/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = "./src/entry_points/gallery_demo.tsx"); /******/ }) /************************************************************************/ /******/ ({ /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": /*!*********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayLikeToArray; });\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithHoles; });\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _arrayWithoutHoles; });\n/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _assertThisInitialized; });\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _classCallCheck; });\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/classCallCheck.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createClass; });\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _defineProperty; });\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/defineProperty.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _extends; });\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/extends.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _getPrototypeOf; });\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": /*!*************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _inherits; });\n/* harmony import */ var _setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf */ \"./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object(_setPrototypeOf__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(subClass, superClass);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/inherits.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _inheritsLoose; });\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArray; });\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": /*!*************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _iterableToArrayLimit; });\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableRest; });\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _nonIterableSpread; });\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": /*!****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutProperties; });\n/* harmony import */ var _objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = Object(_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": /*!*********************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _objectWithoutPropertiesLoose; });\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": /*!******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _possibleConstructorReturn; });\n/* harmony import */ var _helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (Object(_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return Object(_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(self);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _setPrototypeOf; });\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _slicedToArray; });\n/* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js\");\n/* harmony import */ var _unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\n\nfunction _slicedToArray(arr, i) {\n return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArrayLimit__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr, i) || Object(_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr, i) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/slicedToArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toArray.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toArray.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toArray; });\n/* harmony import */ var _arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js\");\n/* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableRest__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js\");\n\n\n\n\nfunction _toArray(arr) {\n return Object(_arrayWithHoles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || Object(_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr) || Object(_nonIterableRest__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/toArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _toConsumableArray; });\n/* harmony import */ var _arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles */ \"./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js\");\n/* harmony import */ var _iterableToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/iterableToArray.js\");\n/* harmony import */ var _unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray */ \"./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js\");\n/* harmony import */ var _nonIterableSpread__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread */ \"./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js\");\n\n\n\n\nfunction _toConsumableArray(arr) {\n return Object(_arrayWithoutHoles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(arr) || Object(_iterableToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(arr) || Object(_unsupportedIterableToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(arr) || Object(_nonIterableSpread__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": /*!***********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _typeof; });\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/typeof.js?"); /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": /*!*******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _unsupportedIterableToArray; });\n/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray */ \"./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(o, minLen);\n}\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Accordion/Accordion.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Accordion/Accordion.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ \"./node_modules/@babel/runtime/helpers/esm/toArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Collapse */ \"./node_modules/@material-ui/core/esm/Collapse/index.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _AccordionContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./AccordionContext */ \"./node_modules/@material-ui/core/esm/Accordion/AccordionContext.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar Accordion = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"forwardRef\"](function Accordion(props, ref) {\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_9__[\"default\"] : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'Accordion',\n state: 'expanded'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = react__WEBPACK_IMPORTED_MODULE_4__[\"useCallback\"](function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_4__[\"Children\"].toArray(childrenProp),\n _React$Children$toArr2 = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_10__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_AccordionContext__WEBPACK_IMPORTED_MODULE_12__[\"default\"].Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\n true ? Accordion.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion.\n */\n children: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.node.isRequired, function (props) {\n var summary = react__WEBPACK_IMPORTED_MODULE_4__[\"Children\"].toArray(props.children)[0];\n\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_5__[\"isFragment\"])(summary)) {\n return new Error(\"Material-UI: The Accordion doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"isValidElement\"](summary)) {\n return new Error('Material-UI: Expected the first child of Accordion to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string,\n\n /**\n * If `true`, expands the accordion by default.\n */\n defaultExpanded: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * If `true`, the accordion will be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * If `true`, expands the accordion, otherwise collapse it.\n * Setting this prop enables control over the accordion.\n */\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the accordion.\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(styles, {\n name: 'MuiAccordion'\n})(Accordion));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Accordion/Accordion.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Accordion/AccordionContext.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Accordion/AccordionContext.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar AccordionContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]({});\n\nif (true) {\n AccordionContext.displayName = 'AccordionContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (AccordionContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Accordion/AccordionContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Accordion/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Accordion/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Accordion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Accordion */ \"./node_modules/@material-ui/core/esm/Accordion/Accordion.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Accordion__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Accordion/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionActions/AccordionActions.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionActions/AccordionActions.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar AccordionActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function AccordionActions(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\n true ? AccordionActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiAccordionActions'\n})(AccordionActions));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionActions/AccordionActions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionActions/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionActions/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _AccordionActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccordionActions */ \"./node_modules/@material-ui/core/esm/AccordionActions/AccordionActions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _AccordionActions__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionActions/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar AccordionDetails = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function AccordionDetails(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other));\n});\n true ? AccordionDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion details.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiAccordionDetails'\n})(AccordionDetails));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionDetails/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionDetails/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _AccordionDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccordionDetails */ \"./node_modules/@material-ui/core/esm/AccordionDetails/AccordionDetails.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _AccordionDetails__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionDetails/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Accordion_AccordionContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Accordion/AccordionContext */ \"./node_modules/@material-ui/core/esm/Accordion/AccordionContext.js\");\n\n\n\n/* eslint-disable jsx-a11y/aria-role */\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar AccordionSummary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function AccordionSummary(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Accordion_AccordionContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_IconButton__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\n true ? AccordionSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the accordion summary.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocusVisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiAccordionSummary'\n})(AccordionSummary));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AccordionSummary/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AccordionSummary/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _AccordionSummary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccordionSummary */ \"./node_modules/@material-ui/core/esm/AccordionSummary/AccordionSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _AccordionSummary__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AccordionSummary/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AppBar/AppBar.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AppBar/AppBar.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n width: '100%',\n boxSizing: 'border-box',\n // Prevent padding issue with the Modal and fixed positioned AppBar.\n zIndex: theme.zIndex.appBar,\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `position=\"fixed\"`. */\n positionFixed: {\n position: 'fixed',\n top: 0,\n left: 'auto',\n right: 0,\n '@media print': {\n // Prevent the app bar to be visible on each printed page.\n position: 'absolute'\n }\n },\n\n /* Styles applied to the root element if `position=\"absolute\"`. */\n positionAbsolute: {\n position: 'absolute',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"sticky\"`. */\n positionSticky: {\n // ⚠️ sticky is not supported by IE 11.\n position: 'sticky',\n top: 0,\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {\n position: 'static'\n },\n\n /* Styles applied to the root element if `position=\"relative\"`. */\n positionRelative: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if `color=\"default\"`. */\n colorDefault: {\n backgroundColor: backgroundColorDefault,\n color: theme.palette.getContrastText(backgroundColorDefault)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"transparent\"`. */\n colorTransparent: {\n backgroundColor: 'transparent',\n color: 'inherit'\n }\n };\n};\nvar AppBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function AppBar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$position = props.position,\n position = _props$position === void 0 ? 'fixed' : _props$position,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"position\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n square: true,\n component: \"header\",\n elevation: 4,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"position\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(position))], classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], className, position === 'fixed' && 'mui-fixed'),\n ref: ref\n }, other));\n});\n true ? AppBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'inherit', 'primary', 'secondary', 'transparent']),\n\n /**\n * The positioning type. The behavior of the different options is described\n * [in the MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).\n * Note: `sticky` is not universally supported and will fall back to `static` when unavailable.\n */\n position: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['absolute', 'fixed', 'relative', 'static', 'sticky'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiAppBar'\n})(AppBar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AppBar/AppBar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/AppBar/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/AppBar/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _AppBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AppBar */ \"./node_modules/@material-ui/core/esm/AppBar/AppBar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _AppBar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/AppBar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Avatar/Avatar.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Avatar/Avatar.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _internal_svg_icons_Person__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/svg-icons/Person */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/Person.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none'\n },\n\n /* Styles applied to the root element if not `src` or `srcSet`. */\n colorDefault: {\n color: theme.palette.background.default,\n backgroundColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `variant=\"circle\"`. */\n circle: {},\n\n /* Styles applied to the root element if `variant=\"rounded\"`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"square\"`. */\n square: {\n borderRadius: 0\n },\n\n /* Styles applied to the img element if either `src` or `srcSet` is defined. */\n img: {\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image. The property isn't supported by IE 11.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n },\n\n /* Styles applied to the fallback icon */\n fallback: {\n width: '75%',\n height: '75%'\n }\n };\n};\n\nfunction useLoaded(_ref) {\n var src = _ref.src,\n srcSet = _ref.srcSet;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n loaded = _React$useState[0],\n setLoaded = _React$useState[1];\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (!src && !srcSet) {\n return undefined;\n }\n\n setLoaded(false);\n var active = true;\n var image = new Image();\n image.src = src;\n image.srcSet = srcSet;\n\n image.onload = function () {\n if (!active) {\n return;\n }\n\n setLoaded('loaded');\n };\n\n image.onerror = function () {\n if (!active) {\n return;\n }\n\n setLoaded('error');\n };\n\n return function () {\n active = false;\n };\n }, [src, srcSet]);\n return loaded;\n}\n\nvar Avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Avatar(props, ref) {\n var alt = props.alt,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n imgProps = props.imgProps,\n sizes = props.sizes,\n src = props.src,\n srcSet = props.srcSet,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'circle' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"alt\", \"children\", \"classes\", \"className\", \"component\", \"imgProps\", \"sizes\", \"src\", \"srcSet\", \"variant\"]);\n\n var children = null; // Use a hook instead of onError on the img element to support server-side rendering.\n\n var loaded = useLoaded({\n src: src,\n srcSet: srcSet\n });\n var hasImg = src || srcSet;\n var hasImgNotFailing = hasImg && loaded !== 'error';\n\n if (hasImgNotFailing) {\n children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"img\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n alt: alt,\n src: src,\n srcSet: srcSet,\n sizes: sizes,\n className: classes.img\n }, imgProps));\n } else if (childrenProp != null) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_Person__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: classes.fallback\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes.system, classes[variant], className, !hasImgNotFailing && classes.colorDefault),\n ref: ref\n }, other), children);\n});\n true ? Avatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Attributes applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The `src` attribute for the `img` element.\n */\n src: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The shape of the avatar.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['circle', 'rounded', 'square'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiAvatar'\n})(Avatar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Avatar/Avatar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Avatar/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Avatar/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Avatar */ \"./node_modules/@material-ui/core/esm/Avatar/Avatar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Avatar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Avatar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Backdrop/Backdrop.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Backdrop/Backdrop.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Fade */ \"./node_modules/@material-ui/core/esm/Fade/index.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n // Improve scrollable dialog support.\n zIndex: -1,\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n },\n\n /* Styles applied to the root element if `invisible={true}`. */\n invisible: {\n backgroundColor: 'transparent'\n }\n};\nvar Backdrop = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Backdrop(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$invisible = props.invisible,\n invisible = _props$invisible === void 0 ? false : _props$invisible,\n open = props.open,\n transitionDuration = props.transitionDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Fade__WEBPACK_IMPORTED_MODULE_6__[\"default\"] : _props$TransitionComp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"invisible\", \"open\", \"transitionDuration\", \"TransitionComponent\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: open,\n timeout: transitionDuration\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, invisible && classes.invisible),\n \"aria-hidden\": true,\n ref: ref\n }, children));\n});\n true ? Backdrop.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n */\n invisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the backdrop is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool.isRequired,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiBackdrop'\n})(Backdrop));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Backdrop/Backdrop.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Backdrop/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Backdrop/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Backdrop */ \"./node_modules/@material-ui/core/esm/Backdrop/Backdrop.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Backdrop__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Backdrop/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Badge/Badge.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Badge/Badge.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar RADIUS_STANDARD = 10;\nvar RADIUS_DOT = 4;\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'inline-flex',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n flexShrink: 0\n },\n\n /* Styles applied to the badge `span` element. */\n badge: {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n justifyContent: 'center',\n alignContent: 'center',\n alignItems: 'center',\n position: 'absolute',\n boxSizing: 'border-box',\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(12),\n minWidth: RADIUS_STANDARD * 2,\n lineHeight: 1,\n padding: '0 6px',\n height: RADIUS_STANDARD * 2,\n borderRadius: RADIUS_STANDARD,\n zIndex: 1,\n // Render the badge on top of potential ripples.\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.enteringScreen\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n backgroundColor: theme.palette.error.main,\n color: theme.palette.error.contrastText\n },\n\n /* Styles applied to the root element if `variant=\"dot\"`. */\n dot: {\n borderRadius: RADIUS_DOT,\n height: RADIUS_DOT * 2,\n minWidth: RADIUS_DOT * 2,\n padding: 0\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginTopRightRectangle: {\n top: 0,\n right: 0,\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"rectangle\"`. */\n anchorOriginBottomRightRectangle: {\n bottom: 0,\n right: 0,\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginTopLeftRectangle: {\n top: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"rectangle\"`. */\n anchorOriginBottomLeftRectangle: {\n bottom: 0,\n left: 0,\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }} overlap=\"circle\"`. */\n anchorOriginTopRightCircle: {\n top: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, -50%)',\n transformOrigin: '100% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }} overlap=\"circle\"`. */\n anchorOriginBottomRightCircle: {\n bottom: '14%',\n right: '14%',\n transform: 'scale(1) translate(50%, 50%)',\n transformOrigin: '100% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(50%, 50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }} overlap=\"circle\"`. */\n anchorOriginTopLeftCircle: {\n top: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, -50%)',\n transformOrigin: '0% 0%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, -50%)'\n }\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }} overlap=\"circle\"`. */\n anchorOriginBottomLeftCircle: {\n bottom: '14%',\n left: '14%',\n transform: 'scale(1) translate(-50%, 50%)',\n transformOrigin: '0% 100%',\n '&$invisible': {\n transform: 'scale(0) translate(-50%, 50%)'\n }\n },\n\n /* Pseudo-class to the badge `span` element if `invisible={true}`. */\n invisible: {\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeInOut,\n duration: theme.transitions.duration.leavingScreen\n })\n }\n };\n};\nvar Badge = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Badge(props, ref) {\n var _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'right'\n } : _props$anchorOrigin,\n badgeContent = props.badgeContent,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n ComponentProp = _props$component === void 0 ? 'span' : _props$component,\n invisibleProp = props.invisible,\n _props$max = props.max,\n max = _props$max === void 0 ? 99 : _props$max,\n _props$overlap = props.overlap,\n overlap = _props$overlap === void 0 ? 'rectangle' : _props$overlap,\n _props$showZero = props.showZero,\n showZero = _props$showZero === void 0 ? false : _props$showZero,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"anchorOrigin\", \"badgeContent\", \"children\", \"classes\", \"className\", \"color\", \"component\", \"invisible\", \"max\", \"overlap\", \"showZero\", \"variant\"]);\n\n var invisible = invisibleProp;\n\n if (invisibleProp == null && (badgeContent === 0 && !showZero || badgeContent == null && variant !== 'dot')) {\n invisible = true;\n }\n\n var displayValue = '';\n\n if (variant !== 'dot') {\n displayValue = badgeContent > max ? \"\".concat(max, \"+\") : badgeContent;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](ComponentProp, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.badge, classes[\"\".concat(anchorOrigin.horizontal).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(anchorOrigin.vertical), \"}\")], classes[\"anchorOrigin\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(anchorOrigin.vertical)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(anchorOrigin.horizontal)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(overlap))], color !== 'default' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], invisible && classes.invisible, variant === 'dot' && classes.dot)\n }, displayValue));\n});\n true ? Badge.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The anchor of the badge.\n */\n anchorOrigin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n horizontal: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['left', 'right']).isRequired,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The content rendered within the badge.\n */\n badgeContent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The badge will be added relative to this node.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'error', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the badge will be invisible.\n */\n invisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Max count to show.\n */\n max: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Wrapped shape the badge should overlap.\n */\n overlap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['circle', 'rectangle']),\n\n /**\n * Controls whether the badge is hidden when `badgeContent` is zero.\n */\n showZero: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dot', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiBadge'\n})(Badge));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Badge/Badge.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Badge/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Badge/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Badge__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Badge */ \"./node_modules/@material-ui/core/esm/Badge/Badge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Badge__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Badge/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/BottomNavigation/BottomNavigation.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/BottomNavigation/BottomNavigation.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n justifyContent: 'center',\n height: 56,\n backgroundColor: theme.palette.background.paper\n }\n };\n};\nvar BottomNavigation = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function BottomNavigation(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n onChange = props.onChange,\n _props$showLabels = props.showLabels,\n showLabels = _props$showLabels === void 0 ? false : _props$showLabels,\n value = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"onChange\", \"showLabels\", \"value\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref\n }, other), react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child, childIndex) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The BottomNavigation component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, {\n selected: childValue === value,\n showLabel: child.props.showLabel !== undefined ? child.props.showLabel : showLabels,\n value: childValue,\n onChange: onChange\n });\n }));\n});\n true ? BottomNavigation.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback.\n * @param {any} value We default to the index of the child.\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, all `BottomNavigationAction`s will show their labels.\n * By default, only the selected `BottomNavigationAction` will show its label.\n */\n showLabels: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The value of the currently selected `BottomNavigationAction`.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiBottomNavigation'\n})(BottomNavigation));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/BottomNavigation/BottomNavigation.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/BottomNavigation/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/BottomNavigation/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _BottomNavigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BottomNavigation */ \"./node_modules/@material-ui/core/esm/BottomNavigation/BottomNavigation.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _BottomNavigation__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/BottomNavigation/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/BottomNavigationAction/BottomNavigationAction.js": /*!*********************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/BottomNavigationAction/BottomNavigationAction.js ***! \*********************************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/unsupportedProp */ \"./node_modules/@material-ui/core/esm/utils/unsupportedProp.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n transition: theme.transitions.create(['color', 'padding-top'], {\n duration: theme.transitions.duration.short\n }),\n padding: '6px 12px 8px',\n minWidth: 80,\n maxWidth: 168,\n color: theme.palette.text.secondary,\n flex: '1',\n '&$iconOnly': {\n paddingTop: 16\n },\n '&$selected': {\n paddingTop: 6,\n color: theme.palette.primary.main\n }\n },\n\n /* Pseudo-class applied to the root element if selected. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `showLabel={false}` and not selected. */\n iconOnly: {},\n\n /* Styles applied to the span element that wraps the icon and label. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n },\n\n /* Styles applied to the label's span element. */\n label: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(12),\n opacity: 1,\n transition: 'font-size 0.2s, opacity 0.2s',\n transitionDelay: '0.1s',\n '&$iconOnly': {\n opacity: 0,\n transitionDelay: '0s'\n },\n '&$selected': {\n fontSize: theme.typography.pxToRem(14)\n }\n }\n };\n};\nvar BottomNavigationAction = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function BottomNavigationAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n icon = props.icon,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n selected = props.selected,\n showLabel = props.showLabel,\n value = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"icon\", \"label\", \"onChange\", \"onClick\", \"selected\", \"showLabel\", \"value\"]);\n\n var handleChange = function handleChange(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, selected ? classes.selected : !showLabel && classes.iconOnly),\n focusRipple: true,\n onClick: handleChange\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.wrapper\n }, icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.label, selected ? classes.selected : !showLabel && classes.iconOnly)\n }, label)));\n});\n true ? BottomNavigationAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The icon element.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The label element.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `BottomNavigationAction` will show its label.\n * By default, only the selected `BottomNavigationAction`\n * inside `BottomNavigation` will show its label.\n */\n showLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiBottomNavigationAction'\n})(BottomNavigationAction));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/BottomNavigationAction/BottomNavigationAction.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/BottomNavigationAction/index.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/BottomNavigationAction/index.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BottomNavigationAction */ \"./node_modules/@material-ui/core/esm/BottomNavigationAction/BottomNavigationAction.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/BottomNavigationAction/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Box/Box.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Box/Box.js ***! \*******************************************************/ /*! exports provided: styleFunction, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styleFunction\", function() { return styleFunction; });\n/* harmony import */ var _material_ui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/system */ \"./node_modules/@material-ui/system/esm/index.js\");\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styles/styled */ \"./node_modules/@material-ui/core/esm/styles/styled.js\");\n\n\nvar styleFunction = Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"css\"])(Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"compose\"])(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"borders\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"display\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"flexbox\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"grid\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"positions\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"palette\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"shadows\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"sizing\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"spacing\"], _material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"typography\"]));\n/**\n * @ignore - do not document.\n */\n\nvar Box = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('div')(styleFunction, {\n name: 'MuiBox'\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Box);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Box/Box.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Box/index.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Box/index.js ***! \*********************************************************/ /*! exports provided: default, styleFunction */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Box */ \"./node_modules/@material-ui/core/esm/Box/Box.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Box__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"styleFunction\", function() { return _Box__WEBPACK_IMPORTED_MODULE_0__[\"styleFunction\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Box/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/svg-icons/MoreHoriz */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/MoreHoriz.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n root: {\n display: 'flex',\n marginLeft: theme.spacing(0.5),\n marginRight: theme.spacing(0.5),\n backgroundColor: theme.palette.grey[100],\n color: theme.palette.grey[700],\n borderRadius: 2,\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: theme.palette.grey[200]\n },\n '&:active': {\n boxShadow: theme.shadows[0],\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_5__[\"emphasize\"])(theme.palette.grey[200], 0.12)\n }\n },\n icon: {\n width: 24,\n height: 16\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction BreadcrumbCollapsed(props) {\n var classes = props.classes,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n component: \"li\",\n className: classes.root,\n focusRipple: true\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_MoreHoriz__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: classes.icon\n }));\n}\n\n true ? BreadcrumbCollapsed.propTypes = {\n /**\n * @ignore\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(styles, {\n name: 'PrivateBreadcrumbCollapsed'\n})(BreadcrumbCollapsed));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./BreadcrumbCollapsed */ \"./node_modules/@material-ui/core/esm/Breadcrumbs/BreadcrumbCollapsed.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the ol element. */\n ol: {\n display: 'flex',\n flexWrap: 'wrap',\n alignItems: 'center',\n padding: 0,\n margin: 0,\n listStyle: 'none'\n },\n\n /* Styles applied to the li element. */\n li: {},\n\n /* Styles applied to the separator element. */\n separator: {\n display: 'flex',\n userSelect: 'none',\n marginLeft: 8,\n marginRight: 8\n }\n};\n\nfunction insertSeparators(items, className, separator) {\n return items.reduce(function (acc, current, index) {\n if (index < items.length - 1) {\n acc = acc.concat(current, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"li\", {\n \"aria-hidden\": true,\n key: \"separator-\".concat(index),\n className: className\n }, separator));\n } else {\n acc.push(current);\n }\n\n return acc;\n }, []);\n}\n\nvar Breadcrumbs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Breadcrumbs(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'nav' : _props$component,\n _props$expandText = props.expandText,\n expandText = _props$expandText === void 0 ? 'Show path' : _props$expandText,\n _props$itemsAfterColl = props.itemsAfterCollapse,\n itemsAfterCollapse = _props$itemsAfterColl === void 0 ? 1 : _props$itemsAfterColl,\n _props$itemsBeforeCol = props.itemsBeforeCollapse,\n itemsBeforeCollapse = _props$itemsBeforeCol === void 0 ? 1 : _props$itemsBeforeCol,\n _props$maxItems = props.maxItems,\n maxItems = _props$maxItems === void 0 ? 8 : _props$maxItems,\n _props$separator = props.separator,\n separator = _props$separator === void 0 ? '/' : _props$separator,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"expandText\", \"itemsAfterCollapse\", \"itemsBeforeCollapse\", \"maxItems\", \"separator\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"](false),\n expanded = _React$useState[0],\n setExpanded = _React$useState[1];\n\n var renderItemsBeforeAndAfter = function renderItemsBeforeAndAfter(allItems) {\n var handleClickExpand = function handleClickExpand(event) {\n setExpanded(true); // The clicked element received the focus but gets removed from the DOM.\n // Let's keep the focus in the component after expanding.\n\n var focusable = event.currentTarget.parentNode.querySelector('a[href],button,[tabindex]');\n\n if (focusable) {\n focusable.focus();\n }\n }; // This defends against someone passing weird input, to ensure that if all\n // items would be shown anyway, we just show all items without the EllipsisItem\n\n\n if (itemsBeforeCollapse + itemsAfterCollapse >= allItems.length) {\n if (true) {\n console.error(['Material-UI: You have provided an invalid combination of props to the Breadcrumbs.', \"itemsAfterCollapse={\".concat(itemsAfterCollapse, \"} + itemsBeforeCollapse={\").concat(itemsBeforeCollapse, \"} >= maxItems={\").concat(maxItems, \"}\")].join('\\n'));\n }\n\n return allItems;\n }\n\n return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(allItems.slice(0, itemsBeforeCollapse)), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_BreadcrumbCollapsed__WEBPACK_IMPORTED_MODULE_9__[\"default\"], {\n \"aria-label\": expandText,\n key: \"ellipsis\",\n onClick: handleClickExpand\n })], Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(allItems.slice(allItems.length - itemsAfterCollapse, allItems.length)));\n };\n\n var allItems = react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].toArray(children).filter(function (child) {\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_4__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Breadcrumbs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](child);\n }).map(function (child, index) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"li\", {\n className: classes.li,\n key: \"child-\".concat(index)\n }, child);\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n component: Component,\n color: \"textSecondary\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.root, className)\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"ol\", {\n className: classes.ol\n }, insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator)));\n});\n true ? Breadcrumbs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The breadcrumb children.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default label for the expand button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n expandText: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * If max items is exceeded, the number of items to show after the ellipsis.\n */\n itemsAfterCollapse: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * If max items is exceeded, the number of items to show before the ellipsis.\n */\n itemsBeforeCollapse: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * Specifies the maximum number of breadcrumbs to display. When there are more\n * than the maximum number, only the first `itemsBeforeCollapse` and last `itemsAfterCollapse`\n * will be shown, with an ellipsis in between.\n */\n maxItems: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * Custom separator node.\n */\n separator: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.node\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiBreadcrumbs'\n})(Breadcrumbs));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Breadcrumbs/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Breadcrumbs/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Breadcrumbs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Breadcrumbs */ \"./node_modules/@material-ui/core/esm/Breadcrumbs/Breadcrumbs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Breadcrumbs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Breadcrumbs/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Button/Button.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Button/Button.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.typography.button, {\n boxSizing: 'border-box',\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.text.primary,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n },\n '&$disabled': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // Ensure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `variant=\"text\"`. */\n text: {\n padding: '6px 8px'\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"primary\"`. */\n textPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"text\"` and `color=\"secondary\"`. */\n textSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n padding: '5px 15px',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabledBackground)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.primary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.primary.main),\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.secondary.main, 0.5)),\n '&:hover': {\n border: \"1px solid \".concat(theme.palette.secondary.main),\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n border: \"1px solid \".concat(theme.palette.action.disabled)\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&:active': {\n boxShadow: theme.shadows[8]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"primary\"`. */\n containedPrimary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"contained\"` and `color=\"secondary\"`. */\n containedSecondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n '&$focusVisible': {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n '&$disabled': {\n boxShadow: 'none'\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit',\n borderColor: 'currentColor'\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"text\"`. */\n textSizeSmall: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"text\"`. */\n textSizeLarge: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"outlined\"`. */\n outlinedSizeSmall: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"outlined\"`. */\n outlinedSizeLarge: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"` and `variant=\"contained\"`. */\n containedSizeSmall: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n },\n\n /* Styles applied to the root element if `size=\"large\"` and `variant=\"contained\"`. */\n containedSizeLarge: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {},\n\n /* Styles applied to the root element if `size=\"large\"`. */\n sizeLarge: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the startIcon element if supplied. */\n startIcon: {\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n '&$iconSizeSmall': {\n marginLeft: -2\n }\n },\n\n /* Styles applied to the endIcon element if supplied. */\n endIcon: {\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n '&$iconSizeSmall': {\n marginRight: -2\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"small\"`. */\n iconSizeSmall: {\n '& > *:first-child': {\n fontSize: 18\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"medium\"`. */\n iconSizeMedium: {\n '& > *:first-child': {\n fontSize: 20\n }\n },\n\n /* Styles applied to the icon element if supplied and `size=\"large\"`. */\n iconSizeLarge: {\n '& > *:first-child': {\n fontSize: 22\n }\n }\n };\n};\nvar Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Button(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n endIconProp = props.endIcon,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n startIconProp = props.startIcon,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'text' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"]);\n\n var startIcon = startIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.startIcon, classes[\"iconSize\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size))])\n }, startIconProp);\n var endIcon = endIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.endIcon, classes[\"iconSize\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size))])\n }, endIconProp);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[variant], className, color === 'inherit' ? classes.colorInherit : color !== 'default' && classes[\"\".concat(variant).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(color))], size !== 'medium' && [classes[\"\".concat(variant, \"Size\").concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size))], classes[\"size\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size))]], disableElevation && classes.disableElevation, disabled && classes.disabled, fullWidth && classes.fullWidth),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.label\n }, startIcon, children, endIcon));\n});\n true ? Button.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['large', 'medium', 'small']),\n\n /**\n * Element placed before the children.\n */\n startIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['contained', 'outlined', 'text'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiButton'\n})(Button));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Button/Button.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Button/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Button/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Button */ \"./node_modules/@material-ui/core/esm/Button/Button.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Button__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Button/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony import */ var _TouchRipple__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./TouchRipple */ \"./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$disabled': {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if keyboard focused. */\n focusVisible: {}\n};\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\n\nvar ButtonBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ButtonBase(props, ref) {\n var action = props.action,\n buttonRefProp = props.buttonRef,\n _props$centerRipple = props.centerRipple,\n centerRipple = _props$centerRipple === void 0 ? false : _props$centerRipple,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$disableTouchRi = props.disableTouchRipple,\n disableTouchRipple = _props$disableTouchRi === void 0 ? false : _props$disableTouchRi,\n _props$focusRipple = props.focusRipple,\n focusRipple = _props$focusRipple === void 0 ? false : _props$focusRipple,\n focusVisibleClassName = props.focusVisibleClassName,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onFocusVisible = props.onFocusVisible,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n onMouseDown = props.onMouseDown,\n onMouseLeave = props.onMouseLeave,\n onMouseUp = props.onMouseUp,\n onTouchEnd = props.onTouchEnd,\n onTouchMove = props.onTouchMove,\n onTouchStart = props.onTouchStart,\n onDragLeave = props.onDragLeave,\n _props$tabIndex = props.tabIndex,\n tabIndex = _props$tabIndex === void 0 ? 0 : _props$tabIndex,\n TouchRippleProps = props.TouchRippleProps,\n _props$type = props.type,\n type = _props$type === void 0 ? 'button' : _props$type,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"action\", \"buttonRef\", \"centerRipple\", \"children\", \"classes\", \"className\", \"component\", \"disabled\", \"disableRipple\", \"disableTouchRipple\", \"focusRipple\", \"focusVisibleClassName\", \"onBlur\", \"onClick\", \"onFocus\", \"onFocusVisible\", \"onKeyDown\", \"onKeyUp\", \"onMouseDown\", \"onMouseLeave\", \"onMouseUp\", \"onTouchEnd\", \"onTouchMove\", \"onTouchStart\", \"onDragLeave\", \"tabIndex\", \"TouchRippleProps\", \"type\"]);\n\n var buttonRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n\n function getButtonNode() {\n // #StrictMode ready\n return react_dom__WEBPACK_IMPORTED_MODULE_4__[\"findDOMNode\"](buttonRef.current);\n }\n\n var rippleRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n\n var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useImperativeHandle\"](action, function () {\n return {\n focusVisible: function focusVisible() {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n };\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (focusVisible && focusRipple && !disableRipple) {\n rippleRef.current.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible]);\n\n function useRippleHandler(rippleAction, eventCallback) {\n var skipRippleAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : disableTouchRipple;\n return Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function (event) {\n if (eventCallback) {\n eventCallback(event);\n }\n\n var ignore = skipRippleAction;\n\n if (!ignore && rippleRef.current) {\n rippleRef.current[rippleAction](event);\n }\n\n return true;\n });\n }\n\n var handleMouseDown = useRippleHandler('start', onMouseDown);\n var handleDragLeave = useRippleHandler('stop', onDragLeave);\n var handleMouseUp = useRippleHandler('stop', onMouseUp);\n var handleMouseLeave = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n event.preventDefault();\n }\n\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n var handleTouchStart = useRippleHandler('start', onTouchStart);\n var handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n var handleTouchMove = useRippleHandler('stop', onTouchMove);\n var handleBlur = useRippleHandler('stop', function (event) {\n if (focusVisible) {\n onBlurVisible(event);\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n var handleFocus = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function (event) {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n\n if (onFocus) {\n onFocus(event);\n }\n });\n\n var isNonNativeButton = function isNonNativeButton() {\n var button = getButtonNode();\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n /**\n * IE 11 shim for https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/repeat\n */\n\n\n var keydownRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n var handleKeyDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function (event) {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === ' ') {\n keydownRef.current = true;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.start(event);\n });\n }\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n\n if (onClick) {\n onClick(event);\n }\n }\n });\n var handleKeyUp = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function (event) {\n // calling preventDefault in keyUp on a will not dispatch a click event if Space is pressed\n // https://codesandbox.io/s/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && rippleRef.current && focusVisible && !event.defaultPrevented) {\n keydownRef.current = false;\n event.persist();\n rippleRef.current.stop(event, function () {\n rippleRef.current.pulsate(event);\n });\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n } // Keyboard accessibility for non interactive elements\n\n\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {\n onClick(event);\n }\n });\n var ComponentProp = component;\n\n if (ComponentProp === 'button' && other.href) {\n ComponentProp = 'a';\n }\n\n var buttonProps = {};\n\n if (ComponentProp === 'button') {\n buttonProps.type = type;\n buttonProps.disabled = disabled;\n } else {\n if (ComponentProp !== 'a' || !other.href) {\n buttonProps.role = 'button';\n }\n\n buttonProps['aria-disabled'] = disabled;\n }\n\n var handleUserRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(buttonRefProp, ref);\n var handleOwnRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(focusVisibleRef, buttonRef);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(handleUserRef, handleOwnRef);\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n mountedState = _React$useState2[0],\n setMountedState = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n setMountedState(true);\n }, []);\n var enableTouchRipple = mountedState && !disableRipple && !disabled;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (enableTouchRipple && !rippleRef.current) {\n console.error(['Material-UI: The `component` prop provided to ButtonBase is invalid.', 'Please make sure the children prop is rendered in this custom component.'].join('\\n'));\n }\n }, [enableTouchRipple]);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](ComponentProp, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className, focusVisible && [classes.focusVisible, focusVisibleClassName], disabled && classes.disabled),\n onBlur: handleBlur,\n onClick: onClick,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex\n }, buttonProps, other), children, enableTouchRipple ?\n /*#__PURE__*/\n\n /* TouchRipple is only needed client-side, x2 boost on the server. */\n react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_TouchRipple__WEBPACK_IMPORTED_MODULE_11__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: rippleRef,\n center: centerRipple\n }, TouchRippleProps)) : null);\n});\n true ? ButtonBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"refType\"],\n\n /**\n * @ignore\n *\n * Use that prop to pass a ref to the native button component.\n * @deprecated Use `ref` instead.\n */\n buttonRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"refType\"],\n\n /**\n * If `true`, the ripples will be centered.\n * They won't start at the cursor interaction position.\n */\n centerRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"elementTypeAcceptingRef\"],\n\n /**\n * If `true`, the base button will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `focusVisibleClassName`.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the touch ripple effect will be disabled.\n */\n disableTouchRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n */\n focusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop can help a person know which element has the keyboard focus.\n * The class name will be applied when the element gain the focus through a keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onDragLeave: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onMouseDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onMouseLeave: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onMouseUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onTouchEnd: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onTouchMove: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onTouchStart: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(styles, {\n name: 'MuiButtonBase'\n})(ButtonBase));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonBase/Ripple.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonBase/Ripple.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n\n\n\n\nvar useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"] : react__WEBPACK_IMPORTED_MODULE_0__[\"useLayoutEffect\"];\n/**\n * @ignore - internal component.\n */\n\nfunction Ripple(props) {\n var classes = props.classes,\n _props$pulsate = props.pulsate,\n pulsate = _props$pulsate === void 0 ? false : _props$pulsate,\n rippleX = props.rippleX,\n rippleY = props.rippleY,\n rippleSize = props.rippleSize,\n inProp = props.in,\n _props$onExited = props.onExited,\n onExited = _props$onExited === void 0 ? function () {} : _props$onExited,\n timeout = props.timeout;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false),\n leaving = _React$useState[0],\n setLeaving = _React$useState[1];\n\n var rippleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n var rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n var childClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n var handleExited = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(onExited); // Ripple is used for user feedback (e.g. click or press) so we want to apply styles with the highest priority\n\n useEnhancedEffect(function () {\n if (!inProp) {\n // react-transition-group#onExit\n setLeaving(true); // react-transition-group#onExited\n\n var timeoutId = setTimeout(handleExited, timeout);\n return function () {\n clearTimeout(timeoutId);\n };\n }\n\n return undefined;\n }, [handleExited, inProp, timeout]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: rippleClassName,\n style: rippleStyles\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: childClassName\n }));\n}\n\n true ? Ripple.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.func,\n\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * Diameter of the ripple.\n */\n rippleSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n /**\n * Vertical position of the ripple center.\n */\n rippleY: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number,\n\n /**\n * exit delay\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.number.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Ripple);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonBase/Ripple.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js ***! \**********************************************************************/ /*! exports provided: DELAY_RIPPLE, styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DELAY_RIPPLE\", function() { return DELAY_RIPPLE; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Ripple__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Ripple */ \"./node_modules/@material-ui/core/esm/ButtonBase/Ripple.js\");\n\n\n\n\n\n\n\n\n\nvar DURATION = 550;\nvar DELAY_RIPPLE = 80;\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n },\n\n /* Styles applied to the internal `Ripple` components `ripple` class. */\n ripple: {\n opacity: 0,\n position: 'absolute'\n },\n\n /* Styles applied to the internal `Ripple` components `rippleVisible` class. */\n rippleVisible: {\n opacity: 0.3,\n transform: 'scale(1)',\n animation: \"$enter \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `ripplePulsate` class. */\n ripplePulsate: {\n animationDuration: \"\".concat(theme.transitions.duration.shorter, \"ms\")\n },\n\n /* Styles applied to the internal `Ripple` components `child` class. */\n child: {\n opacity: 1,\n display: 'block',\n width: '100%',\n height: '100%',\n borderRadius: '50%',\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the internal `Ripple` components `childLeaving` class. */\n childLeaving: {\n opacity: 0,\n animation: \"$exit \".concat(DURATION, \"ms \").concat(theme.transitions.easing.easeInOut)\n },\n\n /* Styles applied to the internal `Ripple` components `childPulsate` class. */\n childPulsate: {\n position: 'absolute',\n left: 0,\n top: 0,\n animation: \"$pulsate 2500ms \".concat(theme.transitions.easing.easeInOut, \" 200ms infinite\")\n },\n '@keyframes enter': {\n '0%': {\n transform: 'scale(0)',\n opacity: 0.1\n },\n '100%': {\n transform: 'scale(1)',\n opacity: 0.3\n }\n },\n '@keyframes exit': {\n '0%': {\n opacity: 1\n },\n '100%': {\n opacity: 0\n }\n },\n '@keyframes pulsate': {\n '0%': {\n transform: 'scale(1)'\n },\n '50%': {\n transform: 'scale(0.92)'\n },\n '100%': {\n transform: 'scale(1)'\n }\n }\n };\n};\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\n\nvar TouchRipple = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function TouchRipple(props, ref) {\n var _props$center = props.center,\n centerProp = _props$center === void 0 ? false : _props$center,\n classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"center\", \"classes\", \"className\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"]([]),\n ripples = _React$useState[0],\n setRipples = _React$useState[1];\n\n var nextKey = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](0);\n var rippleCallback = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]); // Used to filter out mouse emulated events on mobile.\n\n var ignoringMouseDown = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](false); // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n\n var startTimer = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null); // This is the hook called once the previous timeout is ready.\n\n var startTimerCommit = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var container = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n return function () {\n clearTimeout(startTimer.current);\n };\n }, []);\n var startCommit = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function (params) {\n var pulsate = params.pulsate,\n rippleX = params.rippleX,\n rippleY = params.rippleY,\n rippleSize = params.rippleSize,\n cb = params.cb;\n setRipples(function (oldRipples) {\n return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(oldRipples), [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Ripple__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n key: nextKey.current,\n classes: classes,\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n })]);\n });\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n var start = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function () {\n var event = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var cb = arguments.length > 2 ? arguments[2] : undefined;\n var _options$pulsate = options.pulsate,\n pulsate = _options$pulsate === void 0 ? false : _options$pulsate,\n _options$center = options.center,\n center = _options$center === void 0 ? centerProp || options.pulsate : _options$center,\n _options$fakeElement = options.fakeElement,\n fakeElement = _options$fakeElement === void 0 ? false : _options$fakeElement;\n\n if (event.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n\n if (event.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n\n var element = fakeElement ? null : container.current;\n var rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n }; // Get the size of the ripple\n\n var rippleX;\n var rippleY;\n var rippleSize;\n\n if (center || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n var _ref = event.touches ? event.touches[0] : event,\n clientX = _ref.clientX,\n clientY = _ref.clientY;\n\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n\n if (center) {\n rippleSize = Math.sqrt((2 * Math.pow(rect.width, 2) + Math.pow(rect.height, 2)) / 3); // For some reason the animation is broken on Mobile Chrome if the size if even.\n\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n var sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n var sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(Math.pow(sizeX, 2) + Math.pow(sizeY, 2));\n } // Touche devices\n\n\n if (event.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = function () {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }; // Delay the execution of the ripple effect.\n\n\n startTimer.current = setTimeout(function () {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n }, DELAY_RIPPLE); // We have to make a tradeoff with this value.\n }\n } else {\n startCommit({\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize,\n cb: cb\n });\n }\n }, [centerProp, startCommit]);\n var pulsate = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function () {\n start({}, {\n pulsate: true\n });\n }, [start]);\n var stop = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function (event, cb) {\n clearTimeout(startTimer.current); // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n\n if (event.type === 'touchend' && startTimerCommit.current) {\n event.persist();\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.current = setTimeout(function () {\n stop(event, cb);\n });\n return;\n }\n\n startTimerCommit.current = null;\n setRipples(function (oldRipples) {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, []);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useImperativeHandle\"](ref, function () {\n return {\n pulsate: pulsate,\n start: start,\n stop: stop\n };\n }, [pulsate, start, stop]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.root, className),\n ref: container\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react_transition_group__WEBPACK_IMPORTED_MODULE_5__[\"TransitionGroup\"], {\n component: null,\n exit: true\n }, ripples));\n});\n true ? TouchRipple.propTypes = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n flip: false,\n name: 'MuiTouchRipple'\n})( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"memo\"](TouchRipple)));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonBase/TouchRipple.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonBase/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonBase/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/ButtonBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ButtonBase__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonBase/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonGroup/ButtonGroup.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonGroup/ButtonGroup.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Button */ \"./node_modules/@material-ui/core/esm/Button/index.js\");\n\n\n\n\n\n\n\n\n\n // Force a side effect so we don't have any override priority issue.\n// eslint-disable-next-line no-unused-expressions\n\n_Button__WEBPACK_IMPORTED_MODULE_9__[\"default\"].styles;\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"contained\"`. */\n contained: {\n boxShadow: theme.shadows[2]\n },\n\n /* Styles applied to the root element if `disableElevation={true}`. */\n disableElevation: {\n boxShadow: 'none'\n },\n\n /* Pseudo-class applied to child elements if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the children. */\n grouped: {\n minWidth: 40\n },\n\n /* Styles applied to the children if `orientation=\"horizontal\"`. */\n groupedHorizontal: {\n '&:not(:first-child)': {\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0\n }\n },\n\n /* Styles applied to the children if `orientation=\"vertical\"`. */\n groupedVertical: {\n '&:not(:first-child)': {\n borderTopRightRadius: 0,\n borderTopLeftRadius: 0\n },\n '&:not(:last-child)': {\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"`. */\n groupedText: {},\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"horizontal\"`. */\n groupedTextHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `orientation=\"vertical\"`. */\n groupedTextVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"primary\"`. */\n groupedTextPrimary: {\n '&:not(:last-child)': {\n borderColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"text\"` and `color=\"secondary\"`. */\n groupedTextSecondary: {\n '&:not(:last-child)': {\n borderColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, 0.5)\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"`. */\n groupedOutlined: {},\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"horizontal\"`. */\n groupedOutlinedHorizontal: {\n '&:not(:first-child)': {\n marginLeft: -1\n },\n '&:not(:last-child)': {\n borderRightColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `orientation=\"vertical\"`. */\n groupedOutlinedVertical: {\n '&:not(:first-child)': {\n marginTop: -1\n },\n '&:not(:last-child)': {\n borderBottomColor: 'transparent'\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"primary\"`. */\n groupedOutlinedPrimary: {\n '&:hover': {\n borderColor: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"outlined\"` and `color=\"secondary\"`. */\n groupedOutlinedSecondary: {\n '&:hover': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"`. */\n groupedContained: {\n boxShadow: 'none'\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"horizontal\"`. */\n groupedContainedHorizontal: {\n '&:not(:last-child)': {\n borderRight: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderRight: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `orientation=\"vertical\"`. */\n groupedContainedVertical: {\n '&:not(:last-child)': {\n borderBottom: \"1px solid \".concat(theme.palette.grey[400]),\n '&$disabled': {\n borderBottom: \"1px solid \".concat(theme.palette.action.disabled)\n }\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"primary\"`. */\n groupedContainedPrimary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.primary.dark\n }\n },\n\n /* Styles applied to the children if `variant=\"contained\"` and `color=\"secondary\"`. */\n groupedContainedSecondary: {\n '&:not(:last-child)': {\n borderColor: theme.palette.secondary.dark\n }\n }\n };\n};\nvar ButtonGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ButtonGroup(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableElevati = props.disableElevation,\n disableElevation = _props$disableElevati === void 0 ? false : _props$disableElevati,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$disableRipple = props.disableRipple,\n disableRipple = _props$disableRipple === void 0 ? false : _props$disableRipple,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'outlined' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"disableRipple\", \"fullWidth\", \"orientation\", \"size\", \"variant\"]);\n\n var buttonClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.grouped, classes[\"grouped\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(orientation))], classes[\"grouped\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(variant))], classes[\"grouped\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(variant)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(orientation))], classes[\"grouped\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(variant)).concat(color !== 'default' ? Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color) : '')], disabled && classes.disabled);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"group\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className, fullWidth && classes.fullWidth, disableElevation && classes.disableElevation, variant === 'contained' && classes.contained, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other), react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The ButtonGroup component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(buttonClassName, child.props.className),\n color: child.props.color || color,\n disabled: child.props.disabled || disabled,\n disableElevation: child.props.disableElevation || disableElevation,\n disableFocusRipple: disableFocusRipple,\n disableRipple: disableRipple,\n fullWidth: fullWidth,\n size: child.props.size || size,\n variant: child.props.variant || variant\n });\n }));\n});\n true ? ButtonGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button group.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the buttons will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the button keyboard focus ripple will be disabled.\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the button ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the buttons will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The group orientation (layout flow direction).\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['horizontal', 'vertical']),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['contained', 'outlined', 'text'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiButtonGroup'\n})(ButtonGroup));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonGroup/ButtonGroup.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ButtonGroup/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ButtonGroup/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ButtonGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ButtonGroup */ \"./node_modules/@material-ui/core/esm/ButtonGroup/ButtonGroup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ButtonGroup__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ButtonGroup/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Card/Card.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Card/Card.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden'\n }\n};\nvar Card = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Card(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$raised = props.raised,\n raised = _props$raised === void 0 ? false : _props$raised,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"raised\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n elevation: raised ? 8 : 1,\n ref: ref\n }, other));\n});\n true ? Card.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the card will use raised styling.\n */\n raised: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiCard'\n})(Card));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Card/Card.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Card/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Card/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ \"./node_modules/@material-ui/core/esm/Card/Card.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Card__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Card/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardActionArea/CardActionArea.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardActionArea/CardActionArea.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n textAlign: 'inherit',\n width: '100%',\n '&:hover $focusHighlight': {\n opacity: theme.palette.action.hoverOpacity\n },\n '&$focusVisible $focusHighlight': {\n opacity: 0.12\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the action area is keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the overlay that covers the action area when it is keyboard focused. */\n focusHighlight: {\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit',\n opacity: 0,\n backgroundColor: 'currentcolor',\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.short\n })\n }\n };\n};\nvar CardActionArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CardActionArea(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n focusVisibleClassName = props.focusVisibleClassName,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"focusVisibleClassName\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(focusVisibleClassName, classes.focusVisible),\n ref: ref\n }, other), children, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.focusHighlight\n }));\n});\n true ? CardActionArea.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiCardActionArea'\n})(CardActionArea));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardActionArea/CardActionArea.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardActionArea/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardActionArea/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CardActionArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CardActionArea */ \"./node_modules/@material-ui/core/esm/CardActionArea/CardActionArea.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CardActionArea__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardActionArea/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardActions/CardActions.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardActions/CardActions.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar CardActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CardActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\n true ? CardActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiCardActions'\n})(CardActions));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardActions/CardActions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardActions/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardActions/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CardActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CardActions */ \"./node_modules/@material-ui/core/esm/CardActions/CardActions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CardActions__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardActions/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardContent/CardContent.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardContent/CardContent.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n padding: 16,\n '&:last-child': {\n paddingBottom: 24\n }\n }\n};\nvar CardContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CardContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other));\n});\n true ? CardContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiCardContent'\n})(CardContent));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardContent/CardContent.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardContent/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardContent/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CardContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CardContent */ \"./node_modules/@material-ui/core/esm/CardContent/CardContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CardContent__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardContent/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardHeader/CardHeader.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardHeader/CardHeader.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 16\n },\n\n /* Styles applied to the avatar element. */\n avatar: {\n flex: '0 0 auto',\n marginRight: 16\n },\n\n /* Styles applied to the action element. */\n action: {\n flex: '0 0 auto',\n alignSelf: 'flex-start',\n marginTop: -8,\n marginRight: -8\n },\n\n /* Styles applied to the content wrapper element. */\n content: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the title Typography element. */\n title: {},\n\n /* Styles applied to the subheader Typography element. */\n subheader: {}\n};\nvar CardHeader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CardHeader(props, ref) {\n var action = props.action,\n avatar = props.avatar,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n subheaderProp = props.subheader,\n subheaderTypographyProps = props.subheaderTypographyProps,\n titleProp = props.title,\n titleTypographyProps = props.titleTypographyProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"action\", \"avatar\", \"classes\", \"className\", \"component\", \"disableTypography\", \"subheader\", \"subheaderTypographyProps\", \"title\", \"titleTypographyProps\"]);\n\n var title = titleProp;\n\n if (title != null && title.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && !disableTypography) {\n title = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n variant: avatar ? 'body2' : 'h5',\n className: classes.title,\n component: \"span\",\n display: \"block\"\n }, titleTypographyProps), title);\n }\n\n var subheader = subheaderProp;\n\n if (subheader != null && subheader.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && !disableTypography) {\n subheader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n variant: avatar ? 'body2' : 'body1',\n className: classes.subheader,\n color: \"textSecondary\",\n component: \"span\",\n display: \"block\"\n }, subheaderTypographyProps), subheader);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other), avatar && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.avatar\n }, avatar), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.content\n }, title, subheader), action && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.action\n }, action));\n});\n true ? CardHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display in the card header.\n */\n action: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The Avatar for the Card Header.\n */\n avatar: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, `subheader` and `title` won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `title` text, and optional `subheader` text\n * with the Typography component.\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n subheader: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the subheader\n * (as long as disableTypography is not `true`).\n */\n subheaderTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The content of the Card Title.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the title\n * (as long as disableTypography is not `true`).\n */\n titleTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiCardHeader'\n})(CardHeader));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardHeader/CardHeader.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardHeader/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardHeader/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CardHeader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CardHeader */ \"./node_modules/@material-ui/core/esm/CardHeader/CardHeader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CardHeader__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardHeader/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardMedia/CardMedia.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardMedia/CardMedia.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n backgroundSize: 'cover',\n backgroundRepeat: 'no-repeat',\n backgroundPosition: 'center'\n },\n\n /* Styles applied to the root element if `component=\"video, audio, picture, iframe, or img\"`. */\n media: {\n width: '100%'\n },\n\n /* Styles applied to the root element if `component=\"picture or img\"`. */\n img: {\n // ⚠️ object-fit is not supported by IE 11.\n objectFit: 'cover'\n }\n};\nvar MEDIA_COMPONENTS = ['video', 'audio', 'picture', 'iframe', 'img'];\nvar CardMedia = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CardMedia(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n image = props.image,\n src = props.src,\n style = props.style,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"image\", \"src\", \"style\"]);\n\n var isMediaComponent = MEDIA_COMPONENTS.indexOf(Component) !== -1;\n var composedStyle = !isMediaComponent && image ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n backgroundImage: \"url(\\\"\".concat(image, \"\\\")\")\n }, style) : style;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, isMediaComponent && classes.media, \"picture img\".indexOf(Component) !== -1 && classes.img),\n ref: ref,\n style: composedStyle,\n src: isMediaComponent ? image || src : undefined\n }, other), children);\n});\n true ? CardMedia.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, function (props) {\n if (!props.children && !props.image && !props.src && !props.component) {\n return new Error('Material-UI: Either `children`, `image`, `src` or `component` prop must be specified.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Image to be displayed as a background image.\n * Either `image` or `src` prop must be specified.\n * Note that caller must specify height otherwise the image will not be visible.\n */\n image: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * An alias for `image` property.\n * Available only with media components.\n * Media components: `video`, `audio`, `picture`, `iframe`, `img`.\n */\n src: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiCardMedia'\n})(CardMedia));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardMedia/CardMedia.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CardMedia/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CardMedia/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CardMedia__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CardMedia */ \"./node_modules/@material-ui/core/esm/CardMedia/CardMedia.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CardMedia__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CardMedia/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Checkbox/Checkbox.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Checkbox/Checkbox.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/SwitchBase */ \"./node_modules/@material-ui/core/esm/internal/SwitchBase.js\");\n/* harmony import */ var _internal_svg_icons_CheckBoxOutlineBlank__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../internal/svg-icons/CheckBoxOutlineBlank */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js\");\n/* harmony import */ var _internal_svg_icons_CheckBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../internal/svg-icons/CheckBox */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _internal_svg_icons_IndeterminateCheckBox__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../internal/svg-icons/IndeterminateCheckBox */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `indeterminate={true}`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_CheckBox__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null);\nvar defaultIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_CheckBoxOutlineBlank__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null);\nvar defaultIndeterminateIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_IndeterminateCheckBox__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\nvar Checkbox = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Checkbox(props, ref) {\n var _props$checkedIcon = props.checkedIcon,\n checkedIcon = _props$checkedIcon === void 0 ? defaultCheckedIcon : _props$checkedIcon,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$icon = props.icon,\n iconProp = _props$icon === void 0 ? defaultIcon : _props$icon,\n _props$indeterminate = props.indeterminate,\n indeterminate = _props$indeterminate === void 0 ? false : _props$indeterminate,\n _props$indeterminateI = props.indeterminateIcon,\n indeterminateIconProp = _props$indeterminateI === void 0 ? defaultIndeterminateIcon : _props$indeterminateI,\n inputProps = props.inputProps,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"checkedIcon\", \"classes\", \"color\", \"icon\", \"indeterminate\", \"indeterminateIcon\", \"inputProps\", \"size\"]);\n\n var icon = indeterminate ? indeterminateIconProp : iconProp;\n var indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"checkbox\",\n classes: {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(color))], indeterminate && classes.indeterminate),\n checked: classes.checked,\n disabled: classes.disabled\n },\n color: color,\n inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n 'data-indeterminate': indeterminate\n }, inputProps),\n icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](icon, {\n fontSize: icon.props.fontSize === undefined && size === \"small\" ? size : icon.props.fontSize\n }),\n checkedIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](indeterminateIcon, {\n fontSize: indeterminateIcon.props.fontSize === undefined && size === \"small\" ? size : indeterminateIcon.props.fontSize\n }),\n ref: ref\n }, other));\n});\n true ? Checkbox.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the checkbox will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the component appears indeterminate.\n * This does not set the native input element to indeterminate due\n * to inconsistent behavior across browsers.\n * However, we set a `data-indeterminate` attribute on the input.\n */\n indeterminate: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is indeterminate.\n */\n indeterminateIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The size of the checkbox.\n * `small` is equivalent to the dense checkbox styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(styles, {\n name: 'MuiCheckbox'\n})(Checkbox));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Checkbox/Checkbox.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Checkbox/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Checkbox/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Checkbox */ \"./node_modules/@material-ui/core/esm/Checkbox/Checkbox.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Checkbox__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Checkbox/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Chip/Chip.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Chip/Chip.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _internal_svg_icons_Cancel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/svg-icons/Cancel */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/unsupportedProp */ \"./node_modules/@material-ui/core/esm/utils/unsupportedProp.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var backgroundColor = theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700];\n var deleteIconColor = Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.text.primary, 0.26);\n return {\n /* Styles applied to the root element. */\n root: {\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // label will inherit this from root, then `clickable` class overrides this for both\n cursor: 'default',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 'none',\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n '&$disabled': {\n opacity: 0.5,\n pointerEvents: 'none'\n },\n '& $avatar': {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n fontSize: theme.typography.pxToRem(12)\n },\n '& $avatarColorPrimary': {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.dark\n },\n '& $avatarColorSecondary': {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.dark\n },\n '& $avatarSmall': {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n height: 24\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n backgroundColor: theme.palette.primary.main,\n color: theme.palette.primary.contrastText\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main,\n color: theme.palette.secondary.contrastText\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `onClick` is defined or `clickable={true}`. */\n clickable: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover, &:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(backgroundColor, 0.08)\n },\n '&:active': {\n boxShadow: theme.shadows[1]\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"primary\"` is defined or `clickable={true}`. */\n clickableColorPrimary: {\n '&:hover, &:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(theme.palette.primary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onClick` and `color=\"secondary\"` is defined or `clickable={true}`. */\n clickableColorSecondary: {\n '&:hover, &:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(theme.palette.secondary.main, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` is defined. */\n deletable: {\n '&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(backgroundColor, 0.08)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"primary\"` is defined. */\n deletableColorPrimary: {\n '&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(theme.palette.primary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `onDelete` and `color=\"secondary\"` is defined. */\n deletableColorSecondary: {\n '&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"emphasize\"])(theme.palette.secondary.main, 0.2)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n backgroundColor: 'transparent',\n border: \"1px solid \".concat(theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n },\n '& $avatar': {\n marginLeft: 4\n },\n '& $avatarSmall': {\n marginLeft: 2\n },\n '& $icon': {\n marginLeft: 4\n },\n '& $iconSmall': {\n marginLeft: 2\n },\n '& $deleteIcon': {\n marginRight: 5\n },\n '& $deleteIconSmall': {\n marginRight: 3\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"primary\"`. */\n outlinedPrimary: {\n color: theme.palette.primary.main,\n border: \"1px solid \".concat(theme.palette.primary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"` and `color=\"secondary\"`. */\n outlinedSecondary: {\n color: theme.palette.secondary.main,\n border: \"1px solid \".concat(theme.palette.secondary.main),\n '$clickable&:hover, $clickable&:focus, $deletable&:focus': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity)\n }\n },\n // TODO v5: remove\n\n /* Styles applied to the `avatar` element. */\n avatar: {},\n\n /* Styles applied to the `avatar` element if `size=\"small\"`. */\n avatarSmall: {},\n\n /* Styles applied to the `avatar` element if `color=\"primary\"`. */\n avatarColorPrimary: {},\n\n /* Styles applied to the `avatar` element if `color=\"secondary\"`. */\n avatarColorSecondary: {},\n\n /* Styles applied to the `icon` element. */\n icon: {\n color: theme.palette.type === 'light' ? theme.palette.grey[700] : theme.palette.grey[300],\n marginLeft: 5,\n marginRight: -6\n },\n\n /* Styles applied to the `icon` element if `size=\"small\"`. */\n iconSmall: {\n width: 18,\n height: 18,\n marginLeft: 4,\n marginRight: -4\n },\n\n /* Styles applied to the `icon` element if `color=\"primary\"`. */\n iconColorPrimary: {\n color: 'inherit'\n },\n\n /* Styles applied to the `icon` element if `color=\"secondary\"`. */\n iconColorSecondary: {\n color: 'inherit'\n },\n\n /* Styles applied to the label `span` element. */\n label: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the label `span` element if `size=\"small\"`. */\n labelSmall: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the `deleteIcon` element. */\n deleteIcon: {\n WebkitTapHighlightColor: 'transparent',\n color: deleteIconColor,\n height: 22,\n width: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(deleteIconColor, 0.4)\n }\n },\n\n /* Styles applied to the `deleteIcon` element if `size=\"small\"`. */\n deleteIconSmall: {\n height: 16,\n width: 16,\n marginRight: 4,\n marginLeft: -4\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"default\"`. */\n deleteIconColorPrimary: {\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"default\"`. */\n deleteIconColorSecondary: {\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.contrastText, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.contrastText\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"primary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorPrimary: {\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.primary.main\n }\n },\n\n /* Styles applied to the deleteIcon element if `color=\"secondary\"` and `variant=\"outlined\"`. */\n deleteIconOutlinedColorSecondary: {\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, 0.7),\n '&:hover, &:active': {\n color: theme.palette.secondary.main\n }\n }\n };\n};\n\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\n\n\nvar Chip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Chip(props, ref) {\n var avatarProp = props.avatar,\n classes = props.classes,\n className = props.className,\n clickableProp = props.clickable,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n ComponentProp = props.component,\n deleteIconProp = props.deleteIcon,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n iconProp = props.icon,\n label = props.label,\n onClick = props.onClick,\n onDelete = props.onDelete,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'default' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"avatar\", \"classes\", \"className\", \"clickable\", \"color\", \"component\", \"deleteIcon\", \"disabled\", \"icon\", \"label\", \"onClick\", \"onDelete\", \"onKeyDown\", \"onKeyUp\", \"size\", \"variant\"]);\n\n var chipRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(chipRef, ref);\n\n var handleDeleteIconClick = function handleDeleteIconClick(event) {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n\n if (onDelete) {\n onDelete(event);\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleKeyUp = function handleKeyUp(event) {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n } else if (event.key === 'Escape' && chipRef.current) {\n chipRef.current.blur();\n }\n }\n\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n\n var clickable = clickableProp !== false && onClick ? true : clickableProp;\n var small = size === 'small';\n var Component = ComponentProp || (clickable ? _ButtonBase__WEBPACK_IMPORTED_MODULE_11__[\"default\"] : 'div');\n var moreProps = Component === _ButtonBase__WEBPACK_IMPORTED_MODULE_11__[\"default\"] ? {\n component: 'div'\n } : {};\n var deleteIcon = null;\n\n if (onDelete) {\n var customClasses = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(color !== 'default' && (variant === \"default\" ? classes[\"deleteIconColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))] : classes[\"deleteIconOutlinedColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))]), small && classes.deleteIconSmall);\n deleteIcon = deleteIconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](deleteIconProp) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](deleteIconProp, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(deleteIconProp.props.className, classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n }) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_Cancel__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.deleteIcon, customClasses),\n onClick: handleDeleteIconClick\n });\n }\n\n var avatar = null;\n\n if (avatarProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](avatarProp)) {\n avatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](avatarProp, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.avatar, avatarProp.props.className, small && classes.avatarSmall, color !== 'default' && classes[\"avatarColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))])\n });\n }\n\n var icon = null;\n\n if (iconProp && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](iconProp)) {\n icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](iconProp, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.icon, iconProp.props.className, small && classes.iconSmall, color !== 'default' && classes[\"iconColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))])\n });\n }\n\n if (true) {\n if (avatar && icon) {\n console.error('Material-UI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: clickable || onDelete ? 'button' : undefined,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, color !== 'default' && [classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))], clickable && classes[\"clickableColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))], onDelete && classes[\"deletableColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(color))]], variant !== \"default\" && [classes.outlined, {\n 'primary': classes.outlinedPrimary,\n 'secondary': classes.outlinedSecondary\n }[color]], disabled && classes.disabled, small && classes.sizeSmall, clickable && classes.clickable, onDelete && classes.deletable),\n \"aria-disabled\": disabled ? true : undefined,\n tabIndex: clickable || onDelete ? 0 : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef\n }, moreProps, other), avatar || icon, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.label, small && classes.labelSmall)\n }, label), deleteIcon);\n});\n true ? Chip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Avatar element.\n */\n avatar: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If false, the chip will not be clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n */\n clickable: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * If `true`, the chip should be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Icon element.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * The content of the label.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback function fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onKeyUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The size of the chip.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'outlined'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiChip'\n})(Chip));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Chip/Chip.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Chip/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Chip/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Chip */ \"./node_modules/@material-ui/core/esm/Chip/Chip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Chip__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Chip/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\nvar SIZE = 44;\n\nfunction getRelativeValue(value, min, max) {\n return (Math.min(Math.max(min, value), max) - min) / (max - min);\n}\n\nfunction easeOut(t) {\n t = getRelativeValue(t, 0, 1); // https://gist.github.com/gre/1650294\n\n t = (t -= 1) * t * t + 1;\n return t;\n}\n\nfunction easeIn(t) {\n return t * t;\n}\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-block'\n },\n\n /* Styles applied to the root element if `variant=\"static\"`. */\n static: {\n transition: theme.transitions.create('transform')\n },\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {\n animation: '$circular-rotate 1.4s linear infinite'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the `svg` element. */\n svg: {\n display: 'block' // Keeps the progress centered\n\n },\n\n /* Styles applied to the `circle` svg path. */\n circle: {\n stroke: 'currentColor' // Use butt to follow the specification, by chance, it's already the default CSS value.\n // strokeLinecap: 'butt',\n\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"static\"`. */\n circleStatic: {\n transition: theme.transitions.create('stroke-dashoffset')\n },\n\n /* Styles applied to the `circle` svg path if `variant=\"indeterminate\"`. */\n circleIndeterminate: {\n animation: '$circular-dash 1.4s ease-in-out infinite',\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: '0px' // Add the unit to fix a Edge 16 and below bug.\n\n },\n '@keyframes circular-rotate': {\n '0%': {\n // Fix IE 11 wobbly\n transformOrigin: '50% 50%'\n },\n '100%': {\n transform: 'rotate(360deg)'\n }\n },\n '@keyframes circular-dash': {\n '0%': {\n strokeDasharray: '1px, 200px',\n strokeDashoffset: '0px'\n },\n '50%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-15px'\n },\n '100%': {\n strokeDasharray: '100px, 200px',\n strokeDashoffset: '-125px'\n }\n },\n\n /* Styles applied to the `circle` svg path if `disableShrink={true}`. */\n circleDisableShrink: {\n animation: 'none'\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar CircularProgress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function CircularProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$disableShrink = props.disableShrink,\n disableShrink = _props$disableShrink === void 0 ? false : _props$disableShrink,\n _props$size = props.size,\n size = _props$size === void 0 ? 40 : _props$size,\n style = props.style,\n _props$thickness = props.thickness,\n thickness = _props$thickness === void 0 ? 3.6 : _props$thickness,\n _props$value = props.value,\n value = _props$value === void 0 ? 0 : _props$value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"disableShrink\", \"size\", \"style\", \"thickness\", \"value\", \"variant\"]);\n\n var circleStyle = {};\n var rootStyle = {};\n var rootProps = {};\n\n if (variant === 'determinate' || variant === 'static') {\n var circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n\n if (variant === 'static') {\n circleStyle.strokeDashoffset = \"\".concat(((100 - value) / 100 * circumference).toFixed(3), \"px\");\n rootStyle.transform = 'rotate(-90deg)';\n } else {\n circleStyle.strokeDashoffset = \"\".concat((easeIn((100 - value) / 100) * circumference).toFixed(3), \"px\");\n rootStyle.transform = \"rotate(\".concat((easeOut(value / 70) * 270).toFixed(3), \"deg)\");\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, color !== 'inherit' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(color))], {\n 'indeterminate': classes.indeterminate,\n 'static': classes.static\n }[variant]),\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n width: size,\n height: size\n }, rootStyle, style),\n ref: ref,\n role: \"progressbar\"\n }, rootProps, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"svg\", {\n className: classes.svg,\n viewBox: \"\".concat(SIZE / 2, \" \").concat(SIZE / 2, \" \").concat(SIZE, \" \").concat(SIZE)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"circle\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.circle, disableShrink && classes.circleDisableShrink, {\n 'indeterminate': classes.circleIndeterminate,\n 'static': classes.circleStatic\n }[variant]),\n style: circleStyle,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })));\n});\n true ? CircularProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n */\n disableShrink: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool, function (props) {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('Material-UI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n\n return null;\n }),\n\n /**\n * The size of the circle.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, e.g '3rem'.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The thickness of the circle.\n */\n thickness: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The value of the progress indicator for the determinate and static variants.\n * Value between 0 and 100.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['determinate', 'indeterminate', 'static'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiCircularProgress',\n flip: false\n})(CircularProgress));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CircularProgress/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CircularProgress/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CircularProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CircularProgress */ \"./node_modules/@material-ui/core/esm/CircularProgress/CircularProgress.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CircularProgress__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CircularProgress/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js": /*!***********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js ***! \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n\n\n\n\n\n\nfunction mapEventPropToEvent(eventProp) {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event) {\n return document.documentElement.clientWidth < event.clientX || document.documentElement.clientHeight < event.clientY;\n}\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\n\n\nfunction ClickAwayListener(props) {\n var children = props.children,\n _props$disableReactTr = props.disableReactTree,\n disableReactTree = _props$disableReactTr === void 0 ? false : _props$disableReactTr,\n _props$mouseEvent = props.mouseEvent,\n mouseEvent = _props$mouseEvent === void 0 ? 'onClick' : _props$mouseEvent,\n onClickAway = props.onClickAway,\n _props$touchEvent = props.touchEvent,\n touchEvent = _props$touchEvent === void 0 ? 'onTouchEnd' : _props$touchEvent;\n var movedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var mountedRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n var syntheticEventRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](false);\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n mountedRef.current = true;\n return function () {\n mountedRef.current = false;\n };\n }, []); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n nodeRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef); // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n\n var handleClickAway = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function (event) {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n var insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false; // 1. IE 11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n\n if (!mountedRef.current || !nodeRef.current || clickedRootScrollbar(event)) {\n return;\n } // Do not act if user performed touchmove\n\n\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n var insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n // TODO v6 remove dead logic https://caniuse.com/#search=composedPath.\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n }); // Keep track of mouse/touch events that bubbled up through the portal.\n\n var createHandleSynthetic = function createHandleSynthetic(handlerName) {\n return function (event) {\n syntheticEventRef.current = true;\n var childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n };\n\n var childrenProps = {\n ref: handleRef\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (touchEvent !== false) {\n var mappedTouchEvent = mapEventPropToEvent(touchEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n\n var handleTouchMove = function handleTouchMove() {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return function () {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (mouseEvent !== false) {\n var mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(nodeRef.current);\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n return function () {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, childrenProps));\n}\n\n true ? ClickAwayListener.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The wrapped element.\n */\n children: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"elementAcceptingRef\"].isRequired,\n\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['onClick', 'onMouseDown', 'onMouseUp', false]),\n\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['onTouchEnd', 'onTouchStart', false])\n} : undefined;\n\nif (true) {\n // eslint-disable-next-line\n ClickAwayListener['propTypes' + ''] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"exactProp\"])(ClickAwayListener.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ClickAwayListener);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ClickAwayListener/index.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ClickAwayListener/index.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ClickAwayListener */ \"./node_modules/@material-ui/core/esm/ClickAwayListener/ClickAwayListener.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ClickAwayListener__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ClickAwayListener/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Collapse/Collapse.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Collapse/Collapse.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils */ \"./node_modules/@material-ui/core/esm/utils/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the container element. */\n container: {\n height: 0,\n overflow: 'hidden',\n transition: theme.transitions.create('height')\n },\n\n /* Styles applied to the container element when the transition has entered. */\n entered: {\n height: 'auto',\n overflow: 'visible'\n },\n\n /* Styles applied to the container element when the transition has exited and `collapsedHeight` != 0px. */\n hidden: {\n visibility: 'hidden'\n },\n\n /* Styles applied to the outer wrapper element. */\n wrapper: {\n // Hack to get children with a negative margin to not falsify the height computation.\n display: 'flex'\n },\n\n /* Styles applied to the inner wrapper element. */\n wrapperInner: {\n width: '100%'\n }\n };\n};\n/**\n * The Collapse transition is used by the\n * [Vertical Stepper](/components/steppers/#vertical-stepper) StepContent component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Collapse = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Collapse(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$collapsedHeigh = props.collapsedHeight,\n collapsedHeightProp = _props$collapsedHeigh === void 0 ? '0px' : _props$collapsedHeigh,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? _styles_transitions__WEBPACK_IMPORTED_MODULE_8__[\"duration\"].standard : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_6__[\"Transition\"] : _props$TransitionComp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"collapsedHeight\", \"component\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_10__[\"default\"])();\n var timer = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n var wrapperRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var autoTransitionDuration = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n var collapsedHeight = typeof collapsedHeightProp === 'number' ? \"\".concat(collapsedHeightProp, \"px\") : collapsedHeightProp;\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var handleRef = Object(_utils__WEBPACK_IMPORTED_MODULE_11__[\"useForkRef\"])(ref, enableStrictModeCompat ? nodeRef : undefined);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = collapsedHeight;\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntering = normalizedTransitionCallback(function (node, isAppearing) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_9__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(function (node, isAppearing) {\n node.style.height = 'auto';\n\n if (onEntered) {\n onEntered(node, isAppearing);\n }\n });\n var handleExit = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n node.style.height = \"\".concat(wrapperHeight, \"px\");\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n var handleExiting = normalizedTransitionCallback(function (node) {\n var wrapperHeight = wrapperRef.current ? wrapperRef.current.clientHeight : 0;\n\n var _getTransitionProps2 = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_9__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration;\n\n if (timeout === 'auto') {\n var duration2 = theme.transitions.getAutoHeightDuration(wrapperHeight);\n node.style.transitionDuration = \"\".concat(duration2, \"ms\");\n autoTransitionDuration.current = duration2;\n } else {\n node.style.transitionDuration = typeof transitionDuration === 'string' ? transitionDuration : \"\".concat(transitionDuration, \"ms\");\n }\n\n node.style.height = collapsedHeight;\n\n if (onExiting) {\n onExiting(node);\n }\n });\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTransitionDuration.current || 0);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: inProp,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.container, className, {\n 'entered': classes.entered,\n 'exited': !inProp && collapsedHeight === '0px' && classes.hidden\n }[state]),\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n minHeight: collapsedHeight\n }, style),\n ref: handleRef\n }, childProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.wrapper,\n ref: wrapperRef\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.wrapperInner\n }, children)));\n });\n});\n true ? Collapse.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content node to be collapsed.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * The height of the container when collapsed.\n */\n collapsedHeight: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the passed `Component`.\n */\n disableStrictModeCompat: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n\n /**\n * @ignore\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['auto']), prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number\n })])\n} : undefined;\nCollapse.muiSupportAuto = true;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiCollapse'\n})(Collapse));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Collapse/Collapse.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Collapse/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Collapse/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Collapse */ \"./node_modules/@material-ui/core/esm/Collapse/Collapse.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Collapse__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Collapse/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Container/Container.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Container/Container.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n display: 'block'\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `disableGutters={true}`. */\n disableGutters: {\n paddingLeft: 0,\n paddingRight: 0\n },\n\n /* Styles applied to the root element if `fixed={true}`. */\n fixed: Object.keys(theme.breakpoints.values).reduce(function (acc, breakpoint) {\n var value = theme.breakpoints.values[breakpoint];\n\n if (value !== 0) {\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: value\n };\n }\n\n return acc;\n }, {}),\n\n /* Styles applied to the root element if `maxWidth=\"xs\"`. */\n maxWidthXs: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.up('xs'), {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }),\n\n /* Styles applied to the root element if `maxWidth=\"sm\"`. */\n maxWidthSm: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.up('sm'), {\n maxWidth: theme.breakpoints.values.sm\n }),\n\n /* Styles applied to the root element if `maxWidth=\"md\"`. */\n maxWidthMd: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.up('md'), {\n maxWidth: theme.breakpoints.values.md\n }),\n\n /* Styles applied to the root element if `maxWidth=\"lg\"`. */\n maxWidthLg: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.up('lg'), {\n maxWidth: theme.breakpoints.values.lg\n }),\n\n /* Styles applied to the root element if `maxWidth=\"xl\"`. */\n maxWidthXl: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.up('xl'), {\n maxWidth: theme.breakpoints.values.xl\n })\n };\n};\nvar Container = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Container(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$fixed = props.fixed,\n fixed = _props$fixed === void 0 ? false : _props$fixed,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'lg' : _props$maxWidth,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"fixed\", \"maxWidth\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className, fixed && classes.fixed, disableGutters && classes.disableGutters, maxWidth !== false && classes[\"maxWidth\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(String(maxWidth)))]),\n ref: ref\n }, other));\n});\n true ? Container.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n */\n fixed: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiContainer'\n})(Container));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Container/Container.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Container/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Container/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Container */ \"./node_modules/@material-ui/core/esm/Container/Container.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Container__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Container/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js ***! \***********************************************************************/ /*! exports provided: html, body, styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"html\", function() { return html; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"body\", function() { return body; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n\n\n\nvar html = {\n WebkitFontSmoothing: 'antialiased',\n // Antialiasing.\n MozOsxFontSmoothing: 'grayscale',\n // Antialiasing.\n // Change from `box-sizing: content-box` so that `width`\n // is not affected by `padding` or `border`.\n boxSizing: 'border-box'\n};\nvar body = function body(theme) {\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n color: theme.palette.text.primary\n }, theme.typography.body2, {\n backgroundColor: theme.palette.background.default,\n '@media print': {\n // Save printer ink.\n backgroundColor: theme.palette.common.white\n }\n });\n};\nvar styles = function styles(theme) {\n return {\n '@global': {\n html: html,\n '*, *::before, *::after': {\n boxSizing: 'inherit'\n },\n 'strong, b': {\n fontWeight: theme.typography.fontWeightBold\n },\n body: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n margin: 0\n }, body(theme), {\n // Add support for document.body.requestFullScreen().\n // Other elements, if background transparent, are not supported.\n '&::backdrop': {\n backgroundColor: theme.palette.background.default\n }\n })\n }\n };\n};\n/**\n * Kickstart an elegant, consistent, and simple baseline to build upon.\n */\n\nfunction CssBaseline(props) {\n /* eslint-disable no-unused-vars */\n var _props$children = props.children,\n children = _props$children === void 0 ? null : _props$children,\n classes = props.classes;\n /* eslint-enable no-unused-vars */\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, children);\n}\n\n true ? CssBaseline.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n} : undefined;\n\nif (true) {\n // eslint-disable-next-line\n CssBaseline['propTypes' + ''] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_4__[\"exactProp\"])(CssBaseline.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(styles, {\n name: 'MuiCssBaseline'\n})(CssBaseline));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/CssBaseline/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/CssBaseline/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _CssBaseline__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CssBaseline */ \"./node_modules/@material-ui/core/esm/CssBaseline/CssBaseline.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _CssBaseline__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/CssBaseline/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Dialog/Dialog.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Dialog/Dialog.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Modal */ \"./node_modules/@material-ui/core/esm/Modal/index.js\");\n/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Backdrop */ \"./node_modules/@material-ui/core/esm/Backdrop/index.js\");\n/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Fade */ \"./node_modules/@material-ui/core/esm/Fade/index.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n },\n\n /* Styles applied to the container element if `scroll=\"paper\"`. */\n scrollPaper: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the container element if `scroll=\"body\"`. */\n scrollBody: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&:after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n },\n\n /* Styles applied to the container element. */\n container: {\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n margin: 32,\n position: 'relative',\n overflowY: 'auto',\n // Fix IE 11 issue, to remove at some point.\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n }\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"paper\"`. */\n paperScrollPaper: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `scroll=\"body\"`. */\n paperScrollBody: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'left' // 'initial' doesn't work on IE 11\n\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=false`. */\n paperWidthFalse: {\n maxWidth: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xs\"`. */\n paperWidthXs: {\n maxWidth: Math.max(theme.breakpoints.values.xs, 444),\n '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"sm\"`. */\n paperWidthSm: {\n maxWidth: theme.breakpoints.values.sm,\n '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down(theme.breakpoints.values.sm + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"md\"`. */\n paperWidthMd: {\n maxWidth: theme.breakpoints.values.md,\n '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down(theme.breakpoints.values.md + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"lg\"`. */\n paperWidthLg: {\n maxWidth: theme.breakpoints.values.lg,\n '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down(theme.breakpoints.values.lg + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `maxWidth=\"xl\"`. */\n paperWidthXl: {\n maxWidth: theme.breakpoints.values.xl,\n '&$paperScrollBody': Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down(theme.breakpoints.values.xl + 32 * 2), {\n maxWidth: 'calc(100% - 64px)'\n })\n },\n\n /* Styles applied to the `Paper` component if `fullWidth={true}`. */\n paperFullWidth: {\n width: 'calc(100% - 64px)'\n },\n\n /* Styles applied to the `Paper` component if `fullScreen={true}`. */\n paperFullScreen: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n '&$paperScrollBody': {\n margin: 0,\n maxWidth: '100%'\n }\n }\n };\n};\nvar defaultTransitionDuration = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__[\"duration\"].leavingScreen\n};\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\n\nvar Dialog = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Dialog(props, ref) {\n var BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$fullScreen = props.fullScreen,\n fullScreen = _props$fullScreen === void 0 ? false : _props$fullScreen,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$maxWidth = props.maxWidth,\n maxWidth = _props$maxWidth === void 0 ? 'sm' : _props$maxWidth,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperComponent = props.PaperComponent,\n PaperComponent = _props$PaperComponent === void 0 ? _Paper__WEBPACK_IMPORTED_MODULE_12__[\"default\"] : _props$PaperComponent,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$scroll = props.scroll,\n scroll = _props$scroll === void 0 ? 'paper' : _props$scroll,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Fade__WEBPACK_IMPORTED_MODULE_10__[\"default\"] : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n ariaDescribedby = props['aria-describedby'],\n ariaLabelledby = props['aria-labelledby'],\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"BackdropProps\", \"children\", \"classes\", \"className\", \"disableBackdropClick\", \"disableEscapeKeyDown\", \"fullScreen\", \"fullWidth\", \"maxWidth\", \"onBackdropClick\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onEscapeKeyDown\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperComponent\", \"PaperProps\", \"scroll\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\", \"aria-describedby\", \"aria-labelledby\"]);\n\n var mouseDownTarget = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n\n var handleMouseDown = function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n // Ignore the events not coming from the \"backdrop\"\n // We don't want to close the dialog when clicking the dialog content.\n if (event.target !== event.currentTarget) {\n return;\n } // Make sure the event starts and ends on the same DOM element.\n\n\n if (event.target !== mouseDownTarget.current) {\n return;\n }\n\n mouseDownTarget.current = null;\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Modal__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n BackdropComponent: _Backdrop__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n transitionDuration: transitionDuration\n }, BackdropProps),\n closeAfterTransition: true,\n disableBackdropClick: disableBackdropClick,\n disableEscapeKeyDown: disableEscapeKeyDown,\n onEscapeKeyDown: onEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n appear: true,\n in: open,\n timeout: transitionDuration,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered,\n onExit: onExit,\n onExiting: onExiting,\n onExited: onExited,\n role: \"none presentation\"\n }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.container, classes[\"scroll\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(scroll))]),\n onMouseUp: handleBackdropClick,\n onMouseDown: handleMouseDown\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](PaperComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby\n }, PaperProps, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.paper, classes[\"paperScroll\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(scroll))], classes[\"paperWidth\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(String(maxWidth)))], PaperProps.className, fullScreen && classes.paperFullScreen, fullWidth && classes.paperFullWidth)\n }), children))));\n});\n true ? Dialog.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * @ignore\n */\n BackdropProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Dialog children, usually the included sub-components.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * If `true`, clicking the backdrop will not fire the `onClose` callback.\n */\n disableBackdropClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n */\n disableEscapeKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the dialog will be full-screen\n */\n fullScreen: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n */\n maxWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['lg', 'md', 'sm', 'xl', 'xs', false]),\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the dialog enters.\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the dialog has entered.\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the dialog is entering.\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableKeyboard` is false and the modal is in focus.\n */\n onEscapeKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the dialog exits.\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the dialog has exited.\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the dialog is exiting.\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, the Dialog is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool.isRequired,\n\n /**\n * The component used to render the body of the dialog.\n */\n PaperComponent: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Determine the container for scrolling the dialog.\n */\n scroll: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['body', 'paper']),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiDialog'\n})(Dialog));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Dialog/Dialog.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Dialog/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Dialog/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dialog */ \"./node_modules/@material-ui/core/esm/Dialog/Dialog.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Dialog__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Dialog/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogActions/DialogActions.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogActions/DialogActions.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar DialogActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function DialogActions(props, ref) {\n var _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"disableSpacing\", \"classes\", \"className\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\n true ? DialogActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiDialogActions'\n})(DialogActions));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogActions/DialogActions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogActions/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogActions/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _DialogActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DialogActions */ \"./node_modules/@material-ui/core/esm/DialogActions/DialogActions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _DialogActions__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogActions/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogContent/DialogContent.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogContent/DialogContent.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n overflowY: 'auto',\n padding: '8px 24px',\n '&:first-child': {\n // dialog without title\n paddingTop: 20\n }\n },\n\n /* Styles applied to the root element if `dividers={true}`. */\n dividers: {\n padding: '16px 24px',\n borderTop: \"1px solid \".concat(theme.palette.divider),\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n }\n };\n};\nvar DialogContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function DialogContent(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$dividers = props.dividers,\n dividers = _props$dividers === void 0 ? false : _props$dividers,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"dividers\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, dividers && classes.dividers),\n ref: ref\n }, other));\n});\n true ? DialogContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Display the top and bottom dividers.\n */\n dividers: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiDialogContent'\n})(DialogContent));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogContent/DialogContent.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogContent/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogContent/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _DialogContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DialogContent */ \"./node_modules/@material-ui/core/esm/DialogContent/DialogContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _DialogContent__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogContent/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogContentText/DialogContentText.js": /*!***********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogContentText/DialogContentText.js ***! \***********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n marginBottom: 12\n }\n};\nvar DialogContentText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"forwardRef\"](function DialogContentText(props, ref) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_4__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n component: \"p\",\n variant: \"body1\",\n color: \"textSecondary\",\n ref: ref\n }, props));\n});\n true ? DialogContentText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(styles, {\n name: 'MuiDialogContentText'\n})(DialogContentText));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogContentText/DialogContentText.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogContentText/index.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogContentText/index.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _DialogContentText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DialogContentText */ \"./node_modules/@material-ui/core/esm/DialogContentText/DialogContentText.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _DialogContentText__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogContentText/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogTitle/DialogTitle.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogTitle/DialogTitle.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n margin: 0,\n padding: '16px 24px',\n flex: '0 0 auto'\n }\n};\nvar DialogTitle = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function DialogTitle(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"disableTypography\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other), disableTypography ? children : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n component: \"h2\",\n variant: \"h6\"\n }, children));\n});\n true ? DialogTitle.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a typography component.\n * For instance, this can be useful to render an h4 instead of the default h2.\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiDialogTitle'\n})(DialogTitle));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogTitle/DialogTitle.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/DialogTitle/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/DialogTitle/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _DialogTitle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DialogTitle */ \"./node_modules/@material-ui/core/esm/DialogTitle/DialogTitle.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _DialogTitle__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/DialogTitle/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Divider/Divider.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Divider/Divider.js ***! \***************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 1,\n margin: 0,\n // Reset browser default style.\n border: 'none',\n flexShrink: 0,\n backgroundColor: theme.palette.divider\n },\n\n /* Styles applied to the root element if `absolute={true}`. */\n absolute: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n },\n\n /* Styles applied to the root element if `variant=\"inset\"`. */\n inset: {\n marginLeft: 72\n },\n\n /* Styles applied to the root element if `light={true}`. */\n light: {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_6__[\"fade\"])(theme.palette.divider, 0.08)\n },\n\n /* Styles applied to the root element if `variant=\"middle\"`. */\n middle: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n height: '100%',\n width: 1\n },\n\n /* Styles applied to the root element if `flexItem={true}`. */\n flexItem: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n };\n};\nvar Divider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Divider(props, ref) {\n var _props$absolute = props.absolute,\n absolute = _props$absolute === void 0 ? false : _props$absolute,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'hr' : _props$component,\n _props$flexItem = props.flexItem,\n flexItem = _props$flexItem === void 0 ? false : _props$flexItem,\n _props$light = props.light,\n light = _props$light === void 0 ? false : _props$light,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$role = props.role,\n role = _props$role === void 0 ? Component !== 'hr' ? 'separator' : undefined : _props$role,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'fullWidth' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"absolute\", \"classes\", \"className\", \"component\", \"flexItem\", \"light\", \"orientation\", \"role\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, variant !== 'fullWidth' && classes[variant], absolute && classes.absolute, flexItem && classes.flexItem, light && classes.light, orientation === 'vertical' && classes.vertical),\n role: role,\n ref: ref\n }, other));\n});\n true ? Divider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Absolutely position the element.\n */\n absolute: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n */\n flexItem: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the divider will have a lighter color.\n */\n light: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The divider orientation.\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['horizontal', 'vertical']),\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['fullWidth', 'inset', 'middle'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiDivider'\n})(Divider));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Divider/Divider.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Divider/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Divider/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Divider */ \"./node_modules/@material-ui/core/esm/Divider/Divider.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Divider__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Divider/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Drawer/Drawer.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Drawer/Drawer.js ***! \*************************************************************/ /*! exports provided: styles, isHorizontal, getAnchor, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isHorizontal\", function() { return isHorizontal; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getAnchor\", function() { return getAnchor; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Modal */ \"./node_modules/@material-ui/core/esm/Modal/index.js\");\n/* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Backdrop */ \"./node_modules/@material-ui/core/esm/Backdrop/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Slide */ \"./node_modules/@material-ui/core/esm/Slide/index.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `variant=\"permanent or persistent\"`. */\n docked: {\n flex: '0 0 auto'\n },\n\n /* Styles applied to the `Paper` component. */\n paper: {\n overflowY: 'auto',\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n flex: '1 0 auto',\n zIndex: theme.zIndex.drawer,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n // temporary style\n position: 'fixed',\n top: 0,\n // We disable the focus ring for mouse, touch and keyboard users.\n // At some point, it would be better to keep it for keyboard users.\n // :focus-ring CSS pseudo-class will help.\n outline: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"`. */\n paperAnchorLeft: {\n left: 0,\n right: 'auto'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"`. */\n paperAnchorRight: {\n left: 'auto',\n right: 0\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"`. */\n paperAnchorTop: {\n top: 0,\n left: 0,\n bottom: 'auto',\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"`. */\n paperAnchorBottom: {\n top: 'auto',\n left: 0,\n bottom: 0,\n right: 0,\n height: 'auto',\n maxHeight: '100%'\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"left\"` and `variant` is not \"temporary\". */\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"top\"` and `variant` is not \"temporary\". */\n paperAnchorDockedTop: {\n borderBottom: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"right\"` and `variant` is not \"temporary\". */\n paperAnchorDockedRight: {\n borderLeft: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Paper` component if `anchor=\"bottom\"` and `variant` is not \"temporary\". */\n paperAnchorDockedBottom: {\n borderTop: \"1px solid \".concat(theme.palette.divider)\n },\n\n /* Styles applied to the `Modal` component. */\n modal: {}\n };\n};\nvar oppositeDirection = {\n left: 'right',\n right: 'left',\n top: 'down',\n bottom: 'up'\n};\nfunction isHorizontal(anchor) {\n return ['left', 'right'].indexOf(anchor) !== -1;\n}\nfunction getAnchor(theme, anchor) {\n return theme.direction === 'rtl' && isHorizontal(anchor) ? oppositeDirection[anchor] : anchor;\n}\nvar defaultTransitionDuration = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_11__[\"duration\"].leavingScreen\n};\n/**\n * The props of the [Modal](/api/modal/) component are available\n * when `variant=\"temporary\"` is set.\n */\n\nvar Drawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Drawer(props, ref) {\n var _props$anchor = props.anchor,\n anchorProp = _props$anchor === void 0 ? 'left' : _props$anchor,\n BackdropProps = props.BackdropProps,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 16 : _props$elevation,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropPropsProp = _props$ModalProps.BackdropProps,\n ModalProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n _props$open = props.open,\n open = _props$open === void 0 ? false : _props$open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SlideProps = props.SlideProps,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Slide__WEBPACK_IMPORTED_MODULE_8__[\"default\"] : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? defaultTransitionDuration : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"anchor\", \"BackdropProps\", \"children\", \"classes\", \"className\", \"elevation\", \"ModalProps\", \"onClose\", \"open\", \"PaperProps\", \"SlideProps\", \"TransitionComponent\", \"transitionDuration\", \"variant\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(); // Let's assume that the Drawer will always be rendered on user space.\n // We use this state is order to skip the appear transition during the\n // initial mount of the component.\n\n var mounted = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n mounted.current = true;\n }, []);\n var anchor = getAnchor(theme, anchorProp);\n var drawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n elevation: variant === 'temporary' ? elevation : 0,\n square: true\n }, PaperProps, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.paper, classes[\"paperAnchor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(anchor))], PaperProps.className, variant !== 'temporary' && classes[\"paperAnchorDocked\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(anchor))])\n }), children);\n\n if (variant === 'permanent') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes.docked, className),\n ref: ref\n }, other), drawer);\n }\n\n var slidingDrawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: open,\n direction: oppositeDirection[anchor],\n timeout: transitionDuration,\n appear: mounted.current\n }, SlideProps), drawer);\n\n if (variant === 'persistent') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes.docked, className),\n ref: ref\n }, other), slidingDrawer);\n } // variant === temporary\n\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Modal__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, BackdropProps, BackdropPropsProp, {\n transitionDuration: transitionDuration\n }),\n BackdropComponent: _Backdrop__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes.modal, className),\n open: open,\n onClose: onClose,\n ref: ref\n }, other, ModalProps), slidingDrawer);\n});\n true ? Drawer.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Side from which the drawer will appear.\n */\n anchor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'left', 'right', 'top']),\n\n /**\n * @ignore\n */\n BackdropProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The contents of the drawer.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The elevation of the drawer.\n */\n elevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Props applied to the [`Modal`](/api/modal/) element.\n */\n ModalProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the drawer is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Props applied to the [`Slide`](/api/slide/) element.\n */\n SlideProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })]),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['permanent', 'persistent', 'temporary'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiDrawer',\n flip: false\n})(Drawer));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Drawer/Drawer.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Drawer/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Drawer/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Drawer */ \"./node_modules/@material-ui/core/esm/Drawer/Drawer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Drawer__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Drawer/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanel.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanel.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ \"./node_modules/@babel/runtime/helpers/esm/toArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Collapse */ \"./node_modules/@material-ui/core/esm/Collapse/index.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ExpansionPanelContext */ \"./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanelContext.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n transition: theme.transitions.create(['margin'], transition),\n '&:before': {\n position: 'absolute',\n left: 0,\n top: -1,\n right: 0,\n height: 1,\n content: '\"\"',\n opacity: 1,\n backgroundColor: theme.palette.divider,\n transition: theme.transitions.create(['opacity', 'background-color'], transition)\n },\n '&:first-child': {\n '&:before': {\n display: 'none'\n }\n },\n '&$expanded': {\n margin: '16px 0',\n '&:first-child': {\n marginTop: 0\n },\n '&:last-child': {\n marginBottom: 0\n },\n '&:before': {\n opacity: 0\n }\n },\n '&$expanded + &': {\n '&:before': {\n display: 'none'\n }\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n }\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: 0,\n '&:first-child': {\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius\n },\n '&:last-child': {\n borderBottomLeftRadius: theme.shape.borderRadius,\n borderBottomRightRadius: theme.shape.borderRadius,\n // Fix a rendering issue on Edge\n '@supports (-ms-ime-align: auto)': {\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 0\n }\n }\n },\n\n /* Styles applied to the root element if `expanded={true}`. */\n expanded: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {}\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanel component was renamed to Accordion to use a more common naming convention.\n *\n * You should use `import { Accordion } from '@material-ui/core'`\n * or `import Accordion from '@material-ui/core/Accordion'`.\n */\n\nvar ExpansionPanel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"forwardRef\"](function ExpansionPanel(props, ref) {\n if (true) {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanel component was renamed to Accordion to use a more common naming convention.', '', \"You should use `import { Accordion } from '@material-ui/core'`\", \"or `import Accordion from '@material-ui/core/Accordion'`\"].join('\\n'));\n }\n }\n\n var childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$defaultExpande = props.defaultExpanded,\n defaultExpanded = _props$defaultExpande === void 0 ? false : _props$defaultExpande,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n expandedProp = props.expanded,\n onChange = props.onChange,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_9__[\"default\"] : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"defaultExpanded\", \"disabled\", \"expanded\", \"onChange\", \"square\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_13__[\"default\"])({\n controlled: expandedProp,\n default: defaultExpanded,\n name: 'ExpansionPanel',\n state: 'expanded'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_useControlled, 2),\n expanded = _useControlled2[0],\n setExpandedState = _useControlled2[1];\n\n var handleChange = react__WEBPACK_IMPORTED_MODULE_4__[\"useCallback\"](function (event) {\n setExpandedState(!expanded);\n\n if (onChange) {\n onChange(event, !expanded);\n }\n }, [expanded, onChange, setExpandedState]);\n\n var _React$Children$toArr = react__WEBPACK_IMPORTED_MODULE_4__[\"Children\"].toArray(childrenProp),\n _React$Children$toArr2 = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_React$Children$toArr),\n summary = _React$Children$toArr2[0],\n children = _React$Children$toArr2.slice(1);\n\n var contextValue = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return {\n expanded: expanded,\n disabled: disabled,\n toggle: handleChange\n };\n }, [expanded, disabled, handleChange]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_10__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.root, className, expanded && classes.expanded, disabled && classes.disabled, !square && classes.rounded),\n ref: ref,\n square: square\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_12__[\"default\"].Provider, {\n value: contextValue\n }, summary), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: expanded,\n timeout: \"auto\"\n }, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", {\n \"aria-labelledby\": summary.props.id,\n id: summary.props['aria-controls'],\n role: \"region\"\n }, children)));\n});\n true ? ExpansionPanel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel.\n */\n children: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.node.isRequired, function (props) {\n var summary = react__WEBPACK_IMPORTED_MODULE_4__[\"Children\"].toArray(props.children)[0];\n\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_5__[\"isFragment\"])(summary)) {\n return new Error(\"Material-UI: The ExpansionPanel doesn't accept a Fragment as a child. \" + 'Consider providing an array instead.');\n }\n\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"isValidElement\"](summary)) {\n return new Error('Material-UI: Expected the first child of ExpansionPanel to be a valid element.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string,\n\n /**\n * If `true`, expands the panel by default.\n */\n defaultExpanded: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * If `true`, the panel will be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * If `true`, expands the panel, otherwise collapse it.\n * Setting this prop enables control over the panel.\n */\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Callback fired when the expand/collapse state is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {boolean} expanded The `expanded` state of the panel.\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func,\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * The component used for the collapse effect.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(styles, {\n name: 'MuiExpansionPanel'\n})(ExpansionPanel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanelContext.js": /*!************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanelContext.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n * @type {React.Context<{} | {expanded: boolean, disabled: boolean, toggle: () => void}>}\n */\n\nvar ExpansionPanelContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]({});\n\nif (true) {\n ExpansionPanelContext.displayName = 'ExpansionPanelContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ExpansionPanelContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanelContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanel/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanel/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ExpansionPanel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExpansionPanel */ \"./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ExpansionPanel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelActions/ExpansionPanelActions.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelActions/ExpansionPanelActions.js ***! \*******************************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `disableSpacing={false}`. */\n spacing: {\n '& > :not(:first-child)': {\n marginLeft: 8\n }\n }\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.\n *\n * You should use `import { AccordionActions } from '@material-ui/core'`\n * or `import AccordionActions from '@material-ui/core/AccordionActions'`.\n */\n\nvar ExpansionPanelActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ExpansionPanelActions(props, ref) {\n if (true) {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelActions component was renamed to AccordionActions to use a more common naming convention.', '', \"You should use `import { AccordionActions } from '@material-ui/core'`\", \"or `import AccordionActions from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n _props$disableSpacing = props.disableSpacing,\n disableSpacing = _props$disableSpacing === void 0 ? false : _props$disableSpacing,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"disableSpacing\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, !disableSpacing && classes.spacing),\n ref: ref\n }, other));\n});\n true ? ExpansionPanelActions.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the actions do not have additional margin.\n */\n disableSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiExpansionPanelActions'\n})(ExpansionPanelActions));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelActions/ExpansionPanelActions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelActions/index.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelActions/index.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExpansionPanelActions */ \"./node_modules/@material-ui/core/esm/ExpansionPanelActions/ExpansionPanelActions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelActions/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelDetails/ExpansionPanelDetails.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelDetails/ExpansionPanelDetails.js ***! \*******************************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: theme.spacing(1, 2, 2)\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.\n *\n * You should use `import { AccordionDetails } from '@material-ui/core'`\n * or `import AccordionDetails from '@material-ui/core/AccordionDetails'`.\n */\n\nvar ExpansionPanelDetails = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ExpansionPanelDetails(props, ref) {\n if (true) {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelDetails component was renamed to AccordionDetails to use a more common naming convention.', '', \"You should use `import { AccordionDetails } from '@material-ui/core'`\", \"or `import AccordionDetails from '@material-ui/core/AccordionActions'`\"].join('\\n'));\n }\n }\n\n var classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other));\n});\n true ? ExpansionPanelDetails.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel details.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiExpansionPanelDetails'\n})(ExpansionPanelDetails));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelDetails/ExpansionPanelDetails.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelDetails/index.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelDetails/index.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExpansionPanelDetails */ \"./node_modules/@material-ui/core/esm/ExpansionPanelDetails/ExpansionPanelDetails.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelDetails/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelSummary/ExpansionPanelSummary.js": /*!*******************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelSummary/ExpansionPanelSummary.js ***! \*******************************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ExpansionPanel_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ExpansionPanel/ExpansionPanelContext */ \"./node_modules/@material-ui/core/esm/ExpansionPanel/ExpansionPanelContext.js\");\n\n\n\n/* eslint-disable jsx-a11y/aria-role */\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var transition = {\n duration: theme.transitions.duration.shortest\n };\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n minHeight: 8 * 6,\n transition: theme.transitions.create(['min-height', 'background-color'], transition),\n padding: theme.spacing(0, 2),\n '&:hover:not($disabled)': {\n cursor: 'pointer'\n },\n '&$expanded': {\n minHeight: 64\n },\n '&$focused': {\n backgroundColor: theme.palette.action.focus\n },\n '&$disabled': {\n opacity: theme.palette.action.disabledOpacity\n }\n },\n\n /* Pseudo-class applied to the root element, children wrapper element and `IconButton` component if `expanded={true}`. */\n expanded: {},\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the children wrapper element. */\n content: {\n display: 'flex',\n flexGrow: 1,\n transition: theme.transitions.create(['margin'], transition),\n margin: '12px 0',\n '&$expanded': {\n margin: '20px 0'\n }\n },\n\n /* Styles applied to the `IconButton` component when `expandIcon` is supplied. */\n expandIcon: {\n transform: 'rotate(0deg)',\n transition: theme.transitions.create('transform', transition),\n '&:hover': {\n // Disable the hover effect for the IconButton,\n // because a hover effect should apply to the entire Expand button and\n // not only to the IconButton.\n backgroundColor: 'transparent'\n },\n '&$expanded': {\n transform: 'rotate(180deg)'\n }\n }\n };\n};\nvar warnedOnce = false;\n/**\n * ⚠️ The ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.\n *\n * You should use `import { AccordionSummary } from '@material-ui/core'`\n * or `import AccordionSummary from '@material-ui/core/AccordionSummary'`.\n */\n\nvar ExpansionPanelSummary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ExpansionPanelSummary(props, ref) {\n if (true) {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['Material-UI: the ExpansionPanelSummary component was renamed to AccordionSummary to use a more common naming convention.', '', \"You should use `import { AccordionSummary } from '@material-ui/core'`\", \"or `import AccordionSummary from '@material-ui/core/AccordionSummary'`\"].join('\\n'));\n }\n }\n\n var children = props.children,\n classes = props.classes,\n className = props.className,\n expandIcon = props.expandIcon,\n IconButtonProps = props.IconButtonProps,\n onBlur = props.onBlur,\n onClick = props.onClick,\n onFocusVisible = props.onFocusVisible,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"expandIcon\", \"IconButtonProps\", \"onBlur\", \"onClick\", \"onFocusVisible\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n focusedState = _React$useState[0],\n setFocusedState = _React$useState[1];\n\n var handleFocusVisible = function handleFocusVisible(event) {\n setFocusedState(true);\n\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n setFocusedState(false);\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_ExpansionPanel_ExpansionPanelContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"]),\n _React$useContext$dis = _React$useContext.disabled,\n disabled = _React$useContext$dis === void 0 ? false : _React$useContext$dis,\n expanded = _React$useContext.expanded,\n toggle = _React$useContext.toggle;\n\n var handleChange = function handleChange(event) {\n if (toggle) {\n toggle(event);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n focusRipple: false,\n disableRipple: true,\n disabled: disabled,\n component: \"div\",\n \"aria-expanded\": expanded,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, disabled && classes.disabled, expanded && classes.expanded, focusedState && classes.focused),\n onFocusVisible: handleFocusVisible,\n onBlur: handleBlur,\n onClick: handleChange,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.content, expanded && classes.expanded)\n }, children), expandIcon && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_IconButton__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.expandIcon, expanded && classes.expanded),\n edge: \"end\",\n component: \"div\",\n tabIndex: null,\n role: null,\n \"aria-hidden\": true\n }, IconButtonProps), expandIcon));\n});\n true ? ExpansionPanelSummary.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the expansion panel summary.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The icon to display as the expand indicator.\n */\n expandIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Props applied to the `IconButton` element wrapping the expand icon.\n */\n IconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiExpansionPanelSummary'\n})(ExpansionPanelSummary));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelSummary/ExpansionPanelSummary.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ExpansionPanelSummary/index.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ExpansionPanelSummary/index.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ExpansionPanelSummary */ \"./node_modules/@material-ui/core/esm/ExpansionPanelSummary/ExpansionPanelSummary.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ExpansionPanelSummary/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Fab/Fab.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Fab/Fab.js ***! \*******************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.typography.button, {\n boxSizing: 'border-box',\n minHeight: 36,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border'], {\n duration: theme.transitions.duration.short\n }),\n borderRadius: '50%',\n padding: 0,\n minWidth: 0,\n width: 56,\n height: 56,\n boxShadow: theme.shadows[6],\n '&:active': {\n boxShadow: theme.shadows[12]\n },\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n '&:hover': {\n backgroundColor: theme.palette.grey.A100,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.grey[300]\n },\n '&$disabled': {\n backgroundColor: theme.palette.action.disabledBackground\n },\n textDecoration: 'none'\n },\n '&$focusVisible': {\n boxShadow: theme.shadows[6]\n },\n '&$disabled': {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n }\n }),\n\n /* Styles applied to the span element that wraps the children. */\n label: {\n width: '100%',\n // assure the correct width for iOS Safari\n display: 'inherit',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n primary: {\n color: theme.palette.primary.contrastText,\n backgroundColor: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: theme.palette.primary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.primary.main\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n secondary: {\n color: theme.palette.secondary.contrastText,\n backgroundColor: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: theme.palette.secondary.dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette.secondary.main\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"extended\"`. */\n extended: {\n borderRadius: 48 / 2,\n padding: '0 16px',\n width: 'auto',\n minHeight: 'auto',\n minWidth: 48,\n height: 48,\n '&$sizeSmall': {\n width: 'auto',\n padding: '0 8px',\n borderRadius: 34 / 2,\n minWidth: 34,\n height: 34\n },\n '&$sizeMedium': {\n width: 'auto',\n padding: '0 16px',\n borderRadius: 40 / 2,\n minWidth: 40,\n height: 40\n }\n },\n\n /* Pseudo-class applied to the ButtonBase root element if the button is keyboard focused. */\n focusVisible: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `size=\"small\"``. */\n sizeSmall: {\n width: 40,\n height: 40\n },\n\n /* Styles applied to the root element if `size=\"medium\"``. */\n sizeMedium: {\n width: 48,\n height: 48\n }\n };\n};\nvar Fab = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Fab(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'button' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$size = props.size,\n size = _props$size === void 0 ? 'large' : _props$size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'round' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"disableFocusRipple\", \"focusVisibleClassName\", \"size\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, variant !== \"round\" && classes.extended, size !== 'large' && classes[\"size\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(size))], disabled && classes.disabled, {\n 'primary': classes.primary,\n 'secondary': classes.secondary,\n 'inherit': classes.colorInherit\n }[color]),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.label\n }, children));\n});\n true ? Fab.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the button.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['large', 'medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['extended', 'round'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiFab'\n})(Fab));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Fab/Fab.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Fab/index.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Fab/index.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Fab__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Fab */ \"./node_modules/@material-ui/core/esm/Fab/Fab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Fab__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Fab/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Fade/Fade.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Fade/Fade.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\nvar defaultTimeout = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__[\"duration\"].leavingScreen\n};\n/**\n * The Fade transition is used by the [Modal](/components/modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Fade = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Fade(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__[\"Transition\"] : _props$TransitionComp,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"TransitionComponent\", \"timeout\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(children.ref, ref);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"reflow\"])(node); // So the animation always start from the start.\n\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\n true ? Fade.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Fade);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Fade/Fade.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Fade/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Fade/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Fade */ \"./node_modules/@material-ui/core/esm/Fade/Fade.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Fade__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Fade/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FilledInput/FilledInput.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FilledInput/FilledInput.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n var backgroundColor = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n backgroundColor: backgroundColor,\n borderTopLeftRadius: theme.shape.borderRadius,\n borderTopRightRadius: theme.shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.13)' : 'rgba(255, 255, 255, 0.13)',\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: backgroundColor\n }\n },\n '&$focused': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.09)'\n },\n '&$disabled': {\n backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'\n }\n },\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:before': {\n borderBottom: \"1px solid \".concat(theme.palette.text.primary)\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if the component is focused. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {\n paddingLeft: 12\n },\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {\n paddingRight: 12\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: '27px 12px 10px',\n '&$marginDense': {\n paddingTop: 23,\n paddingBottom: 6\n }\n },\n\n /* Styles applied to the `input` element. */\n input: {\n padding: '27px 12px 10px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff',\n caretColor: theme.palette.type === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 23,\n paddingBottom: 6\n },\n\n /* Styles applied to the `input` if in ``. */\n inputHiddenLabel: {\n paddingTop: 18,\n paddingBottom: 19,\n '&$inputMarginDense': {\n paddingTop: 10,\n paddingBottom: 11\n }\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n padding: 0\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {\n paddingLeft: 0\n },\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {\n paddingRight: 0\n }\n };\n};\nvar FilledInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FilledInput(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_InputBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, classes, {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\n true ? FilledInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none']),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\nFilledInput.muiName = 'Input';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiFilledInput'\n})(FilledInput));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FilledInput/FilledInput.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FilledInput/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FilledInput/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FilledInput */ \"./node_modules/@material-ui/core/esm/FilledInput/FilledInput.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FilledInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FilledInput/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControl/FormControl.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControl/FormControl.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _InputBase_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../InputBase/utils */ \"./node_modules/@material-ui/core/esm/InputBase/utils.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/isMuiElement */ \"./node_modules/@material-ui/core/esm/utils/isMuiElement.js\");\n/* harmony import */ var _FormControlContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FormControlContext */ \"./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top' // Fix alignment issue on Safari.\n\n },\n\n /* Styles applied to the root element if `margin=\"normal\"`. */\n marginNormal: {\n marginTop: 16,\n marginBottom: 8\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 8,\n marginBottom: 4\n },\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n }\n};\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/components/text-fields/#components).\n *\n * ```jsx\n * \n * Email address\n * \n * We'll never share your email.\n * \n * ```\n *\n * ⚠️Only one input can be used within a FormControl.\n */\n\nvar FormControl = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FormControl(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n visuallyFocused = props.focused,\n _props$hiddenLabel = props.hiddenLabel,\n hiddenLabel = _props$hiddenLabel === void 0 ? false : _props$hiddenLabel,\n _props$margin = props.margin,\n margin = _props$margin === void 0 ? 'none' : _props$margin,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n size = props.size,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"fullWidth\", \"focused\", \"hiddenLabel\", \"margin\", \"required\", \"size\", \"variant\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialAdornedStart = false;\n\n if (children) {\n react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].forEach(children, function (child) {\n if (!Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(child, ['Input', 'Select'])) {\n return;\n }\n\n var input = Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(child, ['Select']) ? child.props.input : child;\n\n if (input && Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_5__[\"isAdornedStart\"])(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n\n return initialAdornedStart;\n }),\n adornedStart = _React$useState[0],\n setAdornedStart = _React$useState[1];\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](function () {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n var initialFilled = false;\n\n if (children) {\n react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].forEach(children, function (child) {\n if (!Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(child, ['Input', 'Select'])) {\n return;\n }\n\n if (Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_5__[\"isFilled\"])(child.props, true)) {\n initialFilled = true;\n }\n });\n }\n\n return initialFilled;\n }),\n filled = _React$useState2[0],\n setFilled = _React$useState2[1];\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n _focused = _React$useState3[0],\n setFocused = _React$useState3[1];\n\n var focused = visuallyFocused !== undefined ? visuallyFocused : _focused;\n\n if (disabled && focused) {\n setFocused(false);\n }\n\n var registerEffect;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var registeredInput = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n\n registerEffect = function registerEffect() {\n if (registeredInput.current) {\n console.error(['Material-UI: There are multiple InputBase components inside a FormControl.', 'This is not supported. It might cause infinite rendering loops.', 'Only use one InputBase.'].join('\\n'));\n }\n\n registeredInput.current = true;\n return function () {\n registeredInput.current = false;\n };\n };\n }\n\n var onFilled = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n setFilled(true);\n }, []);\n var onEmpty = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n setFilled(false);\n }, []);\n var childContext = {\n adornedStart: adornedStart,\n setAdornedStart: setAdornedStart,\n color: color,\n disabled: disabled,\n error: error,\n filled: filled,\n focused: focused,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n margin: (size === 'small' ? 'dense' : undefined) || margin,\n onBlur: function onBlur() {\n setFocused(false);\n },\n onEmpty: onEmpty,\n onFilled: onFilled,\n onFocus: function onFocus() {\n setFocused(true);\n },\n registerEffect: registerEffect,\n required: required,\n variant: variant\n };\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FormControlContext__WEBPACK_IMPORTED_MODULE_9__[\"default\"].Provider, {\n value: childContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, margin !== 'none' && classes[\"margin\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(margin))], fullWidth && classes.fullWidth),\n ref: ref\n }, other), children));\n});\n true ? FormControl.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the form control.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component will be displayed in focused state.\n */\n focused: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label will be hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n */\n hiddenLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The size of the text field.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiFormControl'\n})(FormControl));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControl/FormControl.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js": /*!******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js ***! \******************************************************************************/ /*! exports provided: useFormControl, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"useFormControl\", function() { return useFormControl; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n */\n\nvar FormControlContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]();\n\nif (true) {\n FormControlContext.displayName = 'FormControlContext';\n}\n\nfunction useFormControl() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"](FormControlContext);\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (FormControlContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControl/formControlState.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControl/formControlState.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formControlState; });\nfunction formControlState(_ref) {\n var props = _ref.props,\n states = _ref.states,\n muiFormControl = _ref.muiFormControl;\n return states.reduce(function (acc, state) {\n acc[state] = props[state];\n\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n\n return acc;\n }, {});\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControl/formControlState.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControl/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControl/index.js ***! \*****************************************************************/ /*! exports provided: default, useFormControl */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormControl */ \"./node_modules/@material-ui/core/esm/FormControl/FormControl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _useFormControl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useFormControl\", function() { return _useFormControl__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControl/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControl/useFormControl.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControl/useFormControl.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useFormControl; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FormControlContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FormControlContext */ \"./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js\");\n\n\nfunction useFormControl() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"](_FormControlContext__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControl/useFormControl.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js ***! \*********************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl */ \"./node_modules/@material-ui/core/esm/FormControl/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n alignItems: 'center',\n cursor: 'pointer',\n // For correct alignment with the text.\n verticalAlign: 'middle',\n WebkitTapHighlightColor: 'transparent',\n marginLeft: -11,\n marginRight: 16,\n // used for row presentation of radio/checkbox\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `labelPlacement=\"start\"`. */\n labelPlacementStart: {\n flexDirection: 'row-reverse',\n marginLeft: 16,\n // used for row presentation of radio/checkbox\n marginRight: -11\n },\n\n /* Styles applied to the root element if `labelPlacement=\"top\"`. */\n labelPlacementTop: {\n flexDirection: 'column-reverse',\n marginLeft: 16\n },\n\n /* Styles applied to the root element if `labelPlacement=\"bottom\"`. */\n labelPlacementBottom: {\n flexDirection: 'column',\n marginLeft: 16\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the label's Typography component. */\n label: {\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n }\n };\n};\n/**\n * Drop in replacement of the `Radio`, `Switch` and `Checkbox` component.\n * Use this component if you want to display an extra label.\n */\n\nvar FormControlLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FormControlLabel(props, ref) {\n var checked = props.checked,\n classes = props.classes,\n className = props.className,\n control = props.control,\n disabledProp = props.disabled,\n inputRef = props.inputRef,\n label = props.label,\n _props$labelPlacement = props.labelPlacement,\n labelPlacement = _props$labelPlacement === void 0 ? 'end' : _props$labelPlacement,\n name = props.name,\n onChange = props.onChange,\n value = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"checked\", \"classes\", \"className\", \"control\", \"disabled\", \"inputRef\", \"label\", \"labelPlacement\", \"name\", \"onChange\", \"value\"]);\n\n var muiFormControl = Object(_FormControl__WEBPACK_IMPORTED_MODULE_6__[\"useFormControl\"])();\n var disabled = disabledProp;\n\n if (typeof disabled === 'undefined' && typeof control.props.disabled !== 'undefined') {\n disabled = control.props.disabled;\n }\n\n if (typeof disabled === 'undefined' && muiFormControl) {\n disabled = muiFormControl.disabled;\n }\n\n var controlProps = {\n disabled: disabled\n };\n ['checked', 'name', 'onChange', 'value', 'inputRef'].forEach(function (key) {\n if (typeof control.props[key] === 'undefined' && typeof props[key] !== 'undefined') {\n controlProps[key] = props[key];\n }\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"label\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, labelPlacement !== 'end' && classes[\"labelPlacement\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(labelPlacement))], disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](control, controlProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n component: \"span\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.label, disabled && classes.disabled)\n }, label));\n});\n true ? FormControlLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component appears selected.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * A control element. For instance, it can be be a `Radio`, a `Switch` or a `Checkbox`.\n */\n control: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element.isRequired,\n\n /**\n * If `true`, the control will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * The text to be used in an enclosing label element.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The position of the label.\n */\n labelPlacement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'end', 'start', 'top']),\n\n /**\n * @ignore\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The value of the component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiFormControlLabel'\n})(FormControlLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormControlLabel/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormControlLabel/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FormControlLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormControlLabel */ \"./node_modules/@material-ui/core/esm/FormControlLabel/FormControlLabel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FormControlLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormControlLabel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormGroup/FormGroup.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormGroup/FormGroup.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'column',\n flexWrap: 'wrap'\n },\n\n /* Styles applied to the root element if `row={true}`. */\n row: {\n flexDirection: 'row'\n }\n};\n/**\n * `FormGroup` wraps controls such as `Checkbox` and `Switch`.\n * It provides compact row layout.\n * For the `Radio`, you should be using the `RadioGroup` component instead of this one.\n */\n\nvar FormGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FormGroup(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$row = props.row,\n row = _props$row === void 0 ? false : _props$row,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"row\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, row && classes.row),\n ref: ref\n }, other));\n});\n true ? FormGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Display group of elements in a compact row.\n */\n row: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiFormGroup'\n})(FormGroup));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormGroup/FormGroup.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormGroup/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormGroup/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormGroup */ \"./node_modules/@material-ui/core/esm/FormGroup/FormGroup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FormGroup__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormGroup/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormHelperText/FormHelperText.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormHelperText/FormHelperText.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n color: theme.palette.text.secondary\n }, theme.typography.caption, {\n textAlign: 'left',\n marginTop: 3,\n margin: 0,\n '&$disabled': {\n color: theme.palette.text.disabled\n },\n '&$error': {\n color: theme.palette.error.main\n }\n }),\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n marginTop: 4\n },\n\n /* Styles applied to the root element if `variant=\"filled\"` or `variant=\"outlined\"`. */\n contained: {\n marginLeft: 14,\n marginRight: 14\n },\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `filled={true}`. */\n filled: {},\n\n /* Pseudo-class applied to the root element if `required={true}`. */\n required: {}\n };\n};\nvar FormHelperText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FormHelperText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'p' : _props$component,\n disabled = props.disabled,\n error = props.error,\n filled = props.filled,\n focused = props.focused,\n margin = props.margin,\n required = props.required,\n variant = props.variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"disabled\", \"error\", \"filled\", \"focused\", \"margin\", \"required\", \"variant\"]);\n\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant', 'margin', 'disabled', 'error', 'filled', 'focused', 'required']\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, (fcs.variant === 'filled' || fcs.variant === 'outlined') && classes.contained, className, fcs.disabled && classes.disabled, fcs.error && classes.error, fcs.filled && classes.filled, fcs.focused && classes.focused, fcs.required && classes.required, fcs.margin === 'dense' && classes.marginDense),\n ref: ref\n }, other), children === ' ' ?\n /*#__PURE__*/\n // eslint-disable-next-line react/no-danger\n react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: ''\n }\n }) : children);\n});\n true ? FormHelperText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n *\n * If `' '` is provided, the component reserves one line height for displaying a future message.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the helper text should be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, helper text should be displayed in an error state.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the helper text should use filled classes key.\n */\n filled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the helper text should use focused classes key.\n */\n focused: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense']),\n\n /**\n * If `true`, the helper text should use required classes key.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiFormHelperText'\n})(FormHelperText));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormHelperText/FormHelperText.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormHelperText/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormHelperText/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormHelperText */ \"./node_modules/@material-ui/core/esm/FormHelperText/FormHelperText.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FormHelperText__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormHelperText/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormLabel/FormLabel.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormLabel/FormLabel.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n color: theme.palette.text.secondary\n }, theme.typography.body1, {\n lineHeight: 1,\n padding: 0,\n '&$focused': {\n color: theme.palette.primary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n },\n '&$error': {\n color: theme.palette.error.main\n }\n }),\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {\n '&$focused': {\n color: theme.palette.secondary.main\n }\n },\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element if `filled={true}`. */\n filled: {},\n\n /* Pseudo-class applied to the root element if `required={true}`. */\n required: {},\n\n /* Styles applied to the asterisk element. */\n asterisk: {\n '&$error': {\n color: theme.palette.error.main\n }\n }\n };\n};\nvar FormLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function FormLabel(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n color = props.color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'label' : _props$component,\n disabled = props.disabled,\n error = props.error,\n filled = props.filled,\n focused = props.focused,\n required = props.required,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"disabled\", \"error\", \"filled\", \"focused\", \"required\"]);\n\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fcs.filled && classes.filled, fcs.focused && classes.focused, fcs.required && classes.required),\n ref: ref\n }, other), children, fcs.required && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n \"aria-hidden\": true,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.asterisk, fcs.error && classes.error)\n }, \"\\u2009\", '*'));\n});\n true ? FormLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label should be displayed in an error state.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label will indicate that the input is required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiFormLabel'\n})(FormLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormLabel/FormLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/FormLabel/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/FormLabel/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FormLabel */ \"./node_modules/@material-ui/core/esm/FormLabel/FormLabel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _FormLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/FormLabel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Grid/Grid.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Grid/Grid.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/requirePropFactory */ \"./node_modules/@material-ui/core/esm/utils/requirePropFactory.js\");\n\n\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\n\n\n\n\nvar SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nvar GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n\nfunction generateGrid(globalStyles, theme, breakpoint) {\n var styles = {};\n GRID_SIZES.forEach(function (size) {\n var key = \"grid-\".concat(breakpoint, \"-\").concat(size);\n\n if (size === true) {\n // For the auto layouting\n styles[key] = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n return;\n }\n\n if (size === 'auto') {\n styles[key] = {\n flexBasis: 'auto',\n flexGrow: 0,\n maxWidth: 'none'\n };\n return;\n } // Keep 7 significant numbers.\n\n\n var width = \"\".concat(Math.round(size / 12 * 10e7) / 10e5, \"%\"); // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n styles[key] = {\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n };\n }); // No need for a media query for the first size.\n\n if (breakpoint === 'xs') {\n Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction getOffset(val) {\n var div = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var parse = parseFloat(val);\n return \"\".concat(parse / div).concat(String(val).replace(String(parse), '') || 'px');\n}\n\nfunction generateGutter(theme, breakpoint) {\n var styles = {};\n SPACINGS.forEach(function (spacing) {\n var themeSpacing = theme.spacing(spacing);\n\n if (themeSpacing === 0) {\n return;\n }\n\n styles[\"spacing-\".concat(breakpoint, \"-\").concat(spacing)] = {\n margin: \"-\".concat(getOffset(themeSpacing, 2)),\n width: \"calc(100% + \".concat(getOffset(themeSpacing), \")\"),\n '& > $item': {\n padding: getOffset(themeSpacing, 2)\n }\n };\n });\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\n\nvar styles = function styles(theme) {\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `container={true}`. */\n container: {\n boxSizing: 'border-box',\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n },\n\n /* Styles applied to the root element if `item={true}`. */\n item: {\n boxSizing: 'border-box',\n margin: '0' // For instance, it's useful when used with a `figure` element.\n\n },\n\n /* Styles applied to the root element if `zeroMinWidth={true}`. */\n zeroMinWidth: {\n minWidth: 0\n },\n\n /* Styles applied to the root element if `direction=\"column\"`. */\n 'direction-xs-column': {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `direction=\"column-reverse\"`. */\n 'direction-xs-column-reverse': {\n flexDirection: 'column-reverse'\n },\n\n /* Styles applied to the root element if `direction=\"row-reverse\"`. */\n 'direction-xs-row-reverse': {\n flexDirection: 'row-reverse'\n },\n\n /* Styles applied to the root element if `wrap=\"nowrap\"`. */\n 'wrap-xs-nowrap': {\n flexWrap: 'nowrap'\n },\n\n /* Styles applied to the root element if `wrap=\"reverse\"`. */\n 'wrap-xs-wrap-reverse': {\n flexWrap: 'wrap-reverse'\n },\n\n /* Styles applied to the root element if `alignItems=\"center\"`. */\n 'align-items-xs-center': {\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `alignItems=\"flex-start\"`. */\n 'align-items-xs-flex-start': {\n alignItems: 'flex-start'\n },\n\n /* Styles applied to the root element if `alignItems=\"flex-end\"`. */\n 'align-items-xs-flex-end': {\n alignItems: 'flex-end'\n },\n\n /* Styles applied to the root element if `alignItems=\"baseline\"`. */\n 'align-items-xs-baseline': {\n alignItems: 'baseline'\n },\n\n /* Styles applied to the root element if `alignContent=\"center\"`. */\n 'align-content-xs-center': {\n alignContent: 'center'\n },\n\n /* Styles applied to the root element if `alignContent=\"flex-start\"`. */\n 'align-content-xs-flex-start': {\n alignContent: 'flex-start'\n },\n\n /* Styles applied to the root element if `alignContent=\"flex-end\"`. */\n 'align-content-xs-flex-end': {\n alignContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `alignContent=\"space-between\"`. */\n 'align-content-xs-space-between': {\n alignContent: 'space-between'\n },\n\n /* Styles applied to the root element if `alignContent=\"space-around\"`. */\n 'align-content-xs-space-around': {\n alignContent: 'space-around'\n },\n\n /* Styles applied to the root element if `justify=\"center\"`. */\n 'justify-xs-center': {\n justifyContent: 'center'\n },\n\n /* Styles applied to the root element if `justify=\"flex-end\"`. */\n 'justify-xs-flex-end': {\n justifyContent: 'flex-end'\n },\n\n /* Styles applied to the root element if `justify=\"space-between\"`. */\n 'justify-xs-space-between': {\n justifyContent: 'space-between'\n },\n\n /* Styles applied to the root element if `justify=\"space-around\"`. */\n 'justify-xs-space-around': {\n justifyContent: 'space-around'\n },\n\n /* Styles applied to the root element if `justify=\"space-evenly\"`. */\n 'justify-xs-space-evenly': {\n justifyContent: 'space-evenly'\n }\n }, generateGutter(theme, 'xs'), theme.breakpoints.keys.reduce(function (accumulator, key) {\n // Use side effect over immutability for better performance.\n generateGrid(accumulator, theme, key);\n return accumulator;\n }, {}));\n};\nvar Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Grid(props, ref) {\n var _props$alignContent = props.alignContent,\n alignContent = _props$alignContent === void 0 ? 'stretch' : _props$alignContent,\n _props$alignItems = props.alignItems,\n alignItems = _props$alignItems === void 0 ? 'stretch' : _props$alignItems,\n classes = props.classes,\n classNameProp = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$container = props.container,\n container = _props$container === void 0 ? false : _props$container,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'row' : _props$direction,\n _props$item = props.item,\n item = _props$item === void 0 ? false : _props$item,\n _props$justify = props.justify,\n justify = _props$justify === void 0 ? 'flex-start' : _props$justify,\n _props$lg = props.lg,\n lg = _props$lg === void 0 ? false : _props$lg,\n _props$md = props.md,\n md = _props$md === void 0 ? false : _props$md,\n _props$sm = props.sm,\n sm = _props$sm === void 0 ? false : _props$sm,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 0 : _props$spacing,\n _props$wrap = props.wrap,\n wrap = _props$wrap === void 0 ? 'wrap' : _props$wrap,\n _props$xl = props.xl,\n xl = _props$xl === void 0 ? false : _props$xl,\n _props$xs = props.xs,\n xs = _props$xs === void 0 ? false : _props$xs,\n _props$zeroMinWidth = props.zeroMinWidth,\n zeroMinWidth = _props$zeroMinWidth === void 0 ? false : _props$zeroMinWidth,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"alignContent\", \"alignItems\", \"classes\", \"className\", \"component\", \"container\", \"direction\", \"item\", \"justify\", \"lg\", \"md\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"]);\n\n var className = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classNameProp, container && [classes.container, spacing !== 0 && classes[\"spacing-xs-\".concat(String(spacing))]], item && classes.item, zeroMinWidth && classes.zeroMinWidth, direction !== 'row' && classes[\"direction-xs-\".concat(String(direction))], wrap !== 'wrap' && classes[\"wrap-xs-\".concat(String(wrap))], alignItems !== 'stretch' && classes[\"align-items-xs-\".concat(String(alignItems))], alignContent !== 'stretch' && classes[\"align-content-xs-\".concat(String(alignContent))], justify !== 'flex-start' && classes[\"justify-xs-\".concat(String(justify))], xs !== false && classes[\"grid-xs-\".concat(String(xs))], sm !== false && classes[\"grid-sm-\".concat(String(sm))], md !== false && classes[\"grid-md-\".concat(String(md))], lg !== false && classes[\"grid-lg-\".concat(String(lg))], xl !== false && classes[\"grid-xl-\".concat(String(xl))]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: className,\n ref: ref\n }, other));\n});\n true ? Grid.propTypes = {\n /**\n * Defines the `align-content` style property.\n * It's applied for all screen sizes.\n */\n alignContent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['stretch', 'center', 'flex-start', 'flex-end', 'space-between', 'space-around']),\n\n /**\n * Defines the `align-items` style property.\n * It's applied for all screen sizes.\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['flex-start', 'center', 'flex-end', 'stretch', 'baseline']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['row', 'row-reverse', 'column', 'column-reverse']),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n */\n item: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `justify-content` style property.\n * It is applied for all screen sizes.\n */\n justify: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['flex-start', 'center', 'flex-end', 'space-between', 'space-around', 'space-evenly']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n */\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n */\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n */\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the space between the type `item` component.\n * It can only be used on a type `container` component.\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(SPACINGS),\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n */\n wrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['nowrap', 'wrap', 'wrap-reverse']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n */\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n */\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf([false, 'auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n */\n zeroMinWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\nvar StyledGrid = Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiGrid'\n})(Grid);\n\nif (true) {\n var requireProp = Object(_utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_6__[\"default\"])('Grid');\n StyledGrid.propTypes = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, StyledGrid.propTypes, {\n alignContent: requireProp('container'),\n alignItems: requireProp('container'),\n direction: requireProp('container'),\n justify: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (StyledGrid);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Grid/Grid.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Grid/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Grid/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Grid */ \"./node_modules/@material-ui/core/esm/Grid/Grid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Grid__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Grid/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridList/GridList.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridList/GridList.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexWrap: 'wrap',\n overflowY: 'auto',\n listStyle: 'none',\n padding: 0,\n WebkitOverflowScrolling: 'touch' // Add iOS momentum scrolling.\n\n }\n};\nvar GridList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function GridList(props, ref) {\n var _props$cellHeight = props.cellHeight,\n cellHeight = _props$cellHeight === void 0 ? 180 : _props$cellHeight,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 2 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$spacing = props.spacing,\n spacing = _props$spacing === void 0 ? 4 : _props$spacing,\n style = props.style,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"cellHeight\", \"children\", \"classes\", \"className\", \"cols\", \"component\", \"spacing\", \"style\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref,\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n margin: -spacing / 2\n }, style)\n }, other), react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The GridList component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childCols = child.props.cols || 1;\n var childRows = child.props.rows || 1;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n width: \"\".concat(100 / cols * childCols, \"%\"),\n height: cellHeight === 'auto' ? 'auto' : cellHeight * childRows + spacing,\n padding: spacing / 2\n }, child.props.style)\n });\n }));\n});\n true ? GridList.propTypes = {\n /**\n * Number of px for one cell height.\n * You can set `'auto'` if you want to let the children determine the height.\n */\n cellHeight: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['auto'])]),\n\n /**\n * Grid Tiles that will be in Grid List.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Number of columns.\n */\n cols: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Number of px for the spacing between tiles.\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiGridList'\n})(GridList));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridList/GridList.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridList/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridList/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _GridList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GridList */ \"./node_modules/@material-ui/core/esm/GridList/GridList.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _GridList__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridList/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridListTile/GridListTile.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridListTile/GridListTile.js ***! \*************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/isMuiElement */ \"./node_modules/@material-ui/core/esm/utils/isMuiElement.js\");\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n flexShrink: 0\n },\n\n /* Styles applied to the `div` element that wraps the children. */\n tile: {\n position: 'relative',\n display: 'block',\n // In case it's not rendered with a div.\n height: '100%',\n overflow: 'hidden'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullHeight: {\n height: '100%',\n transform: 'translateX(-50%)',\n position: 'relative',\n left: '50%'\n },\n\n /* Styles applied to an `img` element child, if needed to ensure it covers the tile. */\n imgFullWidth: {\n width: '100%',\n position: 'relative',\n transform: 'translateY(-50%)',\n top: '50%'\n }\n};\n\nvar fit = function fit(imgEl, classes) {\n if (!imgEl || !imgEl.complete) {\n return;\n }\n\n if (imgEl.width / imgEl.height > imgEl.parentElement.offsetWidth / imgEl.parentElement.offsetHeight) {\n var _imgEl$classList, _imgEl$classList2;\n\n (_imgEl$classList = imgEl.classList).remove.apply(_imgEl$classList, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.imgFullWidth.split(' ')));\n\n (_imgEl$classList2 = imgEl.classList).add.apply(_imgEl$classList2, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.imgFullHeight.split(' ')));\n } else {\n var _imgEl$classList3, _imgEl$classList4;\n\n (_imgEl$classList3 = imgEl.classList).remove.apply(_imgEl$classList3, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.imgFullHeight.split(' ')));\n\n (_imgEl$classList4 = imgEl.classList).add.apply(_imgEl$classList4, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.imgFullWidth.split(' ')));\n }\n};\n\nfunction ensureImageCover(imgEl, classes) {\n if (!imgEl) {\n return;\n }\n\n if (imgEl.complete) {\n fit(imgEl, classes);\n } else {\n imgEl.addEventListener('load', function () {\n fit(imgEl, classes);\n });\n }\n}\n\nvar GridListTile = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function GridListTile(props, ref) {\n // cols rows default values are for docs only\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$cols = props.cols,\n cols = _props$cols === void 0 ? 1 : _props$cols,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$rows = props.rows,\n rows = _props$rows === void 0 ? 1 : _props$rows,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"cols\", \"component\", \"rows\"]);\n\n var imgRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n ensureImageCover(imgRef.current, classes);\n });\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(function () {\n fit(imgRef.current, classes);\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [classes]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.tile\n }, react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].map(children, function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (child.type === 'img' || Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(child, ['Image'])) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](child, {\n ref: imgRef\n });\n }\n\n return child;\n })));\n});\n true ? GridListTile.propTypes = {\n /**\n * Theoretically you can pass any node as children, but the main use case is to pass an img,\n * in which case GridListTile takes care of making the image \"cover\" available space\n * (similar to `background-size: cover` or to `object-fit: cover`).\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Width of the tile in number of grid cells.\n */\n cols: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Height of the tile in number of grid cells.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiGridListTile'\n})(GridListTile));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridListTile/GridListTile.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridListTile/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridListTile/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _GridListTile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GridListTile */ \"./node_modules/@material-ui/core/esm/GridListTile/GridListTile.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _GridListTile__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridListTile/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridListTileBar/GridListTileBar.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridListTileBar/GridListTileBar.js ***! \*******************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n left: 0,\n right: 0,\n height: 48,\n background: 'rgba(0, 0, 0, 0.5)',\n display: 'flex',\n alignItems: 'center',\n fontFamily: theme.typography.fontFamily\n },\n\n /* Styles applied to the root element if `titlePosition=\"bottom\"`. */\n titlePositionBottom: {\n bottom: 0\n },\n\n /* Styles applied to the root element if `titlePosition=\"top\"`. */\n titlePositionTop: {\n top: 0\n },\n\n /* Styles applied to the root element if a `subtitle` is provided. */\n rootSubtitle: {\n height: 68\n },\n\n /* Styles applied to the title and subtitle container element. */\n titleWrap: {\n flexGrow: 1,\n marginLeft: 16,\n marginRight: 16,\n color: theme.palette.common.white,\n overflow: 'hidden'\n },\n\n /* Styles applied to the container element if `actionPosition=\"left\"`. */\n titleWrapActionPosLeft: {\n marginLeft: 0\n },\n\n /* Styles applied to the container element if `actionPosition=\"right\"`. */\n titleWrapActionPosRight: {\n marginRight: 0\n },\n\n /* Styles applied to the title container element. */\n title: {\n fontSize: theme.typography.pxToRem(16),\n lineHeight: '24px',\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the subtitle container element. */\n subtitle: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1,\n textOverflow: 'ellipsis',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the actionIcon if supplied. */\n actionIcon: {},\n\n /* Styles applied to the actionIcon if `actionPosition=\"left\"`. */\n actionIconActionPosLeft: {\n order: -1\n }\n };\n};\nvar GridListTileBar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function GridListTileBar(props, ref) {\n var actionIcon = props.actionIcon,\n _props$actionPosition = props.actionPosition,\n actionPosition = _props$actionPosition === void 0 ? 'right' : _props$actionPosition,\n classes = props.classes,\n className = props.className,\n subtitle = props.subtitle,\n title = props.title,\n _props$titlePosition = props.titlePosition,\n titlePosition = _props$titlePosition === void 0 ? 'bottom' : _props$titlePosition,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"actionIcon\", \"actionPosition\", \"classes\", \"className\", \"subtitle\", \"title\", \"titlePosition\"]);\n\n var actionPos = actionIcon && actionPosition;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, titlePosition === 'top' ? classes.titlePositionTop : classes.titlePositionBottom, subtitle && classes.rootSubtitle),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.titleWrap, {\n 'left': classes.titleWrapActionPosLeft,\n 'right': classes.titleWrapActionPosRight\n }[actionPos])\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.title\n }, title), subtitle ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.subtitle\n }, subtitle) : null), actionIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.actionIcon, actionPos === 'left' && classes.actionIconActionPosLeft)\n }, actionIcon) : null);\n});\n true ? GridListTileBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * An IconButton element to be used as secondary action target\n * (primary action target is the tile itself).\n */\n actionIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Position of secondary action IconButton.\n */\n actionPosition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['left', 'right']),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * String or element serving as subtitle (support text).\n */\n subtitle: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Title to be displayed on tile.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Position of the title bar.\n */\n titlePosition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'top'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiGridListTileBar'\n})(GridListTileBar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridListTileBar/GridListTileBar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/GridListTileBar/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/GridListTileBar/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _GridListTileBar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GridListTileBar */ \"./node_modules/@material-ui/core/esm/GridListTileBar/GridListTileBar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _GridListTileBar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/GridListTileBar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Grow/Grow.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Grow/Grow.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\n\n\n\nfunction getScale(value) {\n return \"scale(\".concat(value, \", \").concat(Math.pow(value, 2), \")\");\n}\n\nvar styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n/**\n * The Grow transition is used by the [Tooltip](/components/tooltips/) and\n * [Popover](/components/popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Grow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Grow(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? 'auto' : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__[\"Transition\"] : _props$TransitionComp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var timer = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n var autoTimeout = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(children.ref, ref);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__[\"reflow\"])(node); // So the animation always start from the start.\n\n var _getTransitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n }),\n transitionDuration = _getTransitionProps.duration,\n delay = _getTransitionProps.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay\n })].join(',');\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var _getTransitionProps2 = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_7__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n }),\n transitionDuration = _getTransitionProps2.duration,\n delay = _getTransitionProps2.delay;\n\n var duration;\n\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n\n node.style.transition = [theme.transitions.create('opacity', {\n duration: duration,\n delay: delay\n }), theme.transitions.create('transform', {\n duration: duration * 0.666,\n delay: delay || duration * 0.333\n })].join(',');\n node.style.opacity = '0';\n node.style.transform = getScale(0.75);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n\n var addEndListener = function addEndListener(nodeOrNext, maybeNext) {\n var next = enableStrictModeCompat ? nodeOrNext : maybeNext;\n\n if (timeout === 'auto') {\n timer.current = setTimeout(next, autoTimeout.current || 0);\n }\n };\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n return function () {\n clearTimeout(timer.current);\n };\n }, []);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: addEndListener,\n timeout: timeout === 'auto' ? null : timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\n true ? Grow.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['auto']), prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })])\n} : undefined;\nGrow.muiSupportAuto = true;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Grow);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Grow/Grow.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Grow/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Grow/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Grow */ \"./node_modules/@material-ui/core/esm/Grow/Grow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Grow__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Grow/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Hidden/Hidden.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Hidden/Hidden.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _HiddenJs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HiddenJs */ \"./node_modules/@material-ui/core/esm/Hidden/HiddenJs.js\");\n/* harmony import */ var _HiddenCss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HiddenCss */ \"./node_modules/@material-ui/core/esm/Hidden/HiddenCss.js\");\n\n\n\n\n\n\n/**\n * Responsively hides children based on the selected implementation.\n */\n\nfunction Hidden(props) {\n var _props$implementation = props.implementation,\n implementation = _props$implementation === void 0 ? 'js' : _props$implementation,\n _props$lgDown = props.lgDown,\n lgDown = _props$lgDown === void 0 ? false : _props$lgDown,\n _props$lgUp = props.lgUp,\n lgUp = _props$lgUp === void 0 ? false : _props$lgUp,\n _props$mdDown = props.mdDown,\n mdDown = _props$mdDown === void 0 ? false : _props$mdDown,\n _props$mdUp = props.mdUp,\n mdUp = _props$mdUp === void 0 ? false : _props$mdUp,\n _props$smDown = props.smDown,\n smDown = _props$smDown === void 0 ? false : _props$smDown,\n _props$smUp = props.smUp,\n smUp = _props$smUp === void 0 ? false : _props$smUp,\n _props$xlDown = props.xlDown,\n xlDown = _props$xlDown === void 0 ? false : _props$xlDown,\n _props$xlUp = props.xlUp,\n xlUp = _props$xlUp === void 0 ? false : _props$xlUp,\n _props$xsDown = props.xsDown,\n xsDown = _props$xsDown === void 0 ? false : _props$xsDown,\n _props$xsUp = props.xsUp,\n xsUp = _props$xsUp === void 0 ? false : _props$xsUp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"implementation\", \"lgDown\", \"lgUp\", \"mdDown\", \"mdUp\", \"smDown\", \"smUp\", \"xlDown\", \"xlUp\", \"xsDown\", \"xsUp\"]);\n\n if (implementation === 'js') {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_HiddenJs__WEBPACK_IMPORTED_MODULE_4__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_HiddenCss__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n lgDown: lgDown,\n lgUp: lgUp,\n mdDown: mdDown,\n mdUp: mdUp,\n smDown: smDown,\n smUp: smUp,\n xlDown: xlDown,\n xlUp: xlUp,\n xsDown: xsDown,\n xsUp: xsUp\n }, other));\n}\n\n true ? Hidden.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Hidden);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Hidden/Hidden.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Hidden/HiddenCss.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Hidden/HiddenCss.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var hidden = {\n display: 'none'\n };\n return theme.breakpoints.keys.reduce(function (acc, key) {\n acc[\"only\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(key))] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.only(key), hidden);\n acc[\"\".concat(key, \"Up\")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up(key), hidden);\n acc[\"\".concat(key, \"Down\")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.down(key), hidden);\n return acc;\n }, {});\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction HiddenCss(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n only = props.only,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"only\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n\n if (true) {\n var unknownProps = Object.keys(other).filter(function (propName) {\n var isUndeclaredBreakpoint = !theme.breakpoints.keys.some(function (breakpoint) {\n return \"\".concat(breakpoint, \"Up\") === propName || \"\".concat(breakpoint, \"Down\") === propName;\n });\n return isUndeclaredBreakpoint;\n });\n\n if (unknownProps.length > 0) {\n console.error(\"Material-UI: Unsupported props received by ``: \".concat(unknownProps.join(', '), \". Did you forget to wrap this component in a ThemeProvider declaring these breakpoints?\"));\n }\n }\n\n var clsx = [];\n\n if (className) {\n clsx.push(className);\n }\n\n for (var i = 0; i < theme.breakpoints.keys.length; i += 1) {\n var breakpoint = theme.breakpoints.keys[i];\n var breakpointUp = props[\"\".concat(breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(breakpoint, \"Down\")];\n\n if (breakpointUp) {\n clsx.push(classes[\"\".concat(breakpoint, \"Up\")]);\n }\n\n if (breakpointDown) {\n clsx.push(classes[\"\".concat(breakpoint, \"Down\")]);\n }\n }\n\n if (only) {\n var onlyBreakpoints = Array.isArray(only) ? only : [only];\n onlyBreakpoints.forEach(function (breakpoint) {\n clsx.push(classes[\"only\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(breakpoint))]);\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: clsx.join(' ')\n }, children);\n}\n\n true ? HiddenCss.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['js', 'css']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'PrivateHiddenCss'\n})(HiddenCss));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Hidden/HiddenCss.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Hidden/HiddenJs.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Hidden/HiddenJs.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../withWidth */ \"./node_modules/@material-ui/core/esm/withWidth/index.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n/**\n * @ignore - internal component.\n */\n\nfunction HiddenJs(props) {\n var children = props.children,\n only = props.only,\n width = props.width;\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n var visible = true; // `only` check is faster to get out sooner if used.\n\n if (only) {\n if (Array.isArray(only)) {\n for (var i = 0; i < only.length; i += 1) {\n var breakpoint = only[i];\n\n if (width === breakpoint) {\n visible = false;\n break;\n }\n }\n } else if (only && width === only) {\n visible = false;\n }\n } // Allow `only` to be combined with other props. If already hidden, no need to check others.\n\n\n if (visible) {\n // determine visibility based on the smallest size up\n for (var _i = 0; _i < theme.breakpoints.keys.length; _i += 1) {\n var _breakpoint = theme.breakpoints.keys[_i];\n var breakpointUp = props[\"\".concat(_breakpoint, \"Up\")];\n var breakpointDown = props[\"\".concat(_breakpoint, \"Down\")];\n\n if (breakpointUp && Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__[\"isWidthUp\"])(_breakpoint, width) || breakpointDown && Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__[\"isWidthDown\"])(_breakpoint, width)) {\n visible = false;\n break;\n }\n }\n }\n\n if (!visible) {\n return null;\n }\n\n return children;\n}\n\nHiddenJs.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.node,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,\n\n /**\n * Specify which implementation to use. 'js' is the default, 'css' works better for\n * server-side rendering.\n */\n implementation: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['js', 'css']),\n\n /**\n * You can use this prop when choosing the `js` implementation with server-side rendering.\n *\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n lgDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n lgUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n mdDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n mdUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * Hide the given breakpoint(s).\n */\n only: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n smDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n smUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * @ignore\n * width prop provided by withWidth decorator.\n */\n width: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string.isRequired,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xlDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xlUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and down will be hidden.\n */\n xsDown: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,\n\n /**\n * If `true`, screens this size and up will be hidden.\n */\n xsUp: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool\n};\n\nif (true) {\n HiddenJs.propTypes = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_1__[\"exactProp\"])(HiddenJs.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_withWidth__WEBPACK_IMPORTED_MODULE_2__[\"default\"])()(HiddenJs));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Hidden/HiddenJs.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Hidden/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Hidden/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Hidden__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Hidden */ \"./node_modules/@material-ui/core/esm/Hidden/Hidden.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Hidden__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Hidden/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Icon/Icon.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Icon/Icon.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n fontSize: theme.typography.pxToRem(24),\n width: '1em',\n height: '1em',\n // Chrome fix for https://bugs.chromium.org/p/chromium/issues/detail?id=820541\n // To remove at some point.\n overflow: 'hidden',\n flexShrink: 0\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(36)\n }\n };\n};\nvar Icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Icon(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'default' : _props$fontSize,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"component\", \"fontSize\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])('material-icons', classes.root, className, color !== 'inherit' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], fontSize !== 'default' && classes[\"fontSize\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(fontSize))]),\n \"aria-hidden\": true,\n ref: ref\n }, other));\n});\n true ? Icon.propTypes = {\n /**\n * The name of the icon font ligature.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'default', 'small', 'large'])\n} : undefined;\nIcon.muiName = 'Icon';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiIcon'\n})(Icon));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Icon/Icon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Icon/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Icon/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Icon */ \"./node_modules/@material-ui/core/esm/Icon/Icon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Icon__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Icon/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/IconButton/IconButton.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/IconButton/IconButton.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 12,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE 11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n '&$disabled': {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -12,\n '$sizeSmall&': {\n marginLeft: -3\n }\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -12,\n '$sizeSmall&': {\n marginRight: -3\n }\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: 3,\n fontSize: theme.typography.pxToRem(18)\n },\n\n /* Styles applied to the children container element. */\n label: {\n width: '100%',\n display: 'flex',\n alignItems: 'inherit',\n justifyContent: 'inherit'\n }\n };\n};\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nvar IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function IconButton(props, ref) {\n var _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"edge\", \"children\", \"classes\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, color !== 'default' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(color))], disabled && classes.disabled, size === \"small\" && classes[\"size\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(size))], {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge]),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.label\n }, children));\n});\n true ? IconButton.propTypes = {\n /**\n * The icon element.\n */\n children: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, function (props) {\n var found = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children).some(function (child) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child) && child.props.onClick;\n });\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener ' + 'to a child of a button element.', 'Firefox will never trigger the event.', 'You should move the onClick listener to the parent button element.', 'https://github.com/mui-org/material-ui/issues/13957'].join('\\n'));\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'inherit', 'primary', 'secondary']),\n\n /**\n * If `true`, the button will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['start', 'end', false]),\n\n /**\n * The size of the button.\n * `small` is equivalent to the dense button styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiIconButton'\n})(IconButton));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/IconButton/IconButton.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/IconButton/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/IconButton/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/IconButton.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _IconButton__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/IconButton/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Input/Input.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Input/Input.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative'\n },\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n 'label + &': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if color secondary. */\n colorSecondary: {\n '&$underline:after': {\n borderBottomColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if `disableUnderline={false}`. */\n underline: {\n '&:after': {\n borderBottom: \"2px solid \".concat(theme.palette.primary.main),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&$focused:after': {\n transform: 'scaleX(1)'\n },\n '&$error:after': {\n borderBottomColor: theme.palette.error.main,\n transform: 'scaleX(1)' // error is always underlined in red\n\n },\n '&:before': {\n borderBottom: \"1px solid \".concat(bottomLineColor),\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE 11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n\n },\n '&:hover:not($disabled):before': {\n borderBottom: \"2px solid \".concat(theme.palette.text.primary),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: \"1px solid \".concat(bottomLineColor)\n }\n },\n '&$disabled:before': {\n borderBottomStyle: 'dotted'\n }\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {},\n\n /* Styles applied to the `input` element. */\n input: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {},\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {},\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {}\n };\n};\nvar Input = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Input(props, ref) {\n var disableUnderline = props.disableUnderline,\n classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"disableUnderline\", \"classes\", \"fullWidth\", \"inputComponent\", \"multiline\", \"type\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_InputBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, classes, {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, !disableUnderline && classes.underline),\n underline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\n true ? Input.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input will not have an underline.\n */\n disableUnderline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none']),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\nInput.muiName = 'Input';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiInput'\n})(Input));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Input/Input.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Input/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Input/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Input */ \"./node_modules/@material-ui/core/esm/Input/Input.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Input__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Input/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FormControl/FormControlContext */ \"./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js\");\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n height: '0.01em',\n // Fix IE 11 flexbox alignment. To remove at some point.\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the root element if `variant=\"filled\"`. */\n filled: {\n '&$positionStart:not($hiddenLabel)': {\n marginTop: 16\n }\n },\n\n /* Styles applied to the root element if `position=\"start\"`. */\n positionStart: {\n marginRight: 8\n },\n\n /* Styles applied to the root element if `position=\"end\"`. */\n positionEnd: {\n marginLeft: 8\n },\n\n /* Styles applied to the root element if `disablePointerEvents=true`. */\n disablePointerEvents: {\n pointerEvents: 'none'\n },\n\n /* Styles applied if the adornment is used inside . */\n hiddenLabel: {},\n\n /* Styles applied if the adornment is used inside . */\n marginDense: {}\n};\nvar InputAdornment = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function InputAdornment(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disablePointer = props.disablePointerEvents,\n disablePointerEvents = _props$disablePointer === void 0 ? false : _props$disablePointer,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n position = props.position,\n variantProp = props.variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"disablePointerEvents\", \"disableTypography\", \"position\", \"variant\"]);\n\n var muiFormControl = Object(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__[\"useFormControl\"])() || {};\n var variant = variantProp;\n\n if (variantProp && muiFormControl.variant) {\n if (true) {\n if (variantProp === muiFormControl.variant) {\n console.error('Material-UI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Provider, {\n value: null\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, disablePointerEvents && classes.disablePointerEvents, muiFormControl.hiddenLabel && classes.hiddenLabel, variant === 'filled' && classes.filled, {\n 'start': classes.positionStart,\n 'end': classes.positionEnd\n }[position], muiFormControl.margin === 'dense' && classes.marginDense),\n ref: ref\n }, other), typeof children === 'string' && !disableTypography ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n color: \"textSecondary\"\n }, children) : children));\n});\n true ? InputAdornment.propTypes = {\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the input on click.\n */\n disablePointerEvents: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If children is a string then disable wrapping in a Typography component.\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n muiFormControl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['start', 'end']),\n\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['standard', 'outlined', 'filled'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiInputAdornment'\n})(InputAdornment));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputAdornment/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputAdornment/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _InputAdornment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputAdornment */ \"./node_modules/@material-ui/core/esm/InputAdornment/InputAdornment.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _InputAdornment__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputAdornment/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputBase/InputBase.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputBase/InputBase.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FormControl/FormControlContext */ \"./node_modules/@material-ui/core/esm/FormControl/FormControlContext.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../TextareaAutosize */ \"./node_modules/@material-ui/core/esm/TextareaAutosize/index.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./utils */ \"./node_modules/@material-ui/core/esm/InputBase/utils.js\");\n\n\n\n\n/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var light = theme.palette.type === 'light';\n var placeholder = {\n color: 'currentColor',\n opacity: light ? 0.42 : 0.5,\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n var placeholderHidden = {\n opacity: '0 !important'\n };\n var placeholderVisible = {\n opacity: light ? 0.42 : 0.5\n };\n return {\n '@global': {\n '@keyframes mui-auto-fill': {},\n '@keyframes mui-auto-fill-cancel': {}\n },\n\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.typography.body1, {\n color: theme.palette.text.primary,\n lineHeight: '1.1876em',\n // Reset (19px), match the native input line-height\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n '&$disabled': {\n color: theme.palette.text.disabled,\n cursor: 'default'\n }\n }),\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {},\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {},\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n '&$marginDense': {\n paddingTop: 4 - 1\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {},\n\n /* Styles applied to the root element if `fullWidth={true}`. */\n fullWidth: {\n width: '100%'\n },\n\n /* Styles applied to the `input` element. */\n input: {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: \"\".concat(8 - 2, \"px 0 \").concat(8 - 1, \"px\"),\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.1876em',\n // Reset (19px), match the native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n // Fix IE 11 width issue\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholder,\n // IE 11\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n '-webkit-appearance': 'none'\n },\n // Show and hide the placeholder logic\n 'label[data-shrink=false] + $formControl &': {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&:-ms-input-placeholder': placeholderHidden,\n // IE 11\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus:-ms-input-placeholder': placeholderVisible,\n // IE 11\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n\n },\n '&$disabled': {\n opacity: 1 // Reset iOS opacity\n\n },\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 4 - 1\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n height: 'auto',\n resize: 'none',\n padding: 0\n },\n\n /* Styles applied to the `input` element if `type=\"search\"`. */\n inputTypeSearch: {\n // Improve type search style.\n '-moz-appearance': 'textfield',\n '-webkit-appearance': 'textfield'\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {},\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {},\n\n /* Styles applied to the `input` element if `hiddenLabel={true}`. */\n inputHiddenLabel: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"] : react__WEBPACK_IMPORTED_MODULE_3__[\"useLayoutEffect\"];\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\n\nvar InputBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function InputBase(props, ref) {\n var ariaDescribedby = props['aria-describedby'],\n autoComplete = props.autoComplete,\n autoFocus = props.autoFocus,\n classes = props.classes,\n className = props.className,\n color = props.color,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n endAdornment = props.endAdornment,\n error = props.error,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n id = props.id,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n _props$inputProps = props.inputProps,\n inputPropsProp = _props$inputProps === void 0 ? {} : _props$inputProps,\n inputRefProp = props.inputRef,\n margin = props.margin,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n onKeyDown = props.onKeyDown,\n onKeyUp = props.onKeyUp,\n placeholder = props.placeholder,\n readOnly = props.readOnly,\n renderSuffix = props.renderSuffix,\n rows = props.rows,\n rowsMax = props.rowsMax,\n rowsMin = props.rowsMin,\n startAdornment = props.startAdornment,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n valueProp = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"aria-describedby\", \"autoComplete\", \"autoFocus\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"endAdornment\", \"error\", \"fullWidth\", \"id\", \"inputComponent\", \"inputProps\", \"inputRef\", \"margin\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onClick\", \"onFocus\", \"onKeyDown\", \"onKeyUp\", \"placeholder\", \"readOnly\", \"renderSuffix\", \"rows\", \"rowsMax\", \"rowsMin\", \"startAdornment\", \"type\", \"value\"]);\n\n var value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n\n var _React$useRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n var handleInputRefWarning = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function (instance) {\n if (true) {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['Material-UI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `inputRef` prop.', 'Make sure the `inputRef` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n var handleInputPropsRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(inputPropsProp.ref, handleInputRefWarning);\n var handleInputRefProp = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(inputRefProp, handleInputPropsRefProp);\n var handleInputRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(inputRef, handleInputRefProp);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"](false),\n focused = _React$useState[0],\n setFocused = _React$useState[1];\n\n var muiFormControl = Object(_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__[\"useFormControl\"])();\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n\n return undefined;\n }, [muiFormControl]);\n }\n\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'margin', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused; // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n var onFilled = muiFormControl && muiFormControl.onFilled;\n var onEmpty = muiFormControl && muiFormControl.onEmpty;\n var checkDirty = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function (obj) {\n if (Object(_utils__WEBPACK_IMPORTED_MODULE_12__[\"isFilled\"])(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(function () {\n if (isControlled) {\n checkDirty({\n value: value\n });\n }\n }, [value, checkDirty, isControlled]);\n\n var handleFocus = function handleFocus(event) {\n // Fix a bug with IE 11 where the focus/blur events are triggered\n // while the input is disabled.\n if (fcs.disabled) {\n event.stopPropagation();\n return;\n }\n\n if (onFocus) {\n onFocus(event);\n }\n\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n\n var handleChange = function handleChange(event) {\n if (!isControlled) {\n var element = event.target || inputRef.current;\n\n if (element == null) {\n throw new Error( true ? \"Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.\" : undefined);\n }\n\n checkDirty({\n value: element.value\n });\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange.apply(inputPropsProp, [event].concat(args));\n } // Perform in the willUpdate\n\n\n if (onChange) {\n onChange.apply(void 0, [event].concat(args));\n }\n }; // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n checkDirty(inputRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n var handleClick = function handleClick(event) {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var InputComponent = inputComponent;\n\n var inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, inputPropsProp, {\n ref: handleInputRef\n });\n\n if (typeof InputComponent !== 'string') {\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n // Rename ref to inputRef as we don't know the\n // provided `inputComponent` structure.\n inputRef: handleInputRef,\n type: type\n }, inputProps, {\n ref: null\n });\n } else if (multiline) {\n if (rows && !rowsMax && !rowsMin) {\n InputComponent = 'textarea';\n } else {\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n rows: rows,\n rowsMax: rowsMax\n }, inputProps);\n InputComponent = _TextareaAutosize__WEBPACK_IMPORTED_MODULE_11__[\"default\"];\n }\n } else {\n inputProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n type: type\n }, inputProps);\n }\n\n var handleAutoFill = function handleAutoFill(event) {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(fcs.color || 'primary'))], className, fcs.disabled && classes.disabled, fcs.error && classes.error, fullWidth && classes.fullWidth, fcs.focused && classes.focused, muiFormControl && classes.formControl, multiline && classes.multiline, startAdornment && classes.adornedStart, endAdornment && classes.adornedEnd, fcs.margin === 'dense' && classes.marginDense),\n onClick: handleClick,\n ref: ref\n }, other), startAdornment, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_FormControl_FormControlContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"].Provider, {\n value: null\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp\n }, inputProps, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.input, inputPropsProp.className, fcs.disabled && classes.disabled, multiline && classes.inputMultiline, fcs.hiddenLabel && classes.inputHiddenLabel, startAdornment && classes.inputAdornedStart, endAdornment && classes.inputAdornedEnd, type === 'search' && classes.inputTypeSearch, fcs.margin === 'dense' && classes.inputMarginDense),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n }))), endAdornment, renderSuffix ? renderSuffix(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, fcs, {\n startAdornment: startAdornment\n })) : null);\n});\n true ? InputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n 'aria-describedby': prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"refType\"],\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['dense', 'none']),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Callback fired when the input is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onKeyUp: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n renderSuffix: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n rowsMin: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiInputBase'\n})(InputBase));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputBase/InputBase.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputBase/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputBase/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/InputBase.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _InputBase__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputBase/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputBase/utils.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputBase/utils.js ***! \***************************************************************/ /*! exports provided: hasValue, isFilled, isAdornedStart */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasValue\", function() { return hasValue; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isFilled\", function() { return isFilled; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isAdornedStart\", function() { return isAdornedStart; });\n// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nfunction hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n} // Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\n\nfunction isFilled(obj) {\n var SSR = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n} // Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\n\nfunction isAdornedStart(obj) {\n return obj.startAdornment;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputBase/utils.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputLabel/InputLabel.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputLabel/InputLabel.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../FormLabel */ \"./node_modules/@material-ui/core/esm/FormLabel/index.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n transformOrigin: 'top left'\n },\n\n /* Pseudo-class applied to the root element if `focused={true}`. */\n focused: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element if `required={true}`. */\n required: {},\n\n /* Pseudo-class applied to the asterisk element. */\n asterisk: {},\n\n /* Styles applied to the root element if the component is a descendant of `FormControl`. */\n formControl: {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 24px) scale(1)'\n },\n\n /* Styles applied to the root element if `margin=\"dense\"`. */\n marginDense: {\n // Compensation for the `Input.inputDense` style.\n transform: 'translate(0, 21px) scale(1)'\n },\n\n /* Styles applied to the `input` element if `shrink={true}`. */\n shrink: {\n transform: 'translate(0, 1.5px) scale(0.75)',\n transformOrigin: 'top left'\n },\n\n /* Styles applied to the `input` element if `disableAnimation={false}`. */\n animated: {\n transition: theme.transitions.create(['color', 'transform'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n },\n\n /* Styles applied to the root element if `variant=\"filled\"`. */\n filled: {\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 20px) scale(1)',\n '&$marginDense': {\n transform: 'translate(12px, 17px) scale(1)'\n },\n '&$shrink': {\n transform: 'translate(12px, 10px) scale(0.75)',\n '&$marginDense': {\n transform: 'translate(12px, 7px) scale(0.75)'\n }\n }\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 20px) scale(1)',\n '&$marginDense': {\n transform: 'translate(14px, 12px) scale(1)'\n },\n '&$shrink': {\n transform: 'translate(14px, -6px) scale(0.75)'\n }\n }\n };\n};\nvar InputLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function InputLabel(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disableAnimati = props.disableAnimation,\n disableAnimation = _props$disableAnimati === void 0 ? false : _props$disableAnimati,\n margin = props.margin,\n shrinkProp = props.shrink,\n variant = props.variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"disableAnimation\", \"margin\", \"shrink\", \"variant\"]);\n\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n var shrink = shrinkProp;\n\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_5__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['margin', 'variant']\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FormLabel__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-shrink\": shrink,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, muiFormControl && classes.formControl, !disableAnimation && classes.animated, shrink && classes.shrink, fcs.margin === 'dense' && classes.marginDense, {\n 'filled': classes.filled,\n 'outlined': classes.outlined\n }[fcs.variant]),\n classes: {\n focused: classes.focused,\n disabled: classes.disabled,\n error: classes.error,\n required: classes.required,\n asterisk: classes.asterisk\n },\n ref: ref\n }, other));\n});\n true ? InputLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The contents of the `InputLabel`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * If `true`, the transition animation is disabled.\n */\n disableAnimation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, apply disabled class.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label will be displayed in an error state.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input of this label is focused.\n */\n focused: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense']),\n\n /**\n * if `true`, the label will indicate that the input is required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label is shrunk.\n */\n shrink: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiInputLabel'\n})(InputLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputLabel/InputLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/InputLabel/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/InputLabel/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./InputLabel */ \"./node_modules/@material-ui/core/esm/InputLabel/InputLabel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _InputLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/InputLabel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\n\nvar TRANSITION_DURATION = 4; // seconds\n\nvar styles = function styles(theme) {\n var getColor = function getColor(color) {\n return theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"lighten\"])(color, 0.62) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"darken\"])(color, 0.5);\n };\n\n var backgroundPrimary = getColor(theme.palette.primary.main);\n var backgroundSecondary = getColor(theme.palette.secondary.main);\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n overflow: 'hidden',\n height: 4,\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root and bar2 element if `color=\"primary\"`; bar2 if `variant=\"buffer\"`. */\n colorPrimary: {\n backgroundColor: backgroundPrimary\n },\n\n /* Styles applied to the root and bar2 elements if `color=\"secondary\"`; bar2 if `variant=\"buffer\"`. */\n colorSecondary: {\n backgroundColor: backgroundSecondary\n },\n\n /* Styles applied to the root element if `variant=\"determinate\"`. */\n determinate: {},\n\n /* Styles applied to the root element if `variant=\"indeterminate\"`. */\n indeterminate: {},\n\n /* Styles applied to the root element if `variant=\"buffer\"`. */\n buffer: {\n backgroundColor: 'transparent'\n },\n\n /* Styles applied to the root element if `variant=\"query\"`. */\n query: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"`. */\n dashed: {\n position: 'absolute',\n marginTop: 0,\n height: '100%',\n width: '100%',\n animation: '$buffer 3s infinite linear'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"primary\"`. */\n dashedColorPrimary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundPrimary, \" 0%, \").concat(backgroundPrimary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the additional bar element if `variant=\"buffer\"` and `color=\"secondary\"`. */\n dashedColorSecondary: {\n backgroundImage: \"radial-gradient(\".concat(backgroundSecondary, \" 0%, \").concat(backgroundSecondary, \" 16%, transparent 42%)\"),\n backgroundSize: '10px 10px',\n backgroundPosition: '0 -23px'\n },\n\n /* Styles applied to the layered bar1 and bar2 elements. */\n bar: {\n width: '100%',\n position: 'absolute',\n left: 0,\n bottom: 0,\n top: 0,\n transition: 'transform 0.2s linear',\n transformOrigin: 'left'\n },\n\n /* Styles applied to the bar elements if `color=\"primary\"`; bar2 if `variant` not \"buffer\". */\n barColorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the bar elements if `color=\"secondary\"`; bar2 if `variant` not \"buffer\". */\n barColorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n\n /* Styles applied to the bar1 element if `variant=\"indeterminate or query\"`. */\n bar1Indeterminate: {\n width: 'auto',\n animation: '$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite'\n },\n\n /* Styles applied to the bar1 element if `variant=\"determinate\"`. */\n bar1Determinate: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar1 element if `variant=\"buffer\"`. */\n bar1Buffer: {\n zIndex: 1,\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n\n /* Styles applied to the bar2 element if `variant=\"indeterminate or query\"`. */\n bar2Indeterminate: {\n width: 'auto',\n animation: '$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite'\n },\n\n /* Styles applied to the bar2 element if `variant=\"buffer\"`. */\n bar2Buffer: {\n transition: \"transform .\".concat(TRANSITION_DURATION, \"s linear\")\n },\n // Legends:\n // || represents the viewport\n // - represents a light background\n // x represents a dark background\n '@keyframes indeterminate1': {\n // |-----|---x-||-----||-----|\n '0%': {\n left: '-35%',\n right: '100%'\n },\n // |-----|-----||-----||xxxx-|\n '60%': {\n left: '100%',\n right: '-90%'\n },\n '100%': {\n left: '100%',\n right: '-90%'\n }\n },\n '@keyframes indeterminate2': {\n // |xxxxx|xxxxx||-----||-----|\n '0%': {\n left: '-200%',\n right: '100%'\n },\n // |-----|-----||-----||-x----|\n '60%': {\n left: '107%',\n right: '-8%'\n },\n '100%': {\n left: '107%',\n right: '-8%'\n }\n },\n '@keyframes buffer': {\n '0%': {\n opacity: 1,\n backgroundPosition: '0 -23px'\n },\n '50%': {\n opacity: 0,\n backgroundPosition: '0 -23px'\n },\n '100%': {\n opacity: 1,\n backgroundPosition: '-200px -23px'\n }\n }\n };\n};\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\n\nvar LinearProgress = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function LinearProgress(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n value = props.value,\n valueBuffer = props.valueBuffer,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'indeterminate' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"value\", \"valueBuffer\", \"variant\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n var rootProps = {};\n var inlineStyles = {\n bar1: {},\n bar2: {}\n };\n\n if (variant === 'determinate' || variant === 'buffer') {\n if (value !== undefined) {\n rootProps['aria-valuenow'] = Math.round(value);\n rootProps['aria-valuemin'] = 0;\n rootProps['aria-valuemax'] = 100;\n var transform = value - 100;\n\n if (theme.direction === 'rtl') {\n transform = -transform;\n }\n\n inlineStyles.bar1.transform = \"translateX(\".concat(transform, \"%)\");\n } else if (true) {\n console.error('Material-UI: You need to provide a value prop ' + 'when using the determinate or buffer variant of LinearProgress .');\n }\n }\n\n if (variant === 'buffer') {\n if (valueBuffer !== undefined) {\n var _transform = (valueBuffer || 0) - 100;\n\n if (theme.direction === 'rtl') {\n _transform = -_transform;\n }\n\n inlineStyles.bar2.transform = \"translateX(\".concat(_transform, \"%)\");\n } else if (true) {\n console.error('Material-UI: You need to provide a valueBuffer prop ' + 'when using the buffer variant of LinearProgress.');\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(color))], className, {\n 'determinate': classes.determinate,\n 'indeterminate': classes.indeterminate,\n 'buffer': classes.buffer,\n 'query': classes.query\n }[variant]),\n role: \"progressbar\"\n }, rootProps, {\n ref: ref\n }, other), variant === 'buffer' ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.dashed, classes[\"dashedColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(color))])\n }) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.bar, classes[\"barColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(color))], (variant === 'indeterminate' || variant === 'query') && classes.bar1Indeterminate, {\n 'determinate': classes.bar1Determinate,\n 'buffer': classes.bar1Buffer\n }[variant]),\n style: inlineStyles.bar1\n }), variant === 'determinate' ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.bar, (variant === 'indeterminate' || variant === 'query') && classes.bar2Indeterminate, variant === 'buffer' ? [classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(color))], classes.bar2Buffer] : classes[\"barColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(color))]),\n style: inlineStyles.bar2\n }));\n});\n true ? LinearProgress.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The value of the progress indicator for the determinate and buffer variants.\n * Value between 0 and 100.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The value for the buffer variant.\n * Value between 0 and 100.\n */\n valueBuffer: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The variant to use.\n * Use indeterminate or query when there is no progress value.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['buffer', 'determinate', 'indeterminate', 'query'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiLinearProgress'\n})(LinearProgress));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/LinearProgress/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/LinearProgress/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./LinearProgress */ \"./node_modules/@material-ui/core/esm/LinearProgress/LinearProgress.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _LinearProgress__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/LinearProgress/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Link/Link.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Link/Link.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `underline=\"none\"`. */\n underlineNone: {\n textDecoration: 'none'\n },\n\n /* Styles applied to the root element if `underline=\"hover\"`. */\n underlineHover: {\n textDecoration: 'none',\n '&:hover': {\n textDecoration: 'underline'\n }\n },\n\n /* Styles applied to the root element if `underline=\"always\"`. */\n underlineAlways: {\n textDecoration: 'underline'\n },\n // Same reset as ButtonBase.root\n\n /* Styles applied to the root element if `component=\"button\"`. */\n button: {\n position: 'relative',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n\n },\n '&$focusVisible': {\n outline: 'auto'\n }\n },\n\n /* Pseudo-class applied to the root element if the link is keyboard focused. */\n focusVisible: {}\n};\nvar Link = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Link(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n component = _props$component === void 0 ? 'a' : _props$component,\n onBlur = props.onBlur,\n onFocus = props.onFocus,\n TypographyClasses = props.TypographyClasses,\n _props$underline = props.underline,\n underline = _props$underline === void 0 ? 'hover' : _props$underline,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'inherit' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"component\", \"onBlur\", \"onFocus\", \"TypographyClasses\", \"underline\", \"variant\"]);\n\n var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n focusVisible = _React$useState[0],\n setFocusVisible = _React$useState[1];\n\n var handlerRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(ref, focusVisibleRef);\n\n var handleBlur = function handleBlur(event) {\n if (focusVisible) {\n onBlurVisible();\n setFocusVisible(false);\n }\n\n if (onBlur) {\n onBlur(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (isFocusVisible(event)) {\n setFocusVisible(true);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_10__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"underline\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(underline))], className, focusVisible && classes.focusVisible, component === 'button' && classes.button),\n classes: TypographyClasses,\n color: color,\n component: component,\n onBlur: handleBlur,\n onFocus: handleFocus,\n ref: handlerRef,\n variant: variant\n }, other));\n});\n true ? Link.propTypes = {\n /**\n * The content of the link.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the link.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__[\"elementTypeAcceptingRef\"],\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * `classes` prop applied to the [`Typography`](/api/typography/) element.\n */\n TypographyClasses: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Controls when the link should have an underline.\n */\n underline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['none', 'hover', 'always']),\n\n /**\n * Applies the theme typography styles.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiLink'\n})(Link));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Link/Link.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Link/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Link/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Link */ \"./node_modules/@material-ui/core/esm/Link/Link.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Link__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Link/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/List/List.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/List/List.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ListContext */ \"./node_modules/@material-ui/core/esm/List/ListContext.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative'\n },\n\n /* Styles applied to the root element if `disablePadding={false}`. */\n padding: {\n paddingTop: 8,\n paddingBottom: 8\n },\n\n /* Styles applied to the root element if dense. */\n dense: {},\n\n /* Styles applied to the root element if a `subheader` is provided. */\n subheader: {\n paddingTop: 0\n }\n};\nvar List = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function List(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'ul' : _props$component,\n _props$dense = props.dense,\n dense = _props$dense === void 0 ? false : _props$dense,\n _props$disablePadding = props.disablePadding,\n disablePadding = _props$disablePadding === void 0 ? false : _props$disablePadding,\n subheader = props.subheader,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"component\", \"dense\", \"disablePadding\", \"subheader\"]);\n\n var context = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](function () {\n return {\n dense: dense\n };\n }, [dense]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ListContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: context\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, dense && classes.dense, !disablePadding && classes.padding, subheader && classes.subheader),\n ref: ref\n }, other), subheader, children));\n});\n true ? List.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, vertical padding will be removed from the list.\n */\n disablePadding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiList'\n})(List));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/List/List.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/List/ListContext.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/List/ListContext.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n */\n\nvar ListContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]({});\n\nif (true) {\n ListContext.displayName = 'ListContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ListContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/List/ListContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/List/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/List/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./List */ \"./node_modules/@material-ui/core/esm/List/List.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _List__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/List/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItem/ListItem.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItem/ListItem.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/isMuiElement */ \"./node_modules/@material-ui/core/esm/utils/isMuiElement.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../List/ListContext */ \"./node_modules/@material-ui/core/esm/List/ListContext.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the (normally root) `component` element. May be wrapped by a `container`. */\n root: {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left',\n paddingTop: 8,\n paddingBottom: 8,\n '&$focusVisible': {\n backgroundColor: theme.palette.action.selected\n },\n '&$selected, &$selected:hover': {\n backgroundColor: theme.palette.action.selected\n },\n '&$disabled': {\n opacity: 0.5\n }\n },\n\n /* Styles applied to the `container` element if `children` includes `ListItemSecondaryAction`. */\n container: {\n position: 'relative'\n },\n\n /* Pseudo-class applied to the `component`'s `focusVisibleClassName` prop if `button={true}`. */\n focusVisible: {},\n\n /* Styles applied to the `component` element if dense. */\n dense: {\n paddingTop: 4,\n paddingBottom: 4\n },\n\n /* Styles applied to the `component` element if `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n alignItems: 'flex-start'\n },\n\n /* Pseudo-class applied to the inner `component` element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the inner `component` element if `divider={true}`. */\n divider: {\n borderBottom: \"1px solid \".concat(theme.palette.divider),\n backgroundClip: 'padding-box'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the inner `component` element if `button={true}`. */\n button: {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n\n /* Styles applied to the `component` element if `children` includes `ListItemSecondaryAction`. */\n secondaryAction: {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {}\n };\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"];\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nvar ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItem(props, ref) {\n var _props$alignItems = props.alignItems,\n alignItems = _props$alignItems === void 0 ? 'center' : _props$alignItems,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,\n _props$button = props.button,\n button = _props$button === void 0 ? false : _props$button,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n componentProp = props.component,\n _props$ContainerCompo = props.ContainerComponent,\n ContainerComponent = _props$ContainerCompo === void 0 ? 'li' : _props$ContainerCompo,\n _props$ContainerProps = props.ContainerProps;\n _props$ContainerProps = _props$ContainerProps === void 0 ? {} : _props$ContainerProps;\n\n var ContainerClassName = _props$ContainerProps.className,\n ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_props$ContainerProps, [\"className\"]),\n _props$dense = props.dense,\n dense = _props$dense === void 0 ? false : _props$dense,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$divider = props.divider,\n divider = _props$divider === void 0 ? false : _props$divider,\n focusVisibleClassName = props.focusVisibleClassName,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"classes\", \"className\", \"component\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"divider\", \"focusVisibleClassName\", \"selected\"]);\n\n var context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__[\"default\"]);\n var childContext = {\n dense: dense || context.dense || false,\n alignItems: alignItems\n };\n var listItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n useEnhancedEffect(function () {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n var children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(childrenProp);\n var hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(children[children.length - 1], ['ListItemSecondaryAction']);\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n listItemRef.current = react_dom__WEBPACK_IMPORTED_MODULE_11__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(handleOwnRef, ref);\n\n var componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, childContext.dense && classes.dense, !disableGutters && classes.gutters, divider && classes.divider, disabled && classes.disabled, button && classes.button, alignItems !== \"center\" && classes.alignItemsFlexStart, hasSecondaryAction && classes.secondaryAction, selected && classes.selected),\n disabled: disabled\n }, other);\n\n var Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.focusVisible, focusVisibleClassName);\n Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n }\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Provider, {\n value: childContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](ContainerComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.container, ContainerClassName),\n ref: handleRef\n }, ContainerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, componentProps, children), children.pop()));\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_10__[\"default\"].Provider, {\n value: childContext\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: handleRef\n }, componentProps), children));\n});\n true ? ListItem.propTypes = {\n /**\n * Defines the `align-items` style property.\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['flex-start', 'center']),\n\n /**\n * If `true`, the list item will be focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item will be a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n */\n button: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component. If a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, function (props) {\n var children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n var secondaryActionIndex = -1;\n\n for (var i = children.length - 1; i >= 0; i -= 1) {\n var child = children[i];\n\n if (Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n * By default, it's a `li` when `button` is `false` and a `div` when `button` is `true`.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n */\n ContainerComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the container component if used.\n */\n ContainerProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used.\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Use to apply selected styling.\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiListItem'\n})(ListItem));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItem/ListItem.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItem/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItem/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListItem */ \"./node_modules/@material-ui/core/esm/ListItem/ListItem.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListItem__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItem/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemAvatar/ListItemAvatar.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemAvatar/ListItemAvatar.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../List/ListContext */ \"./node_modules/@material-ui/core/esm/List/ListContext.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n flexShrink: 0\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n};\n/**\n * A simple wrapper to apply `List` styles to an `Avatar`.\n */\n\nvar ListItemAvatar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemAvatar(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\"]);\n\n var context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\n true ? ListItemAvatar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component – normally `Avatar`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiListItemAvatar'\n})(ListItemAvatar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemAvatar/ListItemAvatar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemAvatar/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemAvatar/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListItemAvatar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListItemAvatar */ \"./node_modules/@material-ui/core/esm/ListItemAvatar/ListItemAvatar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListItemAvatar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemAvatar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemIcon/ListItemIcon.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemIcon/ListItemIcon.js ***! \*************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../List/ListContext */ \"./node_modules/@material-ui/core/esm/List/ListContext.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n },\n\n /* Styles applied to the root element when the parent `ListItem` uses `alignItems=\"flex-start\"`. */\n alignItemsFlexStart: {\n marginTop: 8\n }\n };\n};\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nvar ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemIcon(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\"]);\n\n var context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, context.alignItems === 'flex-start' && classes.alignItemsFlexStart),\n ref: ref\n }, other));\n});\n true ? ListItemIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@material-ui/icons` SVG icon element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiListItemIcon'\n})(ListItemIcon));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemIcon/ListItemIcon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemIcon/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemIcon/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListItemIcon */ \"./node_modules/@material-ui/core/esm/ListItemIcon/ListItemIcon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListItemIcon__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemIcon/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemSecondaryAction/ListItemSecondaryAction.js": /*!***********************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemSecondaryAction/ListItemSecondaryAction.js ***! \***********************************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)'\n }\n};\n/**\n * Must be used as the last child of ListItem to function properly.\n */\n\nvar ListItemSecondaryAction = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemSecondaryAction(props, ref) {\n var classes = props.classes,\n className = props.className,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref\n }, other));\n});\n true ? ListItemSecondaryAction.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiListItemSecondaryAction'\n})(ListItemSecondaryAction));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemSecondaryAction/ListItemSecondaryAction.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemSecondaryAction/index.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemSecondaryAction/index.js ***! \*****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListItemSecondaryAction */ \"./node_modules/@material-ui/core/esm/ListItemSecondaryAction/ListItemSecondaryAction.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemSecondaryAction/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemText/ListItemText.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemText/ListItemText.js ***! \*************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List/ListContext */ \"./node_modules/@material-ui/core/esm/List/ListContext.js\");\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n },\n\n /* Styles applied to the `Typography` components if primary and secondary are set. */\n multiline: {\n marginTop: 6,\n marginBottom: 6\n },\n\n /* Styles applied to the `Typography` components if dense. */\n dense: {},\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 56\n },\n\n /* Styles applied to the primary `Typography` component. */\n primary: {},\n\n /* Styles applied to the secondary `Typography` component. */\n secondary: {}\n};\nvar ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemText(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$disableTypogra = props.disableTypography,\n disableTypography = _props$disableTypogra === void 0 ? false : _props$disableTypogra,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n primaryProp = props.primary,\n primaryTypographyProps = props.primaryTypographyProps,\n secondaryProp = props.secondary,\n secondaryTypographyProps = props.secondaryTypographyProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"]);\n\n var _React$useContext = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__[\"default\"]),\n dense = _React$useContext.dense;\n\n var primary = primaryProp != null ? primaryProp : children;\n\n if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && !disableTypography) {\n primary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps), primary);\n }\n\n var secondary = secondaryProp;\n\n if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && !disableTypography) {\n secondary = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n display: \"block\"\n }, secondaryTypographyProps), secondary);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, dense && classes.dense, inset && classes.inset, primary && secondary && classes.multiline),\n ref: ref\n }, other), primary, secondary);\n});\n true ? ListItemText.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the children will be indented.\n * This should be used if there is no left avatar or left icon.\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The main content element.\n */\n primary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The secondary content element.\n */\n secondary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiListItemText'\n})(ListItemText));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemText/ListItemText.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListItemText/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListItemText/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListItemText */ \"./node_modules/@material-ui/core/esm/ListItemText/ListItemText.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListItemText__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListItemText/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n boxSizing: 'border-box',\n lineHeight: '48px',\n listStyle: 'none',\n color: theme.palette.text.secondary,\n fontFamily: theme.typography.fontFamily,\n fontWeight: theme.typography.fontWeightMedium,\n fontSize: theme.typography.pxToRem(14)\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the inner `component` element if `disableGutters={false}`. */\n gutters: {\n paddingLeft: 16,\n paddingRight: 16\n },\n\n /* Styles applied to the root element if `inset={true}`. */\n inset: {\n paddingLeft: 72\n },\n\n /* Styles applied to the root element if `disableSticky={false}`. */\n sticky: {\n position: 'sticky',\n top: 0,\n zIndex: 1,\n backgroundColor: 'inherit'\n }\n };\n};\nvar ListSubheader = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListSubheader(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'default' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$disableSticky = props.disableSticky,\n disableSticky = _props$disableSticky === void 0 ? false : _props$disableSticky,\n _props$inset = props.inset,\n inset = _props$inset === void 0 ? false : _props$inset,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"component\", \"disableGutters\", \"disableSticky\", \"inset\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, color !== 'default' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], inset && classes.inset, !disableSticky && classes.sticky, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\n true ? ListSubheader.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'primary', 'inherit']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the List Subheader will not have gutters.\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the List Subheader will not stick to the top during scroll.\n */\n disableSticky: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the List Subheader will be indented.\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiListSubheader'\n})(ListSubheader));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/ListSubheader/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/ListSubheader/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ListSubheader__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ListSubheader */ \"./node_modules/@material-ui/core/esm/ListSubheader/ListSubheader.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ListSubheader__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/ListSubheader/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Menu/Menu.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Menu/Menu.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Popover */ \"./node_modules/@material-ui/core/esm/Popover/index.js\");\n/* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../MenuList */ \"./node_modules/@material-ui/core/esm/MenuList/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nvar LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nvar styles = {\n /* Styles applied to the `Paper` component. */\n paper: {\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tapable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling.\n WebkitOverflowScrolling: 'touch'\n },\n\n /* Styles applied to the `List` component via `MenuList`. */\n list: {\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n }\n};\nvar Menu = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Menu(props, ref) {\n var _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n children = props.children,\n classes = props.classes,\n _props$disableAutoFoc = props.disableAutoFocusItem,\n disableAutoFocusItem = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$MenuListProps = props.MenuListProps,\n MenuListProps = _props$MenuListProps === void 0 ? {} : _props$MenuListProps,\n onClose = props.onClose,\n onEntering = props.onEntering,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n PopoverClasses = props.PopoverClasses,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"autoFocus\", \"children\", \"classes\", \"disableAutoFocusItem\", \"MenuListProps\", \"onClose\", \"onEntering\", \"open\", \"PaperProps\", \"PopoverClasses\", \"transitionDuration\", \"variant\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_12__[\"default\"])();\n var autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n var menuListActionsRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var contentAnchorRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n\n var getContentAnchorEl = function getContentAnchorEl() {\n return contentAnchorRef.current;\n };\n\n var handleEntering = function handleEntering(element, isAppearing) {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, theme);\n }\n\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n\n var handleListKeyDown = function handleListKeyDown(event) {\n if (event.key === 'Tab') {\n event.preventDefault();\n\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n\n var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child, index) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant !== \"menu\" && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n var items = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child, index) {\n if (index === activeItemIndex) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, {\n ref: function ref(instance) {\n // #StrictMode ready\n contentAnchorRef.current = react_dom__WEBPACK_IMPORTED_MODULE_10__[\"findDOMNode\"](instance);\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(child.ref, instance);\n }\n });\n }\n\n return child;\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Popover__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n getContentAnchorEl: getContentAnchorEl,\n classes: PopoverClasses,\n onClose: onClose,\n onEntering: handleEntering,\n anchorOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN,\n transformOrigin: theme.direction === 'rtl' ? RTL_ORIGIN : LTR_ORIGIN,\n PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, PaperProps, {\n classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, PaperProps.classes, {\n root: classes.paper\n })\n }),\n open: open,\n ref: ref,\n transitionDuration: transitionDuration\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_MenuList__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant\n }, MenuListProps, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.list, MenuListProps.className)\n }), items));\n});\n true ? Menu.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A HTML element, or a function that returns it.\n * It's used to set the position of the menu.\n */\n anchorEl: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n */\n disableAutoFocusItem: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Props applied to the [`MenuList`](/api/menu-list/) element.\n */\n MenuListProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the Menu enters.\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the Menu has entered.\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the Menu is entering.\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the Menu exits.\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the Menu has exited.\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the Menu is exiting.\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, the menu is visible.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * `classes` prop applied to the [`Popover`](/api/popover/) element.\n */\n PopoverClasses: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * The length of the transition in `ms`, or 'auto'\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['auto']), prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })]),\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['menu', 'selectedMenu'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiMenu'\n})(Menu));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Menu/Menu.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Menu/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Menu/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Menu */ \"./node_modules/@material-ui/core/esm/Menu/Menu.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Menu__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Menu/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MenuItem/MenuItem.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MenuItem/MenuItem.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ListItem */ \"./node_modules/@material-ui/core/esm/ListItem/index.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.typography.body1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n width: 'auto',\n overflow: 'hidden',\n whiteSpace: 'nowrap'\n }, theme.breakpoints.up('sm'), {\n minHeight: 'auto'\n })),\n // TODO v5: remove\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: {},\n\n /* Styles applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Styles applied to the root element if dense. */\n dense: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.typography.body2, {\n minHeight: 'auto'\n })\n };\n};\nvar MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function MenuItem(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n component = _props$component === void 0 ? 'li' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n ListItemClasses = props.ListItemClasses,\n _props$role = props.role,\n role = _props$role === void 0 ? 'menuitem' : _props$role,\n selected = props.selected,\n tabIndexProp = props.tabIndex,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"ListItemClasses\", \"role\", \"selected\", \"tabIndex\"]);\n\n var tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ListItem__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n button: true,\n role: role,\n tabIndex: tabIndex,\n component: component,\n selected: selected,\n disableGutters: disableGutters,\n classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n dense: classes.dense\n }, ListItemClasses),\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className, selected && classes.selected, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\n true ? MenuItem.propTypes = {\n /**\n * Menu item contents.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input will be used.\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * `classes` prop applied to the [`ListItem`](/api/list-item/) element.\n */\n ListItemClasses: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiMenuItem'\n})(MenuItem));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MenuItem/MenuItem.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MenuItem/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MenuItem/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MenuItem */ \"./node_modules/@material-ui/core/esm/MenuItem/MenuItem.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _MenuItem__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MenuItem/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MenuList/MenuList.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MenuList/MenuList.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List */ \"./node_modules/@material-ui/core/esm/List/index.js\");\n/* harmony import */ var _utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/getScrollbarSize */ \"./node_modules/@material-ui/core/esm/utils/getScrollbarSize.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\n\n\n\n\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n\n return disableListWrap ? null : list.firstChild;\n}\n\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n\n return disableListWrap ? null : list.lastChild;\n}\n\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n\n var text = nextFocus.innerText;\n\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n\n text = text.trim().toLowerCase();\n\n if (text.length === 0) {\n return false;\n }\n\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n\n return text.indexOf(textCriteria.keys.join('')) === 0;\n}\n\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n var wrappedOnce = false;\n var nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return;\n }\n\n wrappedOnce = true;\n } // Same logic as useAutocomplete.js\n\n\n var nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return;\n }\n }\n}\n\nvar useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"];\n/**\n * A permanently displayed menu following https://www.w3.org/TR/wai-aria-practices/#menubutton.\n * It's exposed to help customization of the [`Menu`](/api/menu/) component. If you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\n\nvar MenuList = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function MenuList(props, ref) {\n var actions = props.actions,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,\n _props$autoFocusItem = props.autoFocusItem,\n autoFocusItem = _props$autoFocusItem === void 0 ? false : _props$autoFocusItem,\n children = props.children,\n className = props.className,\n _props$disabledItemsF = props.disabledItemsFocusable,\n disabledItemsFocusable = _props$disabledItemsF === void 0 ? false : _props$disabledItemsF,\n _props$disableListWra = props.disableListWrap,\n disableListWrap = _props$disableListWra === void 0 ? false : _props$disableListWra,\n onKeyDown = props.onKeyDown,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'selectedMenu' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"actions\", \"autoFocus\", \"autoFocusItem\", \"children\", \"className\", \"disabledItemsFocusable\", \"disableListWrap\", \"onKeyDown\", \"variant\"]);\n\n var listRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var textCriteriaRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(function () {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useImperativeHandle\"](actions, function () {\n return {\n adjustStyleForScrollbar: function adjustStyleForScrollbar(containerElement, theme) {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n var noExplicitWidth = !listRef.current.style.width;\n\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n var scrollbarSize = \"\".concat(Object(_utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(true), \"px\");\n listRef.current.style[theme.direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = \"calc(100% + \".concat(scrollbarSize, \")\");\n }\n\n return listRef.current;\n }\n };\n }, []);\n\n var handleKeyDown = function handleKeyDown(event) {\n var list = listRef.current;\n var key = event.key;\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n\n var currentFocus = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(list).activeElement;\n\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n var criteria = textCriteriaRef.current;\n var lowerKey = key.toLowerCase();\n var currTime = performance.now();\n\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n var keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n listRef.current = react_dom__WEBPACK_IMPORTED_MODULE_5__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(handleOwnRef, ref);\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n\n var activeItemIndex = -1; // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].forEach(children, function (child, index) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n var items = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child, index) {\n if (index === activeItemIndex) {\n var newChildProps = {};\n\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, newChildProps);\n }\n\n return child;\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_List__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1\n }, other), items);\n});\n true ? MenuList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n */\n autoFocusItem: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * If `true`, will allow focus on disabled items.\n */\n disabledItemsFocusable: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the menu items will not wrap focus.\n */\n disableListWrap: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n onKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['menu', 'selectedMenu'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (MenuList);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MenuList/MenuList.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MenuList/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MenuList/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MenuList */ \"./node_modules/@material-ui/core/esm/MenuList/MenuList.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _MenuList__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MenuList/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MobileStepper/MobileStepper.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MobileStepper/MobileStepper.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../LinearProgress */ \"./node_modules/@material-ui/core/esm/LinearProgress/index.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n background: theme.palette.background.default,\n padding: 8\n },\n\n /* Styles applied to the root element if `position=\"bottom\"`. */\n positionBottom: {\n position: 'fixed',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"top\"`. */\n positionTop: {\n position: 'fixed',\n top: 0,\n left: 0,\n right: 0,\n zIndex: theme.zIndex.mobileStepper\n },\n\n /* Styles applied to the root element if `position=\"static\"`. */\n positionStatic: {},\n\n /* Styles applied to the dots container if `variant=\"dots\"`. */\n dots: {\n display: 'flex',\n flexDirection: 'row'\n },\n\n /* Styles applied to each dot if `variant=\"dots\"`. */\n dot: {\n backgroundColor: theme.palette.action.disabled,\n borderRadius: '50%',\n width: 8,\n height: 8,\n margin: '0 2px'\n },\n\n /* Styles applied to a dot if `variant=\"dots\"` and this is the active step. */\n dotActive: {\n backgroundColor: theme.palette.primary.main\n },\n\n /* Styles applied to the Linear Progress component if `variant=\"progress\"`. */\n progress: {\n width: '50%'\n }\n };\n};\nvar MobileStepper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function MobileStepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n backButton = props.backButton,\n classes = props.classes,\n className = props.className,\n LinearProgressProps = props.LinearProgressProps,\n nextButton = props.nextButton,\n _props$position = props.position,\n position = _props$position === void 0 ? 'bottom' : _props$position,\n steps = props.steps,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'dots' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"activeStep\", \"backButton\", \"classes\", \"className\", \"LinearProgressProps\", \"nextButton\", \"position\", \"steps\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n square: true,\n elevation: 0,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[\"position\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(position))], className),\n ref: ref\n }, other), backButton, variant === 'text' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_3__[\"Fragment\"], null, activeStep + 1, \" / \", steps), variant === 'dots' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.dots\n }, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(new Array(steps)).map(function (_, index) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n key: index,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.dot, index === activeStep && classes.dotActive)\n });\n })), variant === 'progress' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_LinearProgress__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: classes.progress,\n variant: \"determinate\",\n value: Math.ceil(activeStep / (steps - 1) * 100)\n }, LinearProgressProps)), nextButton);\n});\n true ? MobileStepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Defines which dot is highlighted when the variant is 'dots'.\n */\n activeStep: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * A back button element. For instance, it can be a `Button` or an `IconButton`.\n */\n backButton: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Props applied to the `LinearProgress` element.\n */\n LinearProgressProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * A next button element. For instance, it can be a `Button` or an `IconButton`.\n */\n nextButton: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Set the positioning type.\n */\n position: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['bottom', 'static', 'top']),\n\n /**\n * The total steps.\n */\n steps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number.isRequired,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['dots', 'progress', 'text'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiMobileStepper'\n})(MobileStepper));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MobileStepper/MobileStepper.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/MobileStepper/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/MobileStepper/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _MobileStepper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MobileStepper */ \"./node_modules/@material-ui/core/esm/MobileStepper/MobileStepper.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _MobileStepper__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/MobileStepper/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Modal/Modal.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Modal/Modal.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Portal */ \"./node_modules/@material-ui/core/esm/Portal/index.js\");\n/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _styles_zIndex__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../styles/zIndex */ \"./node_modules/@material-ui/core/esm/styles/zIndex.js\");\n/* harmony import */ var _ModalManager__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ModalManager */ \"./node_modules/@material-ui/core/esm/Modal/ModalManager.js\");\n/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Unstable_TrapFocus */ \"./node_modules/@material-ui/core/esm/Unstable_TrapFocus/index.js\");\n/* harmony import */ var _SimpleBackdrop__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./SimpleBackdrop */ \"./node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getContainer(container) {\n container = typeof container === 'function' ? container() : container;\n return react_dom__WEBPACK_IMPORTED_MODULE_3__[\"findDOMNode\"](container);\n}\n\nfunction getHasTransition(props) {\n return props.children ? props.children.props.hasOwnProperty('in') : false;\n} // A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\n\n\nvar defaultManager = new _ModalManager__WEBPACK_IMPORTED_MODULE_13__[\"default\"]();\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n zIndex: theme.zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0\n },\n\n /* Styles applied to the root element if the `Modal` has exited. */\n hidden: {\n visibility: 'hidden'\n }\n };\n};\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/api/dialog/)\n * - [Drawer](/api/drawer/)\n * - [Menu](/api/menu/)\n * - [Popover](/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\n\nvar Modal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Modal(inProps, ref) {\n var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__[\"useTheme\"])();\n var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__[\"getThemeProps\"])({\n name: 'MuiModal',\n props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, inProps),\n theme: theme\n });\n\n var _props$BackdropCompon = props.BackdropComponent,\n BackdropComponent = _props$BackdropCompon === void 0 ? _SimpleBackdrop__WEBPACK_IMPORTED_MODULE_15__[\"default\"] : _props$BackdropCompon,\n BackdropProps = props.BackdropProps,\n children = props.children,\n _props$closeAfterTran = props.closeAfterTransition,\n closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,\n container = props.container,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableBackdro = props.disableBackdropClick,\n disableBackdropClick = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableEscapeK = props.disableEscapeKeyDown,\n disableEscapeKeyDown = _props$disableEscapeK === void 0 ? false : _props$disableEscapeK,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n _props$disableScrollL = props.disableScrollLock,\n disableScrollLock = _props$disableScrollL === void 0 ? false : _props$disableScrollL,\n _props$hideBackdrop = props.hideBackdrop,\n hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,\n _props$keepMounted = props.keepMounted,\n keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n _props$manager = props.manager,\n manager = _props$manager === void 0 ? defaultManager : _props$manager,\n onBackdropClick = props.onBackdropClick,\n onClose = props.onClose,\n onEscapeKeyDown = props.onEscapeKeyDown,\n onRendered = props.onRendered,\n open = props.open,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"BackdropComponent\", \"BackdropProps\", \"children\", \"closeAfterTransition\", \"container\", \"disableAutoFocus\", \"disableBackdropClick\", \"disableEnforceFocus\", \"disableEscapeKeyDown\", \"disablePortal\", \"disableRestoreFocus\", \"disableScrollLock\", \"hideBackdrop\", \"keepMounted\", \"manager\", \"onBackdropClick\", \"onClose\", \"onEscapeKeyDown\", \"onRendered\", \"open\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var modal = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({});\n var mountNodeRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var modalRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(modalRef, ref);\n var hasTransition = getHasTransition(props);\n\n var getDoc = function getDoc() {\n return Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(mountNodeRef.current);\n };\n\n var getModal = function getModal() {\n modal.current.modalRef = modalRef.current;\n modal.current.mountNode = mountNodeRef.current;\n return modal.current;\n };\n\n var handleMounted = function handleMounted() {\n manager.mount(getModal(), {\n disableScrollLock: disableScrollLock\n }); // Fix a bug on Chrome where the scroll isn't initially 0.\n\n modalRef.current.scrollTop = 0;\n };\n\n var handleOpen = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(function () {\n var resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer); // The element was already mounted.\n\n if (modalRef.current) {\n handleMounted();\n }\n });\n var isTopModal = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n return manager.isTopModal(getModal());\n }, [manager]);\n var handlePortalRef = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(function (node) {\n mountNodeRef.current = node;\n\n if (!node) {\n return;\n }\n\n if (onRendered) {\n onRendered();\n }\n\n if (open && isTopModal()) {\n handleMounted();\n } else {\n Object(_ModalManager__WEBPACK_IMPORTED_MODULE_13__[\"ariaHidden\"])(modalRef.current, true);\n }\n });\n var handleClose = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n manager.remove(getModal());\n }, [manager]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n return function () {\n handleClose();\n };\n }, [handleClose]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n\n if (closeAfterTransition) {\n handleClose();\n }\n };\n\n var handleBackdropClick = function handleBackdropClick(event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n\n if (!disableBackdropClick && onClose) {\n onClose(event, 'backdropClick');\n }\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviours like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || !isTopModal()) {\n return;\n }\n\n if (onEscapeKeyDown) {\n onEscapeKeyDown(event);\n }\n\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n\n var inlineStyle = styles(theme || {\n zIndex: _styles_zIndex__WEBPACK_IMPORTED_MODULE_12__[\"default\"]\n });\n var childProps = {};\n\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = children.props.tabIndex || '-1';\n } // It's a Transition like component\n\n\n if (hasTransition) {\n childProps.onEnter = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(handleEnter, children.props.onEnter);\n childProps.onExited = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(handleExited, children.props.onExited);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Portal__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {\n ref: handlePortalRef,\n container: container,\n disablePortal: disablePortal\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n ref: handleRef,\n onKeyDown: handleKeyDown,\n role: \"presentation\"\n }, other, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, inlineStyle.root, !open && exited ? inlineStyle.hidden : {}, other.style)\n }), hideBackdrop ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](BackdropComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n open: open,\n onClick: handleBackdropClick\n }, BackdropProps)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n getDoc: getDoc,\n isEnabled: isTopModal,\n open: open\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childProps))));\n});\n true ? Modal.propTypes = {\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n */\n BackdropComponent: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType,\n\n /**\n * Props applied to the [`Backdrop`](/api/backdrop/) element.\n */\n BackdropProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * A single child content element.\n */\n children: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"elementAcceptingRef\"].isRequired,\n\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n */\n closeAfterTransition: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.instanceOf(react__WEBPACK_IMPORTED_MODULE_2__[\"Component\"]), prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n */\n disableAutoFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, clicking the backdrop will not fire `onClose`.\n */\n disableBackdropClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n */\n disableEnforceFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, hitting escape will not fire `onClose`.\n */\n disableEscapeKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden.\n */\n disableRestoreFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Disable the scroll lock behavior.\n */\n disableScrollLock: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the backdrop is not rendered.\n */\n hideBackdrop: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n */\n keepMounted: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n manager: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Callback fired when the backdrop is clicked.\n */\n onBackdropClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the escape key is pressed,\n * `disableEscapeKeyDown` is false and the modal is in focus.\n */\n onEscapeKeyDown: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired once the children has been mounted into the `container`.\n * It signals that the `open={true}` prop took effect.\n *\n * This prop will be deprecated and removed in v5, the ref can be used instead.\n */\n onRendered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, the modal is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Modal);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Modal/Modal.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Modal/ModalManager.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Modal/ModalManager.js ***! \******************************************************************/ /*! exports provided: ariaHidden, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ariaHidden\", function() { return ariaHidden; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ModalManager; });\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/getScrollbarSize */ \"./node_modules/@material-ui/core/esm/utils/getScrollbarSize.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/ownerWindow */ \"./node_modules/@material-ui/core/esm/utils/ownerWindow.js\");\n\n\n\n\n\n // Is a vertical scrollbar displayed?\n\nfunction isOverflowing(container) {\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(container);\n\n if (doc.body === container) {\n return Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(doc).innerWidth > doc.documentElement.clientWidth;\n }\n\n return container.scrollHeight > container.clientHeight;\n}\n\nfunction ariaHidden(node, show) {\n if (show) {\n node.setAttribute('aria-hidden', 'true');\n } else {\n node.removeAttribute('aria-hidden');\n }\n}\n\nfunction getPaddingRight(node) {\n return parseInt(window.getComputedStyle(node)['padding-right'], 10) || 0;\n}\n\nfunction ariaHiddenSiblings(container, mountNode, currentNode) {\n var nodesToExclude = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var show = arguments.length > 4 ? arguments[4] : undefined;\n var blacklist = [mountNode, currentNode].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(nodesToExclude));\n var blacklistTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE'];\n [].forEach.call(container.children, function (node) {\n if (node.nodeType === 1 && blacklist.indexOf(node) === -1 && blacklistTagNames.indexOf(node.tagName) === -1) {\n ariaHidden(node, show);\n }\n });\n}\n\nfunction findIndexOf(containerInfo, callback) {\n var idx = -1;\n containerInfo.some(function (item, index) {\n if (callback(item)) {\n idx = index;\n return true;\n }\n\n return false;\n });\n return idx;\n}\n\nfunction handleContainer(containerInfo, props) {\n var restoreStyle = [];\n var restorePaddings = [];\n var container = containerInfo.container;\n var fixedNodes;\n\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n var scrollbarSize = Object(_utils_getScrollbarSize__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n restoreStyle.push({\n value: container.style.paddingRight,\n key: 'padding-right',\n el: container\n }); // Use computed style, here to get the real padding to add our scrollbar width.\n\n container.style['padding-right'] = \"\".concat(getPaddingRight(container) + scrollbarSize, \"px\"); // .mui-fixed is a global helper.\n\n fixedNodes = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedNodes, function (node) {\n restorePaddings.push(node.style.paddingRight);\n node.style.paddingRight = \"\".concat(getPaddingRight(node) + scrollbarSize, \"px\");\n });\n } // Improve Gatsby support\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n\n\n var parent = container.parentElement;\n var scrollContainer = parent.nodeName === 'HTML' && window.getComputedStyle(parent)['overflow-y'] === 'scroll' ? parent : container; // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n key: 'overflow',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n\n var restore = function restore() {\n if (fixedNodes) {\n [].forEach.call(fixedNodes, function (node, i) {\n if (restorePaddings[i]) {\n node.style.paddingRight = restorePaddings[i];\n } else {\n node.style.removeProperty('padding-right');\n }\n });\n }\n\n restoreStyle.forEach(function (_ref) {\n var value = _ref.value,\n el = _ref.el,\n key = _ref.key;\n\n if (value) {\n el.style.setProperty(key, value);\n } else {\n el.style.removeProperty(key);\n }\n });\n };\n\n return restore;\n}\n\nfunction getHiddenSiblings(container) {\n var hiddenSiblings = [];\n [].forEach.call(container.children, function (node) {\n if (node.getAttribute && node.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(node);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\n\n\nvar ModalManager = /*#__PURE__*/function () {\n function ModalManager() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, ModalManager);\n\n // this.modals[modalIndex] = modal\n this.modals = []; // this.containers[containerIndex] = {\n // modals: [],\n // container,\n // restore: null,\n // }\n\n this.containers = [];\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(ModalManager, [{\n key: \"add\",\n value: function add(modal, container) {\n var modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex !== -1) {\n return modalIndex;\n }\n\n modalIndex = this.modals.length;\n this.modals.push(modal); // If the modal we are adding is already in the DOM.\n\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n\n var hiddenSiblingNodes = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mountNode, modal.modalRef, hiddenSiblingNodes, true);\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.container === container;\n });\n\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n\n this.containers.push({\n modals: [modal],\n container: container,\n restore: null,\n hiddenSiblingNodes: hiddenSiblingNodes\n });\n return modalIndex;\n }\n }, {\n key: \"mount\",\n value: function mount(modal, props) {\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.modals.indexOf(modal) !== -1;\n });\n var containerInfo = this.containers[containerIndex];\n\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n }, {\n key: \"remove\",\n value: function remove(modal) {\n var modalIndex = this.modals.indexOf(modal);\n\n if (modalIndex === -1) {\n return modalIndex;\n }\n\n var containerIndex = findIndexOf(this.containers, function (item) {\n return item.modals.indexOf(modal) !== -1;\n });\n var containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1); // If that was the last modal in a container, clean up the container.\n\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, true);\n }\n\n ariaHiddenSiblings(containerInfo.container, modal.mountNode, modal.modalRef, containerInfo.hiddenSiblingNodes, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n var nextTop = containerInfo.modals[containerInfo.modals.length - 1]; // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n\n return modalIndex;\n }\n }, {\n key: \"isTopModal\",\n value: function isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n }]);\n\n return ModalManager;\n}();\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Modal/ModalManager.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js ***! \********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n zIndex: -1,\n position: 'fixed',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent'\n },\n\n /* Styles applied to the root element if `invisible={true}`. */\n invisible: {\n backgroundColor: 'transparent'\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SimpleBackdrop = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function SimpleBackdrop(props, ref) {\n var _props$invisible = props.invisible,\n invisible = _props$invisible === void 0 ? false : _props$invisible,\n open = props.open,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"invisible\", \"open\"]);\n\n return open ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-hidden\": true,\n ref: ref\n }, other, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, styles.root, invisible ? styles.invisible : {}, other.style)\n })) : null;\n});\n true ? SimpleBackdrop.propTypes = {\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n */\n invisible: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the backdrop is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (SimpleBackdrop);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Modal/SimpleBackdrop.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Modal/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Modal/index.js ***! \***********************************************************/ /*! exports provided: default, ModalManager */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Modal */ \"./node_modules/@material-ui/core/esm/Modal/Modal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Modal__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _ModalManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModalManager */ \"./node_modules/@material-ui/core/esm/Modal/ModalManager.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ModalManager\", function() { return _ModalManager__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Modal/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js ***! \*************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _NativeSelectInput__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./NativeSelectInput */ \"./node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../internal/svg-icons/ArrowDropDown */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Input */ \"./node_modules/@material-ui/core/esm/Input/index.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the select component `root` class. */\n root: {},\n\n /* Styles applied to the select component `select` class. */\n select: {\n '-moz-appearance': 'none',\n // Reset\n '-webkit-appearance': 'none',\n // Reset\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n borderRadius: 0,\n // Reset\n minWidth: 16,\n // So it doesn't collapse.\n cursor: 'pointer',\n '&:focus': {\n // Show that it's not an text input\n backgroundColor: theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.05)' : 'rgba(255, 255, 255, 0.05)',\n borderRadius: 0 // Reset Chrome style\n\n },\n // Remove IE 11 arrow\n '&::-ms-expand': {\n display: 'none'\n },\n '&$disabled': {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: theme.palette.background.paper\n },\n '&&': {\n paddingRight: 24\n }\n },\n\n /* Styles applied to the select component if `variant=\"filled\"`. */\n filled: {\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component if `variant=\"outlined\"`. */\n outlined: {\n borderRadius: theme.shape.borderRadius,\n '&&': {\n paddingRight: 32\n }\n },\n\n /* Styles applied to the select component `selectMenu` class. */\n selectMenu: {\n height: 'auto',\n // Resets for multpile select with chips\n minHeight: '1.1876em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n },\n\n /* Pseudo-class applied to the select component `disabled` class. */\n disabled: {},\n\n /* Styles applied to the icon component. */\n icon: {\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n top: 'calc(50% - 12px)',\n // Center vertically\n pointerEvents: 'none',\n // Don't block pointer events on the select under the icon.\n color: theme.palette.action.active,\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the icon component if the popup is open. */\n iconOpen: {\n transform: 'rotate(180deg)'\n },\n\n /* Styles applied to the icon component if `variant=\"filled\"`. */\n iconFilled: {\n right: 7\n },\n\n /* Styles applied to the icon component if `variant=\"outlined\"`. */\n iconOutlined: {\n right: 7\n },\n\n /* Styles applied to the underlying native input component. */\n nativeInput: {\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%'\n }\n };\n};\nvar defaultInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Input__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null);\n/**\n * An alternative to `` with a much smaller bundle size footprint.\n */\n\nvar NativeSelect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function NativeSelect(props, ref) {\n var children = props.children,\n classes = props.classes,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_8__[\"default\"] : _props$IconComponent,\n _props$input = props.input,\n input = _props$input === void 0 ? defaultInput : _props$input,\n inputProps = props.inputProps,\n variant = props.variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"IconComponent\", \"input\", \"inputProps\", \"variant\"]);\n\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant']\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](input, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // Most of the logic is implemented in `NativeSelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: _NativeSelectInput__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n children: children,\n classes: classes,\n IconComponent: IconComponent,\n variant: fcs.variant,\n type: undefined\n }, inputProps, input ? input.props.inputProps : {}),\n ref: ref\n }, other));\n});\n true ? NativeSelect.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The option elements to populate the select with.\n * Can be some `` elements.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * Attributes applied to the `select` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The input value. The DOM API casts this to a string.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\nNativeSelect.muiName = 'Select';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiNativeSelect'\n})(NativeSelect));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js": /*!******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n/**\n * @ignore - internal component.\n */\n\nvar NativeSelectInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function NativeSelectInput(props, ref) {\n var classes = props.classes,\n className = props.className,\n disabled = props.disabled,\n IconComponent = props.IconComponent,\n inputRef = props.inputRef,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"disabled\", \"IconComponent\", \"inputRef\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"select\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, // TODO v5: merge root and select\n classes.select, classes[variant], className, disabled && classes.disabled),\n disabled: disabled,\n ref: inputRef || ref\n }, other)), props.multiple ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](IconComponent, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.icon, classes[\"icon\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(variant))], disabled && classes.disabled)\n }));\n});\n true ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `` elements.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * The CSS class name of the select element.\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the select will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType.isRequired,\n\n /**\n * Use that prop to pass a ref to the native select element.\n * @deprecated\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * @ignore\n */\n multiple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The input value.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['standard', 'outlined', 'filled'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (NativeSelectInput);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/NativeSelect/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/NativeSelect/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _NativeSelect__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NativeSelect */ \"./node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _NativeSelect__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/NativeSelect/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/NoSsr/NoSsr.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/NoSsr/NoSsr.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n\nvar useEnhancedEffect = typeof window !== 'undefined' && \"development\" !== 'test' ? react__WEBPACK_IMPORTED_MODULE_0__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"];\n/**\n * NoSsr purposely removes components from the subject of Server Side Rendering (SSR).\n *\n * This component can be useful in a variety of situations:\n * - Escape hatch for broken dependencies not supporting SSR.\n * - Improve the time-to-first paint on the client by only rendering above the fold.\n * - Reduce the rendering time on the server.\n * - Under too heavy server load, you can turn on service degradation.\n */\n\nfunction NoSsr(props) {\n var children = props.children,\n _props$defer = props.defer,\n defer = _props$defer === void 0 ? false : _props$defer,\n _props$fallback = props.fallback,\n fallback = _props$fallback === void 0 ? null : _props$fallback;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n if (!defer) {\n setMountedState(true);\n }\n }, [defer]);\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (defer) {\n setMountedState(true);\n }\n }, [defer]); // We need the Fragment here to force react-docgen to recognise NoSsr as a component.\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, mountedState ? children : fallback);\n}\n\n true ? NoSsr.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * You can wrap a node.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node,\n\n /**\n * If `true`, the component will not only prevent server-side rendering.\n * It will also defer the rendering of the children into a different screen frame.\n */\n defer: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * The fallback content to display.\n */\n fallback: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node\n} : undefined;\n\nif (true) {\n // eslint-disable-next-line\n NoSsr['propTypes' + ''] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"exactProp\"])(NoSsr.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (NoSsr);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/NoSsr/NoSsr.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/NoSsr/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/NoSsr/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NoSsr */ \"./node_modules/@material-ui/core/esm/NoSsr/NoSsr.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _NoSsr__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/NoSsr/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js ***! \****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden'\n },\n\n /* Styles applied to the legend element when `labelWidth` is provided. */\n legend: {\n textAlign: 'left',\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n },\n\n /* Styles applied to the legend element. */\n legendLabelled: {\n display: 'block',\n width: 'auto',\n textAlign: 'left',\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block'\n }\n },\n\n /* Styles applied to the legend element is notched. */\n legendNotched: {\n maxWidth: 1000,\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar NotchedOutline = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function NotchedOutline(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n label = props.label,\n labelWidthProp = props.labelWidth,\n notched = props.notched,\n style = props.style,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"label\", \"labelWidth\", \"notched\", \"style\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var align = theme.direction === 'rtl' ? 'right' : 'left';\n\n if (label !== undefined) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"fieldset\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n \"aria-hidden\": true,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref,\n style: style\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"legend\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.legendLabelled, notched && classes.legendNotched)\n }, label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", null, label) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: ''\n }\n })));\n }\n\n var labelWidth = labelWidthProp > 0 ? labelWidthProp * 0.75 + 8 : 0.01;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"fieldset\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n \"aria-hidden\": true,\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"padding\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(align)), 8), style),\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"legend\", {\n className: classes.legend,\n style: {\n // IE 11: fieldset with legend does not render\n // a border radius. This maintains consistency\n // by always having a legend rendered\n width: notched ? labelWidth : 0.01\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: ''\n }\n })));\n});\n true ? NotchedOutline.propTypes = {\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The label.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * The width of the label.\n */\n labelWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number.isRequired,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool.isRequired,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'PrivateNotchedOutline'\n})(NotchedOutline));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/index.js\");\n/* harmony import */ var _NotchedOutline__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./NotchedOutline */ \"./node_modules/@material-ui/core/esm/OutlinedInput/NotchedOutline.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var borderColor = theme.palette.type === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n borderRadius: theme.shape.borderRadius,\n '&:hover $notchedOutline': {\n borderColor: theme.palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n '&:hover $notchedOutline': {\n borderColor: borderColor\n }\n },\n '&$focused $notchedOutline': {\n borderColor: theme.palette.primary.main,\n borderWidth: 2\n },\n '&$error $notchedOutline': {\n borderColor: theme.palette.error.main\n },\n '&$disabled $notchedOutline': {\n borderColor: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if the color is secondary. */\n colorSecondary: {\n '&$focused $notchedOutline': {\n borderColor: theme.palette.secondary.main\n }\n },\n\n /* Styles applied to the root element if the component is focused. */\n focused: {},\n\n /* Styles applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `startAdornment` is provided. */\n adornedStart: {\n paddingLeft: 14\n },\n\n /* Styles applied to the root element if `endAdornment` is provided. */\n adornedEnd: {\n paddingRight: 14\n },\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {},\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n marginDense: {},\n\n /* Styles applied to the root element if `multiline={true}`. */\n multiline: {\n padding: '18.5px 14px',\n '&$marginDense': {\n paddingTop: 10.5,\n paddingBottom: 10.5\n }\n },\n\n /* Styles applied to the `NotchedOutline` element. */\n notchedOutline: {\n borderColor: borderColor\n },\n\n /* Styles applied to the `input` element. */\n input: {\n padding: '18.5px 14px',\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.type === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.type === 'light' ? null : '#fff',\n caretColor: theme.palette.type === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n },\n\n /* Styles applied to the `input` element if `margin=\"dense\"`. */\n inputMarginDense: {\n paddingTop: 10.5,\n paddingBottom: 10.5\n },\n\n /* Styles applied to the `input` element if `multiline={true}`. */\n inputMultiline: {\n padding: 0\n },\n\n /* Styles applied to the `input` element if `startAdornment` is provided. */\n inputAdornedStart: {\n paddingLeft: 0\n },\n\n /* Styles applied to the `input` element if `endAdornment` is provided. */\n inputAdornedEnd: {\n paddingRight: 0\n }\n };\n};\nvar OutlinedInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function OutlinedInput(props, ref) {\n var classes = props.classes,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n _props$inputComponent = props.inputComponent,\n inputComponent = _props$inputComponent === void 0 ? 'input' : _props$inputComponent,\n label = props.label,\n _props$labelWidth = props.labelWidth,\n labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n notched = props.notched,\n _props$type = props.type,\n type = _props$type === void 0 ? 'text' : _props$type,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"fullWidth\", \"inputComponent\", \"label\", \"labelWidth\", \"multiline\", \"notched\", \"type\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_InputBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n renderSuffix: function renderSuffix(state) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_NotchedOutline__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n className: classes.notchedOutline,\n label: label,\n labelWidth: labelWidth,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n });\n },\n classes: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, classes, {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes.underline),\n notchedOutline: null\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type\n }, other));\n});\n true ? OutlinedInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `true`, the input will indicate an error. This is normally obtained via context from\n * FormControl.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n */\n inputComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * The label of the input. It is only used for layout. The actual labelling\n * is handled by `InputLabel`. If specified `labelWidth` is ignored.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The width of the label. Is ignored if `label` is provided. Prefer `label`\n * if the input label appears with a strike through.\n */\n labelWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none']),\n\n /**\n * If `true`, a textarea element will be rendered.\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\nOutlinedInput.muiName = 'Input';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiOutlinedInput'\n})(OutlinedInput));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/OutlinedInput/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/OutlinedInput/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./OutlinedInput */ \"./node_modules/@material-ui/core/esm/OutlinedInput/OutlinedInput.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _OutlinedInput__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/OutlinedInput/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Paper/Paper.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Paper/Paper.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var elevations = {};\n theme.shadows.forEach(function (shadow, index) {\n elevations[\"elevation\".concat(index)] = {\n boxShadow: shadow\n };\n });\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n /* Styles applied to the root element. */\n root: {\n backgroundColor: theme.palette.background.paper,\n color: theme.palette.text.primary,\n transition: theme.transitions.create('box-shadow')\n },\n\n /* Styles applied to the root element if `square={false}`. */\n rounded: {\n borderRadius: theme.shape.borderRadius\n },\n\n /* Styles applied to the root element if `variant=\"outlined\"`. */\n outlined: {\n border: \"1px solid \".concat(theme.palette.divider)\n }\n }, elevations);\n};\nvar Paper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Paper(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$square = props.square,\n square = _props$square === void 0 ? false : _props$square,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 1 : _props$elevation,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'elevation' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"square\", \"elevation\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, variant === 'outlined' ? classes.outlined : classes[\"elevation\".concat(elevation)], !square && classes.rounded),\n ref: ref\n }, other));\n});\n true ? Paper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n */\n elevation: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, function (props) {\n var classes = props.classes,\n elevation = props.elevation; // in case `withStyles` fails to inject we don't need this warning\n\n if (classes === undefined) {\n return null;\n }\n\n if (elevation != null && classes[\"elevation\".concat(elevation)] === undefined) {\n return new Error(\"Material-UI: This elevation `\".concat(elevation, \"` is not implemented.\"));\n }\n\n return null;\n }),\n\n /**\n * If `true`, rounded corners are disabled.\n */\n square: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['elevation', 'outlined'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiPaper'\n})(Paper));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Paper/Paper.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Paper/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Paper/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Paper */ \"./node_modules/@material-ui/core/esm/Paper/Paper.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Paper__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Paper/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Popover/Popover.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Popover/Popover.js ***! \***************************************************************/ /*! exports provided: getOffsetTop, getOffsetLeft, styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getOffsetTop\", function() { return getOffsetTop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getOffsetLeft\", function() { return getOffsetLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/ownerWindow */ \"./node_modules/@material-ui/core/esm/utils/ownerWindow.js\");\n/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Modal */ \"./node_modules/@material-ui/core/esm/Modal/index.js\");\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Grow */ \"./node_modules/@material-ui/core/esm/Grow/index.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getOffsetTop(rect, vertical) {\n var offset = 0;\n\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n\n return offset;\n}\nfunction getOffsetLeft(rect, horizontal) {\n var offset = 0;\n\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n\n return offset;\n}\n\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(function (n) {\n return typeof n === 'number' ? \"\".concat(n, \"px\") : n;\n }).join(' ');\n} // Sum the scrollTop between two elements.\n\n\nfunction getScrollParent(parent, child) {\n var element = child;\n var scrollTop = 0;\n\n while (element && element !== parent) {\n element = element.parentElement;\n scrollTop += element.scrollTop;\n }\n\n return scrollTop;\n}\n\nfunction getAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the `Paper` component. */\n paper: {\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n }\n};\nvar Popover = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Popover(props, ref) {\n var action = props.action,\n anchorEl = props.anchorEl,\n _props$anchorOrigin = props.anchorOrigin,\n anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'top',\n horizontal: 'left'\n } : _props$anchorOrigin,\n anchorPosition = props.anchorPosition,\n _props$anchorReferenc = props.anchorReference,\n anchorReference = _props$anchorReferenc === void 0 ? 'anchorEl' : _props$anchorReferenc,\n children = props.children,\n classes = props.classes,\n className = props.className,\n containerProp = props.container,\n _props$elevation = props.elevation,\n elevation = _props$elevation === void 0 ? 8 : _props$elevation,\n getContentAnchorEl = props.getContentAnchorEl,\n _props$marginThreshol = props.marginThreshold,\n marginThreshold = _props$marginThreshol === void 0 ? 16 : _props$marginThreshol,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n _props$transformOrigi = props.transformOrigin,\n transformOrigin = _props$transformOrigi === void 0 ? {\n vertical: 'top',\n horizontal: 'left'\n } : _props$transformOrigi,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_13__[\"default\"] : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n _props$TransitionProp = props.TransitionProps,\n TransitionProps = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"action\", \"anchorEl\", \"anchorOrigin\", \"anchorPosition\", \"anchorReference\", \"children\", \"classes\", \"className\", \"container\", \"elevation\", \"getContentAnchorEl\", \"marginThreshold\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"open\", \"PaperProps\", \"transformOrigin\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var paperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](); // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n\n var getAnchorOffset = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (contentAnchorOffset) {\n if (anchorReference === 'anchorPosition') {\n if (true) {\n if (!anchorPosition) {\n console.error('Material-UI: You need to provide a `anchorPosition` prop when using ' + '.');\n }\n }\n\n return anchorPosition;\n }\n\n var resolvedAnchorEl = getAnchorEl(anchorEl); // If an anchor element wasn't provided, just use the parent body element of this Popover\n\n var anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(paperRef.current).body;\n var anchorRect = anchorElement.getBoundingClientRect();\n\n if (true) {\n var box = anchorElement.getBoundingClientRect();\n\n if ( true && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n\n var anchorVertical = contentAnchorOffset === 0 ? anchorOrigin.vertical : 'center';\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorVertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]); // Returns the vertical offset of inner content to anchor the transform on if provided\n\n var getContentAnchorOffset = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (element) {\n var contentAnchorOffset = 0;\n\n if (getContentAnchorEl && anchorReference === 'anchorEl') {\n var contentAnchorEl = getContentAnchorEl(element);\n\n if (contentAnchorEl && element.contains(contentAnchorEl)) {\n var scrollTop = getScrollParent(element, contentAnchorEl);\n contentAnchorOffset = contentAnchorEl.offsetTop + contentAnchorEl.clientHeight / 2 - scrollTop || 0;\n } // != the default value\n\n\n if (true) {\n if (anchorOrigin.vertical !== 'top') {\n console.error(['Material-UI: You can not change the default `anchorOrigin.vertical` value ', 'when also providing the `getContentAnchorEl` prop to the popover component.', 'Only use one of the two props.', 'Set `getContentAnchorEl` to `null | undefined`' + ' or leave `anchorOrigin.vertical` unchanged.'].join('\\n'));\n }\n }\n }\n\n return contentAnchorOffset;\n }, [anchorOrigin.vertical, anchorReference, getContentAnchorEl]); // Return the base transform origin using the element\n // and taking the content anchor offset into account if in use\n\n var getTransformOrigin = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (elemRect) {\n var contentAnchorOffset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical) + contentAnchorOffset,\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n var getPositioningStyle = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (element) {\n // Check if the parent has requested anchoring on an inner content node\n var contentAnchorOffset = getContentAnchorOffset(element);\n var elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n }; // Get the transform origin point on the element itself\n\n var elemTransformOrigin = getTransformOrigin(elemRect, contentAnchorOffset);\n\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n } // Get the offset of of the anchoring element\n\n\n var anchorOffset = getAnchorOffset(contentAnchorOffset); // Calculate element positioning\n\n var top = anchorOffset.top - elemTransformOrigin.vertical;\n var left = anchorOffset.left - elemTransformOrigin.horizontal;\n var bottom = top + elemRect.height;\n var right = left + elemRect.width; // Use the parent window of the anchorEl if provided\n\n var containerWindow = Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(getAnchorEl(anchorEl)); // Window thresholds taking required margin into account\n\n var heightThreshold = containerWindow.innerHeight - marginThreshold;\n var widthThreshold = containerWindow.innerWidth - marginThreshold; // Check if the vertical axis needs shifting\n\n if (top < marginThreshold) {\n var diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (bottom > heightThreshold) {\n var _diff = bottom - heightThreshold;\n\n top -= _diff;\n elemTransformOrigin.vertical += _diff;\n }\n\n if (true) {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['Material-UI: The popover component is too tall.', \"Some part of it can not be seen on the screen (\".concat(elemRect.height - heightThreshold, \"px).\"), 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n } // Check if the horizontal axis needs shifting\n\n\n if (left < marginThreshold) {\n var _diff2 = left - marginThreshold;\n\n left -= _diff2;\n elemTransformOrigin.horizontal += _diff2;\n } else if (right > widthThreshold) {\n var _diff3 = right - widthThreshold;\n\n left -= _diff3;\n elemTransformOrigin.horizontal += _diff3;\n }\n\n return {\n top: \"\".concat(Math.round(top), \"px\"),\n left: \"\".concat(Math.round(left), \"px\"),\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getContentAnchorOffset, getTransformOrigin, marginThreshold]);\n var setPositioningStyles = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n var element = paperRef.current;\n\n if (!element) {\n return;\n }\n\n var positioning = getPositioningStyle(element);\n\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n\n element.style.transformOrigin = positioning.transformOrigin;\n }, [getPositioningStyle]);\n\n var handleEntering = function handleEntering(element, isAppearing) {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n\n setPositioningStyles();\n };\n\n var handlePaperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n paperRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__[\"findDOMNode\"](instance);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (open) {\n setPositioningStyles();\n }\n });\n react__WEBPACK_IMPORTED_MODULE_2__[\"useImperativeHandle\"](action, function () {\n return open ? {\n updatePosition: function updatePosition() {\n setPositioningStyles();\n }\n } : null;\n }, [open, setPositioningStyles]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (!open) {\n return undefined;\n }\n\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(function () {\n setPositioningStyles();\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [open, setPositioningStyles]);\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n } // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n\n\n var container = containerProp || (anchorEl ? Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(getAnchorEl(anchorEl)).body : undefined);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Modal__WEBPACK_IMPORTED_MODULE_12__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n container: container,\n open: open,\n ref: ref,\n BackdropProps: {\n invisible: true\n },\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.root, className)\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n appear: true,\n in: open,\n onEnter: onEnter,\n onEntered: onEntered,\n onExit: onExit,\n onExited: onExited,\n onExiting: onExiting,\n timeout: transitionDuration\n }, TransitionProps, {\n onEntering: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(handleEntering, TransitionProps.onEntering)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n elevation: elevation,\n ref: handlePaperRef\n }, PaperProps, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.paper, PaperProps.className)\n }), children)));\n});\n true ? Popover.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * A HTML element, or a function that returns it.\n * It's used to set the position of the popover.\n */\n anchorEl: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func]), function (props) {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if ( true && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', \"It should be an Element instance but it's `\".concat(resolvedAnchorEl, \"` instead.\")].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n */\n anchorOrigin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n horizontal: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'left', 'right']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]).isRequired,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'center', 'top']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]).isRequired\n }),\n\n /**\n * This is the position that may be used\n * to set the position of the popover.\n * The coordinates are relative to\n * the application's client area.\n */\n anchorPosition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n left: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired,\n top: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired\n }),\n\n /**\n * This determines which anchor prop to refer to to set\n * the position of the popover.\n */\n anchorReference: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['anchorEl', 'anchorPosition', 'none']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.instanceOf(react__WEBPACK_IMPORTED_MODULE_2__[\"Component\"]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func]),\n\n /**\n * The elevation of the popover.\n */\n elevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * This function is called in order to retrieve the content anchor element.\n * It's the opposite of the `anchorEl` prop.\n * The content anchor element should be an element inside the popover.\n * It's used to correctly scroll and set the position of the popover.\n * The positioning strategy tries to make the content anchor element just above the\n * anchor element.\n */\n getContentAnchorEl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Specifies how close to the edge of the window the popover can appear.\n */\n marginThreshold: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired before the component is entering.\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component has entered.\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component is entering.\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired before the component is exiting.\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component has exited.\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component is exiting.\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the popover is visible.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool.isRequired,\n\n /**\n * Props applied to the [`Paper`](/api/paper/) element.\n */\n PaperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .shape({\n component: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"elementTypeAcceptingRef\"]\n }),\n\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n */\n transformOrigin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n horizontal: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'left', 'right']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]).isRequired,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom', 'center', 'top']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number]).isRequired\n }),\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(styles, {\n name: 'MuiPopover'\n})(Popover));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Popover/Popover.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Popover/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Popover/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Popover */ \"./node_modules/@material-ui/core/esm/Popover/Popover.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Popover__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Popover/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Popper/Popper.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Popper/Popper.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var popper_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! popper.js */ \"./node_modules/popper.js/dist/esm/popper.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Portal */ \"./node_modules/@material-ui/core/esm/Portal/index.js\");\n/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction flipPlacement(placement, theme) {\n var direction = theme && theme.direction || 'ltr';\n\n if (direction === 'ltr') {\n return placement;\n }\n\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n\n case 'bottom-start':\n return 'bottom-end';\n\n case 'top-end':\n return 'top-start';\n\n case 'top-start':\n return 'top-end';\n\n default:\n return placement;\n }\n}\n\nfunction getAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"];\nvar defaultPopperOptions = {};\n/**\n * Poppers rely on the 3rd party library [Popper.js](https://popper.js.org/docs/v1/) for positioning.\n */\n\nvar Popper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Popper(props, ref) {\n var anchorEl = props.anchorEl,\n children = props.children,\n container = props.container,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n _props$keepMounted = props.keepMounted,\n keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,\n modifiers = props.modifiers,\n open = props.open,\n _props$placement = props.placement,\n initialPlacement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$popperOptions = props.popperOptions,\n popperOptions = _props$popperOptions === void 0 ? defaultPopperOptions : _props$popperOptions,\n popperRefProp = props.popperRef,\n style = props.style,\n _props$transition = props.transition,\n transition = _props$transition === void 0 ? false : _props$transition,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"anchorEl\", \"children\", \"container\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"style\", \"transition\"]);\n\n var tooltipRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var ownRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(tooltipRef, ref);\n var popperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var handlePopperRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(popperRef, popperRefProp);\n var handlePopperRefRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](handlePopperRef);\n useEnhancedEffect(function () {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useImperativeHandle\"](popperRefProp, function () {\n return popperRef.current;\n }, []);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_6__[\"useTheme\"])();\n var rtlPlacement = flipPlacement(initialPlacement, theme);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](rtlPlacement),\n placement = _React$useState2[0],\n setPlacement = _React$useState2[1];\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (popperRef.current) {\n popperRef.current.update();\n }\n });\n var handleOpen = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n if (!tooltipRef.current || !anchorEl || !open) {\n return;\n }\n\n if (popperRef.current) {\n popperRef.current.destroy();\n handlePopperRefRef.current(null);\n }\n\n var handlePopperUpdate = function handlePopperUpdate(data) {\n setPlacement(data.placement);\n };\n\n var resolvedAnchorEl = getAnchorEl(anchorEl);\n\n if (true) {\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if ( true && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n\n var popper = new popper_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"](getAnchorEl(anchorEl), tooltipRef.current, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n placement: rtlPlacement\n }, popperOptions, {\n modifiers: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, disablePortal ? {} : {\n // It's using scrollParent by default, we can use the viewport when using a portal.\n preventOverflow: {\n boundariesElement: 'window'\n }\n }, modifiers, popperOptions.modifiers),\n // We could have been using a custom modifier like react-popper is doing.\n // But it seems this is the best public API for this use case.\n onCreate: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(handlePopperUpdate, popperOptions.onCreate),\n onUpdate: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(handlePopperUpdate, popperOptions.onUpdate)\n }));\n handlePopperRefRef.current(popper);\n }, [anchorEl, disablePortal, modifiers, open, rtlPlacement, popperOptions]);\n var handleRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (node) {\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(ownRef, node);\n handleOpen();\n }, [ownRef, handleOpen]);\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n var handleClose = function handleClose() {\n if (!popperRef.current) {\n return;\n }\n\n popperRef.current.destroy();\n handlePopperRefRef.current(null);\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n handleClose();\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n return function () {\n handleClose();\n };\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (!open && !transition) {\n // Otherwise handleExited will call this.\n handleClose();\n }\n }, [open, transition]);\n\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n var childProps = {\n placement: placement\n };\n\n if (transition) {\n childProps.TransitionProps = {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n };\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Portal__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n disablePortal: disablePortal,\n container: container\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: handleRef,\n role: \"tooltip\"\n }, other, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display: !open && keepMounted && !transition ? 'none' : null\n }, style)\n }), typeof children === 'function' ? children(childProps) : children));\n});\n true ? Popper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A HTML element, [referenceObject](https://popper.js.org/docs/v1/#referenceObject),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func]), function (props) {\n if (props.open) {\n var resolvedAnchorEl = getAnchorEl(props.anchorEl);\n\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n var box = resolvedAnchorEl.getBoundingClientRect();\n\n if ( true && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.clientWidth !== 'number' || typeof resolvedAnchorEl.clientHeight !== 'number' || typeof resolvedAnchorEl.getBoundingClientRect !== 'function') {\n return new Error(['Material-UI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a referenceObject ', '(https://popper.js.org/docs/v1/#referenceObject).'].join('\\n'));\n }\n }\n\n return null;\n }),\n\n /**\n * Popper render function or node.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func]).isRequired,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.instanceOf(react__WEBPACK_IMPORTED_MODULE_2__[\"Component\"]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func]),\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n */\n keepMounted: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v1/#modifiers).\n */\n modifiers: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, the popper is visible.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool.isRequired,\n\n /**\n * Popper placement.\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * Options provided to the [`popper.js`](https://popper.js.org/docs/v1/) instance.\n */\n popperOptions: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Help supporting a react-transition-group/Transition component.\n */\n transition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Popper);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Popper/Popper.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Popper/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Popper/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Popper */ \"./node_modules/@material-ui/core/esm/Popper/Popper.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Popper__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Popper/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Portal/Portal.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Portal/Portal.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\nfunction getContainer(container) {\n container = typeof container === 'function' ? container() : container; // #StrictMode ready\n\n return react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](container);\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"];\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n */\n\nvar Portal = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"](function Portal(props, ref) {\n var children = props.children,\n container = props.container,\n _props$disablePortal = props.disablePortal,\n disablePortal = _props$disablePortal === void 0 ? false : _props$disablePortal,\n onRendered = props.onRendered;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](null),\n mountNode = _React$useState[0],\n setMountNode = _React$useState[1];\n\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"](children) ? children.ref : null, ref);\n useEnhancedEffect(function () {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(function () {\n if (mountNode && !disablePortal) {\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(ref, mountNode);\n return function () {\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(ref, null);\n };\n }\n\n return undefined;\n }, [ref, mountNode, disablePortal]);\n useEnhancedEffect(function () {\n if (onRendered && (mountNode || disablePortal)) {\n onRendered();\n }\n }, [onRendered, mountNode, disablePortal]);\n\n if (disablePortal) {\n if ( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"](children)) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, {\n ref: handleRef\n });\n }\n\n return children;\n }\n\n return mountNode ? /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_1__[\"createPortal\"](children, mountNode) : mountNode;\n});\n true ? Portal.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The children to render into the `container`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n\n /**\n * A HTML element, component instance, or function that returns either.\n * The `container` will have the portal children appended to it.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([_material_ui_utils__WEBPACK_IMPORTED_MODULE_3__[\"HTMLElementType\"], prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.instanceOf(react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"]), prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func]),\n\n /**\n * Disable the portal behavior.\n * The children stay within it's parent DOM hierarchy.\n */\n disablePortal: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * Callback fired once the children has been mounted into the `container`.\n *\n * This prop will be deprecated and removed in v5, the ref can be used instead.\n */\n onRendered: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func\n} : undefined;\n\nif (true) {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_3__[\"exactProp\"])(Portal.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Portal);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Portal/Portal.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Portal/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Portal/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Portal */ \"./node_modules/@material-ui/core/esm/Portal/Portal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Portal__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Portal/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Radio/Radio.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Radio/Radio.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/SwitchBase */ \"./node_modules/@material-ui/core/esm/internal/SwitchBase.js\");\n/* harmony import */ var _RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RadioButtonIcon */ \"./node_modules/@material-ui/core/esm/Radio/RadioButtonIcon.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _RadioGroup_useRadioGroup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../RadioGroup/useRadioGroup */ \"./node_modules/@material-ui/core/esm/RadioGroup/useRadioGroup.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.secondary\n },\n\n /* Pseudo-class applied to the root element if `checked={true}`. */\n checked: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.action.disabled\n }\n }\n };\n};\nvar defaultCheckedIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n checked: true\n});\nvar defaultIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_RadioButtonIcon__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null);\nvar Radio = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Radio(props, ref) {\n var checkedProp = props.checked,\n classes = props.classes,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n nameProp = props.name,\n onChangeProp = props.onChange,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"checked\", \"classes\", \"color\", \"name\", \"onChange\", \"size\"]);\n\n var radioGroup = Object(_RadioGroup_useRadioGroup__WEBPACK_IMPORTED_MODULE_12__[\"default\"])();\n var checked = checkedProp;\n var onChange = Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(onChangeProp, radioGroup && radioGroup.onChange);\n var name = nameProp;\n\n if (radioGroup) {\n if (typeof checked === 'undefined') {\n checked = radioGroup.value === props.value;\n }\n\n if (typeof name === 'undefined') {\n name = radioGroup.name;\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n color: color,\n type: \"radio\",\n icon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](defaultIcon, {\n fontSize: size === 'small' ? 'small' : 'default'\n }),\n checkedIcon: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](defaultCheckedIcon, {\n fontSize: size === 'small' ? 'small' : 'default'\n }),\n classes: {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(color))]),\n checked: classes.checked,\n disabled: classes.disabled\n },\n name: name,\n checked: checked,\n onChange: onChange,\n ref: ref\n }, other));\n});\n true ? Radio.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * If `true`, the radio will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(styles, {\n name: 'MuiRadio'\n})(Radio));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Radio/Radio.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Radio/RadioButtonIcon.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Radio/RadioButtonIcon.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _internal_svg_icons_RadioButtonUnchecked__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/svg-icons/RadioButtonUnchecked */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonUnchecked.js\");\n/* harmony import */ var _internal_svg_icons_RadioButtonChecked__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/svg-icons/RadioButtonChecked */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonChecked.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n root: {\n position: 'relative',\n display: 'flex',\n '&$checked $layer': {\n transform: 'scale(1)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeOut,\n duration: theme.transitions.duration.shortest\n })\n }\n },\n layer: {\n left: 0,\n position: 'absolute',\n transform: 'scale(0)',\n transition: theme.transitions.create('transform', {\n easing: theme.transitions.easing.easeIn,\n duration: theme.transitions.duration.shortest\n })\n },\n checked: {}\n };\n};\n/**\n * @ignore - internal component.\n */\n\nfunction RadioButtonIcon(props) {\n var checked = props.checked,\n classes = props.classes,\n fontSize = props.fontSize;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.root, checked && classes.checked)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_internal_svg_icons_RadioButtonUnchecked__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n fontSize: fontSize\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_internal_svg_icons_RadioButtonChecked__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n fontSize: fontSize,\n className: classes.layer\n }));\n}\n\n true ? RadioButtonIcon.propTypes = {\n /**\n * If `true`, the component is checked.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object.isRequired,\n\n /**\n * The size of the radio.\n * `small` is equivalent to the dense radio styling.\n */\n fontSize: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.oneOf(['small', 'default'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'PrivateRadioButtonIcon'\n})(RadioButtonIcon));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Radio/RadioButtonIcon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Radio/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Radio/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Radio__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Radio */ \"./node_modules/@material-ui/core/esm/Radio/Radio.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Radio__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Radio/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RadioGroup/RadioGroup.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RadioGroup/RadioGroup.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../FormGroup */ \"./node_modules/@material-ui/core/esm/FormGroup/index.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n/* harmony import */ var _RadioGroupContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./RadioGroupContext */ \"./node_modules/@material-ui/core/esm/RadioGroup/RadioGroupContext.js\");\n/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/unstable_useId */ \"./node_modules/@material-ui/core/esm/utils/unstable_useId.js\");\n\n\n\n\n\n\n\n\n\n\nvar RadioGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function RadioGroup(props, ref) {\n var actions = props.actions,\n children = props.children,\n nameProp = props.name,\n valueProp = props.value,\n onChange = props.onChange,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"actions\", \"children\", \"name\", \"value\", \"onChange\"]);\n\n var rootRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n controlled: valueProp,\n default: props.defaultValue,\n name: 'RadioGroup'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useImperativeHandle\"](actions, function () {\n return {\n focus: function focus() {\n var input = rootRef.current.querySelector('input:not(:disabled):checked');\n\n if (!input) {\n input = rootRef.current.querySelector('input:not(:disabled)');\n }\n\n if (input) {\n input.focus();\n }\n }\n };\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(ref, rootRef);\n\n var handleChange = function handleChange(event) {\n setValue(event.target.value);\n\n if (onChange) {\n onChange(event, event.target.value);\n }\n };\n\n var name = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(nameProp);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_RadioGroupContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"].Provider, {\n value: {\n name: name,\n onChange: handleChange,\n value: value\n }\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_FormGroup__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"radiogroup\",\n ref: handleRef\n }, other), children));\n});\n true ? RadioGroup.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * The default `input` element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string), prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n\n /**\n * The name used to reference the value of the control.\n * If you don't provide this prop, it falls back to a randomly generated name.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Callback fired when a radio button is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Value of the selected radio button. The DOM API casts this to a string.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (RadioGroup);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RadioGroup/RadioGroup.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RadioGroup/RadioGroupContext.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RadioGroup/RadioGroupContext.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n */\n\nvar RadioGroupContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]();\n\nif (true) {\n RadioGroupContext.displayName = 'RadioGroupContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RadioGroupContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RadioGroup/RadioGroupContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RadioGroup/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RadioGroup/index.js ***! \****************************************************************/ /*! exports provided: default, useRadioGroup */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _RadioGroup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RadioGroup */ \"./node_modules/@material-ui/core/esm/RadioGroup/RadioGroup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _useRadioGroup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useRadioGroup */ \"./node_modules/@material-ui/core/esm/RadioGroup/useRadioGroup.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useRadioGroup\", function() { return _useRadioGroup__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RadioGroup/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RadioGroup/useRadioGroup.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RadioGroup/useRadioGroup.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useRadioGroup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RadioGroupContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RadioGroupContext */ \"./node_modules/@material-ui/core/esm/RadioGroup/RadioGroupContext.js\");\n\n\nfunction useRadioGroup() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"](_RadioGroupContext__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RadioGroup/useRadioGroup.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RootRef/RootRef.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RootRef/RootRef.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ \"./node_modules/@babel/runtime/helpers/esm/inherits.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ \"./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ \"./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n\n\n\n\n\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\n\n\n\n\n\n/**\n * ⚠️⚠️⚠️\n * If you want the DOM element of a Material-UI component check out\n * [FAQ: How can I access the DOM element?](/getting-started/faq/#how-can-i-access-the-dom-element)\n * first.\n *\n * This component uses `findDOMNode` which is deprecated in React.StrictMode.\n *\n * Helper component to allow attaching a ref to a\n * wrapped element to access the underlying DOM element.\n *\n * It's highly inspired by https://github.com/facebook/react/issues/11401#issuecomment-340543801.\n * For example:\n * ```jsx\n * import React from 'react';\n * import RootRef from '@material-ui/core/RootRef';\n *\n * function MyComponent() {\n * const domRef = React.useRef();\n *\n * React.useEffect(() => {\n * console.log(domRef.current); // DOM node\n * }, []);\n *\n * return (\n * \n * \n * \n * );\n * }\n * ```\n */\n\nvar RootRef = /*#__PURE__*/function (_React$Component) {\n Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(RootRef, _React$Component);\n\n var _super = _createSuper(RootRef);\n\n function RootRef() {\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(this, RootRef);\n\n return _super.apply(this, arguments);\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(RootRef, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ref = react_dom__WEBPACK_IMPORTED_MODULE_6__[\"findDOMNode\"](this);\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(this.props.rootRef, this.ref);\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var ref = react_dom__WEBPACK_IMPORTED_MODULE_6__[\"findDOMNode\"](this);\n\n if (prevProps.rootRef !== this.props.rootRef || this.ref !== ref) {\n if (prevProps.rootRef !== this.props.rootRef) {\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(prevProps.rootRef, null);\n }\n\n this.ref = ref;\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(this.props.rootRef, this.ref);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.ref = null;\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(this.props.rootRef, null);\n }\n }, {\n key: \"render\",\n value: function render() {\n return this.props.children;\n }\n }]);\n\n return RootRef;\n}(react__WEBPACK_IMPORTED_MODULE_5__[\"Component\"]);\n\n true ? RootRef.propTypes = {\n /**\n * The wrapped element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.element.isRequired,\n\n /**\n * A ref that points to the first DOM node of the wrapped element.\n */\n rootRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"refType\"].isRequired\n} : undefined;\n\nif (true) {\n true ? RootRef.propTypes = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"exactProp\"])(RootRef.propTypes) : undefined;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (RootRef);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RootRef/RootRef.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/RootRef/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/RootRef/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _RootRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RootRef */ \"./node_modules/@material-ui/core/esm/RootRef/RootRef.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _RootRef__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/RootRef/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Select/Select.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Select/Select.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _SelectInput__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SelectInput */ \"./node_modules/@material-ui/core/esm/Select/SelectInput.js\");\n/* harmony import */ var _FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../FormControl/formControlState */ \"./node_modules/@material-ui/core/esm/FormControl/formControlState.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../internal/svg-icons/ArrowDropDown */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Input */ \"./node_modules/@material-ui/core/esm/Input/index.js\");\n/* harmony import */ var _NativeSelect_NativeSelect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../NativeSelect/NativeSelect */ \"./node_modules/@material-ui/core/esm/NativeSelect/NativeSelect.js\");\n/* harmony import */ var _NativeSelect_NativeSelectInput__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../NativeSelect/NativeSelectInput */ \"./node_modules/@material-ui/core/esm/NativeSelect/NativeSelectInput.js\");\n/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../FilledInput */ \"./node_modules/@material-ui/core/esm/FilledInput/index.js\");\n/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../OutlinedInput */ \"./node_modules/@material-ui/core/esm/OutlinedInput/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = _NativeSelect_NativeSelect__WEBPACK_IMPORTED_MODULE_11__[\"styles\"];\n\nvar _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Input__WEBPACK_IMPORTED_MODULE_10__[\"default\"], null);\n\nvar _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FilledInput__WEBPACK_IMPORTED_MODULE_13__[\"default\"], null);\n\nvar Select = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Select(props, ref) {\n var _props$autoWidth = props.autoWidth,\n autoWidth = _props$autoWidth === void 0 ? false : _props$autoWidth,\n children = props.children,\n classes = props.classes,\n _props$displayEmpty = props.displayEmpty,\n displayEmpty = _props$displayEmpty === void 0 ? false : _props$displayEmpty,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDropDown__WEBPACK_IMPORTED_MODULE_9__[\"default\"] : _props$IconComponent,\n id = props.id,\n input = props.input,\n inputProps = props.inputProps,\n label = props.label,\n labelId = props.labelId,\n _props$labelWidth = props.labelWidth,\n labelWidth = _props$labelWidth === void 0 ? 0 : _props$labelWidth,\n MenuProps = props.MenuProps,\n _props$multiple = props.multiple,\n multiple = _props$multiple === void 0 ? false : _props$multiple,\n _props$native = props.native,\n native = _props$native === void 0 ? false : _props$native,\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n renderValue = props.renderValue,\n SelectDisplayProps = props.SelectDisplayProps,\n _props$variant = props.variant,\n variantProps = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"autoWidth\", \"children\", \"classes\", \"displayEmpty\", \"IconComponent\", \"id\", \"input\", \"inputProps\", \"label\", \"labelId\", \"labelWidth\", \"MenuProps\", \"multiple\", \"native\", \"onClose\", \"onOpen\", \"open\", \"renderValue\", \"SelectDisplayProps\", \"variant\"]);\n\n var inputComponent = native ? _NativeSelect_NativeSelectInput__WEBPACK_IMPORTED_MODULE_12__[\"default\"] : _SelectInput__WEBPACK_IMPORTED_MODULE_5__[\"default\"];\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var fcs = Object(_FormControl_formControlState__WEBPACK_IMPORTED_MODULE_6__[\"default\"])({\n props: props,\n muiFormControl: muiFormControl,\n states: ['variant']\n });\n var variant = fcs.variant || variantProps;\n var InputComponent = input || {\n standard: _ref,\n outlined: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_OutlinedInput__WEBPACK_IMPORTED_MODULE_14__[\"default\"], {\n label: label,\n labelWidth: labelWidth\n }),\n filled: _ref2\n }[variant];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // Most of the logic is implemented in `SelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent: inputComponent,\n inputProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n children: children,\n IconComponent: IconComponent,\n variant: variant,\n type: undefined,\n // We render a select. We can ignore the type provided by the `Input`.\n multiple: multiple\n }, native ? {\n id: id\n } : {\n autoWidth: autoWidth,\n displayEmpty: displayEmpty,\n labelId: labelId,\n MenuProps: MenuProps,\n onClose: onClose,\n onOpen: onOpen,\n open: open,\n renderValue: renderValue,\n SelectDisplayProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: id\n }, SelectDisplayProps)\n }, inputProps, {\n classes: inputProps ? Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_4__[\"mergeClasses\"])({\n baseClasses: classes,\n newClasses: inputProps.classes,\n Component: Select\n }) : classes\n }, input ? input.props.inputProps : {}),\n ref: ref\n }, other));\n});\n true ? Select.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n *\n * ⚠️The `MenuItem` elements **must** be direct descendants when `native` is false.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, a value is displayed even if no items are selected.\n *\n * In order to display a meaningful value, a function should be passed to the `renderValue` prop which returns the value to be displayed when no items are selected.\n * You can only use it when the `native` prop is `false` (default).\n */\n displayEmpty: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * The `id` of the wrapper element or the `select` element when `native`.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * When `native` is `true`, the attributes are applied on the `select` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * See [OutlinedInput#label](/api/outlined-input/#props)\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * See [OutlinedInput#label](/api/outlined-input/#props)\n */\n labelWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component will be using a native `select` element.\n */\n native: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected when `native` is `false` (default).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Control `select` open state.\n * You can only use it when the `native` prop is `false` (default).\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Render the selected value.\n * You can only use it when the `native` prop is `false` (default).\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The input value. Providing an empty string will select no options.\n * This prop is required when the `native` prop is `false` (default).\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n *\n * If the value is an object it must have reference equality with the option in order to be selected.\n * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\nSelect.muiName = 'Select';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiSelect'\n})(Select));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Select/Select.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Select/SelectInput.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Select/SelectInput.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Menu_Menu__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Menu/Menu */ \"./node_modules/@material-ui/core/esm/Menu/Menu.js\");\n/* harmony import */ var _InputBase_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../InputBase/utils */ \"./node_modules/@material-ui/core/esm/InputBase/utils.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction areEqualValues(a, b) {\n if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(b) === 'object' && b !== null) {\n return a === b;\n }\n\n return String(a) === String(b);\n}\n\nfunction isEmpty(display) {\n return display == null || typeof display === 'string' && !display.trim();\n}\n/**\n * @ignore - internal component.\n */\n\n\nvar SelectInput = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"forwardRef\"](function SelectInput(props, ref) {\n var ariaLabel = props['aria-label'],\n autoFocus = props.autoFocus,\n autoWidth = props.autoWidth,\n children = props.children,\n classes = props.classes,\n className = props.className,\n defaultValue = props.defaultValue,\n disabled = props.disabled,\n displayEmpty = props.displayEmpty,\n IconComponent = props.IconComponent,\n inputRefProp = props.inputRef,\n labelId = props.labelId,\n _props$MenuProps = props.MenuProps,\n MenuProps = _props$MenuProps === void 0 ? {} : _props$MenuProps,\n multiple = props.multiple,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onClose = props.onClose,\n onFocus = props.onFocus,\n onOpen = props.onOpen,\n openProp = props.open,\n readOnly = props.readOnly,\n renderValue = props.renderValue,\n _props$SelectDisplayP = props.SelectDisplayProps,\n SelectDisplayProps = _props$SelectDisplayP === void 0 ? {} : _props$SelectDisplayP,\n tabIndexProp = props.tabIndex,\n type = props.type,\n valueProp = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"aria-label\", \"autoFocus\", \"autoWidth\", \"children\", \"classes\", \"className\", \"defaultValue\", \"disabled\", \"displayEmpty\", \"IconComponent\", \"inputRef\", \"labelId\", \"MenuProps\", \"multiple\", \"name\", \"onBlur\", \"onChange\", \"onClose\", \"onFocus\", \"onOpen\", \"open\", \"readOnly\", \"renderValue\", \"SelectDisplayProps\", \"tabIndex\", \"type\", \"value\", \"variant\"]);\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_14__[\"default\"])({\n controlled: valueProp,\n default: defaultValue,\n name: 'Select'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useControlled, 2),\n value = _useControlled2[0],\n setValue = _useControlled2[1];\n\n var inputRef = react__WEBPACK_IMPORTED_MODULE_5__[\"useRef\"](null);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_5__[\"useState\"](null),\n displayNode = _React$useState[0],\n setDisplayNode = _React$useState[1];\n\n var _React$useRef = react__WEBPACK_IMPORTED_MODULE_5__[\"useRef\"](openProp != null),\n isOpenControlled = _React$useRef.current;\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_5__[\"useState\"](),\n menuMinWidthState = _React$useState2[0],\n setMenuMinWidthState = _React$useState2[1];\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_5__[\"useState\"](false),\n openState = _React$useState3[0],\n setOpenState = _React$useState3[1];\n\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(ref, inputRefProp);\n react__WEBPACK_IMPORTED_MODULE_5__[\"useImperativeHandle\"](handleRef, function () {\n return {\n focus: function focus() {\n displayNode.focus();\n },\n node: inputRef.current,\n value: value\n };\n }, [displayNode, value]);\n react__WEBPACK_IMPORTED_MODULE_5__[\"useEffect\"](function () {\n if (autoFocus && displayNode) {\n displayNode.focus();\n }\n }, [autoFocus, displayNode]);\n react__WEBPACK_IMPORTED_MODULE_5__[\"useEffect\"](function () {\n if (displayNode) {\n var label = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(displayNode).getElementById(labelId);\n\n if (label) {\n var handler = function handler() {\n if (getSelection().isCollapsed) {\n displayNode.focus();\n }\n };\n\n label.addEventListener('click', handler);\n return function () {\n label.removeEventListener('click', handler);\n };\n }\n }\n\n return undefined;\n }, [labelId, displayNode]);\n\n var update = function update(open, event) {\n if (open) {\n if (onOpen) {\n onOpen(event);\n }\n } else if (onClose) {\n onClose(event);\n }\n\n if (!isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);\n setOpenState(open);\n }\n };\n\n var handleMouseDown = function handleMouseDown(event) {\n // Ignore everything but left-click\n if (event.button !== 0) {\n return;\n } // Hijack the default focus behavior.\n\n\n event.preventDefault();\n displayNode.focus();\n update(true, event);\n };\n\n var handleClose = function handleClose(event) {\n update(false, event);\n };\n\n var childrenArray = react__WEBPACK_IMPORTED_MODULE_5__[\"Children\"].toArray(children); // Support autofill.\n\n var handleChange = function handleChange(event) {\n var index = childrenArray.map(function (child) {\n return child.props.value;\n }).indexOf(event.target.value);\n\n if (index === -1) {\n return;\n }\n\n var child = childrenArray[index];\n setValue(child.props.value);\n\n if (onChange) {\n onChange(event, child);\n }\n };\n\n var handleItemClick = function handleItemClick(child) {\n return function (event) {\n if (!multiple) {\n update(false, event);\n }\n\n var newValue;\n\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n var itemIndex = value.indexOf(child.props.value);\n\n if (itemIndex === -1) {\n newValue.push(child.props.value);\n } else {\n newValue.splice(itemIndex, 1);\n }\n } else {\n newValue = child.props.value;\n }\n\n if (child.props.onClick) {\n child.props.onClick(event);\n }\n\n if (value === newValue) {\n return;\n }\n\n setValue(newValue);\n\n if (onChange) {\n event.persist(); // Preact support, target is read only property on a native event.\n\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value: newValue,\n name: name\n }\n });\n onChange(event, child);\n }\n };\n };\n\n var handleKeyDown = function handleKeyDown(event) {\n if (!readOnly) {\n var validKeys = [' ', 'ArrowUp', 'ArrowDown', // The native select doesn't respond to enter on MacOS, but it's recommended by\n // https://www.w3.org/TR/wai-aria-practices/examples/listbox/listbox-collapsible.html\n 'Enter'];\n\n if (validKeys.indexOf(event.key) !== -1) {\n event.preventDefault();\n update(true, event);\n }\n }\n };\n\n var open = displayNode !== null && (isOpenControlled ? openProp : openState);\n\n var handleBlur = function handleBlur(event) {\n // if open event.stopImmediatePropagation\n if (!open && onBlur) {\n event.persist(); // Preact support, target is read only property on a native event.\n\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value: value,\n name: name\n }\n });\n onBlur(event);\n }\n };\n\n delete other['aria-invalid'];\n var display;\n var displaySingle;\n var displayMultiple = [];\n var computeDisplay = false;\n var foundMatch = false; // No need to display any value if the field is empty.\n\n if (Object(_InputBase_utils__WEBPACK_IMPORTED_MODULE_12__[\"isFilled\"])({\n value: value\n }) || displayEmpty) {\n if (renderValue) {\n display = renderValue(value);\n } else {\n computeDisplay = true;\n }\n }\n\n var items = childrenArray.map(function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_6__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Select component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var selected;\n\n if (multiple) {\n if (!Array.isArray(value)) {\n throw new Error( true ? \"Material-UI: The `value` prop must be an array when using the `Select` component with `multiple`.\" : undefined);\n }\n\n selected = value.some(function (v) {\n return areEqualValues(v, child.props.value);\n });\n\n if (selected && computeDisplay) {\n displayMultiple.push(child.props.children);\n }\n } else {\n selected = areEqualValues(value, child.props.value);\n\n if (selected && computeDisplay) {\n displaySingle = child.props.children;\n }\n }\n\n if (selected) {\n foundMatch = true;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"cloneElement\"](child, {\n 'aria-selected': selected ? 'true' : undefined,\n onClick: handleItemClick(child),\n onKeyUp: function onKeyUp(event) {\n if (event.key === ' ') {\n // otherwise our MenuItems dispatches a click event\n // it's not behavior of the native and causes\n // the select to close immediately since we open on space keydown\n event.preventDefault();\n }\n\n if (child.props.onKeyUp) {\n child.props.onKeyUp(event);\n }\n },\n role: 'option',\n selected: selected,\n value: undefined,\n // The value is most likely not a valid HTML attribute.\n 'data-value': child.props.value // Instead, we provide it as a data attribute.\n\n });\n });\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_5__[\"useEffect\"](function () {\n if (!foundMatch && !multiple && value !== '') {\n var values = childrenArray.map(function (child) {\n return child.props.value;\n });\n console.warn([\"Material-UI: You have provided an out-of-range value `\".concat(value, \"` for the select \").concat(name ? \"(name=\\\"\".concat(name, \"\\\") \") : '', \"component.\"), \"Consider providing a value that matches one of the available options or ''.\", \"The available values are \".concat(values.filter(function (x) {\n return x != null;\n }).map(function (x) {\n return \"`\".concat(x, \"`\");\n }).join(', ') || '\"\"', \".\")].join('\\n'));\n }\n }, [foundMatch, childrenArray, multiple, name, value]);\n }\n\n if (computeDisplay) {\n display = multiple ? displayMultiple.join(', ') : displaySingle;\n } // Avoid performing a layout computation in the render method.\n\n\n var menuMinWidth = menuMinWidthState;\n\n if (!autoWidth && isOpenControlled && displayNode) {\n menuMinWidth = displayNode.clientWidth;\n }\n\n var tabIndex;\n\n if (typeof tabIndexProp !== 'undefined') {\n tabIndex = tabIndexProp;\n } else {\n tabIndex = disabled ? null : 0;\n }\n\n var buttonId = SelectDisplayProps.id || (name ? \"mui-component-select-\".concat(name) : undefined);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_5__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(classes.root, // TODO v5: merge root and select\n classes.select, classes.selectMenu, classes[variant], className, disabled && classes.disabled),\n ref: setDisplayNode,\n tabIndex: tabIndex,\n role: \"button\",\n \"aria-disabled\": disabled ? 'true' : undefined,\n \"aria-expanded\": open ? 'true' : undefined,\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": [labelId, buttonId].filter(Boolean).join(' ') || undefined,\n onKeyDown: handleKeyDown,\n onMouseDown: disabled || readOnly ? null : handleMouseDown,\n onBlur: handleBlur,\n onFocus: onFocus\n }, SelectDisplayProps, {\n // The id is required for proper a11y\n id: buttonId\n }), isEmpty(display) ?\n /*#__PURE__*/\n // eslint-disable-next-line react/no-danger\n react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: ''\n }\n }) : display), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](\"input\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n value: Array.isArray(value) ? value.join(',') : value,\n name: name,\n ref: inputRef,\n \"aria-hidden\": true,\n onChange: handleChange,\n tabIndex: -1,\n className: classes.nativeInput,\n autoFocus: autoFocus\n }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](IconComponent, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(classes.icon, classes[\"icon\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(variant))], open && classes.iconOpen, disabled && classes.disabled)\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_5__[\"createElement\"](_Menu_Menu__WEBPACK_IMPORTED_MODULE_11__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: \"menu-\".concat(name || ''),\n anchorEl: displayNode,\n open: open,\n onClose: handleClose\n }, MenuProps, {\n MenuListProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n 'aria-labelledby': labelId,\n role: 'listbox',\n disableListWrap: true\n }, MenuProps.MenuListProps),\n PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, MenuProps.PaperProps, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n minWidth: menuMinWidth\n }, MenuProps.PaperProps != null ? MenuProps.PaperProps.style : null)\n })\n }), items));\n});\n true ? SelectInput.propTypes = {\n /**\n * @ignore\n */\n 'aria-label': prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n /**\n * @ignore\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * The option elements to populate the select with.\n * Can be some `` elements.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object.isRequired,\n\n /**\n * The CSS class name of the select element.\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.any,\n\n /**\n * If `true`, the select will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * If `true`, the selected item is displayed even if its value is empty.\n */\n displayEmpty: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * The icon that displays the arrow.\n */\n IconComponent: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.elementType.isRequired,\n\n /**\n * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`\n * Equivalent to `ref`\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__[\"refType\"],\n\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n /**\n * Props applied to the [`Menu`](/api/menu/) element.\n */\n MenuProps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object,\n\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * Callback function fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected.\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * Control `select` open state.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * @ignore\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.bool,\n\n /**\n * Render the selected value.\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.func,\n\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.object,\n\n /**\n * @ignore\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.string]),\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.any,\n\n /**\n * The input value.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.any,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_7___default.a.oneOf(['standard', 'outlined', 'filled'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (SelectInput);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Select/SelectInput.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Select/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Select/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Select */ \"./node_modules/@material-ui/core/esm/Select/Select.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Select__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Select/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Slide/Slide.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Slide/Slide.js ***! \***********************************************************/ /*! exports provided: setTranslateValue, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setTranslateValue\", function() { return setTranslateValue; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n\n\n\n\n\n\n\n\n\n\n\n // Translate the node so he can't be seen on the screen.\n// Later, we gonna translate back the node to his original location\n// with `none`.`\n\nfunction getTranslateValue(direction, node) {\n var rect = node.getBoundingClientRect();\n var transform;\n\n if (node.fakeTransform) {\n transform = node.fakeTransform;\n } else {\n var computedStyle = window.getComputedStyle(node);\n transform = computedStyle.getPropertyValue('-webkit-transform') || computedStyle.getPropertyValue('transform');\n }\n\n var offsetX = 0;\n var offsetY = 0;\n\n if (transform && transform !== 'none' && typeof transform === 'string') {\n var transformValues = transform.split('(')[1].split(')')[0].split(',');\n offsetX = parseInt(transformValues[4], 10);\n offsetY = parseInt(transformValues[5], 10);\n }\n\n if (direction === 'left') {\n return \"translateX(\".concat(window.innerWidth, \"px) translateX(\").concat(offsetX - rect.left, \"px)\");\n }\n\n if (direction === 'right') {\n return \"translateX(-\".concat(rect.left + rect.width - offsetX, \"px)\");\n }\n\n if (direction === 'up') {\n return \"translateY(\".concat(window.innerHeight, \"px) translateY(\").concat(offsetY - rect.top, \"px)\");\n } // direction === 'down'\n\n\n return \"translateY(-\".concat(rect.top + rect.height - offsetY, \"px)\");\n}\n\nfunction setTranslateValue(direction, node) {\n var transform = getTranslateValue(direction, node);\n\n if (transform) {\n node.style.webkitTransform = transform;\n node.style.transform = transform;\n }\n}\nvar defaultTimeout = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__[\"duration\"].leavingScreen\n};\n/**\n * The Slide transition is used by the [Drawer](/components/drawers/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Slide = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Slide(props, ref) {\n var children = props.children,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'down' : _props$direction,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_6__[\"Transition\"] : _props$TransitionComp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"direction\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[\"default\"])();\n var childrenRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n /**\n * used in cloneElement(children, { ref: handleRef })\n */\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n childrenRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__[\"findDOMNode\"](instance);\n }, []);\n var handleRefIntermediary = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(children.ref, handleOwnRef);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(handleRefIntermediary, ref);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (isAppearing) {\n if (callback) {\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (isAppearing === undefined) {\n callback(childrenRef.current);\n } else {\n callback(childrenRef.current, isAppearing);\n }\n }\n };\n };\n\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n setTranslateValue(direction, node);\n Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__[\"reflow\"])(node);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntering = normalizedTransitionCallback(function (node, isAppearing) {\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__[\"getTransitionProps\"])({\n timeout: timeout,\n style: style\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('-webkit-transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transitionProps, {\n easing: theme.transitions.easing.easeOut\n }));\n node.style.transition = theme.transitions.create('transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transitionProps, {\n easing: theme.transitions.easing.easeOut\n }));\n node.style.webkitTransform = 'none';\n node.style.transform = 'none';\n\n if (onEntering) {\n onEntering(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_11__[\"getTransitionProps\"])({\n timeout: timeout,\n style: style\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('-webkit-transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transitionProps, {\n easing: theme.transitions.easing.sharp\n }));\n node.style.transition = theme.transitions.create('transform', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, transitionProps, {\n easing: theme.transitions.easing.sharp\n }));\n setTranslateValue(direction, node);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(function (node) {\n // No need for transitions when the component is hidden\n node.style.webkitTransition = '';\n node.style.transition = '';\n\n if (onExited) {\n onExited(node);\n }\n });\n var updatePosition = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n if (childrenRef.current) {\n setTranslateValue(direction, childrenRef.current);\n }\n }, [direction]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n // Skip configuration where the position is screen size invariant.\n if (inProp || direction === 'down' || direction === 'right') {\n return undefined;\n }\n\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(function () {\n if (childrenRef.current) {\n setTranslateValue(direction, childrenRef.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [direction, inProp]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (!inProp) {\n // We need to update the position of the drawer when the direction change and\n // when it's hidden.\n updatePosition();\n }\n }, [inProp, updatePosition]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n nodeRef: childrenRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n appear: true,\n in: inProp,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: handleRef,\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, style, children.props.style)\n }, childProps));\n });\n});\n true ? Slide.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__[\"elementAcceptingRef\"],\n\n /**\n * Direction the child node will enter from.\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['down', 'left', 'right', 'up']),\n\n /**\n * If `true`, show the component; triggers the enter or exit animation.\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Slide);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Slide/Slide.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Slide/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Slide/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Slide */ \"./node_modules/@material-ui/core/esm/Slide/Slide.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Slide__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Slide/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Slider/Slider.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Slider/Slider.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n/* harmony import */ var _ValueLabel__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ValueLabel */ \"./node_modules/@material-ui/core/esm/Slider/ValueLabel.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction asc(a, b) {\n return a - b;\n}\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(min, value), max);\n}\n\nfunction findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n\n return closestIndex;\n}\n\nfunction trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n\n return false;\n }\n\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\n\nfunction valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\n\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\n\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\n\nfunction roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\n\nfunction setValueIndex(_ref) {\n var values = _ref.values,\n source = _ref.source,\n newValue = _ref.newValue,\n index = _ref.index;\n\n // Performance shortcut\n if (values[index] === newValue) {\n return source;\n }\n\n var output = values.slice();\n output[index] = newValue;\n return output;\n}\n\nfunction focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n\n if (!sliderRef.current.contains(document.activeElement) || Number(document.activeElement.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current.querySelector(\"[role=\\\"slider\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\")).focus();\n }\n\n if (setActive) {\n setActive(activeIndex);\n }\n}\n\nvar axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\n\nvar Identity = function Identity(x) {\n return x;\n};\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n height: 2,\n width: '100%',\n boxSizing: 'content-box',\n padding: '13px 0',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n color: theme.palette.primary.main,\n WebkitTapHighlightColor: 'transparent',\n '&$disabled': {\n pointerEvents: 'none',\n cursor: 'default',\n color: theme.palette.grey[400]\n },\n '&$vertical': {\n width: 2,\n height: '100%',\n padding: '0 13px'\n },\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0',\n '&$vertical': {\n padding: '0 20px'\n }\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `marks` is provided with at least one label. */\n marked: {\n marginBottom: 20,\n '&$vertical': {\n marginBottom: 'auto',\n marginRight: 20\n }\n },\n\n /* Pseudo-class applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Pseudo-class applied to the root and thumb element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the rail element. */\n rail: {\n display: 'block',\n position: 'absolute',\n width: '100%',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n opacity: 0.38,\n '$vertical &': {\n height: '100%',\n width: 2\n }\n },\n\n /* Styles applied to the track element. */\n track: {\n display: 'block',\n position: 'absolute',\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n '$vertical &': {\n width: 2\n }\n },\n\n /* Styles applied to the track element if `track={false}`. */\n trackFalse: {\n '& $track': {\n display: 'none'\n }\n },\n\n /* Styles applied to the track element if `track=\"inverted\"`. */\n trackInverted: {\n '& $track': {\n backgroundColor: // Same logic as the LinearProgress track color\n theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"lighten\"])(theme.palette.primary.main, 0.62) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"darken\"])(theme.palette.primary.main, 0.5)\n },\n '& $rail': {\n opacity: 1\n }\n },\n\n /* Styles applied to the thumb element. */\n thumb: {\n position: 'absolute',\n width: 12,\n height: 12,\n marginLeft: -6,\n marginTop: -5,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // reach 42px hit target (2 * 15 + thumb diameter)\n left: -15,\n top: -15,\n right: -15,\n bottom: -15\n },\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"fade\"])(theme.palette.primary.main, 0.16)),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"fade\"])(theme.palette.primary.main, 0.16))\n },\n '&$disabled': {\n width: 8,\n height: 8,\n marginLeft: -4,\n marginTop: -3,\n '&:hover': {\n boxShadow: 'none'\n }\n },\n '$vertical &': {\n marginLeft: -5,\n marginBottom: -6\n },\n '$vertical &$disabled': {\n marginLeft: -3,\n marginBottom: -4\n }\n },\n\n /* Styles applied to the thumb element if `color=\"primary\"`. */\n thumbColorPrimary: {// TODO v5: move the style here\n },\n\n /* Styles applied to the thumb element if `color=\"secondary\"`. */\n thumbColorSecondary: {\n '&$focusVisible,&:hover': {\n boxShadow: \"0px 0px 0px 8px \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"fade\"])(theme.palette.secondary.main, 0.16))\n },\n '&$active': {\n boxShadow: \"0px 0px 0px 14px \".concat(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_10__[\"fade\"])(theme.palette.secondary.main, 0.16))\n }\n },\n\n /* Pseudo-class applied to the thumb element if it's active. */\n active: {},\n\n /* Pseudo-class applied to the thumb element if keyboard focused. */\n focusVisible: {},\n\n /* Styles applied to the thumb label element. */\n valueLabel: {\n // IE 11 centering bug, to remove from the customization demos once no longer supported\n left: 'calc(-50% - 4px)'\n },\n\n /* Styles applied to the mark element. */\n mark: {\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor'\n },\n\n /* Styles applied to the mark element if active (depending on the value). */\n markActive: {\n backgroundColor: theme.palette.background.paper,\n opacity: 0.8\n },\n\n /* Styles applied to the mark label element. */\n markLabel: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, theme.typography.body2, {\n color: theme.palette.text.secondary,\n position: 'absolute',\n top: 26,\n transform: 'translateX(-50%)',\n whiteSpace: 'nowrap',\n '$vertical &': {\n top: 'auto',\n left: 26,\n transform: 'translateY(50%)'\n },\n '@media (pointer: coarse)': {\n top: 40,\n '$vertical &': {\n left: 31\n }\n }\n }),\n\n /* Styles applied to the mark label element if active (depending on the value). */\n markLabelActive: {\n color: theme.palette.text.primary\n }\n };\n};\nvar Slider = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"forwardRef\"](function Slider(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledby = props['aria-labelledby'],\n ariaValuetext = props['aria-valuetext'],\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'span' : _props$component,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n getAriaLabel = props.getAriaLabel,\n getAriaValueText = props.getAriaValueText,\n _props$marks = props.marks,\n marksProp = _props$marks === void 0 ? false : _props$marks,\n _props$max = props.max,\n max = _props$max === void 0 ? 100 : _props$max,\n _props$min = props.min,\n min = _props$min === void 0 ? 0 : _props$min,\n name = props.name,\n onChange = props.onChange,\n onChangeCommitted = props.onChangeCommitted,\n onMouseDown = props.onMouseDown,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$scale = props.scale,\n scale = _props$scale === void 0 ? Identity : _props$scale,\n _props$step = props.step,\n step = _props$step === void 0 ? 1 : _props$step,\n _props$ThumbComponent = props.ThumbComponent,\n ThumbComponent = _props$ThumbComponent === void 0 ? 'span' : _props$ThumbComponent,\n _props$track = props.track,\n track = _props$track === void 0 ? 'normal' : _props$track,\n valueProp = props.value,\n _props$ValueLabelComp = props.ValueLabelComponent,\n ValueLabelComponent = _props$ValueLabelComp === void 0 ? _ValueLabel__WEBPACK_IMPORTED_MODULE_17__[\"default\"] : _props$ValueLabelComp,\n _props$valueLabelDisp = props.valueLabelDisplay,\n valueLabelDisplay = _props$valueLabelDisp === void 0 ? 'off' : _props$valueLabelDisp,\n _props$valueLabelForm = props.valueLabelFormat,\n valueLabelFormat = _props$valueLabelForm === void 0 ? Identity : _props$valueLabelForm,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"aria-label\", \"aria-labelledby\", \"aria-valuetext\", \"classes\", \"className\", \"color\", \"component\", \"defaultValue\", \"disabled\", \"getAriaLabel\", \"getAriaValueText\", \"marks\", \"max\", \"min\", \"name\", \"onChange\", \"onChangeCommitted\", \"onMouseDown\", \"orientation\", \"scale\", \"step\", \"ThumbComponent\", \"track\", \"value\", \"ValueLabelComponent\", \"valueLabelDisplay\", \"valueLabelFormat\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[\"default\"])();\n var touchId = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](); // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transfered when inversing a range slider.\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](-1),\n active = _React$useState[0],\n setActive = _React$useState[1];\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](-1),\n open = _React$useState2[0],\n setOpen = _React$useState2[1];\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_16__[\"default\"])({\n controlled: valueProp,\n default: defaultValue,\n name: 'Slider'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(function (value) {\n return clamp(value, min, max);\n });\n var marks = marksProp === true && step !== null ? Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Array(Math.floor((max - min) / step) + 1)).map(function (_, index) {\n return {\n value: min + step * index\n };\n }) : marksProp || [];\n\n var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](-1),\n focusVisible = _React$useState3[0],\n setFocusVisible = _React$useState3[1];\n\n var sliderRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n var handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(focusVisibleRef, sliderRef);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(ref, handleFocusRef);\n var handleFocus = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n\n if (isFocusVisible(event)) {\n setFocusVisible(index);\n }\n\n setOpen(index);\n });\n var handleBlur = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function () {\n if (focusVisible !== -1) {\n setFocusVisible(-1);\n onBlurVisible();\n }\n\n setOpen(-1);\n });\n var handleMouseOver = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n });\n var handleMouseLeave = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function () {\n setOpen(-1);\n });\n var isRtl = theme.direction === 'rtl';\n var handleKeyDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n var index = Number(event.currentTarget.getAttribute('data-index'));\n var value = values[index];\n var tenPercents = (max - min) / 10;\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var marksIndex = marksValues.indexOf(value);\n var newValue;\n var increaseKey = isRtl ? 'ArrowLeft' : 'ArrowRight';\n var decreaseKey = isRtl ? 'ArrowRight' : 'ArrowLeft';\n\n switch (event.key) {\n case 'Home':\n newValue = min;\n break;\n\n case 'End':\n newValue = max;\n break;\n\n case 'PageUp':\n if (step) {\n newValue = value + tenPercents;\n }\n\n break;\n\n case 'PageDown':\n if (step) {\n newValue = value - tenPercents;\n }\n\n break;\n\n case increaseKey:\n case 'ArrowUp':\n if (step) {\n newValue = value + step;\n } else {\n newValue = marksValues[marksIndex + 1] || marksValues[marksValues.length - 1];\n }\n\n break;\n\n case decreaseKey:\n case 'ArrowDown':\n if (step) {\n newValue = value - step;\n } else {\n newValue = marksValues[marksIndex - 1] || marksValues[0];\n }\n\n break;\n\n default:\n return;\n } // Prevent scroll of the page\n\n\n event.preventDefault();\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n\n newValue = clamp(newValue, min, max);\n\n if (range) {\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n source: valueDerived,\n newValue: newValue,\n index: index\n }).sort(asc);\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: newValue.indexOf(previousValue)\n });\n }\n\n setValueState(newValue);\n setFocusVisible(index);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n });\n var previousIndex = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n var axis = orientation;\n\n if (isRtl && orientation !== \"vertical\") {\n axis += '-reverse';\n }\n\n var getFingerNewValue = function getFingerNewValue(_ref3) {\n var finger = _ref3.finger,\n _ref3$move = _ref3.move,\n move = _ref3$move === void 0 ? false : _ref3$move,\n values2 = _ref3.values,\n source = _ref3.source;\n var slider = sliderRef.current;\n\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n\n var percent;\n\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n\n var newValue;\n newValue = percentToValue(percent, min, max);\n\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n var marksValues = marks.map(function (mark) {\n return mark.value;\n });\n var closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n source: source,\n newValue: newValue,\n index: activeIndex\n }).sort(asc);\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n };\n\n var handleTouchMove = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue = getFingerNewValue({\n finger: finger,\n move: true,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue.newValue,\n activeIndex = _getFingerNewValue.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n });\n var handleTouchEnd = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n var finger = trackFinger(event, touchId);\n\n if (!finger) {\n return;\n }\n\n var _getFingerNewValue2 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue2.newValue;\n\n setActive(-1);\n\n if (event.type === 'touchend') {\n setOpen(-1);\n }\n\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n\n touchId.current = undefined;\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n });\n var handleTouchStart = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n // Workaround as Safari has partial support for touchAction: 'none'.\n event.preventDefault();\n var touch = event.changedTouches[0];\n\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue3 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue3.newValue,\n activeIndex = _getFingerNewValue3.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n var slider = sliderRef.current;\n slider.addEventListener('touchstart', handleTouchStart);\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(slider);\n return function () {\n slider.removeEventListener('touchstart', handleTouchStart);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n };\n }, [handleTouchEnd, handleTouchMove, handleTouchStart]);\n var handleMouseDown = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(function (event) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n\n var _getFingerNewValue4 = getFingerNewValue({\n finger: finger,\n values: values,\n source: valueDerived\n }),\n newValue = _getFingerNewValue4.newValue,\n activeIndex = _getFingerNewValue4.activeIndex;\n\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n\n if (onChange) {\n onChange(event, newValue);\n }\n\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n });\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n\n var trackStyle = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({}, axisProps[axis].offset(trackOffset), axisProps[axis].leap(trackLeap));\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n ref: handleRef,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(color))], className, disabled && classes.disabled, marks.length > 0 && marks.some(function (mark) {\n return mark.label;\n }) && classes.marked, track === false && classes.trackFalse, orientation === 'vertical' && classes.vertical, track === 'inverted' && classes.trackInverted),\n onMouseDown: handleMouseDown\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n className: classes.rail\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n className: classes.track,\n style: trackStyle\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"input\", {\n value: values.join(','),\n name: name,\n type: \"hidden\"\n }), marks.map(function (mark, index) {\n var percent = valueToPercent(mark.value, min, max);\n var style = axisProps[axis].offset(percent);\n var markActive;\n\n if (track === false) {\n markActive = values.indexOf(mark.value) !== -1;\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_4__[\"Fragment\"], {\n key: mark.value\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n style: style,\n \"data-index\": index,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.mark, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n \"aria-hidden\": true,\n \"data-index\": index,\n style: style,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.markLabel, markActive && classes.markLabelActive)\n }, mark.label) : null);\n }), values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](ValueLabelComponent, {\n key: index,\n valueLabelFormat: valueLabelFormat,\n valueLabelDisplay: valueLabelDisplay,\n className: classes.valueLabel,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index: index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled: disabled\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](ThumbComponent, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.thumb, classes[\"thumbColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(color))], active === index && classes.active, disabled && classes.disabled, focusVisible === index && classes.focusVisible),\n tabIndex: disabled ? null : 0,\n role: \"slider\",\n style: style,\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-labelledby\": ariaLabelledby,\n \"aria-orientation\": orientation,\n \"aria-valuemax\": scale(max),\n \"aria-valuemin\": scale(min),\n \"aria-valuenow\": scale(value),\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }));\n }));\n});\n true ? Slider.propTypes = {\n /**\n * The label of the slider.\n */\n 'aria-label': Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_7__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-label'] != null) {\n return new Error('Material-UI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_7__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string, function (props) {\n var range = Array.isArray(props.value || props.defaultValue);\n\n if (range && props['aria-valuetext'] != null) {\n return new Error('Material-UI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The default element value. Use when the component is not controlled.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number)]),\n\n /**\n * If `true`, the slider will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n *\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n *\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks will be spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n */\n marks: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.array]),\n\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n */\n max: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n */\n min: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * Name attribute of the hidden `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {object} event The event source of the callback.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * @ignore\n */\n onMouseDown: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * The slider orientation.\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['horizontal', 'vertical']),\n\n /**\n * A transformation function, to change the scale of the slider.\n */\n scale: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n */\n step: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number,\n\n /**\n * The component used to display the value label.\n */\n ThumbComponent: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.elementType,\n\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n */\n track: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['normal', false, 'inverted']),\n\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.number)]),\n\n /**\n * The value label component.\n */\n ValueLabelComponent: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.elementType,\n\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n */\n valueLabelDisplay: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['on', 'auto', 'off']),\n\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n */\n valueLabelFormat: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(styles, {\n name: 'MuiSlider'\n})(Slider));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Slider/Slider.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Slider/ValueLabel.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Slider/ValueLabel.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n thumb: {\n '&$open': {\n '& $offset': {\n transform: 'scale(1) translateY(-10px)'\n }\n }\n },\n open: {},\n offset: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n zIndex: 1\n }, theme.typography.body2, {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.2,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n top: -34,\n transformOrigin: 'bottom center',\n transform: 'scale(0)',\n position: 'absolute'\n }),\n circle: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: '50% 50% 50% 0',\n backgroundColor: 'currentColor',\n transform: 'rotate(-45deg)'\n },\n label: {\n color: theme.palette.primary.contrastText,\n transform: 'rotate(45deg)'\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\n\nfunction ValueLabel(props) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n open = props.open,\n value = props.value,\n valueLabelDisplay = props.valueLabelDisplay;\n\n if (valueLabelDisplay === 'off') {\n return children;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"cloneElement\"](children, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(children.props.className, (open || valueLabelDisplay === 'on') && classes.open, classes.thumb)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.offset, className)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"span\", {\n className: classes.circle\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"span\", {\n className: classes.label\n }, value))));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(styles, {\n name: 'PrivateValueLabel'\n})(ValueLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Slider/ValueLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Slider/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Slider/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Slider */ \"./node_modules/@material-ui/core/esm/Slider/Slider.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Slider__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Slider/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Snackbar/Snackbar.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Snackbar/Snackbar.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ClickAwayListener */ \"./node_modules/@material-ui/core/esm/ClickAwayListener/index.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ \"./node_modules/@material-ui/core/esm/Grow/index.js\");\n/* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../SnackbarContent */ \"./node_modules/@material-ui/core/esm/SnackbarContent/index.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var top1 = {\n top: 8\n };\n var bottom1 = {\n bottom: 8\n };\n var right = {\n justifyContent: 'flex-end'\n };\n var left = {\n justifyContent: 'flex-start'\n };\n var top3 = {\n top: 24\n };\n var bottom3 = {\n bottom: 24\n };\n var right3 = {\n right: 24\n };\n var left3 = {\n left: 24\n };\n var center = {\n left: '50%',\n right: 'auto',\n transform: 'translateX(-50%)'\n };\n return {\n /* Styles applied to the root element. */\n root: {\n zIndex: theme.zIndex.snackbar,\n position: 'fixed',\n display: 'flex',\n left: 8,\n right: 8,\n justifyContent: 'center',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'center' }}`. */\n anchorOriginTopCenter: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, top1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, top3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'center' }}`. */\n anchorOriginBottomCenter: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, bottom1, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, bottom3, center))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'right' }}`. */\n anchorOriginTopRight: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, top1, right, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n left: 'auto'\n }, top3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'right' }}`. */\n anchorOriginBottomRight: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, bottom1, right, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n left: 'auto'\n }, bottom3, right3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'top', 'left' }}`. */\n anchorOriginTopLeft: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, top1, left, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n right: 'auto'\n }, top3, left3))),\n\n /* Styles applied to the root element if `anchorOrigin={{ 'bottom', 'left' }}`. */\n anchorOriginBottomLeft: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, bottom1, left, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n right: 'auto'\n }, bottom3, left3)))\n };\n};\nvar Snackbar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Snackbar(props, ref) {\n var action = props.action,\n _props$anchorOrigin = props.anchorOrigin;\n _props$anchorOrigin = _props$anchorOrigin === void 0 ? {\n vertical: 'bottom',\n horizontal: 'center'\n } : _props$anchorOrigin;\n\n var vertical = _props$anchorOrigin.vertical,\n horizontal = _props$anchorOrigin.horizontal,\n _props$autoHideDurati = props.autoHideDuration,\n autoHideDuration = _props$autoHideDurati === void 0 ? null : _props$autoHideDurati,\n children = props.children,\n classes = props.classes,\n className = props.className,\n ClickAwayListenerProps = props.ClickAwayListenerProps,\n ContentProps = props.ContentProps,\n _props$disableWindowB = props.disableWindowBlurListener,\n disableWindowBlurListener = _props$disableWindowB === void 0 ? false : _props$disableWindowB,\n message = props.message,\n onClose = props.onClose,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n open = props.open,\n resumeHideDuration = props.resumeHideDuration,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_12__[\"default\"] : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_7__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_7__[\"duration\"].leavingScreen\n } : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"action\", \"anchorOrigin\", \"autoHideDuration\", \"children\", \"classes\", \"className\", \"ClickAwayListenerProps\", \"ContentProps\", \"disableWindowBlurListener\", \"message\", \"onClose\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"onMouseEnter\", \"onMouseLeave\", \"open\", \"resumeHideDuration\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n var timerAutoHide = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"]();\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"](true),\n exited = _React$useState[0],\n setExited = _React$useState[1];\n\n var handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function () {\n if (onClose) {\n onClose.apply(void 0, arguments);\n }\n });\n var setAutoHideTimer = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (autoHideDurationParam) {\n if (!onClose || autoHideDurationParam == null) {\n return;\n }\n\n clearTimeout(timerAutoHide.current);\n timerAutoHide.current = setTimeout(function () {\n handleClose(null, 'timeout');\n }, autoHideDurationParam);\n });\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (open) {\n setAutoHideTimer(autoHideDuration);\n }\n\n return function () {\n clearTimeout(timerAutoHide.current);\n };\n }, [open, autoHideDuration, setAutoHideTimer]); // Pause the timer when the user is interacting with the Snackbar\n // or when the user hide the window.\n\n var handlePause = function handlePause() {\n clearTimeout(timerAutoHide.current);\n }; // Restart the timer when the user is no longer interacting with the Snackbar\n // or when the window is shown back.\n\n\n var handleResume = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function () {\n if (autoHideDuration != null) {\n setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);\n }\n }, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);\n\n var handleMouseEnter = function handleMouseEnter(event) {\n if (onMouseEnter) {\n onMouseEnter(event);\n }\n\n handlePause();\n };\n\n var handleMouseLeave = function handleMouseLeave(event) {\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n\n handleResume();\n };\n\n var handleClickAway = function handleClickAway(event) {\n if (onClose) {\n onClose(event, 'clickaway');\n }\n };\n\n var handleExited = function handleExited() {\n setExited(true);\n };\n\n var handleEnter = function handleEnter() {\n setExited(false);\n };\n\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n if (!disableWindowBlurListener && open) {\n window.addEventListener('focus', handleResume);\n window.addEventListener('blur', handlePause);\n return function () {\n window.removeEventListener('focus', handleResume);\n window.removeEventListener('blur', handlePause);\n };\n }\n\n return undefined;\n }, [disableWindowBlurListener, handleResume, open]); // So we only render active snackbars.\n\n if (!open && exited) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ClickAwayListener__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n onClickAway: handleClickAway\n }, ClickAwayListenerProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[\"anchorOrigin\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(vertical)).concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(horizontal))], className),\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n appear: true,\n in: open,\n onEnter: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(handleEnter, onEnter),\n onEntered: onEntered,\n onEntering: onEntering,\n onExit: onExit,\n onExited: Object(_utils_createChainedFunction__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(handleExited, onExited),\n onExiting: onExiting,\n timeout: transitionDuration,\n direction: vertical === 'top' ? 'down' : 'up'\n }, TransitionProps), children || /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_SnackbarContent__WEBPACK_IMPORTED_MODULE_13__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n message: message,\n action: action\n }, ContentProps)))));\n});\n true ? Snackbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * The anchor of the `Snackbar`.\n */\n anchorOrigin: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n horizontal: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['center', 'left', 'right']).isRequired,\n vertical: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['bottom', 'top']).isRequired\n }),\n\n /**\n * The number of milliseconds to wait before automatically calling the\n * `onClose` function. `onClose` should then set the state of the `open`\n * prop to hide the Snackbar. This behavior is disabled by default with\n * the `null` value.\n */\n autoHideDuration: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * Replace the `SnackbarContent` component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.element,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Props applied to the `ClickAwayListener` element.\n */\n ClickAwayListenerProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Props applied to the [`SnackbarContent`](/api/snackbar-content/) element.\n */\n ContentProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * If `true`, the `autoHideDuration` timer will expire even if the window is not focused.\n */\n disableWindowBlurListener: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * When displaying multiple consecutive Snackbars from a parent rendering a single\n * , add the key prop to ensure independent treatment of each message.\n * e.g. , otherwise, the message may update-in-place and\n * features such as autoHideDuration may be canceled.\n */\n key: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n\n /**\n * The message to display.\n */\n message: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Callback fired when the component requests to be closed.\n * Typically `onClose` is used to set state in the parent component,\n * which is used to control the `Snackbar` `open` prop.\n * The `reason` parameter can optionally be used to control the response to `onClose`,\n * for example ignoring `clickaway`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"timeout\"` (`autoHideDuration` expired), `\"clickaway\"`.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the transition is entering.\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the transition has entered.\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the transition is entering.\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired before the transition is exiting.\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the transition has exited.\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the transition is exiting.\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onMouseEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onMouseLeave: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * If `true`, `Snackbar` is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The number of milliseconds to wait before dismissing after user interaction.\n * If `autoHideDuration` prop isn't specified, it does nothing.\n * If `autoHideDuration` prop is specified but `resumeHideDuration` isn't,\n * we default to `autoHideDuration / 2` ms.\n */\n resumeHideDuration: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n flip: false,\n name: 'MuiSnackbar'\n})(Snackbar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Snackbar/Snackbar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Snackbar/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Snackbar/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Snackbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Snackbar */ \"./node_modules/@material-ui/core/esm/Snackbar/Snackbar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Snackbar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Snackbar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SnackbarContent/SnackbarContent.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SnackbarContent/SnackbarContent.js ***! \*******************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var emphasis = theme.palette.type === 'light' ? 0.8 : 0.98;\n var backgroundColor = Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_8__[\"emphasize\"])(theme.palette.background.default, emphasis);\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.typography.body2, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n color: theme.palette.getContrastText(backgroundColor),\n backgroundColor: backgroundColor,\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n flexGrow: 1\n }, theme.breakpoints.up('sm'), {\n flexGrow: 'initial',\n minWidth: 288\n })),\n\n /* Styles applied to the message wrapper element. */\n message: {\n padding: '8px 0'\n },\n\n /* Styles applied to the action wrapper element if `action` is provided. */\n action: {\n display: 'flex',\n alignItems: 'center',\n marginLeft: 'auto',\n paddingLeft: 16,\n marginRight: -8\n }\n };\n};\nvar SnackbarContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function SnackbarContent(props, ref) {\n var action = props.action,\n classes = props.classes,\n className = props.className,\n message = props.message,\n _props$role = props.role,\n role = _props$role === void 0 ? 'alert' : _props$role,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"action\", \"classes\", \"className\", \"message\", \"role\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n role: role,\n square: true,\n elevation: 6,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.message\n }, message), action ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: classes.action\n }, action) : null);\n});\n true ? SnackbarContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The action to display. It renders after the message, at the end of the snackbar.\n */\n action: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The message to display.\n */\n message: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * The ARIA role attribute of the element.\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiSnackbarContent'\n})(SnackbarContent));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SnackbarContent/SnackbarContent.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SnackbarContent/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SnackbarContent/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SnackbarContent */ \"./node_modules/@material-ui/core/esm/SnackbarContent/SnackbarContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _SnackbarContent__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SnackbarContent/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Step/Step.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Step/Step.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {},\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n paddingLeft: 8,\n paddingRight: 8\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n flex: 1,\n position: 'relative'\n },\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {}\n};\nvar Step = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Step(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n connectorProp = props.connector,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$expanded = props.expanded,\n expanded = _props$expanded === void 0 ? false : _props$expanded,\n index = props.index,\n last = props.last,\n orientation = props.orientation,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"connector\", \"disabled\", \"expanded\", \"index\", \"last\", \"orientation\"]);\n\n var connector = connectorProp ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](connectorProp, {\n orientation: orientation,\n alternativeLabel: alternativeLabel,\n index: index,\n active: active,\n completed: completed,\n disabled: disabled\n }) : null;\n var newChildren = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, completed && classes.completed),\n ref: ref\n }, other), connector && alternativeLabel && index !== 0 ? connector : null, react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].map(children, function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_3__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Step component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](child, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n expanded: expanded,\n last: last,\n icon: index + 1,\n orientation: orientation\n }, child.props));\n }));\n\n if (connector && !alternativeLabel && index !== 0) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, connector, newChildren);\n }\n\n return newChildren;\n});\n true ? Step.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Sets the step as active. Is passed to child components.\n */\n active: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Should be `Step` sub-components such as `StepLabel`, `StepContent`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepButton` is a child of `Step`. Is passed to child components.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * Expand the step.\n */\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiStep'\n})(Step));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Step/Step.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Step/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Step/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Step */ \"./node_modules/@material-ui/core/esm/Step/Step.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Step__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Step/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepButton/StepButton.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepButton/StepButton.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../StepLabel */ \"./node_modules/@material-ui/core/esm/StepLabel/index.js\");\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/isMuiElement */ \"./node_modules/@material-ui/core/esm/utils/isMuiElement.js\");\n\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n padding: '24px 16px',\n margin: '-24px -16px',\n boxSizing: 'content-box'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n justifyContent: 'flex-start',\n padding: '8px',\n margin: '-8px'\n },\n\n /* Styles applied to the `ButtonBase` touch-ripple. */\n touchRipple: {\n color: 'rgba(0, 0, 0, 0.3)'\n }\n};\nvar StepButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function StepButton(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\"]);\n\n var childProps = {\n active: active,\n alternativeLabel: alternativeLabel,\n completed: completed,\n disabled: disabled,\n icon: icon,\n optional: optional,\n orientation: orientation\n };\n var child = Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(children, ['StepLabel']) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childProps) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_StepLabel__WEBPACK_IMPORTED_MODULE_7__[\"default\"], childProps, children);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n focusRipple: true,\n disabled: disabled,\n TouchRippleProps: {\n className: classes.touchRipple\n },\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[orientation], className),\n ref: ref\n }, other), child);\n});\n true ? StepButton.propTypes = {\n /**\n * @ignore\n * Passed in via `Step` - passed through to `StepLabel`.\n */\n active: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n * Set internally by Stepper when it's supplied with the alternativeLabel property.\n */\n alternativeLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Can be a `StepLabel` or a node to place inside `StepLabel` as children.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n * Sets completed styling. Is passed to StepLabel.\n */\n completed: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n * Disables the button and sets disabled styling. Is passed to StepLabel.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n * potentially passed from parent `Step`\n */\n expanded: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon displayed by the step label.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n last: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The optional node to display.\n */\n optional: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['horizontal', 'vertical'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiStepButton'\n})(StepButton));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepButton/StepButton.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepButton/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepButton/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StepButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StepButton */ \"./node_modules/@material-ui/core/esm/StepButton/StepButton.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StepButton__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepButton/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepConnector/StepConnector.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepConnector/StepConnector.js ***! \***************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n flex: '1 1 auto'\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n marginLeft: 12,\n // half icon\n padding: '0 0 8px'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n position: 'absolute',\n top: 8 + 4,\n left: 'calc(-50% + 20px)',\n right: 'calc(50% + 20px)'\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the line element. */\n line: {\n display: 'block',\n borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n lineHorizontal: {\n borderTopStyle: 'solid',\n borderTopWidth: 1\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n lineVertical: {\n borderLeftStyle: 'solid',\n borderLeftWidth: 1,\n minHeight: 24\n }\n };\n};\nvar StepConnector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function StepConnector(props, ref) {\n var active = props.active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n disabled = props.disabled,\n index = props.index,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"alternativeLabel\", \"classes\", \"className\", \"completed\", \"disabled\", \"index\", \"orientation\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel, active && classes.active, completed && classes.completed, disabled && classes.disabled),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.line, {\n 'horizontal': classes.lineHorizontal,\n 'vertical': classes.lineVertical\n }[orientation])\n }));\n});\n true ? StepConnector.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiStepConnector'\n})(StepConnector));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepConnector/StepConnector.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepConnector/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepConnector/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StepConnector */ \"./node_modules/@material-ui/core/esm/StepConnector/StepConnector.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StepConnector__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepConnector/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepContent/StepContent.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepContent/StepContent.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Collapse */ \"./node_modules/@material-ui/core/esm/Collapse/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n marginTop: 8,\n marginLeft: 12,\n // half icon\n paddingLeft: 8 + 12,\n // margin + half icon\n paddingRight: 8,\n borderLeft: \"1px solid \".concat(theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])\n },\n\n /* Styles applied to the root element if `last={true}` (controlled by `Step`). */\n last: {\n borderLeft: 'none'\n },\n\n /* Styles applied to the Transition component. */\n transition: {}\n };\n};\nvar StepContent = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function StepContent(props, ref) {\n var active = props.active,\n alternativeLabel = props.alternativeLabel,\n children = props.children,\n classes = props.classes,\n className = props.className,\n completed = props.completed,\n expanded = props.expanded,\n last = props.last,\n optional = props.optional,\n orientation = props.orientation,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Collapse__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _props$TransitionComp,\n _props$transitionDura = props.transitionDuration,\n transitionDurationProp = _props$transitionDura === void 0 ? 'auto' : _props$transitionDura,\n TransitionProps = props.TransitionProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"expanded\", \"last\", \"optional\", \"orientation\", \"TransitionComponent\", \"transitionDuration\", \"TransitionProps\"]);\n\n if (true) {\n if (orientation !== 'vertical') {\n console.error('Material-UI: is only designed for use with the vertical stepper.');\n }\n }\n\n var transitionDuration = transitionDurationProp;\n\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, last && classes.last),\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n in: active || expanded,\n className: classes.transition,\n timeout: transitionDuration,\n unmountOnExit: true\n }, TransitionProps), children));\n});\n true ? StepContent.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Step content.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Adjust the duration of the content expand transition.\n * Passed as a prop to the transition component.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })]),\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiStepContent'\n})(StepContent));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepContent/StepContent.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepContent/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepContent/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StepContent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StepContent */ \"./node_modules/@material-ui/core/esm/StepContent/StepContent.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StepContent__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepContent/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepIcon/StepIcon.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepIcon/StepIcon.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _internal_svg_icons_CheckCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../internal/svg-icons/CheckCircle */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/CheckCircle.js\");\n/* harmony import */ var _internal_svg_icons_Warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/svg-icons/Warning */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/Warning.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SvgIcon */ \"./node_modules/@material-ui/core/esm/SvgIcon/index.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'block',\n color: theme.palette.text.disabled,\n '&$completed': {\n color: theme.palette.primary.main\n },\n '&$active': {\n color: theme.palette.primary.main\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Styles applied to the SVG text element. */\n text: {\n fill: theme.palette.primary.contrastText,\n fontSize: theme.typography.caption.fontSize,\n fontFamily: theme.typography.fontFamily\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the root element if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element if `error={true}`. */\n error: {}\n };\n};\n\nvar _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"12\"\n});\n\nvar StepIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"](function StepIcon(props, ref) {\n var _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n icon = props.icon,\n _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n classes = props.classes;\n\n if (typeof icon === 'number' || typeof icon === 'string') {\n var className = Object(clsx__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(classes.root, active && classes.active, error && classes.error, completed && classes.completed);\n\n if (error) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_internal_svg_icons_Warning__WEBPACK_IMPORTED_MODULE_4__[\"default\"], {\n className: className,\n ref: ref\n });\n }\n\n if (completed) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_internal_svg_icons_CheckCircle__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {\n className: className,\n ref: ref\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SvgIcon__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n className: className,\n ref: ref\n }, _ref, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"text\", {\n className: classes.text,\n x: \"12\",\n y: \"16\",\n textAnchor: \"middle\"\n }, icon));\n }\n\n return icon;\n});\n true ? StepIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Whether this step is active.\n */\n active: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.object,\n\n /**\n * Mark the step as completed. Is passed to child components.\n */\n completed: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * Mark the step as failed.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.bool,\n\n /**\n * The label displayed in the step icon.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_1___default.a.node\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiStepIcon'\n})(StepIcon));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepIcon/StepIcon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepIcon/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepIcon/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StepIcon */ \"./node_modules/@material-ui/core/esm/StepIcon/StepIcon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StepIcon__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepIcon/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepLabel/StepLabel.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepLabel/StepLabel.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../StepIcon */ \"./node_modules/@material-ui/core/esm/StepIcon/index.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n alignItems: 'center',\n '&$alternativeLabel': {\n flexDirection: 'column'\n },\n '&$disabled': {\n cursor: 'default'\n }\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {},\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {},\n\n /* Styles applied to the `Typography` component which wraps `children`. */\n label: {\n color: theme.palette.text.secondary,\n '&$active': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$completed': {\n color: theme.palette.text.primary,\n fontWeight: 500\n },\n '&$alternativeLabel': {\n textAlign: 'center',\n marginTop: 16\n },\n '&$error': {\n color: theme.palette.error.main\n }\n },\n\n /* Pseudo-class applied to the `Typography` component if `active={true}`. */\n active: {},\n\n /* Pseudo-class applied to the `Typography` component if `completed={true}`. */\n completed: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `error={true}`. */\n error: {},\n\n /* Pseudo-class applied to the root element and `Typography` component if `disabled={true}`. */\n disabled: {},\n\n /* Styles applied to the `icon` container element. */\n iconContainer: {\n flexShrink: 0,\n // Fix IE 11 issue\n display: 'flex',\n paddingRight: 8,\n '&$alternativeLabel': {\n paddingRight: 0\n }\n },\n\n /* Pseudo-class applied to the root and icon container and `Typography` if `alternativeLabel={true}`. */\n alternativeLabel: {},\n\n /* Styles applied to the container element which wraps `Typography` and `optional`. */\n labelContainer: {\n width: '100%'\n }\n };\n};\nvar StepLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function StepLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$completed = props.completed,\n completed = _props$completed === void 0 ? false : _props$completed,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n expanded = props.expanded,\n icon = props.icon,\n last = props.last,\n optional = props.optional,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n StepIconComponentProp = props.StepIconComponent,\n StepIconProps = props.StepIconProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"completed\", \"disabled\", \"error\", \"expanded\", \"icon\", \"last\", \"optional\", \"orientation\", \"StepIconComponent\", \"StepIconProps\"]);\n\n var StepIconComponent = StepIconComponentProp;\n\n if (icon && !StepIconComponent) {\n StepIconComponent = _StepIcon__WEBPACK_IMPORTED_MODULE_7__[\"default\"];\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[orientation], className, disabled && classes.disabled, alternativeLabel && classes.alternativeLabel, error && classes.error),\n ref: ref\n }, other), icon || StepIconComponent ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.iconContainer, alternativeLabel && classes.alternativeLabel)\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](StepIconComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n completed: completed,\n active: active,\n error: error,\n icon: icon\n }, StepIconProps))) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.labelContainer\n }, children ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n variant: \"body2\",\n component: \"span\",\n display: \"block\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.label, alternativeLabel && classes.alternativeLabel, completed && classes.completed, active && classes.active, error && classes.error)\n }, children) : null, optional));\n});\n true ? StepLabel.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * In most cases will simply be a string containing a title for the label.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Mark the step as disabled, will also disable the button if\n * `StepLabelButton` is a child of `StepLabel`. Is passed to child components.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Mark the step as failed.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Override the default label of the step icon.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The optional node to display.\n */\n optional: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The component to render in place of the [`StepIcon`](/api/step-icon/).\n */\n StepIconComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the [`StepIcon`](/api/step-icon/) element.\n */\n StepIconProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\nStepLabel.muiName = 'StepLabel';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiStepLabel'\n})(StepLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepLabel/StepLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/StepLabel/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/StepLabel/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StepLabel */ \"./node_modules/@material-ui/core/esm/StepLabel/StepLabel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StepLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/StepLabel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Stepper/Stepper.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Stepper/Stepper.js ***! \***************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../StepConnector */ \"./node_modules/@material-ui/core/esm/StepConnector/index.js\");\n\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'flex',\n padding: 24\n },\n\n /* Styles applied to the root element if `orientation=\"horizontal\"`. */\n horizontal: {\n flexDirection: 'row',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the root element if `alternativeLabel={true}`. */\n alternativeLabel: {\n alignItems: 'flex-start'\n }\n};\nvar defaultConnector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_StepConnector__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null);\nvar Stepper = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Stepper(props, ref) {\n var _props$activeStep = props.activeStep,\n activeStep = _props$activeStep === void 0 ? 0 : _props$activeStep,\n _props$alternativeLab = props.alternativeLabel,\n alternativeLabel = _props$alternativeLab === void 0 ? false : _props$alternativeLab,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$connector = props.connector,\n connectorProp = _props$connector === void 0 ? defaultConnector : _props$connector,\n _props$nonLinear = props.nonLinear,\n nonLinear = _props$nonLinear === void 0 ? false : _props$nonLinear,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"activeStep\", \"alternativeLabel\", \"children\", \"classes\", \"className\", \"connector\", \"nonLinear\", \"orientation\"]);\n\n var connector = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](connectorProp) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](connectorProp, {\n orientation: orientation\n }) : null;\n var childrenArray = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(children);\n var steps = childrenArray.map(function (step, index) {\n var state = {\n index: index,\n active: false,\n completed: false,\n disabled: false\n };\n\n if (activeStep === index) {\n state.active = true;\n } else if (!nonLinear && activeStep > index) {\n state.completed = true;\n } else if (!nonLinear && activeStep < index) {\n state.disabled = true;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](step, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n alternativeLabel: alternativeLabel,\n connector: connector,\n last: index + 1 === childrenArray.length,\n orientation: orientation\n }, state, step.props));\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Paper__WEBPACK_IMPORTED_MODULE_6__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n square: true,\n elevation: 0,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[orientation], className, alternativeLabel && classes.alternativeLabel),\n ref: ref\n }, other), steps);\n});\n true ? Stepper.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the active step (zero based index).\n * Set to -1 to disable all the steps.\n */\n activeStep: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If set to 'true' and orientation is horizontal,\n * then the step label will be positioned under the icon.\n */\n alternativeLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Two or more `` components.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * An element to be placed between each step.\n */\n connector: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.element,\n\n /**\n * If set the `Stepper` will not assist in controlling steps for linear flow.\n */\n nonLinear: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The stepper orientation (layout flow direction).\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['horizontal', 'vertical'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiStepper'\n})(Stepper));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Stepper/Stepper.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Stepper/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Stepper/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Stepper__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stepper */ \"./node_modules/@material-ui/core/esm/Stepper/Stepper.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Stepper__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Stepper/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js ***! \***************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n fill: 'currentColor',\n flexShrink: 0,\n fontSize: theme.typography.pxToRem(24),\n transition: theme.transitions.create('fill', {\n duration: theme.transitions.duration.shorter\n })\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"action\"`. */\n colorAction: {\n color: theme.palette.action.active\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `color=\"disabled\"`. */\n colorDisabled: {\n color: theme.palette.action.disabled\n },\n\n /* Styles applied to the root element if `fontSize=\"inherit\"`. */\n fontSizeInherit: {\n fontSize: 'inherit'\n },\n\n /* Styles applied to the root element if `fontSize=\"small\"`. */\n fontSizeSmall: {\n fontSize: theme.typography.pxToRem(20)\n },\n\n /* Styles applied to the root element if `fontSize=\"large\"`. */\n fontSizeLarge: {\n fontSize: theme.typography.pxToRem(35)\n }\n };\n};\nvar SvgIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function SvgIcon(props, ref) {\n var children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'inherit' : _props$color,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'svg' : _props$component,\n _props$fontSize = props.fontSize,\n fontSize = _props$fontSize === void 0 ? 'default' : _props$fontSize,\n htmlColor = props.htmlColor,\n titleAccess = props.titleAccess,\n _props$viewBox = props.viewBox,\n viewBox = _props$viewBox === void 0 ? '0 0 24 24' : _props$viewBox,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"classes\", \"className\", \"color\", \"component\", \"fontSize\", \"htmlColor\", \"titleAccess\", \"viewBox\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, color !== 'inherit' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], fontSize !== 'default' && classes[\"fontSize\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(fontSize))]),\n focusable: \"false\",\n viewBox: viewBox,\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref\n }, other), children, titleAccess ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"title\", null, titleAccess) : null);\n});\n true ? SvgIcon.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Node passed into the SVG element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['action', 'disabled', 'error', 'inherit', 'primary', 'secondary']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n */\n fontSize: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'inherit', 'large', 'small']),\n\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this property.\n */\n shapeRendering: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n */\n viewBox: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string\n} : undefined;\nSvgIcon.muiName = 'SvgIcon';\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiSvgIcon'\n})(SvgIcon));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SvgIcon/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SvgIcon/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SvgIcon */ \"./node_modules/@material-ui/core/esm/SvgIcon/SvgIcon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _SvgIcon__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SvgIcon/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeArea.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeArea.js ***! \*************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Drawer_Drawer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Drawer/Drawer */ \"./node_modules/@material-ui/core/esm/Drawer/Drawer.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'fixed',\n top: 0,\n left: 0,\n bottom: 0,\n zIndex: theme.zIndex.drawer - 1\n },\n anchorLeft: {\n right: 'auto'\n },\n anchorRight: {\n left: 'auto',\n right: 0\n },\n anchorTop: {\n bottom: 'auto',\n right: 0\n },\n anchorBottom: {\n top: 'auto',\n bottom: 0,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwipeArea = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function SwipeArea(props, ref) {\n var anchor = props.anchor,\n classes = props.classes,\n className = props.className,\n width = props.width,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"anchor\", \"classes\", \"className\", \"width\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[\"anchor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(anchor))], className),\n ref: ref,\n style: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_8__[\"isHorizontal\"])(anchor) ? 'width' : 'height', width)\n }, other));\n});\n true ? SwipeArea.propTypes = {\n /**\n * Side on which to attach the discovery area.\n */\n anchor: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['left', 'top', 'right', 'bottom']).isRequired,\n\n /**\n * @ignore\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n width: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'PrivateSwipeArea'\n})(SwipeArea));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeArea.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeableDrawer.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeableDrawer.js ***! \*******************************************************************************/ /*! exports provided: reset, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reset\", function() { return reset; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Drawer/Drawer */ \"./node_modules/@material-ui/core/esm/Drawer/Drawer.js\");\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n/* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../NoSsr */ \"./node_modules/@material-ui/core/esm/NoSsr/index.js\");\n/* harmony import */ var _SwipeArea__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SwipeArea */ \"./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeArea.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // This value is closed to what browsers are using internally to\n// trigger a native scroll.\n\nvar UNCERTAINTY_THRESHOLD = 3; // px\n// We can only have one node at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\n\nvar nodeThatClaimedTheSwipe = null; // Exported for test purposes.\n\nfunction reset() {\n nodeThatClaimedTheSwipe = null;\n}\n\nfunction calculateCurrentX(anchor, touches) {\n return anchor === 'right' ? document.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\n\nfunction calculateCurrentY(anchor, touches) {\n return anchor === 'bottom' ? window.innerHeight - touches[0].clientY : touches[0].clientY;\n}\n\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\n\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n var domTreeShapes = [];\n\n while (element && element !== rootNode) {\n var style = window.getComputedStyle(element);\n\n if ( // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' || // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n domTreeShapes = [];\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n\n element = element.parentElement;\n }\n\n return domTreeShapes;\n}\n\nfunction findNativeHandler(_ref) {\n var domTreeShapes = _ref.domTreeShapes,\n start = _ref.start,\n current = _ref.current,\n anchor = _ref.anchor;\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n var axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(function (shape) {\n // Determine if we are going backward or forward.\n var goingForward = current >= start;\n\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n\n var axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n var scrollPosition = shape[axisProperties.scrollPosition[axis]];\n var areNotAtStart = scrollPosition > 0;\n var areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return shape;\n }\n\n return null;\n });\n}\n\nvar iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar transitionDurationDefault = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_10__[\"duration\"].leavingScreen\n};\nvar useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"];\nvar SwipeableDrawer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function SwipeableDrawer(inProps, ref) {\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_11__[\"default\"])();\n var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_6__[\"getThemeProps\"])({\n name: 'MuiSwipeableDrawer',\n props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, inProps),\n theme: theme\n });\n var _props$anchor = props.anchor,\n anchor = _props$anchor === void 0 ? 'left' : _props$anchor,\n _props$disableBackdro = props.disableBackdropTransition,\n disableBackdropTransition = _props$disableBackdro === void 0 ? false : _props$disableBackdro,\n _props$disableDiscove = props.disableDiscovery,\n disableDiscovery = _props$disableDiscove === void 0 ? false : _props$disableDiscove,\n _props$disableSwipeTo = props.disableSwipeToOpen,\n disableSwipeToOpen = _props$disableSwipeTo === void 0 ? iOS : _props$disableSwipeTo,\n hideBackdrop = props.hideBackdrop,\n _props$hysteresis = props.hysteresis,\n hysteresis = _props$hysteresis === void 0 ? 0.52 : _props$hysteresis,\n _props$minFlingVeloci = props.minFlingVelocity,\n minFlingVelocity = _props$minFlingVeloci === void 0 ? 450 : _props$minFlingVeloci,\n _props$ModalProps = props.ModalProps;\n _props$ModalProps = _props$ModalProps === void 0 ? {} : _props$ModalProps;\n\n var BackdropProps = _props$ModalProps.BackdropProps,\n ModalPropsProp = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_props$ModalProps, [\"BackdropProps\"]),\n onClose = props.onClose,\n onOpen = props.onOpen,\n open = props.open,\n _props$PaperProps = props.PaperProps,\n PaperProps = _props$PaperProps === void 0 ? {} : _props$PaperProps,\n SwipeAreaProps = props.SwipeAreaProps,\n _props$swipeAreaWidth = props.swipeAreaWidth,\n swipeAreaWidth = _props$swipeAreaWidth === void 0 ? 20 : _props$swipeAreaWidth,\n _props$transitionDura = props.transitionDuration,\n transitionDuration = _props$transitionDura === void 0 ? transitionDurationDefault : _props$transitionDura,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'temporary' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n maybeSwiping = _React$useState[0],\n setMaybeSwiping = _React$useState[1];\n\n var swipeInstance = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n isSwiping: null\n });\n var swipeAreaRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n var backdropRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n var paperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n var touchDetected = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false); // Ref for transition duration based on / to match swipe speed\n\n var calculatedDurationRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](); // Use a ref so the open value used is always up to date inside useCallback.\n\n useEnhancedEffect(function () {\n calculatedDurationRef.current = null;\n }, [open]);\n var setPosition = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (translate) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? null : _options$mode,\n _options$changeTransi = options.changeTransition,\n changeTransition = _options$changeTransi === void 0 ? true : _options$changeTransi;\n var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"getAnchor\"])(theme, anchor);\n var rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"isHorizontal\"])(anchor);\n var transform = horizontalSwipe ? \"translate(\".concat(rtlTranslateMultiplier * translate, \"px, 0)\") : \"translate(0, \".concat(rtlTranslateMultiplier * translate, \"px)\");\n var drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n var transition = '';\n\n if (mode) {\n transition = theme.transitions.create('all', Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_12__[\"getTransitionProps\"])({\n timeout: transitionDuration\n }, {\n mode: mode\n }));\n }\n\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n\n if (!disableBackdropTransition && !hideBackdrop) {\n var backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n var handleBodyTouchEnd = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (event) {\n if (!touchDetected.current) {\n return;\n }\n\n nodeThatClaimedTheSwipe = null;\n touchDetected.current = false;\n setMaybeSwiping(false); // The swipe wasn't started.\n\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n\n swipeInstance.current.isSwiping = null;\n var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"getAnchor\"])(theme, anchor);\n var horizontal = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"isHorizontal\"])(anchor);\n var current;\n\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, event.changedTouches);\n } else {\n current = calculateCurrentY(anchorRtl, event.changedTouches);\n }\n\n var startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n var maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n var currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n var translateRatio = currentTranslate / maxTranslate;\n\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n\n return;\n }\n\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n var handleBodyTouchMove = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (event) {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n } // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n\n\n if (nodeThatClaimedTheSwipe != null && nodeThatClaimedTheSwipe !== swipeInstance.current) {\n return;\n }\n\n var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"getAnchor\"])(theme, anchor);\n var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"isHorizontal\"])(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (open && paperRef.current.contains(event.target) && nodeThatClaimedTheSwipe == null) {\n var domTreeShapes = getDomTreeShapes(event.target, paperRef.current);\n var nativeHandler = findNativeHandler({\n domTreeShapes: domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor: anchor\n });\n\n if (nativeHandler) {\n nodeThatClaimedTheSwipe = nativeHandler;\n return;\n }\n\n nodeThatClaimedTheSwipe = swipeInstance.current;\n } // We don't know yet.\n\n\n if (swipeInstance.current.isSwiping == null) {\n var dx = Math.abs(currentX - swipeInstance.current.startX);\n var dy = Math.abs(currentY - swipeInstance.current.startY); // We are likely to be swiping, let's prevent the scroll event on iOS.\n\n if (dx > dy) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n\n var definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n\n if (!definitelySwiping) {\n handleBodyTouchEnd(event);\n return;\n } // Shift the starting point.\n\n\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY; // Compensate for the part of the drawer displayed on touch start.\n\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= swipeAreaWidth;\n } else {\n swipeInstance.current.startY -= swipeAreaWidth;\n }\n }\n }\n }\n\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n\n var maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n var startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n\n var translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n\n if (open) {\n if (!swipeInstance.current.paperHit) {\n var paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n\n var velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3; // Low Pass filter.\n\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now(); // We are swiping, let's prevent the scroll event on iOS.\n\n if (event.cancelable) {\n event.preventDefault();\n }\n\n setPosition(translate);\n });\n var handleBodyTouchStart = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(function (event) {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (event.defaultPrevented) {\n return;\n } // We can only have one node at the time claiming ownership for handling the swipe.\n\n\n if (event.muiHandled) {\n return;\n } // At least one element clogs the drawer interaction zone.\n\n\n if (open && !backdropRef.current.contains(event.target) && !paperRef.current.contains(event.target)) {\n return;\n }\n\n var anchorRtl = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"getAnchor\"])(theme, anchor);\n var horizontalSwipe = Object(_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"isHorizontal\"])(anchor);\n var currentX = calculateCurrentX(anchorRtl, event.touches);\n var currentY = calculateCurrentY(anchorRtl, event.touches);\n\n if (!open) {\n if (disableSwipeToOpen || event.target !== swipeAreaRef.current) {\n return;\n }\n\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n\n event.muiHandled = true;\n nodeThatClaimedTheSwipe = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n setMaybeSwiping(true);\n\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 20 : -swipeAreaWidth), {\n changeTransition: false\n });\n }\n\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n });\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (variant === 'temporary') {\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return function () {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: false\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n\n return undefined;\n }, [variant, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n return function () {\n // We need to release the lock.\n if (nodeThatClaimedTheSwipe === swipeInstance.current) {\n nodeThatClaimedTheSwipe = null;\n }\n };\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n var handleBackdropRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n backdropRef.current = react_dom__WEBPACK_IMPORTED_MODULE_4__[\"findDOMNode\"](instance);\n }, []);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Drawer_Drawer__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n BackdropProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, BackdropProps, {\n ref: handleBackdropRef\n })\n }, ModalPropsProp),\n PaperProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, PaperProps, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n pointerEvents: variant === 'temporary' && !open ? 'none' : ''\n }, PaperProps.style),\n ref: paperRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_NoSsr__WEBPACK_IMPORTED_MODULE_13__[\"default\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_SwipeArea__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))));\n});\n true ? SwipeableDrawer.propTypes = {\n /**\n * @ignore\n */\n anchor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['left', 'top', 'right', 'bottom']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n */\n disableBackdropTransition: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n */\n disableDiscovery: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n */\n disableSwipeToOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n hideBackdrop: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Affects how far the drawer must be opened/closed to change his state.\n * Specified as percent (0-1) of the width of the drawer\n */\n hysteresis: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n */\n minFlingVelocity: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * @ignore\n */\n ModalProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n BackdropProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n component: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"elementTypeAcceptingRef\"]\n })\n }),\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func.isRequired,\n\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func.isRequired,\n\n /**\n * If `true`, the drawer is open.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool.isRequired,\n\n /**\n * @ignore\n */\n PaperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n component: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"elementTypeAcceptingRef\"],\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n }),\n\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The width of the left most (or right most) area in pixels where the\n * drawer can be swiped open from.\n */\n swipeAreaWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n enter: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n })]),\n\n /**\n * @ignore\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['permanent', 'persistent', 'temporary'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (SwipeableDrawer);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeableDrawer.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/SwipeableDrawer/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/SwipeableDrawer/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SwipeableDrawer */ \"./node_modules/@material-ui/core/esm/SwipeableDrawer/SwipeableDrawer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/SwipeableDrawer/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Switch/Switch.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Switch/Switch.js ***! \*************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../internal/SwitchBase */ \"./node_modules/@material-ui/core/esm/internal/SwitchBase.js\");\n\n\n// @inheritedComponent IconButton\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'inline-flex',\n width: 34 + 12 * 2,\n height: 14 + 12 * 2,\n overflow: 'hidden',\n padding: 12,\n boxSizing: 'border-box',\n position: 'relative',\n flexShrink: 0,\n zIndex: 0,\n // Reset the stacking context.\n verticalAlign: 'middle',\n // For correct alignment with the text.\n '@media print': {\n colorAdjust: 'exact'\n }\n },\n\n /* Styles applied to the root element if `edge=\"start\"`. */\n edgeStart: {\n marginLeft: -8\n },\n\n /* Styles applied to the root element if `edge=\"end\"`. */\n edgeEnd: {\n marginRight: -8\n },\n\n /* Styles applied to the internal `SwitchBase` component's `root` class. */\n switchBase: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n // Render above the focus ripple.\n color: theme.palette.type === 'light' ? theme.palette.grey[50] : theme.palette.grey[400],\n transition: theme.transitions.create(['left', 'transform'], {\n duration: theme.transitions.duration.shortest\n }),\n '&$checked': {\n transform: 'translateX(20px)'\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n opacity: 0.5\n },\n '&$disabled + $track': {\n opacity: theme.palette.type === 'light' ? 0.12 : 0.1\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"primary\"`. */\n colorPrimary: {\n '&$checked': {\n color: theme.palette.primary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.primary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.primary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the internal SwitchBase component's root element if `color=\"secondary\"`. */\n colorSecondary: {\n '&$checked': {\n color: theme.palette.secondary.main,\n '&:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.hoverOpacity),\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n },\n '&$disabled': {\n color: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[800]\n },\n '&$checked + $track': {\n backgroundColor: theme.palette.secondary.main\n },\n '&$disabled + $track': {\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white\n }\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n width: 40,\n height: 24,\n padding: 7,\n '& $thumb': {\n width: 16,\n height: 16\n },\n '& $switchBase': {\n padding: 4,\n '&$checked': {\n transform: 'translateX(16px)'\n }\n }\n },\n\n /* Pseudo-class applied to the internal `SwitchBase` component's `checked` class. */\n checked: {},\n\n /* Pseudo-class applied to the internal SwitchBase component's disabled class. */\n disabled: {},\n\n /* Styles applied to the internal SwitchBase component's input element. */\n input: {\n left: '-100%',\n width: '300%'\n },\n\n /* Styles used to create the thumb passed to the internal `SwitchBase` component `icon` prop. */\n thumb: {\n boxShadow: theme.shadows[1],\n backgroundColor: 'currentColor',\n width: 20,\n height: 20,\n borderRadius: '50%'\n },\n\n /* Styles applied to the track element. */\n track: {\n height: '100%',\n width: '100%',\n borderRadius: 14 / 2,\n zIndex: -1,\n transition: theme.transitions.create(['opacity', 'background-color'], {\n duration: theme.transitions.duration.shortest\n }),\n backgroundColor: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,\n opacity: theme.palette.type === 'light' ? 0.38 : 0.3\n }\n };\n};\nvar Switch = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Switch(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'secondary' : _props$color,\n _props$edge = props.edge,\n edge = _props$edge === void 0 ? false : _props$edge,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"edge\", \"size\"]);\n\n var icon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.thumb\n });\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, {\n 'start': classes.edgeStart,\n 'end': classes.edgeEnd\n }[edge], size === \"small\" && classes[\"size\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(size))])\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_SwitchBase__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"checkbox\",\n icon: icon,\n checkedIcon: icon,\n classes: {\n root: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.switchBase, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(color))]),\n input: classes.input,\n checked: classes.checked,\n disabled: classes.disabled\n },\n ref: ref\n }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", {\n className: classes.track\n }));\n});\n true ? Switch.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the component is checked.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'primary', 'secondary']),\n\n /**\n * @ignore\n */\n defaultChecked: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n */\n edge: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['end', 'start', false]),\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The size of the switch.\n * `small` is equivalent to the dense switch styling.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * The value of the component. The DOM API casts this to a string.\n * The browser uses \"on\" as the default value.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiSwitch'\n})(Switch));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Switch/Switch.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Switch/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Switch/index.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Switch */ \"./node_modules/@material-ui/core/esm/Switch/Switch.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Switch__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Switch/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tab/Tab.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tab/Tab.js ***! \*******************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/unsupportedProp */ \"./node_modules/@material-ui/core/esm/utils/unsupportedProp.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n var _extends2;\n\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.typography.button, (_extends2 = {\n maxWidth: 264,\n minWidth: 72,\n position: 'relative',\n boxSizing: 'border-box',\n minHeight: 48,\n flexShrink: 0,\n padding: '6px 12px'\n }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_extends2, theme.breakpoints.up('sm'), {\n padding: '6px 24px'\n }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_extends2, \"overflow\", 'hidden'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_extends2, \"whiteSpace\", 'normal'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_extends2, \"textAlign\", 'center'), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_extends2, theme.breakpoints.up('sm'), {\n minWidth: 160\n }), _extends2)),\n\n /* Styles applied to the root element if both `icon` and `label` are provided. */\n labelIcon: {\n minHeight: 72,\n paddingTop: 9,\n '& $wrapper > *:first-child': {\n marginBottom: 6\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"inherit\"`. */\n textColorInherit: {\n color: 'inherit',\n opacity: 0.7,\n '&$selected': {\n opacity: 1\n },\n '&$disabled': {\n opacity: 0.5\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"primary\"`. */\n textColorPrimary: {\n color: theme.palette.text.secondary,\n '&$selected': {\n color: theme.palette.primary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n },\n\n /* Styles applied to the root element if the parent [`Tabs`](/api/tabs/) has `textColor=\"secondary\"`. */\n textColorSecondary: {\n color: theme.palette.text.secondary,\n '&$selected': {\n color: theme.palette.secondary.main\n },\n '&$disabled': {\n color: theme.palette.text.disabled\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}` (controlled by the Tabs component). */\n selected: {},\n\n /* Pseudo-class applied to the root element if `disabled={true}` (controlled by the Tabs component). */\n disabled: {},\n\n /* Styles applied to the root element if `fullWidth={true}` (controlled by the Tabs component). */\n fullWidth: {\n flexShrink: 1,\n flexGrow: 1,\n flexBasis: 0,\n maxWidth: 'none'\n },\n\n /* Styles applied to the root element if `wrapped={true}`. */\n wrapped: {\n fontSize: theme.typography.pxToRem(12),\n lineHeight: 1.5\n },\n\n /* Styles applied to the `icon` and `label`'s wrapper element. */\n wrapper: {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '100%',\n flexDirection: 'column'\n }\n };\n};\nvar Tab = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Tab(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$disableFocusRi = props.disableFocusRipple,\n disableFocusRipple = _props$disableFocusRi === void 0 ? false : _props$disableFocusRi,\n fullWidth = props.fullWidth,\n icon = props.icon,\n indicator = props.indicator,\n label = props.label,\n onChange = props.onChange,\n onClick = props.onClick,\n onFocus = props.onFocus,\n selected = props.selected,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$wrapped = props.wrapped,\n wrapped = _props$wrapped === void 0 ? false : _props$wrapped,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"classes\", \"className\", \"disabled\", \"disableFocusRipple\", \"fullWidth\", \"icon\", \"indicator\", \"label\", \"onChange\", \"onClick\", \"onFocus\", \"selected\", \"selectionFollowsFocus\", \"textColor\", \"value\", \"wrapped\"]);\n\n var handleClick = function handleClick(event) {\n if (onChange) {\n onChange(event, value);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n var handleFocus = function handleFocus(event) {\n if (selectionFollowsFocus && !selected && onChange) {\n onChange(event, value);\n }\n\n if (onFocus) {\n onFocus(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n focusRipple: !disableFocusRipple,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[\"textColor\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(textColor))], className, disabled && classes.disabled, selected && classes.selected, label && icon && classes.labelIcon, fullWidth && classes.fullWidth, wrapped && classes.wrapped),\n ref: ref,\n role: \"tab\",\n \"aria-selected\": selected,\n disabled: disabled,\n onClick: handleClick,\n onFocus: handleFocus,\n tabIndex: selected ? 0 : -1\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"span\", {\n className: classes.wrapper\n }, icon, label), indicator);\n});\n true ? Tab.propTypes = {\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: _utils_unsupportedProp__WEBPACK_IMPORTED_MODULE_9__[\"default\"],\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * If `true`, the tab will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple will be disabled.\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the ripple effect will be disabled.\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The icon element.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * @ignore\n * For server-side rendering consideration, we let the selected tab\n * render the indicator.\n */\n indicator: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * The label element.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * @ignore\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onClick: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n selectionFollowsFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n textColor: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['secondary', 'primary', 'inherit']),\n\n /**\n * You can provide your own value. Otherwise, we fallback to the child position index.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any,\n\n /**\n * Tab labels appear in a single row.\n * They can use a second line if needed.\n */\n wrapped: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiTab'\n})(Tab));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tab/Tab.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tab/index.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tab/index.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tab__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tab */ \"./node_modules/@material-ui/core/esm/Tab/Tab.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Tab__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tab/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js ***! \*******************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/svg-icons/KeyboardArrowLeft */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js\");\n/* harmony import */ var _internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../internal/svg-icons/KeyboardArrowRight */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n\n\n\n/* eslint-disable jsx-a11y/aria-role */\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n width: 40,\n flexShrink: 0,\n opacity: 0.8,\n '&$disabled': {\n opacity: 0\n }\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n width: '100%',\n height: 40,\n '& svg': {\n transform: 'rotate(90deg)'\n }\n },\n\n /* Pseudo-class applied to the root element if `disabled={true}`. */\n disabled: {}\n};\n\nvar _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__[\"default\"], {\n fontSize: \"small\"\n});\n\nvar _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {\n fontSize: \"small\"\n});\n\nvar TabScrollButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TabScrollButton(props, ref) {\n var classes = props.classes,\n classNameProp = props.className,\n direction = props.direction,\n orientation = props.orientation,\n disabled = props.disabled,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"direction\", \"orientation\", \"disabled\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_8__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n component: \"div\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classNameProp, disabled && classes.disabled, orientation === 'vertical' && classes.vertical),\n ref: ref,\n role: null,\n tabIndex: null\n }, other), direction === 'left' ? _ref : _ref2);\n});\n true ? TabScrollButton.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Which direction should the button indicate?\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['left', 'right']).isRequired,\n\n /**\n * If `true`, the element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['horizontal', 'vertical']).isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(styles, {\n name: 'MuiTabScrollButton'\n})(TabScrollButton));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TabScrollButton/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TabScrollButton/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TabScrollButton */ \"./node_modules/@material-ui/core/esm/TabScrollButton/TabScrollButton.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TabScrollButton__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TabScrollButton/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Table/Table.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Table/Table.js ***! \***********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _TableContext__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TableContext */ \"./node_modules/@material-ui/core/esm/Table/TableContext.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n display: 'table',\n width: '100%',\n borderCollapse: 'collapse',\n borderSpacing: 0,\n '& caption': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.typography.body2, {\n padding: theme.spacing(2),\n color: theme.palette.text.secondary,\n textAlign: 'left',\n captionSide: 'bottom'\n })\n },\n\n /* Styles applied to the root element if `stickyHeader={true}`. */\n stickyHeader: {\n borderCollapse: 'separate'\n }\n };\n};\nvar defaultComponent = 'table';\nvar Table = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Table(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$padding = props.padding,\n padding = _props$padding === void 0 ? 'default' : _props$padding,\n _props$size = props.size,\n size = _props$size === void 0 ? 'medium' : _props$size,\n _props$stickyHeader = props.stickyHeader,\n stickyHeader = _props$stickyHeader === void 0 ? false : _props$stickyHeader,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"padding\", \"size\", \"stickyHeader\"]);\n\n var table = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](function () {\n return {\n padding: padding,\n size: size,\n stickyHeader: stickyHeader\n };\n }, [padding, size, stickyHeader]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_TableContext__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: table\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n role: Component === defaultComponent ? null : 'table',\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, stickyHeader && classes.stickyHeader)\n }, other)));\n});\n true ? Table.propTypes = {\n /**\n * The content of the table, normally `TableHead` and `TableBody`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Allows TableCells to inherit padding of the Table.\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['default', 'checkbox', 'none']),\n\n /**\n * Allows TableCells to inherit size of the Table.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium']),\n\n /**\n * Set the header sticky.\n *\n * ⚠️ It doesn't work with IE 11.\n */\n stickyHeader: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTable'\n})(Table));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Table/Table.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Table/TableContext.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Table/TableContext.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n */\n\nvar TableContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]();\n\nif (true) {\n TableContext.displayName = 'TableContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (TableContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Table/TableContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * @ignore - internal component.\n */\n\nvar Tablelvl2Context = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"]();\n\nif (true) {\n Tablelvl2Context.displayName = 'Tablelvl2Context';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Tablelvl2Context);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Table/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Table/index.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table */ \"./node_modules/@material-ui/core/esm/Table/Table.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Table__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Table/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableBody/TableBody.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableBody/TableBody.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ \"./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-row-group'\n }\n};\nvar tablelvl2 = {\n variant: 'body'\n};\nvar defaultComponent = 'tbody';\nvar TableBody = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableBody(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: tablelvl2\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\n true ? TableBody.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableBody'\n})(TableBody));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableBody/TableBody.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableBody/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableBody/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableBody__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableBody */ \"./node_modules/@material-ui/core/esm/TableBody/TableBody.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableBody__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableBody/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableCell/TableCell.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableCell/TableCell.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Table/TableContext */ \"./node_modules/@material-ui/core/esm/Table/TableContext.js\");\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ \"./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: \"1px solid\\n \".concat(theme.palette.type === 'light' ? Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"lighten\"])(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.divider, 1), 0.88) : Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"darken\"])(Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.divider, 1), 0.68)),\n textAlign: 'left',\n padding: 16\n }),\n\n /* Styles applied to the root element if `variant=\"head\"` or `context.table.head`. */\n head: {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the root element if `variant=\"body\"` or `context.table.body`. */\n body: {\n color: theme.palette.text.primary\n },\n\n /* Styles applied to the root element if `variant=\"footer\"` or `context.table.footer`. */\n footer: {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n },\n\n /* Styles applied to the root element if `size=\"small\"`. */\n sizeSmall: {\n padding: '6px 24px 6px 16px',\n '&:last-child': {\n paddingRight: 16\n },\n '&$paddingCheckbox': {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '&:last-child': {\n paddingLeft: 12,\n paddingRight: 16\n },\n '& > *': {\n padding: 0\n }\n }\n },\n\n /* Styles applied to the root element if `padding=\"checkbox\"`. */\n paddingCheckbox: {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px',\n '&:last-child': {\n paddingLeft: 0,\n paddingRight: 4\n }\n },\n\n /* Styles applied to the root element if `padding=\"none\"`. */\n paddingNone: {\n padding: 0,\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the root element if `align=\"left\"`. */\n alignLeft: {\n textAlign: 'left'\n },\n\n /* Styles applied to the root element if `align=\"center\"`. */\n alignCenter: {\n textAlign: 'center'\n },\n\n /* Styles applied to the root element if `align=\"right\"`. */\n alignRight: {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n },\n\n /* Styles applied to the root element if `align=\"justify\"`. */\n alignJustify: {\n textAlign: 'justify'\n },\n\n /* Styles applied to the root element if `context.table.stickyHeader={true}`. */\n stickyHeader: {\n position: 'sticky',\n top: 0,\n left: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n }\n };\n};\n/**\n * The component renders a `` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nvar TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableCell(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n component = props.component,\n paddingProp = props.padding,\n scopeProp = props.scope,\n sizeProp = props.size,\n sortDirection = props.sortDirection,\n variantProp = props.variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, [\"align\", \"classes\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"]);\n\n var table = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_8__[\"default\"]);\n var tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__[\"default\"]);\n var isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n var role;\n var Component;\n\n if (component) {\n Component = component;\n role = isHeadCell ? 'columnheader' : 'cell';\n } else {\n Component = isHeadCell ? 'th' : 'td';\n }\n\n var scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n var padding = paddingProp || (table && table.padding ? table.padding : 'default');\n var size = sizeProp || (table && table.size ? table.size : 'medium');\n var variant = variantProp || tablelvl2 && tablelvl2.variant;\n var ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[variant], className, align !== 'inherit' && classes[\"align\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(align))], padding !== 'default' && classes[\"padding\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(padding))], size !== 'medium' && classes[\"size\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(size))], variant === 'head' && table && table.stickyHeader && classes.stickyHeader),\n \"aria-sort\": ariaSort,\n role: role,\n scope: scope\n }, other));\n});\n true ? TableCell.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The table cell contents.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Sets the padding applied to the cell.\n * By default, the Table parent component set the value (`default`).\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['checkbox', 'default', 'none']),\n\n /**\n * Set scope attribute.\n */\n scope: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify the size of the cell.\n * By default, the Table parent component set the value (`medium`).\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc', false]),\n\n /**\n * Specify the cell type.\n * By default, the TableHead, TableBody or TableFooter parent component set the value.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body', 'footer', 'head'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableCell'\n})(TableCell));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableCell/TableCell.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableCell/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableCell/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableCell */ \"./node_modules/@material-ui/core/esm/TableCell/TableCell.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableCell__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableCell/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableContainer/TableContainer.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableContainer/TableContainer.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n width: '100%',\n overflowX: 'auto'\n }\n};\nvar TableContainer = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableContainer(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className)\n }, other));\n});\n true ? TableContainer.propTypes = {\n /**\n * The table itself, normally ``\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableContainer'\n})(TableContainer));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableContainer/TableContainer.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableContainer/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableContainer/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableContainer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableContainer */ \"./node_modules/@material-ui/core/esm/TableContainer/TableContainer.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableContainer__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableContainer/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableFooter/TableFooter.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableFooter/TableFooter.js ***! \***********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ \"./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-footer-group'\n }\n};\nvar tablelvl2 = {\n variant: 'footer'\n};\nvar defaultComponent = 'tfoot';\nvar TableFooter = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableFooter(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: tablelvl2\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\n true ? TableFooter.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableFooter'\n})(TableFooter));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableFooter/TableFooter.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableFooter/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableFooter/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableFooter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableFooter */ \"./node_modules/@material-ui/core/esm/TableFooter/TableFooter.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableFooter__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableFooter/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableHead/TableHead.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableHead/TableHead.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ \"./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js\");\n\n\n\n\n\n\n\nvar styles = {\n /* Styles applied to the root element. */\n root: {\n display: 'table-header-group'\n }\n};\nvar tablelvl2 = {\n variant: 'head'\n};\nvar defaultComponent = 'thead';\nvar TableHead = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableHead(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__[\"default\"].Provider, {\n value: tablelvl2\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n ref: ref,\n role: Component === defaultComponent ? null : 'rowgroup'\n }, other)));\n});\n true ? TableHead.propTypes = {\n /**\n * The content of the component, normally `TableRow`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableHead'\n})(TableHead));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableHead/TableHead.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableHead/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableHead/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableHead__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableHead */ \"./node_modules/@material-ui/core/esm/TableHead/TableHead.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableHead__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableHead/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TablePagination/TablePagination.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TablePagination/TablePagination.js ***! \*******************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/index.js\");\n/* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../MenuItem */ \"./node_modules/@material-ui/core/esm/MenuItem/index.js\");\n/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Select */ \"./node_modules/@material-ui/core/esm/Select/index.js\");\n/* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../TableCell */ \"./node_modules/@material-ui/core/esm/TableCell/index.js\");\n/* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Toolbar */ \"./node_modules/@material-ui/core/esm/Toolbar/index.js\");\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony import */ var _TablePaginationActions__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TablePaginationActions */ \"./node_modules/@material-ui/core/esm/TablePagination/TablePaginationActions.js\");\n/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/unstable_useId */ \"./node_modules/@material-ui/core/esm/utils/unstable_useId.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: theme.palette.text.primary,\n fontSize: theme.typography.pxToRem(14),\n overflow: 'auto',\n // Increase the specificity to override TableCell.\n '&:last-child': {\n padding: 0\n }\n },\n\n /* Styles applied to the Toolbar component. */\n toolbar: {\n minHeight: 52,\n paddingRight: 2\n },\n\n /* Styles applied to the spacer element. */\n spacer: {\n flex: '1 1 100%'\n },\n\n /* Styles applied to the caption Typography components if `variant=\"caption\"`. */\n caption: {\n flexShrink: 0\n },\n // TODO v5: `.selectRoot` should be merged with `.input`\n\n /* Styles applied to the Select component root element. */\n selectRoot: {\n marginRight: 32,\n marginLeft: 8\n },\n\n /* Styles applied to the Select component `select` class. */\n select: {\n paddingLeft: 8,\n paddingRight: 24,\n textAlign: 'right',\n textAlignLast: 'right' // Align on Chrome.\n\n },\n // TODO v5: remove\n\n /* Styles applied to the Select component `icon` class. */\n selectIcon: {},\n\n /* Styles applied to the `InputBase` component. */\n input: {\n color: 'inherit',\n fontSize: 'inherit',\n flexShrink: 0\n },\n\n /* Styles applied to the MenuItem component. */\n menuItem: {},\n\n /* Styles applied to the internal `TablePaginationActions` component. */\n actions: {\n flexShrink: 0,\n marginLeft: 20\n }\n };\n};\n\nvar defaultLabelDisplayedRows = function defaultLabelDisplayedRows(_ref) {\n var from = _ref.from,\n to = _ref.to,\n count = _ref.count;\n return \"\".concat(from, \"-\").concat(to, \" of \").concat(count !== -1 ? count : \"more than \".concat(to));\n};\n\nvar defaultRowsPerPageOptions = [10, 25, 50, 100];\n/**\n * A `TableCell` based component for placing inside `TableFooter` for pagination.\n */\n\nvar TablePagination = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TablePagination(props, ref) {\n var _props$ActionsCompone = props.ActionsComponent,\n ActionsComponent = _props$ActionsCompone === void 0 ? _TablePaginationActions__WEBPACK_IMPORTED_MODULE_13__[\"default\"] : _props$ActionsCompone,\n backIconButtonProps = props.backIconButtonProps,\n _props$backIconButton = props.backIconButtonText,\n backIconButtonText = _props$backIconButton === void 0 ? 'Previous page' : _props$backIconButton,\n classes = props.classes,\n className = props.className,\n colSpanProp = props.colSpan,\n _props$component = props.component,\n Component = _props$component === void 0 ? _TableCell__WEBPACK_IMPORTED_MODULE_10__[\"default\"] : _props$component,\n count = props.count,\n _props$labelDisplayed = props.labelDisplayedRows,\n labelDisplayedRows = _props$labelDisplayed === void 0 ? defaultLabelDisplayedRows : _props$labelDisplayed,\n _props$labelRowsPerPa = props.labelRowsPerPage,\n labelRowsPerPage = _props$labelRowsPerPa === void 0 ? 'Rows per page:' : _props$labelRowsPerPa,\n nextIconButtonProps = props.nextIconButtonProps,\n _props$nextIconButton = props.nextIconButtonText,\n nextIconButtonText = _props$nextIconButton === void 0 ? 'Next page' : _props$nextIconButton,\n onChangePage = props.onChangePage,\n onChangeRowsPerPage = props.onChangeRowsPerPage,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n _props$rowsPerPageOpt = props.rowsPerPageOptions,\n rowsPerPageOptions = _props$rowsPerPageOpt === void 0 ? defaultRowsPerPageOptions : _props$rowsPerPageOpt,\n _props$SelectProps = props.SelectProps,\n SelectProps = _props$SelectProps === void 0 ? {} : _props$SelectProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"ActionsComponent\", \"backIconButtonProps\", \"backIconButtonText\", \"classes\", \"className\", \"colSpan\", \"component\", \"count\", \"labelDisplayedRows\", \"labelRowsPerPage\", \"nextIconButtonProps\", \"nextIconButtonText\", \"onChangePage\", \"onChangeRowsPerPage\", \"page\", \"rowsPerPage\", \"rowsPerPageOptions\", \"SelectProps\"]);\n\n var colSpan;\n\n if (Component === _TableCell__WEBPACK_IMPORTED_MODULE_10__[\"default\"] || Component === 'td') {\n colSpan = colSpanProp || 1000; // col-span over everything\n }\n\n var selectId = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_14__[\"default\"])();\n var labelId = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_14__[\"default\"])();\n var MenuItemComponent = SelectProps.native ? 'option' : _MenuItem__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className),\n colSpan: colSpan,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Toolbar__WEBPACK_IMPORTED_MODULE_11__[\"default\"], {\n className: classes.toolbar\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", {\n className: classes.spacer\n }), rowsPerPageOptions.length > 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: \"inherit\",\n variant: \"body2\",\n className: classes.caption,\n id: labelId\n }, labelRowsPerPage), rowsPerPageOptions.length > 1 && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Select__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n classes: {\n select: classes.select,\n icon: classes.selectIcon\n },\n input: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_InputBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.input, classes.selectRoot)\n }),\n value: rowsPerPage,\n onChange: onChangeRowsPerPage,\n id: selectId,\n labelId: labelId\n }, SelectProps), rowsPerPageOptions.map(function (rowsPerPageOption) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](MenuItemComponent, {\n className: classes.menuItem,\n key: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption,\n value: rowsPerPageOption.value ? rowsPerPageOption.value : rowsPerPageOption\n }, rowsPerPageOption.label ? rowsPerPageOption.label : rowsPerPageOption);\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Typography__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n color: \"inherit\",\n variant: \"body2\",\n className: classes.caption\n }, labelDisplayedRows({\n from: count === 0 ? 0 : page * rowsPerPage + 1,\n to: count !== -1 ? Math.min(count, (page + 1) * rowsPerPage) : (page + 1) * rowsPerPage,\n count: count === -1 ? -1 : count,\n page: page\n })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](ActionsComponent, {\n className: classes.actions,\n backIconButtonProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n title: backIconButtonText,\n 'aria-label': backIconButtonText\n }, backIconButtonProps),\n count: count,\n nextIconButtonProps: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n title: nextIconButtonText,\n 'aria-label': nextIconButtonText\n }, nextIconButtonProps),\n onChangePage: onChangePage,\n page: page,\n rowsPerPage: rowsPerPage\n })));\n});\n true ? TablePagination.propTypes = {\n /**\n * The component used for displaying the actions.\n * Either a string to use a HTML element or a component.\n */\n ActionsComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) component.\n */\n backIconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Text label for the back arrow icon button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n backIconButtonText: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n colSpan: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * The total number of rows.\n *\n * To enable server side pagination for an unknown number of items, provide -1.\n */\n count: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired,\n\n /**\n * Customize the displayed rows label. Invoked with a `{ from, to, count, page }`\n * object.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n labelDisplayedRows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Customize the rows per page label.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n labelRowsPerPage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Text label for the next arrow icon button.\n *\n * For localization purposes, you can use the provided [translations](/guides/localization/).\n */\n nextIconButtonText: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func.isRequired,\n\n /**\n * Callback fired when the number of rows per page is changed.\n *\n * @param {object} event The event source of the callback.\n */\n onChangeRowsPerPage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The zero-based index of the current page.\n */\n page: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_4__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired, function (props) {\n var count = props.count,\n page = props.page,\n rowsPerPage = props.rowsPerPage;\n\n if (count === -1) {\n return null;\n }\n\n var newLastPage = Math.max(0, Math.ceil(count / rowsPerPage) - 1);\n\n if (page < 0 || page > newLastPage) {\n return new Error('Material-UI: The page prop of a TablePagination is out of range ' + \"(0 to \".concat(newLastPage, \", but page is \").concat(page, \").\"));\n }\n\n return null;\n }),\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired,\n\n /**\n * Customizes the options of the rows per page select field. If less than two options are\n * available, no select field will be displayed.\n */\n rowsPerPageOptions: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.array,\n\n /**\n * Props applied to the rows per page [`Select`](/api/select/) element.\n */\n SelectProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiTablePagination'\n})(TablePagination));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TablePagination/TablePagination.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TablePagination/TablePaginationActions.js": /*!**************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TablePagination/TablePaginationActions.js ***! \**************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../internal/svg-icons/KeyboardArrowLeft */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js\");\n/* harmony import */ var _internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/svg-icons/KeyboardArrowRight */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/index.js\");\n\n\n\n\n\n\n\n\n/**\n * @ignore - internal component.\n */\n\nvar _ref = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null);\n\nvar _ref2 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null);\n\nvar _ref3 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null);\n\nvar _ref4 = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_internal_svg_icons_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null);\n\nvar TablePaginationActions = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TablePaginationActions(props, ref) {\n var backIconButtonProps = props.backIconButtonProps,\n count = props.count,\n nextIconButtonProps = props.nextIconButtonProps,\n onChangePage = props.onChangePage,\n page = props.page,\n rowsPerPage = props.rowsPerPage,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"backIconButtonProps\", \"count\", \"nextIconButtonProps\", \"onChangePage\", \"page\", \"rowsPerPage\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n\n var handleBackButtonClick = function handleBackButtonClick(event) {\n onChangePage(event, page - 1);\n };\n\n var handleNextButtonClick = function handleNextButtonClick(event) {\n onChangePage(event, page + 1);\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_IconButton__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n onClick: handleBackButtonClick,\n disabled: page === 0,\n color: \"inherit\"\n }, backIconButtonProps), theme.direction === 'rtl' ? _ref : _ref2), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_IconButton__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n onClick: handleNextButtonClick,\n disabled: count !== -1 ? page >= Math.ceil(count / rowsPerPage) - 1 : false,\n color: \"inherit\"\n }, nextIconButtonProps), theme.direction === 'rtl' ? _ref3 : _ref4));\n});\n true ? TablePaginationActions.propTypes = {\n /**\n * Props applied to the back arrow [`IconButton`](/api/icon-button/) element.\n */\n backIconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The total number of rows.\n */\n count: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired,\n\n /**\n * Props applied to the next arrow [`IconButton`](/api/icon-button/) element.\n */\n nextIconButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Callback fired when the page is changed.\n *\n * @param {object} event The event source of the callback.\n * @param {number} page The page selected.\n */\n onChangePage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func.isRequired,\n\n /**\n * The zero-based index of the current page.\n */\n page: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired,\n\n /**\n * The number of rows per page.\n */\n rowsPerPage: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number.isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (TablePaginationActions);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TablePagination/TablePaginationActions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TablePagination/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TablePagination/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TablePagination__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TablePagination */ \"./node_modules/@material-ui/core/esm/TablePagination/TablePagination.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TablePagination__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TablePagination/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableRow/TableRow.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableRow/TableRow.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ \"./node_modules/@material-ui/core/esm/Table/Tablelvl2Context.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n '&$hover:hover': {\n backgroundColor: theme.palette.action.hover\n },\n '&$selected, &$selected:hover': {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_7__[\"fade\"])(theme.palette.secondary.main, theme.palette.action.selectedOpacity)\n }\n },\n\n /* Pseudo-class applied to the root element if `selected={true}`. */\n selected: {},\n\n /* Pseudo-class applied to the root element if `hover={true}`. */\n hover: {},\n\n /* Styles applied to the root element if table variant=\"head\". */\n head: {},\n\n /* Styles applied to the root element if table variant=\"footer\". */\n footer: {}\n };\n};\nvar defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nvar TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableRow(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? defaultComponent : _props$component,\n _props$hover = props.hover,\n hover = _props$hover === void 0 ? false : _props$hover,\n _props$selected = props.selected,\n selected = _props$selected === void 0 ? false : _props$selected,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"hover\", \"selected\"]);\n\n var tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_6__[\"default\"]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, tablelvl2 && {\n 'head': classes.head,\n 'footer': classes.footer\n }[tablelvl2.variant], hover && classes.hover, selected && classes.selected),\n role: Component === defaultComponent ? null : 'row'\n }, other));\n});\n true ? TableRow.propTypes = {\n /**\n * Should be valid children such as `TableCell`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n */\n hover: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTableRow'\n})(TableRow));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableRow/TableRow.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableRow/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableRow/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableRow__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableRow */ \"./node_modules/@material-ui/core/esm/TableRow/TableRow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableRow__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableRow/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableSortLabel/TableSortLabel.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableSortLabel/TableSortLabel.js ***! \*****************************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _internal_svg_icons_ArrowDownward__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../internal/svg-icons/ArrowDownward */ \"./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDownward.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n cursor: 'pointer',\n display: 'inline-flex',\n justifyContent: 'flex-start',\n flexDirection: 'inherit',\n alignItems: 'center',\n '&:focus': {\n color: theme.palette.text.secondary\n },\n '&:hover': {\n color: theme.palette.text.secondary,\n '& $icon': {\n opacity: 0.5\n }\n },\n '&$active': {\n color: theme.palette.text.primary,\n // && instead of & is a workaround for https://github.com/cssinjs/jss/issues/1045\n '&& $icon': {\n opacity: 1,\n color: theme.palette.text.secondary\n }\n }\n },\n\n /* Pseudo-class applied to the root element if `active={true}`. */\n active: {},\n\n /* Styles applied to the icon component. */\n icon: {\n fontSize: 18,\n marginRight: 4,\n marginLeft: 4,\n opacity: 0,\n transition: theme.transitions.create(['opacity', 'transform'], {\n duration: theme.transitions.duration.shorter\n }),\n userSelect: 'none'\n },\n\n /* Styles applied to the icon component if `direction=\"desc\"`. */\n iconDirectionDesc: {\n transform: 'rotate(0deg)'\n },\n\n /* Styles applied to the icon component if `direction=\"asc\"`. */\n iconDirectionAsc: {\n transform: 'rotate(180deg)'\n }\n };\n};\n/**\n * A button based label for placing inside `TableCell` for column sorting.\n */\n\nvar TableSortLabel = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableSortLabel(props, ref) {\n var _props$active = props.active,\n active = _props$active === void 0 ? false : _props$active,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$direction = props.direction,\n direction = _props$direction === void 0 ? 'asc' : _props$direction,\n _props$hideSortIcon = props.hideSortIcon,\n hideSortIcon = _props$hideSortIcon === void 0 ? false : _props$hideSortIcon,\n _props$IconComponent = props.IconComponent,\n IconComponent = _props$IconComponent === void 0 ? _internal_svg_icons_ArrowDownward__WEBPACK_IMPORTED_MODULE_5__[\"default\"] : _props$IconComponent,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"active\", \"children\", \"classes\", \"className\", \"direction\", \"hideSortIcon\", \"IconComponent\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ButtonBase__WEBPACK_IMPORTED_MODULE_7__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, active && classes.active),\n component: \"span\",\n disableRipple: true,\n ref: ref\n }, other), children, hideSortIcon && !active ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](IconComponent, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.icon, classes[\"iconDirection\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(direction))])\n }));\n});\n true ? TableSortLabel.propTypes = {\n /**\n * If `true`, the label will have the active styling (should be true for the sorted column).\n */\n active: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Label contents, the arrow will be appended automatically.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The current sort direction.\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc']),\n\n /**\n * Hide sort icon when active is false.\n */\n hideSortIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Sort icon to use.\n */\n IconComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiTableSortLabel'\n})(TableSortLabel));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableSortLabel/TableSortLabel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TableSortLabel/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TableSortLabel/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TableSortLabel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TableSortLabel */ \"./node_modules/@material-ui/core/esm/TableSortLabel/TableSortLabel.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TableSortLabel__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TableSortLabel/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ScrollbarSize; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n\n\n\n\n\nvar styles = {\n width: 99,\n height: 99,\n position: 'absolute',\n top: -9999,\n overflow: 'scroll'\n};\n/**\n * @ignore - internal component.\n * The component originates from https://github.com/STORIS/react-scrollbar-size.\n * It has been moved into the core in order to minimize the bundle size.\n */\n\nfunction ScrollbarSize(props) {\n var onChange = props.onChange,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"onChange\"]);\n\n var scrollbarHeight = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n\n var setMeasurements = function setMeasurements() {\n scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function () {\n var prevHeight = scrollbarHeight.current;\n setMeasurements();\n\n if (prevHeight !== scrollbarHeight.current) {\n onChange(scrollbarHeight.current);\n }\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [onChange]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n setMeasurements();\n onChange(scrollbarHeight.current);\n }, [onChange]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"div\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: styles,\n ref: nodeRef\n }, other));\n}\n true ? ScrollbarSize.propTypes = {\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func.isRequired\n} : undefined;\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js ***! \*****************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n root: {\n position: 'absolute',\n height: 2,\n bottom: 0,\n width: '100%',\n transition: theme.transitions.create()\n },\n colorPrimary: {\n backgroundColor: theme.palette.primary.main\n },\n colorSecondary: {\n backgroundColor: theme.palette.secondary.main\n },\n vertical: {\n height: '100%',\n width: 2,\n right: 0\n }\n };\n};\n/**\n * @ignore - internal component.\n */\n\nvar TabIndicator = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TabIndicator(props, ref) {\n var classes = props.classes,\n className = props.className,\n color = props.color,\n orientation = props.orientation,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"color\", \"orientation\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"span\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], className, orientation === 'vertical' && classes.vertical),\n ref: ref\n }, other));\n});\n true ? TabIndicator.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n * The color of the tab indicator.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']).isRequired,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['horizontal', 'vertical']).isRequired\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'PrivateTabIndicator'\n})(TabIndicator));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tabs/Tabs.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tabs/Tabs.js ***! \*********************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony import */ var _utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/ownerWindow */ \"./node_modules/@material-ui/core/esm/utils/ownerWindow.js\");\n/* harmony import */ var _utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/scrollLeft */ \"./node_modules/@material-ui/core/esm/utils/scrollLeft.js\");\n/* harmony import */ var _internal_animate__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../internal/animate */ \"./node_modules/@material-ui/core/esm/internal/animate.js\");\n/* harmony import */ var _ScrollbarSize__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ScrollbarSize */ \"./node_modules/@material-ui/core/esm/Tabs/ScrollbarSize.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _TabIndicator__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./TabIndicator */ \"./node_modules/@material-ui/core/esm/Tabs/TabIndicator.js\");\n/* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../TabScrollButton */ \"./node_modules/@material-ui/core/esm/TabScrollButton/index.js\");\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n overflow: 'hidden',\n minHeight: 48,\n WebkitOverflowScrolling: 'touch',\n // Add iOS momentum scrolling.\n display: 'flex'\n },\n\n /* Styles applied to the root element if `orientation=\"vertical\"`. */\n vertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element. */\n flexContainer: {\n display: 'flex'\n },\n\n /* Styles applied to the flex container element if `orientation=\"vertical\"`. */\n flexContainerVertical: {\n flexDirection: 'column'\n },\n\n /* Styles applied to the flex container element if `centered={true}` & `!variant=\"scrollable\"`. */\n centered: {\n justifyContent: 'center'\n },\n\n /* Styles applied to the tablist element. */\n scroller: {\n position: 'relative',\n display: 'inline-block',\n flex: '1 1 auto',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the tablist element if `!variant=\"scrollable\"`\b\b\b. */\n fixed: {\n overflowX: 'hidden',\n width: '100%'\n },\n\n /* Styles applied to the tablist element if `variant=\"scrollable\"`. */\n scrollable: {\n overflowX: 'scroll',\n // Hide dimensionless scrollbar on MacOS\n scrollbarWidth: 'none',\n // Firefox\n '&::-webkit-scrollbar': {\n display: 'none' // Safari + Chrome\n\n }\n },\n\n /* Styles applied to the `ScrollButtonComponent` component. */\n scrollButtons: {},\n\n /* Styles applied to the `ScrollButtonComponent` component if `scrollButtons=\"auto\"` or scrollButtons=\"desktop\"`. */\n scrollButtonsDesktop: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({}, theme.breakpoints.down('xs'), {\n display: 'none'\n }),\n\n /* Styles applied to the `TabIndicator` component. */\n indicator: {}\n };\n};\nvar Tabs = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Tabs(props, ref) {\n var ariaLabel = props['aria-label'],\n ariaLabelledBy = props['aria-labelledby'],\n action = props.action,\n _props$centered = props.centered,\n centered = _props$centered === void 0 ? false : _props$centered,\n childrenProp = props.children,\n classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$indicatorColor = props.indicatorColor,\n indicatorColor = _props$indicatorColor === void 0 ? 'secondary' : _props$indicatorColor,\n onChange = props.onChange,\n _props$orientation = props.orientation,\n orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,\n _props$ScrollButtonCo = props.ScrollButtonComponent,\n ScrollButtonComponent = _props$ScrollButtonCo === void 0 ? _TabScrollButton__WEBPACK_IMPORTED_MODULE_15__[\"default\"] : _props$ScrollButtonCo,\n _props$scrollButtons = props.scrollButtons,\n scrollButtons = _props$scrollButtons === void 0 ? 'auto' : _props$scrollButtons,\n selectionFollowsFocus = props.selectionFollowsFocus,\n _props$TabIndicatorPr = props.TabIndicatorProps,\n TabIndicatorProps = _props$TabIndicatorPr === void 0 ? {} : _props$TabIndicatorPr,\n TabScrollButtonProps = props.TabScrollButtonProps,\n _props$textColor = props.textColor,\n textColor = _props$textColor === void 0 ? 'inherit' : _props$textColor,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"aria-label\", \"aria-labelledby\", \"action\", \"centered\", \"children\", \"classes\", \"className\", \"component\", \"indicatorColor\", \"onChange\", \"orientation\", \"ScrollButtonComponent\", \"scrollButtons\", \"selectionFollowsFocus\", \"TabIndicatorProps\", \"TabScrollButtonProps\", \"textColor\", \"value\", \"variant\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_17__[\"default\"])();\n var scrollable = variant === 'scrollable';\n var isRtl = theme.direction === 'rtl';\n var vertical = orientation === 'vertical';\n var scrollStart = vertical ? 'scrollTop' : 'scrollLeft';\n var start = vertical ? 'top' : 'left';\n var end = vertical ? 'bottom' : 'right';\n var clientSize = vertical ? 'clientHeight' : 'clientWidth';\n var size = vertical ? 'height' : 'width';\n\n if (true) {\n if (centered && scrollable) {\n console.error('Material-UI: You can not use the `centered={true}` and `variant=\"scrollable\"` properties ' + 'at the same time on a `Tabs` component.');\n }\n }\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"](false),\n mounted = _React$useState[0],\n setMounted = _React$useState[1];\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"]({}),\n indicatorStyle = _React$useState2[0],\n setIndicatorStyle = _React$useState2[1];\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"]({\n start: false,\n end: false\n }),\n displayScroll = _React$useState3[0],\n setDisplayScroll = _React$useState3[1];\n\n var _React$useState4 = react__WEBPACK_IMPORTED_MODULE_3__[\"useState\"]({\n overflow: 'hidden',\n marginBottom: null\n }),\n scrollerStyle = _React$useState4[0],\n setScrollerStyle = _React$useState4[1];\n\n var valueToIndex = new Map();\n var tabsRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var tabListRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n\n var getTabsMeta = function getTabsMeta() {\n var tabsNode = tabsRef.current;\n var tabsMeta;\n\n if (tabsNode) {\n var rect = tabsNode.getBoundingClientRect(); // create a new object with ClientRect class props + scrollLeft\n\n tabsMeta = {\n clientWidth: tabsNode.clientWidth,\n scrollLeft: tabsNode.scrollLeft,\n scrollTop: tabsNode.scrollTop,\n scrollLeftNormalized: Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__[\"getNormalizedScrollLeft\"])(tabsNode, theme.direction),\n scrollWidth: tabsNode.scrollWidth,\n top: rect.top,\n bottom: rect.bottom,\n left: rect.left,\n right: rect.right\n };\n }\n\n var tabMeta;\n\n if (tabsNode && value !== false) {\n var _children = tabListRef.current.children;\n\n if (_children.length > 0) {\n var tab = _children[valueToIndex.get(value)];\n\n if (true) {\n if (!tab) {\n console.error([\"Material-UI: The value provided to the Tabs component is invalid.\", \"None of the Tabs' children match with `\".concat(value, \"`.\"), valueToIndex.keys ? \"You can provide one of the following values: \".concat(Array.from(valueToIndex.keys()).join(', '), \".\") : null].join('\\n'));\n }\n }\n\n tabMeta = tab ? tab.getBoundingClientRect() : null;\n }\n }\n\n return {\n tabsMeta: tabsMeta,\n tabMeta: tabMeta\n };\n };\n\n var updateIndicatorState = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(function () {\n var _newIndicatorStyle;\n\n var _getTabsMeta = getTabsMeta(),\n tabsMeta = _getTabsMeta.tabsMeta,\n tabMeta = _getTabsMeta.tabMeta;\n\n var startValue = 0;\n\n if (tabMeta && tabsMeta) {\n if (vertical) {\n startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;\n } else {\n var correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;\n startValue = tabMeta.left - tabsMeta.left + correction;\n }\n }\n\n var newIndicatorStyle = (_newIndicatorStyle = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_newIndicatorStyle, start, startValue), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(_newIndicatorStyle, size, tabMeta ? tabMeta[size] : 0), _newIndicatorStyle);\n\n if (isNaN(indicatorStyle[start]) || isNaN(indicatorStyle[size])) {\n setIndicatorStyle(newIndicatorStyle);\n } else {\n var dStart = Math.abs(indicatorStyle[start] - newIndicatorStyle[start]);\n var dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);\n\n if (dStart >= 1 || dSize >= 1) {\n setIndicatorStyle(newIndicatorStyle);\n }\n }\n });\n\n var scroll = function scroll(scrollValue) {\n Object(_internal_animate__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(scrollStart, tabsRef.current, scrollValue);\n };\n\n var moveTabsScroll = function moveTabsScroll(delta) {\n var scrollValue = tabsRef.current[scrollStart];\n\n if (vertical) {\n scrollValue += delta;\n } else {\n scrollValue += delta * (isRtl ? -1 : 1); // Fix for Edge\n\n scrollValue *= isRtl && Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__[\"detectScrollType\"])() === 'reverse' ? -1 : 1;\n }\n\n scroll(scrollValue);\n };\n\n var handleStartScrollClick = function handleStartScrollClick() {\n moveTabsScroll(-tabsRef.current[clientSize]);\n };\n\n var handleEndScrollClick = function handleEndScrollClick() {\n moveTabsScroll(tabsRef.current[clientSize]);\n };\n\n var handleScrollbarSizeChange = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](function (scrollbarHeight) {\n setScrollerStyle({\n overflow: null,\n marginBottom: -scrollbarHeight\n });\n }, []);\n\n var getConditionalElements = function getConditionalElements() {\n var conditionalElements = {};\n conditionalElements.scrollbarSizeListener = scrollable ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_ScrollbarSize__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n className: classes.scrollable,\n onChange: handleScrollbarSizeChange\n }) : null;\n var scrollButtonsActive = displayScroll.start || displayScroll.end;\n var showScrollButtons = scrollable && (scrollButtons === 'auto' && scrollButtonsActive || scrollButtons === 'desktop' || scrollButtons === 'on');\n conditionalElements.scrollButtonStart = showScrollButtons ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](ScrollButtonComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n orientation: orientation,\n direction: isRtl ? 'right' : 'left',\n onClick: handleStartScrollClick,\n disabled: !displayScroll.start,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n conditionalElements.scrollButtonEnd = showScrollButtons ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](ScrollButtonComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n orientation: orientation,\n direction: isRtl ? 'left' : 'right',\n onClick: handleEndScrollClick,\n disabled: !displayScroll.end,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.scrollButtons, scrollButtons !== 'on' && classes.scrollButtonsDesktop)\n }, TabScrollButtonProps)) : null;\n return conditionalElements;\n };\n\n var scrollSelectedIntoView = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(function () {\n var _getTabsMeta2 = getTabsMeta(),\n tabsMeta = _getTabsMeta2.tabsMeta,\n tabMeta = _getTabsMeta2.tabMeta;\n\n if (!tabMeta || !tabsMeta) {\n return;\n }\n\n if (tabMeta[start] < tabsMeta[start]) {\n // left side of button is out of view\n var nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start] - tabsMeta[start]);\n scroll(nextScrollStart);\n } else if (tabMeta[end] > tabsMeta[end]) {\n // right side of button is out of view\n var _nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end] - tabsMeta[end]);\n\n scroll(_nextScrollStart);\n }\n });\n var updateScrollButtonState = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(function () {\n if (scrollable && scrollButtons !== 'off') {\n var _tabsRef$current = tabsRef.current,\n scrollTop = _tabsRef$current.scrollTop,\n scrollHeight = _tabsRef$current.scrollHeight,\n clientHeight = _tabsRef$current.clientHeight,\n scrollWidth = _tabsRef$current.scrollWidth,\n clientWidth = _tabsRef$current.clientWidth;\n var showStartScroll;\n var showEndScroll;\n\n if (vertical) {\n showStartScroll = scrollTop > 1;\n showEndScroll = scrollTop < scrollHeight - clientHeight - 1;\n } else {\n var scrollLeft = Object(_utils_scrollLeft__WEBPACK_IMPORTED_MODULE_10__[\"getNormalizedScrollLeft\"])(tabsRef.current, theme.direction); // use 1 for the potential rounding error with browser zooms.\n\n showStartScroll = isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n showEndScroll = !isRtl ? scrollLeft < scrollWidth - clientWidth - 1 : scrollLeft > 1;\n }\n\n if (showStartScroll !== displayScroll.start || showEndScroll !== displayScroll.end) {\n setDisplayScroll({\n start: showStartScroll,\n end: showEndScroll\n });\n }\n }\n });\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n var win = Object(_utils_ownerWindow__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(tabsRef.current);\n win.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n win.removeEventListener('resize', handleResize);\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var handleTabsScroll = react__WEBPACK_IMPORTED_MODULE_3__[\"useCallback\"](Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_8__[\"default\"])(function () {\n updateScrollButtonState();\n }));\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n return function () {\n handleTabsScroll.clear();\n };\n }, [handleTabsScroll]);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n setMounted(true);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n updateIndicatorState();\n updateScrollButtonState();\n });\n react__WEBPACK_IMPORTED_MODULE_3__[\"useEffect\"](function () {\n scrollSelectedIntoView();\n }, [scrollSelectedIntoView, indicatorStyle]);\n react__WEBPACK_IMPORTED_MODULE_3__[\"useImperativeHandle\"](action, function () {\n return {\n updateIndicator: updateIndicatorState,\n updateScrollButtons: updateScrollButtonState\n };\n }, [updateIndicatorState, updateScrollButtonState]);\n var indicator = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_TabIndicator__WEBPACK_IMPORTED_MODULE_14__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: classes.indicator,\n orientation: orientation,\n color: indicatorColor\n }, TabIndicatorProps, {\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, indicatorStyle, TabIndicatorProps.style)\n }));\n var childIndex = 0;\n var children = react__WEBPACK_IMPORTED_MODULE_3__[\"Children\"].map(childrenProp, function (child) {\n if (! /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"isValidElement\"](child)) {\n return null;\n }\n\n if (true) {\n if (Object(react_is__WEBPACK_IMPORTED_MODULE_4__[\"isFragment\"])(child)) {\n console.error([\"Material-UI: The Tabs component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n\n var childValue = child.props.value === undefined ? childIndex : child.props.value;\n valueToIndex.set(childValue, childIndex);\n var selected = childValue === value;\n childIndex += 1;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](child, {\n fullWidth: variant === 'fullWidth',\n indicator: selected && !mounted && indicator,\n selected: selected,\n selectionFollowsFocus: selectionFollowsFocus,\n onChange: onChange,\n textColor: textColor,\n value: childValue\n });\n });\n\n var handleKeyDown = function handleKeyDown(event) {\n var target = event.target; // Keyboard navigation assumes that [role=\"tab\"] are siblings\n // though we might warn in the future about nested, interactive elements\n // as a a11y violation\n\n var role = target.getAttribute('role');\n\n if (role !== 'tab') {\n return;\n }\n\n var newFocusTarget = null;\n var previousItemKey = orientation !== \"vertical\" ? 'ArrowLeft' : 'ArrowUp';\n var nextItemKey = orientation !== \"vertical\" ? 'ArrowRight' : 'ArrowDown';\n\n if (orientation !== \"vertical\" && theme.direction === 'rtl') {\n // swap previousItemKey with nextItemKey\n previousItemKey = 'ArrowRight';\n nextItemKey = 'ArrowLeft';\n }\n\n switch (event.key) {\n case previousItemKey:\n newFocusTarget = target.previousElementSibling || tabListRef.current.lastChild;\n break;\n\n case nextItemKey:\n newFocusTarget = target.nextElementSibling || tabListRef.current.firstChild;\n break;\n\n case 'Home':\n newFocusTarget = tabListRef.current.firstChild;\n break;\n\n case 'End':\n newFocusTarget = tabListRef.current.lastChild;\n break;\n\n default:\n break;\n }\n\n if (newFocusTarget !== null) {\n newFocusTarget.focus();\n event.preventDefault();\n }\n };\n\n var conditionalElements = getConditionalElements();\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.root, className, vertical && classes.vertical),\n ref: ref\n }, other), conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.scroller, scrollable ? classes.scrollable : classes.fixed),\n style: scrollerStyle,\n ref: tabsRef,\n onScroll: handleTabsScroll\n }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"div\", {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(classes.flexContainer, vertical && classes.flexContainerVertical, centered && !scrollable && classes.centered),\n onKeyDown: handleKeyDown,\n ref: tabListRef,\n role: \"tablist\"\n }, children), mounted && indicator), conditionalElements.scrollButtonEnd);\n});\n true ? Tabs.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Callback fired when the component mounts.\n * This is useful when you want to trigger an action programmatically.\n * It supports two actions: `updateIndicator()` and `updateScrollButtons()`\n *\n * @param {object} actions This object contains all possible actions\n * that can be triggered programmatically.\n */\n action: _material_ui_utils__WEBPACK_IMPORTED_MODULE_7__[\"refType\"],\n\n /**\n * The label for the Tabs as a string.\n */\n 'aria-label': prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * An id or list of ids separated by a space that label the Tabs.\n */\n 'aria-labelledby': prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * If `true`, the tabs will be centered.\n * This property is intended for large views.\n */\n centered: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Determines the color of the indicator.\n */\n indicatorColor: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * Callback fired when the value changes.\n *\n * @param {object} event The event source of the callback\n * @param {any} value We default to the index of the child (number)\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.func,\n\n /**\n * The tabs orientation (layout flow direction).\n */\n orientation: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['horizontal', 'vertical']),\n\n /**\n * The component used to render the scroll buttons.\n */\n ScrollButtonComponent: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.elementType,\n\n /**\n * Determine behavior of scroll buttons when tabs are set to scroll:\n *\n * - `auto` will only present them when not all the items are visible.\n * - `desktop` will only present them on medium and larger viewports.\n * - `on` will always present them.\n * - `off` will never present them.\n */\n scrollButtons: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['auto', 'desktop', 'off', 'on']),\n\n /**\n * If `true` the selected tab changes on focus. Otherwise it only\n * changes on activation.\n */\n selectionFollowsFocus: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.bool,\n\n /**\n * Props applied to the tab indicator element.\n */\n TabIndicatorProps: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * Props applied to the [`TabScrollButton`](/api/tab-scroll-button/) element.\n */\n TabScrollButtonProps: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.object,\n\n /**\n * Determines the color of the `Tab`.\n */\n textColor: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['inherit', 'primary', 'secondary']),\n\n /**\n * The value of the currently selected `Tab`.\n * If you don't want any selected `Tab`, you can set this property to `false`.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.any,\n\n /**\n * Determines additional display behavior of the tabs:\n *\n * - `scrollable` will invoke scrolling properties and allow for horizontally\n * scrolling (or swiping) of the tab bar.\n * -`fullWidth` will make the tabs grow to use all the available space,\n * which should be used for small views, like on mobile.\n * - `standard` will render the default state.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_5___default.a.oneOf(['fullWidth', 'scrollable', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(styles, {\n name: 'MuiTabs'\n})(Tabs));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tabs/Tabs.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tabs/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tabs/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tabs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tabs */ \"./node_modules/@material-ui/core/esm/Tabs/Tabs.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Tabs__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tabs/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TextField/TextField.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TextField/TextField.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Input */ \"./node_modules/@material-ui/core/esm/Input/index.js\");\n/* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../FilledInput */ \"./node_modules/@material-ui/core/esm/FilledInput/index.js\");\n/* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../OutlinedInput */ \"./node_modules/@material-ui/core/esm/OutlinedInput/index.js\");\n/* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../InputLabel */ \"./node_modules/@material-ui/core/esm/InputLabel/index.js\");\n/* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../FormControl */ \"./node_modules/@material-ui/core/esm/FormControl/index.js\");\n/* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../FormHelperText */ \"./node_modules/@material-ui/core/esm/FormHelperText/index.js\");\n/* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Select */ \"./node_modules/@material-ui/core/esm/Select/index.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar variantComponent = {\n standard: _Input__WEBPACK_IMPORTED_MODULE_6__[\"default\"],\n filled: _FilledInput__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n outlined: _OutlinedInput__WEBPACK_IMPORTED_MODULE_8__[\"default\"]\n};\nvar styles = {\n /* Styles applied to the root element. */\n root: {}\n};\n/**\n * The `TextField` is a convenience wrapper for the most common cases (80%).\n * It cannot be all things to all people, otherwise the API would grow out of control.\n *\n * ## Advanced Configuration\n *\n * It's important to understand that the text field is a simple abstraction\n * on top of the following components:\n *\n * - [FormControl](/api/form-control/)\n * - [InputLabel](/api/input-label/)\n * - [FilledInput](/api/filled-input/)\n * - [OutlinedInput](/api/outlined-input/)\n * - [Input](/api/input/)\n * - [FormHelperText](/api/form-helper-text/)\n *\n * If you wish to alter the props applied to the `input` element, you can do so as follows:\n *\n * ```jsx\n * const inputProps = {\n * step: 300,\n * };\n *\n * return ;\n * ```\n *\n * For advanced cases, please look at the source of TextField by clicking on the\n * \"Edit this page\" button above. Consider either:\n *\n * - using the upper case props for passing values directly to the components\n * - using the underlying components directly as shown in the demos\n */\n\nvar TextField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TextField(props, ref) {\n var autoComplete = props.autoComplete,\n _props$autoFocus = props.autoFocus,\n autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,\n children = props.children,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'primary' : _props$color,\n defaultValue = props.defaultValue,\n _props$disabled = props.disabled,\n disabled = _props$disabled === void 0 ? false : _props$disabled,\n _props$error = props.error,\n error = _props$error === void 0 ? false : _props$error,\n FormHelperTextProps = props.FormHelperTextProps,\n _props$fullWidth = props.fullWidth,\n fullWidth = _props$fullWidth === void 0 ? false : _props$fullWidth,\n helperText = props.helperText,\n hiddenLabel = props.hiddenLabel,\n id = props.id,\n InputLabelProps = props.InputLabelProps,\n inputProps = props.inputProps,\n InputProps = props.InputProps,\n inputRef = props.inputRef,\n label = props.label,\n _props$multiline = props.multiline,\n multiline = _props$multiline === void 0 ? false : _props$multiline,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n placeholder = props.placeholder,\n _props$required = props.required,\n required = _props$required === void 0 ? false : _props$required,\n rows = props.rows,\n rowsMax = props.rowsMax,\n _props$select = props.select,\n select = _props$select === void 0 ? false : _props$select,\n SelectProps = props.SelectProps,\n type = props.type,\n value = props.value,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'standard' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"autoComplete\", \"autoFocus\", \"children\", \"classes\", \"className\", \"color\", \"defaultValue\", \"disabled\", \"error\", \"FormHelperTextProps\", \"fullWidth\", \"helperText\", \"hiddenLabel\", \"id\", \"InputLabelProps\", \"inputProps\", \"InputProps\", \"inputRef\", \"label\", \"multiline\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"placeholder\", \"required\", \"rows\", \"rowsMax\", \"select\", \"SelectProps\", \"type\", \"value\", \"variant\"]);\n\n if (true) {\n if (select && !children) {\n console.error('Material-UI: `children` must be passed when using the `TextField` component with `select`.');\n }\n }\n\n var InputMore = {};\n\n if (variant === 'outlined') {\n if (InputLabelProps && typeof InputLabelProps.shrink !== 'undefined') {\n InputMore.notched = InputLabelProps.shrink;\n }\n\n if (label) {\n var _InputLabelProps$requ;\n\n var displayRequired = (_InputLabelProps$requ = InputLabelProps === null || InputLabelProps === void 0 ? void 0 : InputLabelProps.required) !== null && _InputLabelProps$requ !== void 0 ? _InputLabelProps$requ : required;\n InputMore.label = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, label, displayRequired && \"\\xA0*\");\n }\n }\n\n if (select) {\n // unset defaults from textbox inputs\n if (!SelectProps || !SelectProps.native) {\n InputMore.id = undefined;\n }\n\n InputMore['aria-describedby'] = undefined;\n }\n\n var helperTextId = helperText && id ? \"\".concat(id, \"-helper-text\") : undefined;\n var inputLabelId = label && id ? \"\".concat(id, \"-label\") : undefined;\n var InputComponent = variantComponent[variant];\n var InputElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](InputComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-describedby\": helperTextId,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n fullWidth: fullWidth,\n multiline: multiline,\n name: name,\n rows: rows,\n rowsMax: rowsMax,\n type: type,\n value: value,\n id: id,\n inputRef: inputRef,\n onBlur: onBlur,\n onChange: onChange,\n onFocus: onFocus,\n placeholder: placeholder,\n inputProps: inputProps\n }, InputMore, InputProps));\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FormControl__WEBPACK_IMPORTED_MODULE_10__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className),\n disabled: disabled,\n error: error,\n fullWidth: fullWidth,\n hiddenLabel: hiddenLabel,\n ref: ref,\n required: required,\n color: color,\n variant: variant\n }, other), label && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_InputLabel__WEBPACK_IMPORTED_MODULE_9__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n htmlFor: id,\n id: inputLabelId\n }, InputLabelProps), label), select ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_Select__WEBPACK_IMPORTED_MODULE_12__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-describedby\": helperTextId,\n id: id,\n labelId: inputLabelId,\n value: value,\n input: InputElement\n }, SelectProps), children) : InputElement, helperText && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_FormHelperText__WEBPACK_IMPORTED_MODULE_11__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: helperTextId\n }, FormHelperTextProps), helperText));\n});\n true ? TextField.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['primary', 'secondary']),\n\n /**\n * The default value of the `input` element.\n */\n defaultValue: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * If `true`, the `input` element will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the label will be displayed in an error state.\n */\n error: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Props applied to the [`FormHelperText`](/api/form-helper-text/) element.\n */\n FormHelperTextProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, the input will take up the full width of its container.\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The helper text content.\n */\n helperText: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n hiddenLabel: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Props applied to the [`InputLabel`](/api/input-label/) element.\n */\n InputLabelProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](/api/filled-input/),\n * [`OutlinedInput`](/api/outlined-input/) or [`Input`](/api/input/)\n * component depending on the `variant` prop value.\n */\n InputProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"refType\"],\n\n /**\n * The label content.\n */\n label: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n */\n margin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['dense', 'none', 'normal']),\n\n /**\n * If `true`, a textarea element will be rendered instead of an input.\n */\n multiline: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Name attribute of the `input` element.\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * The short hint displayed in the input before the user enters a value.\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the label is displayed as required and the `input` element` will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Render a [`Select`](/api/select/) element while passing the Input element to `Select` as `input` parameter.\n * If this option is set you must pass the options of the select as children.\n */\n select: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Props applied to the [`Select`](/api/select/) element.\n */\n SelectProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The size of the text field.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['medium', 'small']),\n\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.any,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['filled', 'outlined', 'standard'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(styles, {\n name: 'MuiTextField'\n})(TextField));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TextField/TextField.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TextField/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TextField/index.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TextField__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextField */ \"./node_modules/@material-ui/core/esm/TextField/TextField.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TextField__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TextField/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _utils_debounce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\nfunction getStyleValue(computedStyle, property) {\n return parseInt(computedStyle[property], 10) || 0;\n}\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"];\nvar styles = {\n /* Styles applied to the shadow textarea element. */\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nvar TextareaAutosize = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TextareaAutosize(props, ref) {\n var onChange = props.onChange,\n rows = props.rows,\n rowsMax = props.rowsMax,\n _props$rowsMin = props.rowsMin,\n rowsMinProp = _props$rowsMin === void 0 ? 1 : _props$rowsMin,\n style = props.style,\n value = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"onChange\", \"rows\", \"rowsMax\", \"rowsMin\", \"style\", \"value\"]);\n\n var rowsMin = rows || rowsMinProp;\n\n var _React$useRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](value != null),\n isControlled = _React$useRef.current;\n\n var inputRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ref, inputRef);\n var shadowRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n var renders = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](0);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"]({}),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var syncHeight = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](function () {\n var input = inputRef.current;\n var computedStyle = window.getComputedStyle(input);\n var inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || 'x';\n\n if (inputShallow.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += ' ';\n }\n\n var boxSizing = computedStyle['box-sizing'];\n var padding = getStyleValue(computedStyle, 'padding-bottom') + getStyleValue(computedStyle, 'padding-top');\n var border = getStyleValue(computedStyle, 'border-bottom-width') + getStyleValue(computedStyle, 'border-top-width'); // The height of the inner content\n\n var innerHeight = inputShallow.scrollHeight - padding; // Measure height of a textarea with a single row\n\n inputShallow.value = 'x';\n var singleRowHeight = inputShallow.scrollHeight - padding; // The height of the outer content\n\n var outerHeight = innerHeight;\n\n if (rowsMin) {\n outerHeight = Math.max(Number(rowsMin) * singleRowHeight, outerHeight);\n }\n\n if (rowsMax) {\n outerHeight = Math.min(Number(rowsMax) * singleRowHeight, outerHeight);\n }\n\n outerHeight = Math.max(outerHeight, singleRowHeight); // Take the box sizing into account for applying this value as a style.\n\n var outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n var overflow = Math.abs(outerHeight - innerHeight) <= 1;\n setState(function (prevState) {\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (renders.current < 20 && (outerHeightStyle > 0 && Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1 || prevState.overflow !== overflow)) {\n renders.current += 1;\n return {\n overflow: overflow,\n outerHeightStyle: outerHeightStyle\n };\n }\n\n if (true) {\n if (renders.current === 20) {\n console.error(['Material-UI: Too many re-renders. The layout is unstable.', 'TextareaAutosize limits the number of renders to prevent an infinite loop.'].join('\\n'));\n }\n }\n\n return prevState;\n });\n }, [rowsMax, rowsMin, props.placeholder]);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n var handleResize = Object(_utils_debounce__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function () {\n renders.current = 0;\n syncHeight();\n });\n window.addEventListener('resize', handleResize);\n return function () {\n handleResize.clear();\n window.removeEventListener('resize', handleResize);\n };\n }, [syncHeight]);\n useEnhancedEffect(function () {\n syncHeight();\n });\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n renders.current = 0;\n }, [value]);\n\n var handleChange = function handleChange(event) {\n renders.current = 0;\n\n if (!isControlled) {\n syncHeight();\n }\n\n if (onChange) {\n onChange(event);\n }\n };\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"textarea\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n value: value,\n onChange: handleChange,\n ref: handleRef // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: rowsMin,\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n height: state.outerHeightStyle,\n // Need a large enough difference to allow scrolling.\n // This prevents infinite rendering loop.\n overflow: state.overflow ? 'hidden' : null\n }, style)\n }, other)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: shadowRef,\n tabIndex: -1,\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, styles.shadow, style)\n }));\n});\n true ? TextareaAutosize.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n */\n placeholder: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Use `rowsMin` instead. The prop will be removed in v5.\n *\n * @deprecated\n */\n rows: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Maximum number of rows to display.\n */\n rowsMax: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Minimum number of rows to display.\n */\n rowsMin: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextareaAutosize);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/TextareaAutosize/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/TextareaAutosize/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextareaAutosize */ \"./node_modules/@material-ui/core/esm/TextareaAutosize/TextareaAutosize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _TextareaAutosize__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/TextareaAutosize/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Toolbar/Toolbar.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Toolbar/Toolbar.js ***! \***************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n position: 'relative',\n display: 'flex',\n alignItems: 'center'\n },\n\n /* Styles applied to the root element if `disableGutters={false}`. */\n gutters: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2)\n }, theme.breakpoints.up('sm'), {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }),\n\n /* Styles applied to the root element if `variant=\"regular\"`. */\n regular: theme.mixins.toolbar,\n\n /* Styles applied to the root element if `variant=\"dense\"`. */\n dense: {\n minHeight: 48\n }\n };\n};\nvar Toolbar = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Toolbar(props, ref) {\n var classes = props.classes,\n className = props.className,\n _props$component = props.component,\n Component = _props$component === void 0 ? 'div' : _props$component,\n _props$disableGutters = props.disableGutters,\n disableGutters = _props$disableGutters === void 0 ? false : _props$disableGutters,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'regular' : _props$variant,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"className\", \"component\", \"disableGutters\", \"variant\"]);\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, classes[variant], className, !disableGutters && classes.gutters),\n ref: ref\n }, other));\n});\n true ? Toolbar.propTypes = {\n /**\n * Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * If `true`, disables gutter padding.\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The variant to use.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOf(['regular', 'dense'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(styles, {\n name: 'MuiToolbar'\n})(Toolbar));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Toolbar/Toolbar.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Toolbar/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Toolbar/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Toolbar */ \"./node_modules/@material-ui/core/esm/Toolbar/Toolbar.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Toolbar__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Toolbar/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tooltip/Tooltip.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tooltip/Tooltip.js ***! \***************************************************************/ /*! exports provided: styles, testReset, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"testReset\", function() { return testReset; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ \"./node_modules/@material-ui/core/esm/Grow/index.js\");\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Popper */ \"./node_modules/@material-ui/core/esm/Popper/index.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/unstable_useId */ \"./node_modules/@material-ui/core/esm/utils/unstable_useId.js\");\n/* harmony import */ var _utils_setRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nfunction arrowGenerator() {\n return {\n '&[x-placement*=\"bottom\"] $arrow': {\n top: 0,\n left: 0,\n marginTop: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n '&[x-placement*=\"top\"] $arrow': {\n bottom: 0,\n left: 0,\n marginBottom: '-0.71em',\n marginLeft: 4,\n marginRight: 4,\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n '&[x-placement*=\"right\"] $arrow': {\n left: 0,\n marginLeft: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n '&[x-placement*=\"left\"] $arrow': {\n right: 0,\n marginRight: '-0.71em',\n height: '1em',\n width: '0.71em',\n marginTop: 4,\n marginBottom: 4,\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n };\n}\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the Popper component. */\n popper: {\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none' // disable jss-rtl plugin\n\n },\n\n /* Styles applied to the Popper component if `interactive={true}`. */\n popperInteractive: {\n pointerEvents: 'auto'\n },\n\n /* Styles applied to the Popper component if `arrow={true}`. */\n popperArrow: arrowGenerator(),\n\n /* Styles applied to the tooltip (label wrapper) element. */\n tooltip: {\n backgroundColor: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__[\"fade\"])(theme.palette.grey[700], 0.9),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(10),\n lineHeight: \"\".concat(round(14 / 10), \"em\"),\n maxWidth: 300,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `arrow={true}`. */\n tooltipArrow: {\n position: 'relative',\n margin: '0'\n },\n\n /* Styles applied to the arrow element. */\n arrow: {\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: Object(_styles_colorManipulator__WEBPACK_IMPORTED_MODULE_9__[\"fade\"])(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n },\n\n /* Styles applied to the tooltip (label wrapper) element if the tooltip is opened by touch. */\n touch: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: \"\".concat(round(16 / 14), \"em\"),\n fontWeight: theme.typography.fontWeightRegular\n },\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"left\". */\n tooltipPlacementLeft: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n transformOrigin: 'right center',\n margin: '0 24px '\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"right\". */\n tooltipPlacementRight: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n transformOrigin: 'left center',\n margin: '0 24px'\n }, theme.breakpoints.up('sm'), {\n margin: '0 14px'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"top\". */\n tooltipPlacementTop: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n transformOrigin: 'center bottom',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n }),\n\n /* Styles applied to the tooltip (label wrapper) element if `placement` contains \"bottom\". */\n tooltipPlacementBottom: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n transformOrigin: 'center top',\n margin: '24px 0'\n }, theme.breakpoints.up('sm'), {\n margin: '14px 0'\n })\n };\n};\nvar hystersisOpen = false;\nvar hystersisTimer = null;\nfunction testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\nvar Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"forwardRef\"](function Tooltip(props, ref) {\n var _props$arrow = props.arrow,\n arrow = _props$arrow === void 0 ? false : _props$arrow,\n children = props.children,\n classes = props.classes,\n _props$disableFocusLi = props.disableFocusListener,\n disableFocusListener = _props$disableFocusLi === void 0 ? false : _props$disableFocusLi,\n _props$disableHoverLi = props.disableHoverListener,\n disableHoverListener = _props$disableHoverLi === void 0 ? false : _props$disableHoverLi,\n _props$disableTouchLi = props.disableTouchListener,\n disableTouchListener = _props$disableTouchLi === void 0 ? false : _props$disableTouchLi,\n _props$enterDelay = props.enterDelay,\n enterDelay = _props$enterDelay === void 0 ? 100 : _props$enterDelay,\n _props$enterNextDelay = props.enterNextDelay,\n enterNextDelay = _props$enterNextDelay === void 0 ? 0 : _props$enterNextDelay,\n _props$enterTouchDela = props.enterTouchDelay,\n enterTouchDelay = _props$enterTouchDela === void 0 ? 700 : _props$enterTouchDela,\n idProp = props.id,\n _props$interactive = props.interactive,\n interactive = _props$interactive === void 0 ? false : _props$interactive,\n _props$leaveDelay = props.leaveDelay,\n leaveDelay = _props$leaveDelay === void 0 ? 0 : _props$leaveDelay,\n _props$leaveTouchDela = props.leaveTouchDelay,\n leaveTouchDelay = _props$leaveTouchDela === void 0 ? 1500 : _props$leaveTouchDela,\n onClose = props.onClose,\n onOpen = props.onOpen,\n openProp = props.open,\n _props$placement = props.placement,\n placement = _props$placement === void 0 ? 'bottom' : _props$placement,\n _props$PopperComponen = props.PopperComponent,\n PopperComponent = _props$PopperComponen === void 0 ? _Popper__WEBPACK_IMPORTED_MODULE_13__[\"default\"] : _props$PopperComponen,\n PopperProps = props.PopperProps,\n title = props.title,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? _Grow__WEBPACK_IMPORTED_MODULE_12__[\"default\"] : _props$TransitionComp,\n TransitionProps = props.TransitionProps,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"arrow\", \"children\", \"classes\", \"disableFocusListener\", \"disableHoverListener\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"id\", \"interactive\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_19__[\"default\"])();\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](),\n childNode = _React$useState[0],\n setChildNode = _React$useState[1];\n\n var _React$useState2 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](null),\n arrowRef = _React$useState2[0],\n setArrowRef = _React$useState2[1];\n\n var ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](false);\n var closeTimer = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n var enterTimer = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n var leaveTimer = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n var touchTimer = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"]();\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__[\"default\"])({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useControlled, 2),\n openState = _useControlled2[0],\n setOpenState = _useControlled2[1];\n\n var open = openState;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var _React$useRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useRef\"](openProp !== undefined),\n isControlled = _React$useRef.current; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n var id = Object(_utils_unstable_useId__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(idProp);\n react__WEBPACK_IMPORTED_MODULE_4__[\"useEffect\"](function () {\n return function () {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n clearTimeout(touchTimer.current);\n };\n }, []);\n\n var handleOpen = function handleOpen(event) {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen) {\n onOpen(event);\n }\n };\n\n var handleEnter = function handleEnter() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'mouseover' && childrenProps.onMouseOver && forward) {\n childrenProps.onMouseOver(event);\n }\n\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n event.persist();\n enterTimer.current = setTimeout(function () {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n };\n\n var _useIsFocusVisible = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__[\"default\"])(),\n isFocusVisible = _useIsFocusVisible.isFocusVisible,\n onBlurVisible = _useIsFocusVisible.onBlurVisible,\n focusVisibleRef = _useIsFocusVisible.ref;\n\n var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4__[\"useState\"](false),\n childIsFocusVisible = _React$useState3[0],\n setChildIsFocusVisible = _React$useState3[1];\n\n var handleBlur = function handleBlur() {\n if (childIsFocusVisible) {\n setChildIsFocusVisible(false);\n onBlurVisible();\n }\n };\n\n var handleFocus = function handleFocus() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n if (isFocusVisible(event)) {\n setChildIsFocusVisible(true);\n handleEnter()(event);\n }\n\n var childrenProps = children.props;\n\n if (childrenProps.onFocus && forward) {\n childrenProps.onFocus(event);\n }\n };\n };\n\n var handleClose = function handleClose(event) {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(function () {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(function () {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n };\n\n var handleLeave = function handleLeave() {\n var forward = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n return function (event) {\n var childrenProps = children.props;\n\n if (event.type === 'blur') {\n if (childrenProps.onBlur && forward) {\n childrenProps.onBlur(event);\n }\n\n handleBlur();\n }\n\n if (event.type === 'mouseleave' && childrenProps.onMouseLeave && event.currentTarget === childNode) {\n childrenProps.onMouseLeave(event);\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveDelay);\n };\n };\n\n var detectTouchStart = function detectTouchStart(event) {\n ignoreNonTouchEvents.current = true;\n var childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n var handleTouchStart = function handleTouchStart(event) {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n clearTimeout(touchTimer.current);\n event.persist();\n touchTimer.current = setTimeout(function () {\n handleEnter()(event);\n }, enterTouchDelay);\n };\n\n var handleTouchEnd = function handleTouchEnd(event) {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n event.persist();\n leaveTimer.current = setTimeout(function () {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n var handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(setChildNode, ref);\n var handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(focusVisibleRef, handleUseRef); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_4__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n Object(_utils_setRef__WEBPACK_IMPORTED_MODULE_16__[\"default\"])(handleFocusRef, react_dom__WEBPACK_IMPORTED_MODULE_5__[\"findDOMNode\"](instance));\n }, [handleFocusRef]);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(children.ref, handleOwnRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n } // For accessibility and SEO concerns, we render the title to the DOM node when\n // the tooltip is hidden. However, we have made a tradeoff when\n // `disableHoverListener` is set. This title logic is disabled.\n // It's allowing us to keep the implementation size minimal.\n // We are open to change the tradeoff.\n\n\n var shouldShowNativeTitle = !open && !disableHoverListener;\n\n var childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n 'aria-describedby': open ? id : null,\n title: shouldShowNativeTitle && typeof title === 'string' ? title : null\n }, other, children.props, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n });\n\n var interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = handleEnter();\n childrenProps.onMouseLeave = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onMouseOver = handleEnter(false);\n interactiveWrapperListeners.onMouseLeave = handleLeave(false);\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = handleFocus();\n childrenProps.onBlur = handleLeave();\n\n if (interactive) {\n interactiveWrapperListeners.onFocus = handleFocus(false);\n interactiveWrapperListeners.onBlur = handleLeave(false);\n }\n }\n\n if (true) {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', \"Remove this title prop `\".concat(children.props.title, \"` or the Tooltip component.\")].join('\\n'));\n }\n }\n\n var mergedPopperProps = react__WEBPACK_IMPORTED_MODULE_4__[\"useMemo\"](function () {\n return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"deepmerge\"])({\n popperOptions: {\n modifiers: {\n arrow: {\n enabled: Boolean(arrowRef),\n element: arrowRef\n }\n }\n }\n }, PopperProps);\n }, [arrowRef, PopperProps]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_4__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"cloneElement\"](children, childrenProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](PopperComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.popper, interactive && classes.popperInteractive, arrow && classes.popperArrow),\n placement: placement,\n anchorEl: childNode,\n open: childNode ? open : false,\n id: childrenProps['aria-describedby'],\n transition: true\n }, interactiveWrapperListeners, mergedPopperProps), function (_ref) {\n var placementInner = _ref.placement,\n TransitionPropsInner = _ref.TransitionProps;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"div\", {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(classes.tooltip, classes[\"tooltipPlacement\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(placementInner.split('-')[0]))], ignoreNonTouchEvents.current && classes.touch, arrow && classes.tooltipArrow)\n }, title, arrow ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__[\"createElement\"](\"span\", {\n className: classes.arrow,\n ref: setArrowRef\n }) : null));\n }));\n});\n true ? Tooltip.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n */\n arrow: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Tooltip reference element.\n */\n children: _material_ui_utils__WEBPACK_IMPORTED_MODULE_8__[\"elementAcceptingRef\"].isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string,\n\n /**\n * Do not respond to focus events.\n */\n disableFocusListener: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Do not respond to hover events.\n */\n disableHoverListener: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Do not respond to long press touch events.\n */\n disableTouchListener: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n */\n enterDelay: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n */\n enterNextDelay: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n */\n enterTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.string,\n\n /**\n * Makes a tooltip interactive, i.e. will not close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n */\n interactive: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n */\n leaveDelay: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n */\n leaveTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.func,\n\n /**\n * If `true`, the tooltip is shown.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.bool,\n\n /**\n * Tooltip placement.\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n */\n PopperComponent: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n */\n PopperProps: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.elementType,\n\n /**\n * Props applied to the [`Transition`](http://reactcommunity.org/react-transition-group/transition#Transition-props) element.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_6___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(styles, {\n name: 'MuiTooltip',\n flip: false\n})(Tooltip));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tooltip/Tooltip.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Tooltip/index.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Tooltip/index.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Tooltip */ \"./node_modules/@material-ui/core/esm/Tooltip/Tooltip.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Tooltip__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Tooltip/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Typography/Typography.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Typography/Typography.js ***! \*********************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n\n\n\n\n\n\n\nvar styles = function styles(theme) {\n return {\n /* Styles applied to the root element. */\n root: {\n margin: 0\n },\n\n /* Styles applied to the root element if `variant=\"body2\"`. */\n body2: theme.typography.body2,\n\n /* Styles applied to the root element if `variant=\"body1\"`. */\n body1: theme.typography.body1,\n\n /* Styles applied to the root element if `variant=\"caption\"`. */\n caption: theme.typography.caption,\n\n /* Styles applied to the root element if `variant=\"button\"`. */\n button: theme.typography.button,\n\n /* Styles applied to the root element if `variant=\"h1\"`. */\n h1: theme.typography.h1,\n\n /* Styles applied to the root element if `variant=\"h2\"`. */\n h2: theme.typography.h2,\n\n /* Styles applied to the root element if `variant=\"h3\"`. */\n h3: theme.typography.h3,\n\n /* Styles applied to the root element if `variant=\"h4\"`. */\n h4: theme.typography.h4,\n\n /* Styles applied to the root element if `variant=\"h5\"`. */\n h5: theme.typography.h5,\n\n /* Styles applied to the root element if `variant=\"h6\"`. */\n h6: theme.typography.h6,\n\n /* Styles applied to the root element if `variant=\"subtitle1\"`. */\n subtitle1: theme.typography.subtitle1,\n\n /* Styles applied to the root element if `variant=\"subtitle2\"`. */\n subtitle2: theme.typography.subtitle2,\n\n /* Styles applied to the root element if `variant=\"overline\"`. */\n overline: theme.typography.overline,\n\n /* Styles applied to the root element if `variant=\"srOnly\"`. Only accessible to screen readers. */\n srOnly: {\n position: 'absolute',\n height: 1,\n width: 1,\n overflow: 'hidden'\n },\n\n /* Styles applied to the root element if `align=\"left\"`. */\n alignLeft: {\n textAlign: 'left'\n },\n\n /* Styles applied to the root element if `align=\"center\"`. */\n alignCenter: {\n textAlign: 'center'\n },\n\n /* Styles applied to the root element if `align=\"right\"`. */\n alignRight: {\n textAlign: 'right'\n },\n\n /* Styles applied to the root element if `align=\"justify\"`. */\n alignJustify: {\n textAlign: 'justify'\n },\n\n /* Styles applied to the root element if `nowrap={true}`. */\n noWrap: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n },\n\n /* Styles applied to the root element if `gutterBottom={true}`. */\n gutterBottom: {\n marginBottom: '0.35em'\n },\n\n /* Styles applied to the root element if `paragraph={true}`. */\n paragraph: {\n marginBottom: 16\n },\n\n /* Styles applied to the root element if `color=\"inherit\"`. */\n colorInherit: {\n color: 'inherit'\n },\n\n /* Styles applied to the root element if `color=\"primary\"`. */\n colorPrimary: {\n color: theme.palette.primary.main\n },\n\n /* Styles applied to the root element if `color=\"secondary\"`. */\n colorSecondary: {\n color: theme.palette.secondary.main\n },\n\n /* Styles applied to the root element if `color=\"textPrimary\"`. */\n colorTextPrimary: {\n color: theme.palette.text.primary\n },\n\n /* Styles applied to the root element if `color=\"textSecondary\"`. */\n colorTextSecondary: {\n color: theme.palette.text.secondary\n },\n\n /* Styles applied to the root element if `color=\"error\"`. */\n colorError: {\n color: theme.palette.error.main\n },\n\n /* Styles applied to the root element if `display=\"inline\"`. */\n displayInline: {\n display: 'inline'\n },\n\n /* Styles applied to the root element if `display=\"block\"`. */\n displayBlock: {\n display: 'block'\n }\n };\n};\nvar defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p'\n};\nvar Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Typography(props, ref) {\n var _props$align = props.align,\n align = _props$align === void 0 ? 'inherit' : _props$align,\n classes = props.classes,\n className = props.className,\n _props$color = props.color,\n color = _props$color === void 0 ? 'initial' : _props$color,\n component = props.component,\n _props$display = props.display,\n display = _props$display === void 0 ? 'initial' : _props$display,\n _props$gutterBottom = props.gutterBottom,\n gutterBottom = _props$gutterBottom === void 0 ? false : _props$gutterBottom,\n _props$noWrap = props.noWrap,\n noWrap = _props$noWrap === void 0 ? false : _props$noWrap,\n _props$paragraph = props.paragraph,\n paragraph = _props$paragraph === void 0 ? false : _props$paragraph,\n _props$variant = props.variant,\n variant = _props$variant === void 0 ? 'body1' : _props$variant,\n _props$variantMapping = props.variantMapping,\n variantMapping = _props$variantMapping === void 0 ? defaultVariantMapping : _props$variantMapping,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"align\", \"classes\", \"className\", \"color\", \"component\", \"display\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"]);\n\n var Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(classes.root, className, variant !== 'inherit' && classes[variant], color !== 'initial' && classes[\"color\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(color))], noWrap && classes.noWrap, gutterBottom && classes.gutterBottom, paragraph && classes.paragraph, align !== 'inherit' && classes[\"align\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(align))], display !== 'initial' && classes[\"display\".concat(Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(display))]),\n ref: ref\n }, other));\n});\n true ? Typography.propTypes = {\n /**\n * Set the text-align on the component.\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'left', 'center', 'right', 'justify']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['initial', 'inherit', 'primary', 'secondary', 'textPrimary', 'textSecondary', 'error']),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n * Overrides the behavior of the `variantMapping` prop.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .elementType,\n\n /**\n * Controls the display type\n */\n display: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['initial', 'block', 'inline']),\n\n /**\n * If `true`, the text will have a bottom margin.\n */\n gutterBottom: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n */\n noWrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the text will have a bottom margin.\n */\n paragraph: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Applies the theme typography styles.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline', 'srOnly', 'inherit']),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to ``.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n */\n variantMapping: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(styles, {\n name: 'MuiTypography'\n})(Typography));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Typography/Typography.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Typography/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Typography/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Typography */ \"./node_modules/@material-ui/core/esm/Typography/Typography.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Typography__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Typography/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js": /*!*************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js ***! \*************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex, camelcase */\n\n\n\n\n\n\n/**\n * Utility component that locks focus inside the component.\n */\n\nfunction Unstable_TrapFocus(props) {\n var children = props.children,\n _props$disableAutoFoc = props.disableAutoFocus,\n disableAutoFocus = _props$disableAutoFoc === void 0 ? false : _props$disableAutoFoc,\n _props$disableEnforce = props.disableEnforceFocus,\n disableEnforceFocus = _props$disableEnforce === void 0 ? false : _props$disableEnforce,\n _props$disableRestore = props.disableRestoreFocus,\n disableRestoreFocus = _props$disableRestore === void 0 ? false : _props$disableRestore,\n getDoc = props.getDoc,\n isEnabled = props.isEnabled,\n open = props.open;\n var ignoreNextEnforceFocus = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var sentinelStart = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var sentinelEnd = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null);\n var nodeToRestore = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n var rootRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](null); // can be removed once we drop support for non ref forwarding class components\n\n var handleOwnRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n // #StrictMode ready\n rootRef.current = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n }, []);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(children.ref, handleOwnRef);\n var prevOpenRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"]();\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n prevOpenRef.current = open;\n }, [open]);\n\n if (!prevOpenRef.current && open && typeof window !== 'undefined') {\n // WARNING: Potentially unsafe in concurrent mode.\n // The way the read on `nodeToRestore` is setup could make this actually safe.\n // Say we render `open={false}` -> `open={true}` but never commit.\n // We have now written a state that wasn't committed. But no committed effect\n // will read this wrong value. We only read from `nodeToRestore` in effects\n // that were committed on `open={true}`\n // WARNING: Prevents the instance from being garbage collected. Should only\n // hold a weak ref.\n nodeToRestore.current = getDoc().activeElement;\n }\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (!open) {\n return;\n }\n\n var doc = Object(_utils_ownerDocument__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(rootRef.current); // We might render an empty child.\n\n if (!disableAutoFocus && rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (true) {\n console.error(['Material-UI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n\n rootRef.current.setAttribute('tabIndex', -1);\n }\n\n rootRef.current.focus();\n }\n\n var contain = function contain() {\n if (!doc.hasFocus() || disableEnforceFocus || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n if (rootRef.current && !rootRef.current.contains(doc.activeElement)) {\n rootRef.current.focus();\n }\n };\n\n var loopFocus = function loopFocus(event) {\n // 9 = Tab\n if (disableEnforceFocus || !isEnabled() || event.keyCode !== 9) {\n return;\n } // Make sure the next tab starts from the right place.\n\n\n if (doc.activeElement === rootRef.current) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n\n if (event.shiftKey) {\n sentinelEnd.current.focus();\n } else {\n sentinelStart.current.focus();\n }\n }\n };\n\n doc.addEventListener('focus', contain, true);\n doc.addEventListener('keydown', loopFocus, true); // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area\n // e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n\n var interval = setInterval(function () {\n contain();\n }, 50);\n return function () {\n clearInterval(interval);\n doc.removeEventListener('focus', contain, true);\n doc.removeEventListener('keydown', loopFocus, true); // restoreLastFocus()\n\n if (!disableRestoreFocus) {\n // In IE 11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE 11 have a focus method.\n // Once IE 11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n nodeToRestore.current.focus();\n }\n\n nodeToRestore.current = null;\n }\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelStart,\n \"data-test\": \"sentinelStart\"\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"cloneElement\"](children, {\n ref: handleRef\n }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n tabIndex: 0,\n ref: sentinelEnd,\n \"data-test\": \"sentinelEnd\"\n }));\n}\n\n true ? Unstable_TrapFocus.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node,\n\n /**\n * If `true`, the trap focus will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any trap focus children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n */\n disableAutoFocus: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * If `true`, the trap focus will not prevent focus from leaving the trap focus while open.\n *\n * Generally this should never be set to `true` as it makes the trap focus less\n * accessible to assistive technologies, like screen readers.\n */\n disableEnforceFocus: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * If `true`, the trap focus will not restore focus to previously focused element once\n * trap focus is hidden.\n */\n disableRestoreFocus: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool,\n\n /**\n * Return the document to consider.\n * We use it to implement the restore focus between different browser documents.\n */\n getDoc: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n\n /**\n * Do we still want to enforce the focus?\n * This prop helps nesting TrapFocus elements.\n */\n isEnabled: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func.isRequired,\n\n /**\n * If `true`, focus will be locked.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.bool.isRequired\n} : undefined;\n\nif (true) {\n // eslint-disable-next-line\n Unstable_TrapFocus['propTypes' + ''] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"exactProp\"])(Unstable_TrapFocus.propTypes);\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Unstable_TrapFocus);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Unstable_TrapFocus/index.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Unstable_TrapFocus/index.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Unstable_TrapFocus */ \"./node_modules/@material-ui/core/esm/Unstable_TrapFocus/Unstable_TrapFocus.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Unstable_TrapFocus/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Zoom/Zoom.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Zoom/Zoom.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var react_transition_group__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-transition-group */ \"./node_modules/react-transition-group/esm/index.js\");\n/* harmony import */ var _styles_transitions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _transitions_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../transitions/utils */ \"./node_modules/@material-ui/core/esm/transitions/utils.js\");\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n entering: {\n transform: 'none'\n },\n entered: {\n transform: 'none'\n }\n};\nvar defaultTimeout = {\n enter: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__[\"duration\"].enteringScreen,\n exit: _styles_transitions__WEBPACK_IMPORTED_MODULE_6__[\"duration\"].leavingScreen\n};\n/**\n * The Zoom transition can be used for the floating variant of the\n * [Button](/components/buttons/#floating-action-buttons) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\n\nvar Zoom = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function Zoom(props, ref) {\n var children = props.children,\n _props$disableStrictM = props.disableStrictModeCompat,\n disableStrictModeCompat = _props$disableStrictM === void 0 ? false : _props$disableStrictM,\n inProp = props.in,\n onEnter = props.onEnter,\n onEntered = props.onEntered,\n onEntering = props.onEntering,\n onExit = props.onExit,\n onExited = props.onExited,\n onExiting = props.onExiting,\n style = props.style,\n _props$timeout = props.timeout,\n timeout = _props$timeout === void 0 ? defaultTimeout : _props$timeout,\n _props$TransitionComp = props.TransitionComponent,\n TransitionComponent = _props$TransitionComp === void 0 ? react_transition_group__WEBPACK_IMPORTED_MODULE_5__[\"Transition\"] : _props$TransitionComp,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"children\", \"disableStrictModeCompat\", \"in\", \"onEnter\", \"onEntered\", \"onEntering\", \"onExit\", \"onExited\", \"onExiting\", \"style\", \"timeout\", \"TransitionComponent\"]);\n\n var theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var enableStrictModeCompat = theme.unstable_strictMode && !disableStrictModeCompat;\n var nodeRef = react__WEBPACK_IMPORTED_MODULE_3__[\"useRef\"](null);\n var foreignRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(children.ref, ref);\n var handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(enableStrictModeCompat ? nodeRef : undefined, foreignRef);\n\n var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {\n return function (nodeOrAppearing, maybeAppearing) {\n if (callback) {\n var _ref = enableStrictModeCompat ? [nodeRef.current, nodeOrAppearing] : [nodeOrAppearing, maybeAppearing],\n _ref2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, 2),\n node = _ref2[0],\n isAppearing = _ref2[1]; // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n\n\n if (isAppearing === undefined) {\n callback(node);\n } else {\n callback(node, isAppearing);\n }\n }\n };\n };\n\n var handleEntering = normalizedTransitionCallback(onEntering);\n var handleEnter = normalizedTransitionCallback(function (node, isAppearing) {\n Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"reflow\"])(node); // So the animation always start from the start.\n\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('transform', transitionProps);\n node.style.transition = theme.transitions.create('transform', transitionProps);\n\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n var handleEntered = normalizedTransitionCallback(onEntered);\n var handleExiting = normalizedTransitionCallback(onExiting);\n var handleExit = normalizedTransitionCallback(function (node) {\n var transitionProps = Object(_transitions_utils__WEBPACK_IMPORTED_MODULE_8__[\"getTransitionProps\"])({\n style: style,\n timeout: timeout\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('transform', transitionProps);\n node.style.transition = theme.transitions.create('transform', transitionProps);\n\n if (onExit) {\n onExit(node);\n }\n });\n var handleExited = normalizedTransitionCallback(onExited);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n appear: true,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n timeout: timeout\n }, other), function (state, childProps) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"cloneElement\"](children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n transform: 'scale(0)',\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined\n }, styles[state], style, children.props.style),\n ref: handleRef\n }, childProps));\n });\n});\n true ? Zoom.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * A single child content element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.element,\n\n /**\n * Enable this prop if you encounter 'Function components cannot be given refs',\n * use `unstable_createStrictModeTheme`,\n * and can't forward the ref in the child component.\n */\n disableStrictModeCompat: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the component will transition in.\n */\n in: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n onEnter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntered: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onEntering: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExited: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onExiting: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n style: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n timeout: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.shape({\n appear: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n enter: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number,\n exit: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number\n })])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Zoom);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Zoom/Zoom.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/Zoom/index.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/Zoom/index.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Zoom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Zoom */ \"./node_modules/@material-ui/core/esm/Zoom/Zoom.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _Zoom__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/Zoom/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/amber.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/amber.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar amber = {\n 50: '#fff8e1',\n 100: '#ffecb3',\n 200: '#ffe082',\n 300: '#ffd54f',\n 400: '#ffca28',\n 500: '#ffc107',\n 600: '#ffb300',\n 700: '#ffa000',\n 800: '#ff8f00',\n 900: '#ff6f00',\n A100: '#ffe57f',\n A200: '#ffd740',\n A400: '#ffc400',\n A700: '#ffab00'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (amber);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/amber.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/blue.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/blue.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (blue);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/blue.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/blueGrey.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/blueGrey.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar blueGrey = {\n 50: '#eceff1',\n 100: '#cfd8dc',\n 200: '#b0bec5',\n 300: '#90a4ae',\n 400: '#78909c',\n 500: '#607d8b',\n 600: '#546e7a',\n 700: '#455a64',\n 800: '#37474f',\n 900: '#263238',\n A100: '#cfd8dc',\n A200: '#b0bec5',\n A400: '#78909c',\n A700: '#455a64'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (blueGrey);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/blueGrey.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/brown.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/brown.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar brown = {\n 50: '#efebe9',\n 100: '#d7ccc8',\n 200: '#bcaaa4',\n 300: '#a1887f',\n 400: '#8d6e63',\n 500: '#795548',\n 600: '#6d4c41',\n 700: '#5d4037',\n 800: '#4e342e',\n 900: '#3e2723',\n A100: '#d7ccc8',\n A200: '#bcaaa4',\n A400: '#8d6e63',\n A700: '#5d4037'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (brown);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/brown.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/common.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/common.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar common = {\n black: '#000',\n white: '#fff'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (common);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/common.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/cyan.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/cyan.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar cyan = {\n 50: '#e0f7fa',\n 100: '#b2ebf2',\n 200: '#80deea',\n 300: '#4dd0e1',\n 400: '#26c6da',\n 500: '#00bcd4',\n 600: '#00acc1',\n 700: '#0097a7',\n 800: '#00838f',\n 900: '#006064',\n A100: '#84ffff',\n A200: '#18ffff',\n A400: '#00e5ff',\n A700: '#00b8d4'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (cyan);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/cyan.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/deepOrange.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/deepOrange.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar deepOrange = {\n 50: '#fbe9e7',\n 100: '#ffccbc',\n 200: '#ffab91',\n 300: '#ff8a65',\n 400: '#ff7043',\n 500: '#ff5722',\n 600: '#f4511e',\n 700: '#e64a19',\n 800: '#d84315',\n 900: '#bf360c',\n A100: '#ff9e80',\n A200: '#ff6e40',\n A400: '#ff3d00',\n A700: '#dd2c00'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (deepOrange);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/deepOrange.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/deepPurple.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/deepPurple.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar deepPurple = {\n 50: '#ede7f6',\n 100: '#d1c4e9',\n 200: '#b39ddb',\n 300: '#9575cd',\n 400: '#7e57c2',\n 500: '#673ab7',\n 600: '#5e35b1',\n 700: '#512da8',\n 800: '#4527a0',\n 900: '#311b92',\n A100: '#b388ff',\n A200: '#7c4dff',\n A400: '#651fff',\n A700: '#6200ea'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (deepPurple);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/deepPurple.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/green.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/green.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (green);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/green.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/grey.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/grey.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#d5d5d5',\n A200: '#aaaaaa',\n A400: '#303030',\n A700: '#616161'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (grey);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/grey.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/index.js ***! \************************************************************/ /*! exports provided: common, red, pink, purple, deepPurple, indigo, blue, lightBlue, cyan, teal, green, lightGreen, lime, yellow, amber, orange, deepOrange, brown, grey, blueGrey */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common */ \"./node_modules/@material-ui/core/esm/colors/common.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"common\", function() { return _common__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _red__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./red */ \"./node_modules/@material-ui/core/esm/colors/red.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"red\", function() { return _red__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _pink__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pink */ \"./node_modules/@material-ui/core/esm/colors/pink.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"pink\", function() { return _pink__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _purple__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./purple */ \"./node_modules/@material-ui/core/esm/colors/purple.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"purple\", function() { return _purple__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _deepPurple__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./deepPurple */ \"./node_modules/@material-ui/core/esm/colors/deepPurple.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deepPurple\", function() { return _deepPurple__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./indigo */ \"./node_modules/@material-ui/core/esm/colors/indigo.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"indigo\", function() { return _indigo__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _blue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./blue */ \"./node_modules/@material-ui/core/esm/colors/blue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blue\", function() { return _blue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _lightBlue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./lightBlue */ \"./node_modules/@material-ui/core/esm/colors/lightBlue.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lightBlue\", function() { return _lightBlue__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _cyan__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cyan */ \"./node_modules/@material-ui/core/esm/colors/cyan.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"cyan\", function() { return _cyan__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _teal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./teal */ \"./node_modules/@material-ui/core/esm/colors/teal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"teal\", function() { return _teal__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./green */ \"./node_modules/@material-ui/core/esm/colors/green.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"green\", function() { return _green__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _lightGreen__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./lightGreen */ \"./node_modules/@material-ui/core/esm/colors/lightGreen.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lightGreen\", function() { return _lightGreen__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _lime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./lime */ \"./node_modules/@material-ui/core/esm/colors/lime.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lime\", function() { return _lime__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _yellow__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./yellow */ \"./node_modules/@material-ui/core/esm/colors/yellow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"yellow\", function() { return _yellow__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _amber__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./amber */ \"./node_modules/@material-ui/core/esm/colors/amber.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"amber\", function() { return _amber__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _orange__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./orange */ \"./node_modules/@material-ui/core/esm/colors/orange.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"orange\", function() { return _orange__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* harmony import */ var _deepOrange__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./deepOrange */ \"./node_modules/@material-ui/core/esm/colors/deepOrange.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deepOrange\", function() { return _deepOrange__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* harmony import */ var _brown__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./brown */ \"./node_modules/@material-ui/core/esm/colors/brown.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"brown\", function() { return _brown__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* harmony import */ var _grey__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./grey */ \"./node_modules/@material-ui/core/esm/colors/grey.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"grey\", function() { return _grey__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* harmony import */ var _blueGrey__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./blueGrey */ \"./node_modules/@material-ui/core/esm/colors/blueGrey.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"blueGrey\", function() { return _blueGrey__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/indigo.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/indigo.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar indigo = {\n 50: '#e8eaf6',\n 100: '#c5cae9',\n 200: '#9fa8da',\n 300: '#7986cb',\n 400: '#5c6bc0',\n 500: '#3f51b5',\n 600: '#3949ab',\n 700: '#303f9f',\n 800: '#283593',\n 900: '#1a237e',\n A100: '#8c9eff',\n A200: '#536dfe',\n A400: '#3d5afe',\n A700: '#304ffe'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (indigo);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/indigo.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/lightBlue.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/lightBlue.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (lightBlue);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/lightBlue.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/lightGreen.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/lightGreen.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar lightGreen = {\n 50: '#f1f8e9',\n 100: '#dcedc8',\n 200: '#c5e1a5',\n 300: '#aed581',\n 400: '#9ccc65',\n 500: '#8bc34a',\n 600: '#7cb342',\n 700: '#689f38',\n 800: '#558b2f',\n 900: '#33691e',\n A100: '#ccff90',\n A200: '#b2ff59',\n A400: '#76ff03',\n A700: '#64dd17'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (lightGreen);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/lightGreen.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/lime.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/lime.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar lime = {\n 50: '#f9fbe7',\n 100: '#f0f4c3',\n 200: '#e6ee9c',\n 300: '#dce775',\n 400: '#d4e157',\n 500: '#cddc39',\n 600: '#c0ca33',\n 700: '#afb42b',\n 800: '#9e9d24',\n 900: '#827717',\n A100: '#f4ff81',\n A200: '#eeff41',\n A400: '#c6ff00',\n A700: '#aeea00'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (lime);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/lime.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/orange.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/orange.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (orange);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/orange.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/pink.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/pink.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar pink = {\n 50: '#fce4ec',\n 100: '#f8bbd0',\n 200: '#f48fb1',\n 300: '#f06292',\n 400: '#ec407a',\n 500: '#e91e63',\n 600: '#d81b60',\n 700: '#c2185b',\n 800: '#ad1457',\n 900: '#880e4f',\n A100: '#ff80ab',\n A200: '#ff4081',\n A400: '#f50057',\n A700: '#c51162'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (pink);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/pink.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/purple.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/purple.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (purple);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/purple.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/red.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/red.js ***! \**********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (red);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/red.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/teal.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/teal.js ***! \***********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar teal = {\n 50: '#e0f2f1',\n 100: '#b2dfdb',\n 200: '#80cbc4',\n 300: '#4db6ac',\n 400: '#26a69a',\n 500: '#009688',\n 600: '#00897b',\n 700: '#00796b',\n 800: '#00695c',\n 900: '#004d40',\n A100: '#a7ffeb',\n A200: '#64ffda',\n A400: '#1de9b6',\n A700: '#00bfa5'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (teal);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/teal.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/colors/yellow.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/colors/yellow.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar yellow = {\n 50: '#fffde7',\n 100: '#fff9c4',\n 200: '#fff59d',\n 300: '#fff176',\n 400: '#ffee58',\n 500: '#ffeb3b',\n 600: '#fdd835',\n 700: '#fbc02d',\n 800: '#f9a825',\n 900: '#f57f17',\n A100: '#ffff8d',\n A200: '#ffff00',\n A400: '#ffea00',\n A700: '#ffd600'\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (yellow);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/colors/yellow.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/index.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/core/esm/index.js ***! \*****************************************************/ /*! exports provided: colors, Accordion, AccordionActions, AccordionDetails, AccordionSummary, AppBar, Avatar, Backdrop, Badge, BottomNavigation, BottomNavigationAction, Box, Breadcrumbs, Button, ButtonBase, ButtonGroup, Card, CardActionArea, CardActions, CardContent, CardHeader, CardMedia, Checkbox, Chip, CircularProgress, ClickAwayListener, Collapse, Container, CssBaseline, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, Divider, Drawer, ExpansionPanel, ExpansionPanelActions, ExpansionPanelDetails, ExpansionPanelSummary, Fab, Fade, FilledInput, FormControl, FormControlLabel, FormGroup, FormHelperText, FormLabel, Grid, GridList, GridListTile, GridListTileBar, Grow, Hidden, Icon, IconButton, Input, InputAdornment, InputBase, InputLabel, LinearProgress, Link, List, ListItem, ListItemAvatar, ListItemIcon, ListItemSecondaryAction, ListItemText, ListSubheader, Menu, MenuItem, MenuList, MobileStepper, Modal, NativeSelect, NoSsr, OutlinedInput, Paper, Popover, Popper, Portal, Radio, RadioGroup, RootRef, Select, Slide, Slider, Snackbar, SnackbarContent, Step, StepButton, StepConnector, StepContent, StepIcon, StepLabel, Stepper, SvgIcon, SwipeableDrawer, Switch, Tab, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, TabScrollButton, TextField, TextareaAutosize, Toolbar, Tooltip, Typography, Unstable_TrapFocus, useMediaQuery, useScrollTrigger, withMobileDialog, withWidth, Zoom, createMuiTheme, unstable_createMuiStrictModeTheme, createStyles, makeStyles, responsiveFontSizes, styled, useTheme, withStyles, withTheme, createGenerateClassName, jssPreset, ServerStyleSheets, StylesProvider, MuiThemeProvider, ThemeProvider, capitalize, createChainedFunction, createSvgIcon, debounce, deprecatedPropType, isMuiElement, ownerDocument, ownerWindow, requirePropFactory, setRef, unsupportedProp, useControlled, useEventCallback, useForkRef, unstable_useId, useIsFocusVisible, styleFunction, useFormControl, ModalManager, useRadioGroup, hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, fade, darken, lighten, easing, duration, isWidthUp, isWidthDown */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colors */ \"./node_modules/@material-ui/core/esm/colors/index.js\");\n/* harmony reexport (module object) */ __webpack_require__.d(__webpack_exports__, \"colors\", function() { return _colors__WEBPACK_IMPORTED_MODULE_0__; });\n/* harmony import */ var _styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./styles */ \"./node_modules/@material-ui/core/esm/styles/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createMuiTheme\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"createMuiTheme\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unstable_createMuiStrictModeTheme\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"unstable_createMuiStrictModeTheme\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStyles\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"createStyles\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeStyles\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"makeStyles\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"responsiveFontSizes\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"responsiveFontSizes\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"styled\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"styled\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useTheme\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"useTheme\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withStyles\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"withStyles\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withTheme\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"withTheme\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createGenerateClassName\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"createGenerateClassName\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jssPreset\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"jssPreset\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ServerStyleSheets\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"ServerStyleSheets\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StylesProvider\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"StylesProvider\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MuiThemeProvider\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"MuiThemeProvider\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ThemeProvider\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"ThemeProvider\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hexToRgb\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"hexToRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgbToHex\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"rgbToHex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hslToRgb\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"hslToRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"decomposeColor\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"decomposeColor\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"recomposeColor\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"recomposeColor\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getContrastRatio\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"getContrastRatio\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getLuminance\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"getLuminance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"emphasize\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"emphasize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fade\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"fade\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"darken\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"darken\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lighten\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"lighten\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easing\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"easing\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"duration\", function() { return _styles__WEBPACK_IMPORTED_MODULE_1__[\"duration\"]; });\n\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ \"./node_modules/@material-ui/core/esm/utils/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"capitalize\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"capitalize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createChainedFunction\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"createChainedFunction\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createSvgIcon\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"createSvgIcon\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"debounce\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deprecatedPropType\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"deprecatedPropType\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isMuiElement\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"isMuiElement\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ownerDocument\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"ownerDocument\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ownerWindow\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"ownerWindow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requirePropFactory\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"requirePropFactory\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setRef\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"setRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unsupportedProp\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"unsupportedProp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useControlled\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"useControlled\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useEventCallback\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"useEventCallback\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useForkRef\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"useForkRef\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unstable_useId\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"unstable_useId\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useIsFocusVisible\", function() { return _utils__WEBPACK_IMPORTED_MODULE_2__[\"useIsFocusVisible\"]; });\n\n/* harmony import */ var _Accordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Accordion */ \"./node_modules/@material-ui/core/esm/Accordion/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Accordion\", function() { return _Accordion__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _AccordionActions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./AccordionActions */ \"./node_modules/@material-ui/core/esm/AccordionActions/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AccordionActions\", function() { return _AccordionActions__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _AccordionDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AccordionDetails */ \"./node_modules/@material-ui/core/esm/AccordionDetails/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AccordionDetails\", function() { return _AccordionDetails__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _AccordionSummary__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./AccordionSummary */ \"./node_modules/@material-ui/core/esm/AccordionSummary/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AccordionSummary\", function() { return _AccordionSummary__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _AppBar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./AppBar */ \"./node_modules/@material-ui/core/esm/AppBar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"AppBar\", function() { return _AppBar__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Avatar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Avatar */ \"./node_modules/@material-ui/core/esm/Avatar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Avatar\", function() { return _Avatar__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Backdrop__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Backdrop */ \"./node_modules/@material-ui/core/esm/Backdrop/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Backdrop\", function() { return _Backdrop__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Badge__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Badge */ \"./node_modules/@material-ui/core/esm/Badge/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Badge\", function() { return _Badge__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _BottomNavigation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./BottomNavigation */ \"./node_modules/@material-ui/core/esm/BottomNavigation/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"BottomNavigation\", function() { return _BottomNavigation__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./BottomNavigationAction */ \"./node_modules/@material-ui/core/esm/BottomNavigationAction/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"BottomNavigationAction\", function() { return _BottomNavigationAction__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Box__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Box */ \"./node_modules/@material-ui/core/esm/Box/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Box\", function() { return _Box__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"styleFunction\", function() { return _Box__WEBPACK_IMPORTED_MODULE_13__[\"styleFunction\"]; });\n\n/* harmony import */ var _Breadcrumbs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Breadcrumbs */ \"./node_modules/@material-ui/core/esm/Breadcrumbs/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Breadcrumbs\", function() { return _Breadcrumbs__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Button__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Button */ \"./node_modules/@material-ui/core/esm/Button/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Button\", function() { return _Button__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ButtonBase */ \"./node_modules/@material-ui/core/esm/ButtonBase/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ButtonBase\", function() { return _ButtonBase__WEBPACK_IMPORTED_MODULE_16__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ButtonGroup__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ButtonGroup */ \"./node_modules/@material-ui/core/esm/ButtonGroup/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ButtonGroup\", function() { return _ButtonGroup__WEBPACK_IMPORTED_MODULE_17__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Card */ \"./node_modules/@material-ui/core/esm/Card/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Card\", function() { return _Card__WEBPACK_IMPORTED_MODULE_18__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CardActionArea__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./CardActionArea */ \"./node_modules/@material-ui/core/esm/CardActionArea/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CardActionArea\", function() { return _CardActionArea__WEBPACK_IMPORTED_MODULE_19__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CardActions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./CardActions */ \"./node_modules/@material-ui/core/esm/CardActions/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CardActions\", function() { return _CardActions__WEBPACK_IMPORTED_MODULE_20__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CardContent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./CardContent */ \"./node_modules/@material-ui/core/esm/CardContent/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CardContent\", function() { return _CardContent__WEBPACK_IMPORTED_MODULE_21__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CardHeader__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./CardHeader */ \"./node_modules/@material-ui/core/esm/CardHeader/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CardHeader\", function() { return _CardHeader__WEBPACK_IMPORTED_MODULE_22__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CardMedia__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./CardMedia */ \"./node_modules/@material-ui/core/esm/CardMedia/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CardMedia\", function() { return _CardMedia__WEBPACK_IMPORTED_MODULE_23__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Checkbox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Checkbox */ \"./node_modules/@material-ui/core/esm/Checkbox/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Checkbox\", function() { return _Checkbox__WEBPACK_IMPORTED_MODULE_24__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Chip__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Chip */ \"./node_modules/@material-ui/core/esm/Chip/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Chip\", function() { return _Chip__WEBPACK_IMPORTED_MODULE_25__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CircularProgress__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./CircularProgress */ \"./node_modules/@material-ui/core/esm/CircularProgress/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CircularProgress\", function() { return _CircularProgress__WEBPACK_IMPORTED_MODULE_26__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ClickAwayListener__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ClickAwayListener */ \"./node_modules/@material-ui/core/esm/ClickAwayListener/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ClickAwayListener\", function() { return _ClickAwayListener__WEBPACK_IMPORTED_MODULE_27__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Collapse__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Collapse */ \"./node_modules/@material-ui/core/esm/Collapse/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Collapse\", function() { return _Collapse__WEBPACK_IMPORTED_MODULE_28__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Container__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Container */ \"./node_modules/@material-ui/core/esm/Container/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Container\", function() { return _Container__WEBPACK_IMPORTED_MODULE_29__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _CssBaseline__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./CssBaseline */ \"./node_modules/@material-ui/core/esm/CssBaseline/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"CssBaseline\", function() { return _CssBaseline__WEBPACK_IMPORTED_MODULE_30__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Dialog__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Dialog */ \"./node_modules/@material-ui/core/esm/Dialog/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Dialog\", function() { return _Dialog__WEBPACK_IMPORTED_MODULE_31__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _DialogActions__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./DialogActions */ \"./node_modules/@material-ui/core/esm/DialogActions/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DialogActions\", function() { return _DialogActions__WEBPACK_IMPORTED_MODULE_32__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _DialogContent__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./DialogContent */ \"./node_modules/@material-ui/core/esm/DialogContent/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DialogContent\", function() { return _DialogContent__WEBPACK_IMPORTED_MODULE_33__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _DialogContentText__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./DialogContentText */ \"./node_modules/@material-ui/core/esm/DialogContentText/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DialogContentText\", function() { return _DialogContentText__WEBPACK_IMPORTED_MODULE_34__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _DialogTitle__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./DialogTitle */ \"./node_modules/@material-ui/core/esm/DialogTitle/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"DialogTitle\", function() { return _DialogTitle__WEBPACK_IMPORTED_MODULE_35__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Divider */ \"./node_modules/@material-ui/core/esm/Divider/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Divider\", function() { return _Divider__WEBPACK_IMPORTED_MODULE_36__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Drawer__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Drawer */ \"./node_modules/@material-ui/core/esm/Drawer/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Drawer\", function() { return _Drawer__WEBPACK_IMPORTED_MODULE_37__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanel__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./ExpansionPanel */ \"./node_modules/@material-ui/core/esm/ExpansionPanel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExpansionPanel\", function() { return _ExpansionPanel__WEBPACK_IMPORTED_MODULE_38__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./ExpansionPanelActions */ \"./node_modules/@material-ui/core/esm/ExpansionPanelActions/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExpansionPanelActions\", function() { return _ExpansionPanelActions__WEBPACK_IMPORTED_MODULE_39__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./ExpansionPanelDetails */ \"./node_modules/@material-ui/core/esm/ExpansionPanelDetails/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExpansionPanelDetails\", function() { return _ExpansionPanelDetails__WEBPACK_IMPORTED_MODULE_40__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./ExpansionPanelSummary */ \"./node_modules/@material-ui/core/esm/ExpansionPanelSummary/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ExpansionPanelSummary\", function() { return _ExpansionPanelSummary__WEBPACK_IMPORTED_MODULE_41__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Fab__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Fab */ \"./node_modules/@material-ui/core/esm/Fab/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Fab\", function() { return _Fab__WEBPACK_IMPORTED_MODULE_42__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Fade__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Fade */ \"./node_modules/@material-ui/core/esm/Fade/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Fade\", function() { return _Fade__WEBPACK_IMPORTED_MODULE_43__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _FilledInput__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./FilledInput */ \"./node_modules/@material-ui/core/esm/FilledInput/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FilledInput\", function() { return _FilledInput__WEBPACK_IMPORTED_MODULE_44__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _FormControl__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./FormControl */ \"./node_modules/@material-ui/core/esm/FormControl/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormControl\", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_45__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useFormControl\", function() { return _FormControl__WEBPACK_IMPORTED_MODULE_45__[\"useFormControl\"]; });\n\n/* harmony import */ var _FormControlLabel__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./FormControlLabel */ \"./node_modules/@material-ui/core/esm/FormControlLabel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormControlLabel\", function() { return _FormControlLabel__WEBPACK_IMPORTED_MODULE_46__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _FormGroup__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./FormGroup */ \"./node_modules/@material-ui/core/esm/FormGroup/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormGroup\", function() { return _FormGroup__WEBPACK_IMPORTED_MODULE_47__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _FormHelperText__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./FormHelperText */ \"./node_modules/@material-ui/core/esm/FormHelperText/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormHelperText\", function() { return _FormHelperText__WEBPACK_IMPORTED_MODULE_48__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _FormLabel__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./FormLabel */ \"./node_modules/@material-ui/core/esm/FormLabel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"FormLabel\", function() { return _FormLabel__WEBPACK_IMPORTED_MODULE_49__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Grid__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Grid */ \"./node_modules/@material-ui/core/esm/Grid/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Grid\", function() { return _Grid__WEBPACK_IMPORTED_MODULE_50__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _GridList__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./GridList */ \"./node_modules/@material-ui/core/esm/GridList/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"GridList\", function() { return _GridList__WEBPACK_IMPORTED_MODULE_51__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _GridListTile__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./GridListTile */ \"./node_modules/@material-ui/core/esm/GridListTile/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"GridListTile\", function() { return _GridListTile__WEBPACK_IMPORTED_MODULE_52__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _GridListTileBar__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./GridListTileBar */ \"./node_modules/@material-ui/core/esm/GridListTileBar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"GridListTileBar\", function() { return _GridListTileBar__WEBPACK_IMPORTED_MODULE_53__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./Grow */ \"./node_modules/@material-ui/core/esm/Grow/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Grow\", function() { return _Grow__WEBPACK_IMPORTED_MODULE_54__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Hidden__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./Hidden */ \"./node_modules/@material-ui/core/esm/Hidden/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Hidden\", function() { return _Hidden__WEBPACK_IMPORTED_MODULE_55__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Icon__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./Icon */ \"./node_modules/@material-ui/core/esm/Icon/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Icon\", function() { return _Icon__WEBPACK_IMPORTED_MODULE_56__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"IconButton\", function() { return _IconButton__WEBPACK_IMPORTED_MODULE_57__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Input__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./Input */ \"./node_modules/@material-ui/core/esm/Input/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Input\", function() { return _Input__WEBPACK_IMPORTED_MODULE_58__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _InputAdornment__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./InputAdornment */ \"./node_modules/@material-ui/core/esm/InputAdornment/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InputAdornment\", function() { return _InputAdornment__WEBPACK_IMPORTED_MODULE_59__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _InputBase__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./InputBase */ \"./node_modules/@material-ui/core/esm/InputBase/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InputBase\", function() { return _InputBase__WEBPACK_IMPORTED_MODULE_60__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _InputLabel__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./InputLabel */ \"./node_modules/@material-ui/core/esm/InputLabel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"InputLabel\", function() { return _InputLabel__WEBPACK_IMPORTED_MODULE_61__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _LinearProgress__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./LinearProgress */ \"./node_modules/@material-ui/core/esm/LinearProgress/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"LinearProgress\", function() { return _LinearProgress__WEBPACK_IMPORTED_MODULE_62__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Link__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Link */ \"./node_modules/@material-ui/core/esm/Link/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Link\", function() { return _Link__WEBPACK_IMPORTED_MODULE_63__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _List__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./List */ \"./node_modules/@material-ui/core/esm/List/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"List\", function() { return _List__WEBPACK_IMPORTED_MODULE_64__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListItem__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./ListItem */ \"./node_modules/@material-ui/core/esm/ListItem/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListItem\", function() { return _ListItem__WEBPACK_IMPORTED_MODULE_65__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListItemAvatar__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./ListItemAvatar */ \"./node_modules/@material-ui/core/esm/ListItemAvatar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListItemAvatar\", function() { return _ListItemAvatar__WEBPACK_IMPORTED_MODULE_66__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./ListItemIcon */ \"./node_modules/@material-ui/core/esm/ListItemIcon/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListItemIcon\", function() { return _ListItemIcon__WEBPACK_IMPORTED_MODULE_67__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./ListItemSecondaryAction */ \"./node_modules/@material-ui/core/esm/ListItemSecondaryAction/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListItemSecondaryAction\", function() { return _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_68__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./ListItemText */ \"./node_modules/@material-ui/core/esm/ListItemText/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListItemText\", function() { return _ListItemText__WEBPACK_IMPORTED_MODULE_69__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ListSubheader__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./ListSubheader */ \"./node_modules/@material-ui/core/esm/ListSubheader/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ListSubheader\", function() { return _ListSubheader__WEBPACK_IMPORTED_MODULE_70__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Menu__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./Menu */ \"./node_modules/@material-ui/core/esm/Menu/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Menu\", function() { return _Menu__WEBPACK_IMPORTED_MODULE_71__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _MenuItem__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./MenuItem */ \"./node_modules/@material-ui/core/esm/MenuItem/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MenuItem\", function() { return _MenuItem__WEBPACK_IMPORTED_MODULE_72__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _MenuList__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./MenuList */ \"./node_modules/@material-ui/core/esm/MenuList/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MenuList\", function() { return _MenuList__WEBPACK_IMPORTED_MODULE_73__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _MobileStepper__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./MobileStepper */ \"./node_modules/@material-ui/core/esm/MobileStepper/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MobileStepper\", function() { return _MobileStepper__WEBPACK_IMPORTED_MODULE_74__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./Modal */ \"./node_modules/@material-ui/core/esm/Modal/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Modal\", function() { return _Modal__WEBPACK_IMPORTED_MODULE_75__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ModalManager\", function() { return _Modal__WEBPACK_IMPORTED_MODULE_75__[\"ModalManager\"]; });\n\n/* harmony import */ var _NativeSelect__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./NativeSelect */ \"./node_modules/@material-ui/core/esm/NativeSelect/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"NativeSelect\", function() { return _NativeSelect__WEBPACK_IMPORTED_MODULE_76__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _NoSsr__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./NoSsr */ \"./node_modules/@material-ui/core/esm/NoSsr/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"NoSsr\", function() { return _NoSsr__WEBPACK_IMPORTED_MODULE_77__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _OutlinedInput__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./OutlinedInput */ \"./node_modules/@material-ui/core/esm/OutlinedInput/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"OutlinedInput\", function() { return _OutlinedInput__WEBPACK_IMPORTED_MODULE_78__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Paper__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./Paper */ \"./node_modules/@material-ui/core/esm/Paper/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Paper\", function() { return _Paper__WEBPACK_IMPORTED_MODULE_79__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Popover__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./Popover */ \"./node_modules/@material-ui/core/esm/Popover/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Popover\", function() { return _Popover__WEBPACK_IMPORTED_MODULE_80__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./Popper */ \"./node_modules/@material-ui/core/esm/Popper/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Popper\", function() { return _Popper__WEBPACK_IMPORTED_MODULE_81__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Portal__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./Portal */ \"./node_modules/@material-ui/core/esm/Portal/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Portal\", function() { return _Portal__WEBPACK_IMPORTED_MODULE_82__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Radio__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./Radio */ \"./node_modules/@material-ui/core/esm/Radio/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Radio\", function() { return _Radio__WEBPACK_IMPORTED_MODULE_83__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _RadioGroup__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./RadioGroup */ \"./node_modules/@material-ui/core/esm/RadioGroup/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RadioGroup\", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_84__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useRadioGroup\", function() { return _RadioGroup__WEBPACK_IMPORTED_MODULE_84__[\"useRadioGroup\"]; });\n\n/* harmony import */ var _RootRef__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./RootRef */ \"./node_modules/@material-ui/core/esm/RootRef/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"RootRef\", function() { return _RootRef__WEBPACK_IMPORTED_MODULE_85__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Select__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./Select */ \"./node_modules/@material-ui/core/esm/Select/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Select\", function() { return _Select__WEBPACK_IMPORTED_MODULE_86__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Slide__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./Slide */ \"./node_modules/@material-ui/core/esm/Slide/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Slide\", function() { return _Slide__WEBPACK_IMPORTED_MODULE_87__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Slider__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./Slider */ \"./node_modules/@material-ui/core/esm/Slider/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Slider\", function() { return _Slider__WEBPACK_IMPORTED_MODULE_88__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Snackbar__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./Snackbar */ \"./node_modules/@material-ui/core/esm/Snackbar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Snackbar\", function() { return _Snackbar__WEBPACK_IMPORTED_MODULE_89__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _SnackbarContent__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./SnackbarContent */ \"./node_modules/@material-ui/core/esm/SnackbarContent/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SnackbarContent\", function() { return _SnackbarContent__WEBPACK_IMPORTED_MODULE_90__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Step__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./Step */ \"./node_modules/@material-ui/core/esm/Step/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Step\", function() { return _Step__WEBPACK_IMPORTED_MODULE_91__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StepButton__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./StepButton */ \"./node_modules/@material-ui/core/esm/StepButton/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StepButton\", function() { return _StepButton__WEBPACK_IMPORTED_MODULE_92__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StepConnector__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./StepConnector */ \"./node_modules/@material-ui/core/esm/StepConnector/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StepConnector\", function() { return _StepConnector__WEBPACK_IMPORTED_MODULE_93__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StepContent__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./StepContent */ \"./node_modules/@material-ui/core/esm/StepContent/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StepContent\", function() { return _StepContent__WEBPACK_IMPORTED_MODULE_94__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StepIcon__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./StepIcon */ \"./node_modules/@material-ui/core/esm/StepIcon/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StepIcon\", function() { return _StepIcon__WEBPACK_IMPORTED_MODULE_95__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StepLabel__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./StepLabel */ \"./node_modules/@material-ui/core/esm/StepLabel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StepLabel\", function() { return _StepLabel__WEBPACK_IMPORTED_MODULE_96__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Stepper__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./Stepper */ \"./node_modules/@material-ui/core/esm/Stepper/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Stepper\", function() { return _Stepper__WEBPACK_IMPORTED_MODULE_97__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./SvgIcon */ \"./node_modules/@material-ui/core/esm/SvgIcon/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SvgIcon\", function() { return _SvgIcon__WEBPACK_IMPORTED_MODULE_98__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./SwipeableDrawer */ \"./node_modules/@material-ui/core/esm/SwipeableDrawer/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"SwipeableDrawer\", function() { return _SwipeableDrawer__WEBPACK_IMPORTED_MODULE_99__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Switch__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./Switch */ \"./node_modules/@material-ui/core/esm/Switch/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Switch\", function() { return _Switch__WEBPACK_IMPORTED_MODULE_100__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Tab__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Tab */ \"./node_modules/@material-ui/core/esm/Tab/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Tab\", function() { return _Tab__WEBPACK_IMPORTED_MODULE_101__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Table */ \"./node_modules/@material-ui/core/esm/Table/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Table\", function() { return _Table__WEBPACK_IMPORTED_MODULE_102__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableBody__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./TableBody */ \"./node_modules/@material-ui/core/esm/TableBody/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableBody\", function() { return _TableBody__WEBPACK_IMPORTED_MODULE_103__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableCell__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./TableCell */ \"./node_modules/@material-ui/core/esm/TableCell/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableCell\", function() { return _TableCell__WEBPACK_IMPORTED_MODULE_104__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableContainer__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./TableContainer */ \"./node_modules/@material-ui/core/esm/TableContainer/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableContainer\", function() { return _TableContainer__WEBPACK_IMPORTED_MODULE_105__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableFooter__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./TableFooter */ \"./node_modules/@material-ui/core/esm/TableFooter/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableFooter\", function() { return _TableFooter__WEBPACK_IMPORTED_MODULE_106__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableHead__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./TableHead */ \"./node_modules/@material-ui/core/esm/TableHead/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableHead\", function() { return _TableHead__WEBPACK_IMPORTED_MODULE_107__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TablePagination__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./TablePagination */ \"./node_modules/@material-ui/core/esm/TablePagination/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TablePagination\", function() { return _TablePagination__WEBPACK_IMPORTED_MODULE_108__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableRow__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./TableRow */ \"./node_modules/@material-ui/core/esm/TableRow/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableRow\", function() { return _TableRow__WEBPACK_IMPORTED_MODULE_109__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TableSortLabel__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./TableSortLabel */ \"./node_modules/@material-ui/core/esm/TableSortLabel/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TableSortLabel\", function() { return _TableSortLabel__WEBPACK_IMPORTED_MODULE_110__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Tabs__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./Tabs */ \"./node_modules/@material-ui/core/esm/Tabs/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Tabs\", function() { return _Tabs__WEBPACK_IMPORTED_MODULE_111__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TabScrollButton__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./TabScrollButton */ \"./node_modules/@material-ui/core/esm/TabScrollButton/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TabScrollButton\", function() { return _TabScrollButton__WEBPACK_IMPORTED_MODULE_112__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TextField__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./TextField */ \"./node_modules/@material-ui/core/esm/TextField/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TextField\", function() { return _TextField__WEBPACK_IMPORTED_MODULE_113__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _TextareaAutosize__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./TextareaAutosize */ \"./node_modules/@material-ui/core/esm/TextareaAutosize/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"TextareaAutosize\", function() { return _TextareaAutosize__WEBPACK_IMPORTED_MODULE_114__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Toolbar__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./Toolbar */ \"./node_modules/@material-ui/core/esm/Toolbar/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Toolbar\", function() { return _Toolbar__WEBPACK_IMPORTED_MODULE_115__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Tooltip__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./Tooltip */ \"./node_modules/@material-ui/core/esm/Tooltip/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Tooltip\", function() { return _Tooltip__WEBPACK_IMPORTED_MODULE_116__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./Typography */ \"./node_modules/@material-ui/core/esm/Typography/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Typography\", function() { return _Typography__WEBPACK_IMPORTED_MODULE_117__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./Unstable_TrapFocus */ \"./node_modules/@material-ui/core/esm/Unstable_TrapFocus/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Unstable_TrapFocus\", function() { return _Unstable_TrapFocus__WEBPACK_IMPORTED_MODULE_118__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./useMediaQuery */ \"./node_modules/@material-ui/core/esm/useMediaQuery/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useMediaQuery\", function() { return _useMediaQuery__WEBPACK_IMPORTED_MODULE_119__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _useScrollTrigger__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./useScrollTrigger */ \"./node_modules/@material-ui/core/esm/useScrollTrigger/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useScrollTrigger\", function() { return _useScrollTrigger__WEBPACK_IMPORTED_MODULE_120__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _withMobileDialog__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./withMobileDialog */ \"./node_modules/@material-ui/core/esm/withMobileDialog/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withMobileDialog\", function() { return _withMobileDialog__WEBPACK_IMPORTED_MODULE_121__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./withWidth */ \"./node_modules/@material-ui/core/esm/withWidth/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withWidth\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_122__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isWidthUp\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_122__[\"isWidthUp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isWidthDown\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_122__[\"isWidthDown\"]; });\n\n/* harmony import */ var _Zoom__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./Zoom */ \"./node_modules/@material-ui/core/esm/Zoom/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"Zoom\", function() { return _Zoom__WEBPACK_IMPORTED_MODULE_123__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//** @license Material-UI v4.11.0\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable import/export */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // eslint-disable-next-line camelcase\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/SwitchBase.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/SwitchBase.js ***! \*******************************************************************/ /*! exports provided: styles, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"styles\", function() { return styles; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n/* harmony import */ var _FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../FormControl/useFormControl */ \"./node_modules/@material-ui/core/esm/FormControl/useFormControl.js\");\n/* harmony import */ var _styles_withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony import */ var _IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../IconButton */ \"./node_modules/@material-ui/core/esm/IconButton/index.js\");\n\n\n\n\n\n\n\n\n\n\n\nvar styles = {\n root: {\n padding: 9\n },\n checked: {},\n disabled: {},\n input: {\n cursor: 'inherit',\n position: 'absolute',\n opacity: 0,\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n margin: 0,\n padding: 0,\n zIndex: 1\n }\n};\n/**\n * @ignore - internal component.\n */\n\nvar SwitchBase = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"forwardRef\"](function SwitchBase(props, ref) {\n var autoFocus = props.autoFocus,\n checkedProp = props.checked,\n checkedIcon = props.checkedIcon,\n classes = props.classes,\n className = props.className,\n defaultChecked = props.defaultChecked,\n disabledProp = props.disabled,\n icon = props.icon,\n id = props.id,\n inputProps = props.inputProps,\n inputRef = props.inputRef,\n name = props.name,\n onBlur = props.onBlur,\n onChange = props.onChange,\n onFocus = props.onFocus,\n readOnly = props.readOnly,\n required = props.required,\n tabIndex = props.tabIndex,\n type = props.type,\n value = props.value,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(props, [\"autoFocus\", \"checked\", \"checkedIcon\", \"classes\", \"className\", \"defaultChecked\", \"disabled\", \"icon\", \"id\", \"inputProps\", \"inputRef\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"readOnly\", \"required\", \"tabIndex\", \"type\", \"value\"]);\n\n var _useControlled = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n controlled: checkedProp,\n default: Boolean(defaultChecked),\n name: 'SwitchBase',\n state: 'checked'\n }),\n _useControlled2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_useControlled, 2),\n checked = _useControlled2[0],\n setCheckedState = _useControlled2[1];\n\n var muiFormControl = Object(_FormControl_useFormControl__WEBPACK_IMPORTED_MODULE_8__[\"default\"])();\n\n var handleFocus = function handleFocus(event) {\n if (onFocus) {\n onFocus(event);\n }\n\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n }\n };\n\n var handleBlur = function handleBlur(event) {\n if (onBlur) {\n onBlur(event);\n }\n\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n }\n };\n\n var handleInputChange = function handleInputChange(event) {\n var newChecked = event.target.checked;\n setCheckedState(newChecked);\n\n if (onChange) {\n // TODO v5: remove the second argument.\n onChange(event, newChecked);\n }\n };\n\n var disabled = disabledProp;\n\n if (muiFormControl) {\n if (typeof disabled === 'undefined') {\n disabled = muiFormControl.disabled;\n }\n }\n\n var hasLabelFor = type === 'checkbox' || type === 'radio';\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](_IconButton__WEBPACK_IMPORTED_MODULE_10__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n component: \"span\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(classes.root, className, checked && classes.checked, disabled && classes.disabled),\n disabled: disabled,\n tabIndex: null,\n role: undefined,\n onFocus: handleFocus,\n onBlur: handleBlur,\n ref: ref\n }, other), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__[\"createElement\"](\"input\", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n autoFocus: autoFocus,\n checked: checkedProp,\n defaultChecked: defaultChecked,\n className: classes.input,\n disabled: disabled,\n id: hasLabelFor && id,\n name: name,\n onChange: handleInputChange,\n readOnly: readOnly,\n ref: inputRef,\n required: required,\n tabIndex: tabIndex,\n type: type,\n value: value\n }, inputProps)), checked ? checkedIcon : icon);\n}); // NB: If changed, please update Checkbox, Switch and Radio\n// so that the API documentation is updated.\n\n true ? SwitchBase.propTypes = {\n /**\n * If `true`, the `input` element will be focused during the first mount.\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the component is checked.\n */\n checked: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The icon to display when the component is checked.\n */\n checkedIcon: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node.isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n * See [CSS API](#css) below for more details.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object.isRequired,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * @ignore\n */\n defaultChecked: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the switch will be disabled.\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * The icon to display when the component is unchecked.\n */\n icon: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node.isRequired,\n\n /**\n * The id of the `input` element.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.object,\n\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: _material_ui_utils__WEBPACK_IMPORTED_MODULE_6__[\"refType\"],\n\n /*\n * @ignore\n */\n name: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * @ignore\n */\n onBlur: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * Callback fired when the state is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new checked state by accessing `event.target.checked` (boolean).\n */\n onChange: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * @ignore\n */\n onFocus: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func,\n\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * If `true`, the `input` element will be required.\n */\n required: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool,\n\n /**\n * @ignore\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string]),\n\n /**\n * The input component prop `type`.\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string.isRequired,\n\n /**\n * The value of the component.\n */\n value: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.any\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_styles_withStyles__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(styles, {\n name: 'PrivateSwitchBase'\n})(SwitchBase));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/SwitchBase.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/animate.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/animate.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return animate; });\nfunction easeInOutSin(time) {\n return (1 + Math.sin(Math.PI * time - Math.PI / 2)) / 2;\n}\n\nfunction animate(property, element, to) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var cb = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};\n var _options$ease = options.ease,\n ease = _options$ease === void 0 ? easeInOutSin : _options$ease,\n _options$duration = options.duration,\n duration = _options$duration === void 0 ? 300 : _options$duration;\n var start = null;\n var from = element[property];\n var cancelled = false;\n\n var cancel = function cancel() {\n cancelled = true;\n };\n\n var step = function step(timestamp) {\n if (cancelled) {\n cb(new Error('Animation cancelled'));\n return;\n }\n\n if (start === null) {\n start = timestamp;\n }\n\n var time = Math.min(1, (timestamp - start) / duration);\n element[property] = ease(time) * (to - from) + from;\n\n if (time >= 1) {\n requestAnimationFrame(function () {\n cb(null);\n });\n return;\n }\n\n requestAnimationFrame(step);\n };\n\n if (from === to) {\n cb(new Error('Element already at target position'));\n return cancel;\n }\n\n requestAnimationFrame(step);\n return cancel;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/animate.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDownward.js": /*!********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDownward.js ***! \********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z\"\n}), 'ArrowDownward'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDownward.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js": /*!********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js ***! \********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/ArrowDropDown.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/Cancel.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z\"\n}), 'CheckBox'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBox.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js": /*!***************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z\"\n}), 'CheckBoxOutlineBlank'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/CheckBoxOutlineBlank.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/CheckCircle.js": /*!******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/CheckCircle.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z\"\n}), 'CheckCircle'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/CheckCircle.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js": /*!****************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z\"\n}), 'IndeterminateCheckBox'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/IndeterminateCheckBox.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js": /*!************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js ***! \************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z\"\n}), 'KeyboardArrowLeft'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowLeft.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js": /*!*************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js ***! \*************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"\n}), 'KeyboardArrowRight'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/KeyboardArrowRight.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/MoreHoriz.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/MoreHoriz.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z\"\n}), 'MoreHoriz'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/MoreHoriz.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/Person.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/Person.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/Person.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonChecked.js": /*!*************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonChecked.js ***! \*************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z\"\n}), 'RadioButtonChecked'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonChecked.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonUnchecked.js": /*!***************************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonUnchecked.js ***! \***************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n}), 'RadioButtonUnchecked'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/RadioButtonUnchecked.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/internal/svg-icons/Warning.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/internal/svg-icons/Warning.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n\n\n/**\n * @ignore - internal component.\n */\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_utils_createSvgIcon__WEBPACK_IMPORTED_MODULE_1__[\"default\"])( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z\"\n}), 'Warning'));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/internal/svg-icons/Warning.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/colorManipulator.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/colorManipulator.js ***! \***********************************************************************/ /*! exports provided: hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, fade, darken, lighten */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hexToRgb\", function() { return hexToRgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"rgbToHex\", function() { return rgbToHex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hslToRgb\", function() { return hslToRgb; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"decomposeColor\", function() { return decomposeColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recomposeColor\", function() { return recomposeColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getContrastRatio\", function() { return getContrastRatio; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getLuminance\", function() { return getLuminance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"emphasize\", function() { return emphasize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fade\", function() { return fade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"darken\", function() { return darken; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lighten\", function() { return lighten; });\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n/* eslint-disable no-use-before-define */\n\n/**\n * Returns a number whose value is limited to the given range.\n *\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clamp(value) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n if (true) {\n if (value < min || value > max) {\n console.error(\"Material-UI: The value provided \".concat(value, \" is out of range [\").concat(min, \", \").concat(max, \"].\"));\n }\n }\n\n return Math.min(Math.max(min, value), max);\n}\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n *\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\n\n\nfunction hexToRgb(color) {\n color = color.substr(1);\n var re = new RegExp(\".{1,\".concat(color.length >= 6 ? 2 : 1, \"}\"), 'g');\n var colors = color.match(re);\n\n if (colors && colors[0].length === 1) {\n colors = colors.map(function (n) {\n return n + n;\n });\n }\n\n return colors ? \"rgb\".concat(colors.length === 4 ? 'a' : '', \"(\").concat(colors.map(function (n, index) {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', '), \")\") : '';\n}\n\nfunction intToHex(int) {\n var hex = int.toString(16);\n return hex.length === 1 ? \"0\".concat(hex) : hex;\n}\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n *\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\n\n\nfunction rgbToHex(color) {\n // Idempotent\n if (color.indexOf('#') === 0) {\n return color;\n }\n\n var _decomposeColor = decomposeColor(color),\n values = _decomposeColor.values;\n\n return \"#\".concat(values.map(function (n) {\n return intToHex(n);\n }).join(''));\n}\n/**\n * Converts a color from hsl format to rgb format.\n *\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\n\nfunction hslToRgb(color) {\n color = decomposeColor(color);\n var _color = color,\n values = _color.values;\n var h = values[0];\n var s = values[1] / 100;\n var l = values[2] / 100;\n var a = s * Math.min(l, 1 - l);\n\n var f = function f(n) {\n var k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : (n + h / 30) % 12;\n return l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n };\n\n var type = 'rgb';\n var rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n\n return recomposeColor({\n type: type,\n values: rgb\n });\n}\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\n\nfunction decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n\n var marker = color.indexOf('(');\n var type = color.substring(0, marker);\n\n if (['rgb', 'rgba', 'hsl', 'hsla'].indexOf(type) === -1) {\n throw new Error( true ? \"Material-UI: Unsupported `\".concat(color, \"` color.\\nWe support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla().\") : undefined);\n }\n\n var values = color.substring(marker + 1, color.length - 1).split(',');\n values = values.map(function (value) {\n return parseFloat(value);\n });\n return {\n type: type,\n values: values\n };\n}\n/**\n * Converts a color object with type and values to a string.\n *\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\n\nfunction recomposeColor(color) {\n var type = color.type;\n var values = color.values;\n\n if (type.indexOf('rgb') !== -1) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map(function (n, i) {\n return i < 3 ? parseInt(n, 10) : n;\n });\n } else if (type.indexOf('hsl') !== -1) {\n values[1] = \"\".concat(values[1], \"%\");\n values[2] = \"\".concat(values[2], \"%\");\n }\n\n return \"\".concat(type, \"(\").concat(values.join(', '), \")\");\n}\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\n\nfunction getContrastRatio(foreground, background) {\n var lumA = getLuminance(foreground);\n var lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\n\nfunction getLuminance(color) {\n color = decomposeColor(color);\n var rgb = color.type === 'hsl' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(function (val) {\n val /= 255; // normalized\n\n return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);\n }); // Truncate at 3 digits\n\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nfunction emphasize(color) {\n var coefficient = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.15;\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\n/**\n * Set the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} value - value to set the alpha channel to in the range 0 -1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nfunction fade(color, value) {\n color = decomposeColor(color);\n value = clamp(value);\n\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n\n color.values[3] = value;\n return recomposeColor(color);\n}\n/**\n * Darkens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nfunction darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n/**\n * Lightens a color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\n\nfunction lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clamp(coefficient);\n\n if (color.type.indexOf('hsl') !== -1) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.indexOf('rgb') !== -1) {\n for (var i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n }\n\n return recomposeColor(color);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/colorManipulator.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createBreakpoints.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createBreakpoints.js ***! \************************************************************************/ /*! exports provided: keys, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"keys\", function() { return keys; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createBreakpoints; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n\n\n// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nvar keys = ['xs', 'sm', 'md', 'lg', 'xl']; // Keep in mind that @media is inclusive by the CSS specification.\n\nfunction createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n } : _breakpoints$values,\n _breakpoints$unit = breakpoints.unit,\n unit = _breakpoints$unit === void 0 ? 'px' : _breakpoints$unit,\n _breakpoints$step = breakpoints.step,\n step = _breakpoints$step === void 0 ? 5 : _breakpoints$step,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(breakpoints, [\"values\", \"unit\", \"step\"]);\n\n function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n }\n\n function down(key) {\n var endIndex = keys.indexOf(key) + 1;\n var upperbound = values[keys[endIndex]];\n\n if (endIndex === keys.length) {\n // xl down applies to all sizes\n return up('xs');\n }\n\n var value = typeof upperbound === 'number' && endIndex > 0 ? upperbound : key;\n return \"@media (max-width:\".concat(value - step / 100).concat(unit, \")\");\n }\n\n function between(start, end) {\n var endIndex = keys.indexOf(end);\n\n if (endIndex === keys.length - 1) {\n return up(start);\n }\n\n return \"@media (min-width:\".concat(typeof values[start] === 'number' ? values[start] : start).concat(unit, \") and \") + \"(max-width:\".concat((endIndex !== -1 && typeof values[keys[endIndex + 1]] === 'number' ? values[keys[endIndex + 1]] : end) - step / 100).concat(unit, \")\");\n }\n\n function only(key) {\n return between(key, key);\n }\n\n function width(key) {\n return values[key];\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n keys: keys,\n values: values,\n up: up,\n down: down,\n between: between,\n only: only,\n width: width\n }, other);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createBreakpoints.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createMixins.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createMixins.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createMixins; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n\n\nfunction createMixins(breakpoints, spacing, mixins) {\n var _toolbar;\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n gutters: function gutters() {\n var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // To deprecate in v4.1\n // warning(\n // false,\n // [\n // 'Material-UI: Theme.mixins.gutters() is deprecated.',\n // 'You can use the source of the mixin directly:',\n // `\n // paddingLeft: theme.spacing(2),\n // paddingRight: theme.spacing(2),\n // [theme.breakpoints.up('sm')]: {\n // paddingLeft: theme.spacing(3),\n // paddingRight: theme.spacing(3),\n // },\n // `,\n // ].join('\\n'),\n // );\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n paddingLeft: spacing(2),\n paddingRight: spacing(2)\n }, styles, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, breakpoints.up('sm'), Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n paddingLeft: spacing(3),\n paddingRight: spacing(3)\n }, styles[breakpoints.up('sm')])));\n },\n toolbar: (_toolbar = {\n minHeight: 56\n }, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_toolbar, \"\".concat(breakpoints.up('xs'), \" and (orientation: landscape)\"), {\n minHeight: 48\n }), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_toolbar, breakpoints.up('sm'), {\n minHeight: 64\n }), _toolbar)\n }, mixins);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createMixins.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createMuiStrictModeTheme.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createMuiStrictModeTheme.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createMuiStrictModeTheme; });\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _createMuiTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createMuiTheme */ \"./node_modules/@material-ui/core/esm/styles/createMuiTheme.js\");\n\n\nfunction createMuiStrictModeTheme(options) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return _createMuiTheme__WEBPACK_IMPORTED_MODULE_1__[\"default\"].apply(void 0, [Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"deepmerge\"])({\n unstable_strictMode: true\n }, options)].concat(args));\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createMuiStrictModeTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createMuiTheme.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createMuiTheme.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _createBreakpoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createBreakpoints */ \"./node_modules/@material-ui/core/esm/styles/createBreakpoints.js\");\n/* harmony import */ var _createMixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./createMixins */ \"./node_modules/@material-ui/core/esm/styles/createMixins.js\");\n/* harmony import */ var _createPalette__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./createPalette */ \"./node_modules/@material-ui/core/esm/styles/createPalette.js\");\n/* harmony import */ var _createTypography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./createTypography */ \"./node_modules/@material-ui/core/esm/styles/createTypography.js\");\n/* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./shadows */ \"./node_modules/@material-ui/core/esm/styles/shadows.js\");\n/* harmony import */ var _shape__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./shape */ \"./node_modules/@material-ui/core/esm/styles/shape.js\");\n/* harmony import */ var _createSpacing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./createSpacing */ \"./node_modules/@material-ui/core/esm/styles/createSpacing.js\");\n/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony import */ var _zIndex__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./zIndex */ \"./node_modules/@material-ui/core/esm/styles/zIndex.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction createMuiTheme() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$breakpoints = options.breakpoints,\n breakpointsInput = _options$breakpoints === void 0 ? {} : _options$breakpoints,\n _options$mixins = options.mixins,\n mixinsInput = _options$mixins === void 0 ? {} : _options$mixins,\n _options$palette = options.palette,\n paletteInput = _options$palette === void 0 ? {} : _options$palette,\n spacingInput = options.spacing,\n _options$typography = options.typography,\n typographyInput = _options$typography === void 0 ? {} : _options$typography,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(options, [\"breakpoints\", \"mixins\", \"palette\", \"spacing\", \"typography\"]);\n\n var palette = Object(_createPalette__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(paletteInput);\n var breakpoints = Object(_createBreakpoints__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(breakpointsInput);\n var spacing = Object(_createSpacing__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(spacingInput);\n var muiTheme = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"deepmerge\"])({\n breakpoints: breakpoints,\n direction: 'ltr',\n mixins: Object(_createMixins__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(breakpoints, spacing, mixinsInput),\n overrides: {},\n // Inject custom styles\n palette: palette,\n props: {},\n // Provide default props\n shadows: _shadows__WEBPACK_IMPORTED_MODULE_7__[\"default\"],\n typography: Object(_createTypography__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(palette, typographyInput),\n spacing: spacing,\n shape: _shape__WEBPACK_IMPORTED_MODULE_8__[\"default\"],\n transitions: _transitions__WEBPACK_IMPORTED_MODULE_10__[\"default\"],\n zIndex: _zIndex__WEBPACK_IMPORTED_MODULE_11__[\"default\"]\n }, other);\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n muiTheme = args.reduce(function (acc, argument) {\n return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"deepmerge\"])(acc, argument);\n }, muiTheme);\n\n if (true) {\n var pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected'];\n\n var traverse = function traverse(node, parentKey) {\n var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var key; // eslint-disable-next-line guard-for-in, no-restricted-syntax\n\n for (key in node) {\n var child = node[key];\n\n if (depth === 1) {\n if (key.indexOf('Mui') === 0 && child) {\n traverse(child, key, depth + 1);\n }\n } else if (pseudoClasses.indexOf(key) !== -1 && Object.keys(child).length > 0) {\n if (true) {\n console.error([\"Material-UI: The `\".concat(parentKey, \"` component increases \") + \"the CSS specificity of the `\".concat(key, \"` internal state.\"), 'You can not override it like this: ', JSON.stringify(node, null, 2), '', 'Instead, you need to use the $ruleName syntax:', JSON.stringify({\n root: Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, \"&$\".concat(key), child)\n }, null, 2), '', 'https://material-ui.com/r/pseudo-classes-guide'].join('\\n'));\n } // Remove the style to prevent global conflicts.\n\n\n node[key] = {};\n }\n }\n };\n\n traverse(muiTheme.overrides);\n }\n\n return muiTheme;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (createMuiTheme);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createMuiTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createPalette.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createPalette.js ***! \********************************************************************/ /*! exports provided: light, dark, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"light\", function() { return light; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"dark\", function() { return dark; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createPalette; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _colors_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../colors/common */ \"./node_modules/@material-ui/core/esm/colors/common.js\");\n/* harmony import */ var _colors_grey__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../colors/grey */ \"./node_modules/@material-ui/core/esm/colors/grey.js\");\n/* harmony import */ var _colors_indigo__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../colors/indigo */ \"./node_modules/@material-ui/core/esm/colors/indigo.js\");\n/* harmony import */ var _colors_pink__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../colors/pink */ \"./node_modules/@material-ui/core/esm/colors/pink.js\");\n/* harmony import */ var _colors_red__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../colors/red */ \"./node_modules/@material-ui/core/esm/colors/red.js\");\n/* harmony import */ var _colors_orange__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../colors/orange */ \"./node_modules/@material-ui/core/esm/colors/orange.js\");\n/* harmony import */ var _colors_blue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../colors/blue */ \"./node_modules/@material-ui/core/esm/colors/blue.js\");\n/* harmony import */ var _colors_green__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../colors/green */ \"./node_modules/@material-ui/core/esm/colors/green.js\");\n/* harmony import */ var _colorManipulator__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.54)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)',\n // Text hints.\n hint: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: _colors_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].white,\n default: _colors_grey__WEBPACK_IMPORTED_MODULE_4__[\"default\"][50]\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nvar dark = {\n text: {\n primary: _colors_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n hint: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: _colors_grey__WEBPACK_IMPORTED_MODULE_4__[\"default\"][800],\n default: '#303030'\n },\n action: {\n active: _colors_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"].white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\n\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n var tonalOffsetLight = tonalOffset.light || tonalOffset;\n var tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__[\"lighten\"])(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__[\"darken\"])(intent.main, tonalOffsetDark);\n }\n }\n}\n\nfunction createPalette(palette) {\n var _palette$primary = palette.primary,\n primary = _palette$primary === void 0 ? {\n light: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__[\"default\"][300],\n main: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__[\"default\"][500],\n dark: _colors_indigo__WEBPACK_IMPORTED_MODULE_5__[\"default\"][700]\n } : _palette$primary,\n _palette$secondary = palette.secondary,\n secondary = _palette$secondary === void 0 ? {\n light: _colors_pink__WEBPACK_IMPORTED_MODULE_6__[\"default\"].A200,\n main: _colors_pink__WEBPACK_IMPORTED_MODULE_6__[\"default\"].A400,\n dark: _colors_pink__WEBPACK_IMPORTED_MODULE_6__[\"default\"].A700\n } : _palette$secondary,\n _palette$error = palette.error,\n error = _palette$error === void 0 ? {\n light: _colors_red__WEBPACK_IMPORTED_MODULE_7__[\"default\"][300],\n main: _colors_red__WEBPACK_IMPORTED_MODULE_7__[\"default\"][500],\n dark: _colors_red__WEBPACK_IMPORTED_MODULE_7__[\"default\"][700]\n } : _palette$error,\n _palette$warning = palette.warning,\n warning = _palette$warning === void 0 ? {\n light: _colors_orange__WEBPACK_IMPORTED_MODULE_8__[\"default\"][300],\n main: _colors_orange__WEBPACK_IMPORTED_MODULE_8__[\"default\"][500],\n dark: _colors_orange__WEBPACK_IMPORTED_MODULE_8__[\"default\"][700]\n } : _palette$warning,\n _palette$info = palette.info,\n info = _palette$info === void 0 ? {\n light: _colors_blue__WEBPACK_IMPORTED_MODULE_9__[\"default\"][300],\n main: _colors_blue__WEBPACK_IMPORTED_MODULE_9__[\"default\"][500],\n dark: _colors_blue__WEBPACK_IMPORTED_MODULE_9__[\"default\"][700]\n } : _palette$info,\n _palette$success = palette.success,\n success = _palette$success === void 0 ? {\n light: _colors_green__WEBPACK_IMPORTED_MODULE_10__[\"default\"][300],\n main: _colors_green__WEBPACK_IMPORTED_MODULE_10__[\"default\"][500],\n dark: _colors_green__WEBPACK_IMPORTED_MODULE_10__[\"default\"][700]\n } : _palette$success,\n _palette$type = palette.type,\n type = _palette$type === void 0 ? 'light' : _palette$type,\n _palette$contrastThre = palette.contrastThreshold,\n contrastThreshold = _palette$contrastThre === void 0 ? 3 : _palette$contrastThre,\n _palette$tonalOffset = palette.tonalOffset,\n tonalOffset = _palette$tonalOffset === void 0 ? 0.2 : _palette$tonalOffset,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(palette, [\"primary\", \"secondary\", \"error\", \"warning\", \"info\", \"success\", \"type\", \"contrastThreshold\", \"tonalOffset\"]); // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n\n\n function getContrastText(background) {\n var contrastText = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__[\"getContrastRatio\"])(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n\n if (true) {\n var contrast = Object(_colorManipulator__WEBPACK_IMPORTED_MODULE_11__[\"getContrastRatio\"])(background, contrastText);\n\n if (contrast < 3) {\n console.error([\"Material-UI: The contrast ratio of \".concat(contrast, \":1 for \").concat(contrastText, \" on \").concat(background), 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n\n return contrastText;\n }\n\n var augmentColor = function augmentColor(color) {\n var mainShade = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;\n var lightShade = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;\n var darkShade = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 700;\n color = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, color);\n\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n\n if (!color.main) {\n throw new Error( true ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\nThe color object needs to have a `main` property or a `\".concat(mainShade, \"` property.\") : undefined);\n }\n\n if (typeof color.main !== 'string') {\n throw new Error( true ? \"Material-UI: The color provided to augmentColor(color) is invalid.\\n`color.main` should be a string, but `\".concat(JSON.stringify(color.main), \"` was provided instead.\\n\\nDid you intend to use one of the following approaches?\\n\\nimport {\\xA0green } from \\\"@material-ui/core/colors\\\";\\n\\nconst theme1 = createMuiTheme({ palette: {\\n primary: green,\\n} });\\n\\nconst theme2 = createMuiTheme({ palette: {\\n primary: { main: green[500] },\\n} });\") : undefined);\n }\n\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n\n return color;\n };\n\n var types = {\n dark: dark,\n light: light\n };\n\n if (true) {\n if (!types[type]) {\n console.error(\"Material-UI: The palette type `\".concat(type, \"` is not supported.\"));\n }\n }\n\n var paletteOutput = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"deepmerge\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // A collection of common colors.\n common: _colors_common__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n // The palette type, can be light or dark.\n type: type,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor(primary),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor(secondary, 'A400', 'A200', 'A700'),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor(error),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor(warning),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor(info),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor(success),\n // The grey colors.\n grey: _colors_grey__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold: contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText: getContrastText,\n // Generate a rich color object.\n augmentColor: augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset: tonalOffset\n }, types[type]), other);\n return paletteOutput;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createPalette.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createSpacing.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createSpacing.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createSpacing; });\n/* harmony import */ var _material_ui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/system */ \"./node_modules/@material-ui/system/esm/index.js\");\n\nvar warnOnce;\nfunction createSpacing() {\n var spacingInput = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 8;\n\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n } // Material Design layouts are visually balanced. Most measurements align to an 8dp grid applied, which aligns both spacing and the overall layout.\n // Smaller components, such as icons and type, can align to a 4dp grid.\n // https://material.io/design/layout/understanding-layout.html#usage\n\n\n var transform = Object(_material_ui_system__WEBPACK_IMPORTED_MODULE_0__[\"createUnarySpacing\"])({\n spacing: spacingInput\n });\n\n var spacing = function spacing() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (true) {\n if (!(args.length <= 4)) {\n console.error(\"Material-UI: Too many arguments provided, expected between 0 and 4, got \".concat(args.length));\n }\n }\n\n if (args.length === 0) {\n return transform(1);\n }\n\n if (args.length === 1) {\n return transform(args[0]);\n }\n\n return args.map(function (argument) {\n if (typeof argument === 'string') {\n return argument;\n }\n\n var output = transform(argument);\n return typeof output === 'number' ? \"\".concat(output, \"px\") : output;\n }).join(' ');\n }; // Backward compatibility, to remove in v5.\n\n\n Object.defineProperty(spacing, 'unit', {\n get: function get() {\n if (true) {\n if (!warnOnce || \"development\" === 'test') {\n console.error(['Material-UI: theme.spacing.unit usage has been deprecated.', 'It will be removed in v5.', 'You can replace `theme.spacing.unit * y` with `theme.spacing(y)`.', '', 'You can use the `https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api` migration helper to make the process smoother.'].join('\\n'));\n }\n\n warnOnce = true;\n }\n\n return spacingInput;\n }\n });\n spacing.mui = true;\n return spacing;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createSpacing.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createStyles.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createStyles.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createStyles; });\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n // let warnOnce = false;\n// To remove in v5\n\nfunction createStyles(styles) {\n // warning(\n // warnOnce,\n // [\n // 'Material-UI: createStyles from @material-ui/core/styles is deprecated.',\n // 'Please use @material-ui/styles/createStyles',\n // ].join('\\n'),\n // );\n // warnOnce = true;\n return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__[\"createStyles\"])(styles);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/createTypography.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/createTypography.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createTypography; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nvar caseAllCaps = {\n textTransform: 'uppercase'\n};\nvar defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n/**\n * @see @link{https://material.io/design/typography/the-type-system.html}\n * @see @link{https://material.io/design/typography/understanding-typography.html}\n */\n\nfunction createTypography(palette, typography) {\n var _ref = typeof typography === 'function' ? typography(palette) : typography,\n _ref$fontFamily = _ref.fontFamily,\n fontFamily = _ref$fontFamily === void 0 ? defaultFontFamily : _ref$fontFamily,\n _ref$fontSize = _ref.fontSize,\n fontSize = _ref$fontSize === void 0 ? 14 : _ref$fontSize,\n _ref$fontWeightLight = _ref.fontWeightLight,\n fontWeightLight = _ref$fontWeightLight === void 0 ? 300 : _ref$fontWeightLight,\n _ref$fontWeightRegula = _ref.fontWeightRegular,\n fontWeightRegular = _ref$fontWeightRegula === void 0 ? 400 : _ref$fontWeightRegula,\n _ref$fontWeightMedium = _ref.fontWeightMedium,\n fontWeightMedium = _ref$fontWeightMedium === void 0 ? 500 : _ref$fontWeightMedium,\n _ref$fontWeightBold = _ref.fontWeightBold,\n fontWeightBold = _ref$fontWeightBold === void 0 ? 700 : _ref$fontWeightBold,\n _ref$htmlFontSize = _ref.htmlFontSize,\n htmlFontSize = _ref$htmlFontSize === void 0 ? 16 : _ref$htmlFontSize,\n allVariants = _ref.allVariants,\n pxToRem2 = _ref.pxToRem,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, [\"fontFamily\", \"fontSize\", \"fontWeightLight\", \"fontWeightRegular\", \"fontWeightMedium\", \"fontWeightBold\", \"htmlFontSize\", \"allVariants\", \"pxToRem\"]);\n\n if (true) {\n if (typeof fontSize !== 'number') {\n console.error('Material-UI: `fontSize` is required to be a number.');\n }\n\n if (typeof htmlFontSize !== 'number') {\n console.error('Material-UI: `htmlFontSize` is required to be a number.');\n }\n }\n\n var coef = fontSize / 14;\n\n var pxToRem = pxToRem2 || function (size) {\n return \"\".concat(size / htmlFontSize * coef, \"rem\");\n };\n\n var buildVariant = function buildVariant(fontWeight, size, lineHeight, letterSpacing, casing) {\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n fontFamily: fontFamily,\n fontWeight: fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight: lineHeight\n }, fontFamily === defaultFontFamily ? {\n letterSpacing: \"\".concat(round(letterSpacing / size), \"em\")\n } : {}, casing, allVariants);\n };\n\n var variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)\n };\n return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"deepmerge\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n htmlFontSize: htmlFontSize,\n pxToRem: pxToRem,\n round: round,\n // TODO v5: remove\n fontFamily: fontFamily,\n fontSize: fontSize,\n fontWeightLight: fontWeightLight,\n fontWeightRegular: fontWeightRegular,\n fontWeightMedium: fontWeightMedium,\n fontWeightBold: fontWeightBold\n }, variants), other, {\n clone: false // No need to clone deep\n\n });\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/createTypography.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/cssUtils.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/cssUtils.js ***! \***************************************************************/ /*! exports provided: isUnitless, getUnit, toUnitless, convertLength, alignProperty, fontGrid, responsiveProperty */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isUnitless\", function() { return isUnitless; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getUnit\", function() { return getUnit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toUnitless\", function() { return toUnitless; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"convertLength\", function() { return convertLength; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alignProperty\", function() { return alignProperty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fontGrid\", function() { return fontGrid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"responsiveProperty\", function() { return responsiveProperty; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n\nfunction isUnitless(value) {\n return String(parseFloat(value)).length === String(value).length;\n} // Ported from Compass\n// https://github.com/Compass/compass/blob/master/core/stylesheets/compass/typography/_units.scss\n// Emulate the sass function \"unit\"\n\nfunction getUnit(input) {\n return String(input).match(/[\\d.\\-+]*\\s*(.*)/)[1] || '';\n} // Emulate the sass function \"unitless\"\n\nfunction toUnitless(length) {\n return parseFloat(length);\n} // Convert any CSS or value to any another.\n// From https://github.com/KyleAMathews/convert-css-length\n\nfunction convertLength(baseFontSize) {\n return function (length, toUnit) {\n var fromUnit = getUnit(length); // Optimize for cases where `from` and `to` units are accidentally the same.\n\n if (fromUnit === toUnit) {\n return length;\n } // Convert input length to pixels.\n\n\n var pxLength = toUnitless(length);\n\n if (fromUnit !== 'px') {\n if (fromUnit === 'em') {\n pxLength = toUnitless(length) * toUnitless(baseFontSize);\n } else if (fromUnit === 'rem') {\n pxLength = toUnitless(length) * toUnitless(baseFontSize);\n return length;\n }\n } // Convert length in pixels to the output unit\n\n\n var outputLength = pxLength;\n\n if (toUnit !== 'px') {\n if (toUnit === 'em') {\n outputLength = pxLength / toUnitless(baseFontSize);\n } else if (toUnit === 'rem') {\n outputLength = pxLength / toUnitless(baseFontSize);\n } else {\n return length;\n }\n }\n\n return parseFloat(outputLength.toFixed(5)) + toUnit;\n };\n}\nfunction alignProperty(_ref) {\n var size = _ref.size,\n grid = _ref.grid;\n var sizeBelow = size - size % grid;\n var sizeAbove = sizeBelow + grid;\n return size - sizeBelow < sizeAbove - size ? sizeBelow : sizeAbove;\n} // fontGrid finds a minimal grid (in rem) for the fontSize values so that the\n// lineHeight falls under a x pixels grid, 4px in the case of Material Design,\n// without changing the relative line height\n\nfunction fontGrid(_ref2) {\n var lineHeight = _ref2.lineHeight,\n pixels = _ref2.pixels,\n htmlFontSize = _ref2.htmlFontSize;\n return pixels / (lineHeight * htmlFontSize);\n}\n/**\n * generate a responsive version of a given CSS property\n * @example\n * responsiveProperty({\n * cssProperty: 'fontSize',\n * min: 15,\n * max: 20,\n * unit: 'px',\n * breakpoints: [300, 600],\n * })\n *\n * // this returns\n *\n * {\n * fontSize: '15px',\n * '@media (min-width:300px)': {\n * fontSize: '17.5px',\n * },\n * '@media (min-width:600px)': {\n * fontSize: '20px',\n * },\n * }\n *\n * @param {Object} params\n * @param {string} params.cssProperty - The CSS property to be made responsive\n * @param {number} params.min - The smallest value of the CSS property\n * @param {number} params.max - The largest value of the CSS property\n * @param {string} [params.unit] - The unit to be used for the CSS property\n * @param {Array.number} [params.breakpoints] - An array of breakpoints\n * @param {number} [params.alignStep] - Round scaled value to fall under this grid\n * @returns {Object} responsive styles for {params.cssProperty}\n */\n\nfunction responsiveProperty(_ref3) {\n var cssProperty = _ref3.cssProperty,\n min = _ref3.min,\n max = _ref3.max,\n _ref3$unit = _ref3.unit,\n unit = _ref3$unit === void 0 ? 'rem' : _ref3$unit,\n _ref3$breakpoints = _ref3.breakpoints,\n breakpoints = _ref3$breakpoints === void 0 ? [600, 960, 1280] : _ref3$breakpoints,\n _ref3$transform = _ref3.transform,\n transform = _ref3$transform === void 0 ? null : _ref3$transform;\n\n var output = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, cssProperty, \"\".concat(min).concat(unit));\n\n var factor = (max - min) / breakpoints[breakpoints.length - 1];\n breakpoints.forEach(function (breakpoint) {\n var value = min + factor * breakpoint;\n\n if (transform !== null) {\n value = transform(value);\n }\n\n output[\"@media (min-width:\".concat(breakpoint, \"px)\")] = Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, cssProperty, \"\".concat(Math.round(value * 10000) / 10000).concat(unit));\n });\n return output;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/cssUtils.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/defaultTheme.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/defaultTheme.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _createMuiTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createMuiTheme */ \"./node_modules/@material-ui/core/esm/styles/createMuiTheme.js\");\n\nvar defaultTheme = Object(_createMuiTheme__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaultTheme);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/defaultTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/index.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/index.js ***! \************************************************************/ /*! exports provided: createMuiTheme, unstable_createMuiStrictModeTheme, createStyles, makeStyles, responsiveFontSizes, styled, useTheme, withStyles, withTheme, createGenerateClassName, jssPreset, ServerStyleSheets, StylesProvider, MuiThemeProvider, ThemeProvider, hexToRgb, rgbToHex, hslToRgb, decomposeColor, recomposeColor, getContrastRatio, getLuminance, emphasize, fade, darken, lighten, easing, duration */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _colorManipulator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./colorManipulator */ \"./node_modules/@material-ui/core/esm/styles/colorManipulator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hexToRgb\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"hexToRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"rgbToHex\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"rgbToHex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"hslToRgb\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"hslToRgb\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"decomposeColor\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"decomposeColor\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"recomposeColor\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"recomposeColor\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getContrastRatio\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"getContrastRatio\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getLuminance\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"getLuminance\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"emphasize\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"emphasize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fade\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"fade\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"darken\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"darken\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lighten\", function() { return _colorManipulator__WEBPACK_IMPORTED_MODULE_0__[\"lighten\"]; });\n\n/* harmony import */ var _createMuiTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createMuiTheme */ \"./node_modules/@material-ui/core/esm/styles/createMuiTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createMuiTheme\", function() { return _createMuiTheme__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _createMuiStrictModeTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createMuiStrictModeTheme */ \"./node_modules/@material-ui/core/esm/styles/createMuiStrictModeTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unstable_createMuiStrictModeTheme\", function() { return _createMuiStrictModeTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./createStyles */ \"./node_modules/@material-ui/core/esm/styles/createStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStyles\", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./makeStyles */ \"./node_modules/@material-ui/core/esm/styles/makeStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeStyles\", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _responsiveFontSizes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./responsiveFontSizes */ \"./node_modules/@material-ui/core/esm/styles/responsiveFontSizes.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"responsiveFontSizes\", function() { return _responsiveFontSizes__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./styled */ \"./node_modules/@material-ui/core/esm/styles/styled.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"styled\", function() { return _styled__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _transitions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./transitions */ \"./node_modules/@material-ui/core/esm/styles/transitions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"easing\", function() { return _transitions__WEBPACK_IMPORTED_MODULE_7__[\"easing\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"duration\", function() { return _transitions__WEBPACK_IMPORTED_MODULE_7__[\"duration\"]; });\n\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useTheme\", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./withStyles */ \"./node_modules/@material-ui/core/esm/styles/withStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withStyles\", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./withTheme */ \"./node_modules/@material-ui/core/esm/styles/withTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withTheme\", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createGenerateClassName\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"createGenerateClassName\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jssPreset\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"jssPreset\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ServerStyleSheets\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"ServerStyleSheets\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StylesProvider\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"StylesProvider\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"MuiThemeProvider\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"ThemeProvider\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ThemeProvider\", function() { return _material_ui_styles__WEBPACK_IMPORTED_MODULE_11__[\"ThemeProvider\"]; });\n\n\n // eslint-disable-next-line camelcase\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/makeStyles.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/makeStyles.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ \"./node_modules/@material-ui/core/esm/styles/defaultTheme.js\");\n\n\n\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__[\"makeStyles\"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n }, options));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (makeStyles);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/makeStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/responsiveFontSizes.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/responsiveFontSizes.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return responsiveFontSizes; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _cssUtils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./cssUtils */ \"./node_modules/@material-ui/core/esm/styles/cssUtils.js\");\n\n\n\nfunction responsiveFontSizes(themeInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$breakpoints = options.breakpoints,\n breakpoints = _options$breakpoints === void 0 ? ['sm', 'md', 'lg'] : _options$breakpoints,\n _options$disableAlign = options.disableAlign,\n disableAlign = _options$disableAlign === void 0 ? false : _options$disableAlign,\n _options$factor = options.factor,\n factor = _options$factor === void 0 ? 2 : _options$factor,\n _options$variants = options.variants,\n variants = _options$variants === void 0 ? ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'caption', 'button', 'overline'] : _options$variants;\n\n var theme = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, themeInput);\n\n theme.typography = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, theme.typography);\n var typography = theme.typography; // Convert between css lengths e.g. em->px or px->rem\n // Set the baseFontSize for your project. Defaults to 16px (also the browser default).\n\n var convert = Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"convertLength\"])(typography.htmlFontSize);\n var breakpointValues = breakpoints.map(function (x) {\n return theme.breakpoints.values[x];\n });\n variants.forEach(function (variant) {\n var style = typography[variant];\n var remFontSize = parseFloat(convert(style.fontSize, 'rem'));\n\n if (remFontSize <= 1) {\n return;\n }\n\n var maxFontSize = remFontSize;\n var minFontSize = 1 + (maxFontSize - 1) / factor;\n var lineHeight = style.lineHeight;\n\n if (!Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"isUnitless\"])(lineHeight) && !disableAlign) {\n throw new Error( true ? \"Material-UI: Unsupported non-unitless line height with grid alignment.\\nUse unitless line heights instead.\" : undefined);\n }\n\n if (!Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"isUnitless\"])(lineHeight)) {\n // make it unitless\n lineHeight = parseFloat(convert(lineHeight, 'rem')) / parseFloat(remFontSize);\n }\n\n var transform = null;\n\n if (!disableAlign) {\n transform = function transform(value) {\n return Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"alignProperty\"])({\n size: value,\n grid: Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"fontGrid\"])({\n pixels: 4,\n lineHeight: lineHeight,\n htmlFontSize: typography.htmlFontSize\n })\n });\n };\n }\n\n typography[variant] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, style, Object(_cssUtils__WEBPACK_IMPORTED_MODULE_2__[\"responsiveProperty\"])({\n cssProperty: 'fontSize',\n min: minFontSize,\n max: maxFontSize,\n unit: 'rem',\n breakpoints: breakpointValues,\n transform: transform\n }));\n });\n return theme;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/responsiveFontSizes.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/shadows.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/shadows.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar shadowKeyUmbraOpacity = 0.2;\nvar shadowKeyPenumbraOpacity = 0.14;\nvar shadowAmbientShadowOpacity = 0.12;\n\nfunction createShadow() {\n return [\"\".concat(arguments.length <= 0 ? undefined : arguments[0], \"px \").concat(arguments.length <= 1 ? undefined : arguments[1], \"px \").concat(arguments.length <= 2 ? undefined : arguments[2], \"px \").concat(arguments.length <= 3 ? undefined : arguments[3], \"px rgba(0,0,0,\").concat(shadowKeyUmbraOpacity, \")\"), \"\".concat(arguments.length <= 4 ? undefined : arguments[4], \"px \").concat(arguments.length <= 5 ? undefined : arguments[5], \"px \").concat(arguments.length <= 6 ? undefined : arguments[6], \"px \").concat(arguments.length <= 7 ? undefined : arguments[7], \"px rgba(0,0,0,\").concat(shadowKeyPenumbraOpacity, \")\"), \"\".concat(arguments.length <= 8 ? undefined : arguments[8], \"px \").concat(arguments.length <= 9 ? undefined : arguments[9], \"px \").concat(arguments.length <= 10 ? undefined : arguments[10], \"px \").concat(arguments.length <= 11 ? undefined : arguments[11], \"px rgba(0,0,0,\").concat(shadowAmbientShadowOpacity, \")\")].join(',');\n} // Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\n\n\nvar shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\n/* harmony default export */ __webpack_exports__[\"default\"] = (shadows);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/shadows.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/shape.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/shape.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar shape = {\n borderRadius: 4\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (shape);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/shape.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/styled.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/styled.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ \"./node_modules/@material-ui/core/esm/styles/defaultTheme.js\");\n\n\n\n\nvar styled = function styled(Component) {\n var componentCreator = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__[\"styled\"])(Component);\n return function (style, options) {\n return componentCreator(style, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n }, options));\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (styled);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/styled.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/transitions.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/transitions.js ***! \******************************************************************/ /*! exports provided: easing, duration, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"easing\", function() { return easing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"duration\", function() { return duration; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n\n// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nvar easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n}; // Follow https://material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\n\nvar duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\n\nfunction formatMs(milliseconds) {\n return \"\".concat(Math.round(milliseconds), \"ms\");\n}\n/**\n * @param {string|Array} props\n * @param {object} param\n * @param {string} param.prop\n * @param {number} param.duration\n * @param {string} param.easing\n * @param {number} param.delay\n */\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n easing: easing,\n duration: duration,\n create: function create() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['all'];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var _options$duration = options.duration,\n durationOption = _options$duration === void 0 ? duration.standard : _options$duration,\n _options$easing = options.easing,\n easingOption = _options$easing === void 0 ? easing.easeInOut : _options$easing,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 0 : _options$delay,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(options, [\"duration\", \"easing\", \"delay\"]);\n\n if (true) {\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var isNumber = function isNumber(value) {\n return !isNaN(parseFloat(value));\n };\n\n if (!isString(props) && !Array.isArray(props)) {\n console.error('Material-UI: Argument \"props\" must be a string or Array.');\n }\n\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(\"Material-UI: Argument \\\"duration\\\" must be a number or a string but found \".concat(durationOption, \".\"));\n }\n\n if (!isString(easingOption)) {\n console.error('Material-UI: Argument \"easing\" must be a string.');\n }\n\n if (!isNumber(delay) && !isString(delay)) {\n console.error('Material-UI: Argument \"delay\" must be a number or a string.');\n }\n\n if (Object.keys(other).length !== 0) {\n console.error(\"Material-UI: Unrecognized argument(s) [\".concat(Object.keys(other).join(','), \"].\"));\n }\n }\n\n return (Array.isArray(props) ? props : [props]).map(function (animatedProp) {\n return \"\".concat(animatedProp, \" \").concat(typeof durationOption === 'string' ? durationOption : formatMs(durationOption), \" \").concat(easingOption, \" \").concat(typeof delay === 'string' ? delay : formatMs(delay));\n }).join(',');\n },\n getAutoHeightDuration: function getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n\n var constant = height / 36; // https://www.wolframalpha.com/input/?i=(4+%2B+15+*+(x+%2F+36+)+**+0.25+%2B+(x+%2F+36)+%2F+5)+*+10\n\n return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);\n }\n});\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/transitions.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/useTheme.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/useTheme.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useTheme; });\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ \"./node_modules/@material-ui/core/esm/styles/defaultTheme.js\");\n\n\n\nfunction useTheme() {\n var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__[\"useTheme\"])() || _defaultTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"];\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_1___default.a.useDebugValue(theme);\n }\n\n return theme;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/useTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/withStyles.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/withStyles.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ \"./node_modules/@material-ui/core/esm/styles/defaultTheme.js\");\n\n\n\n\nfunction withStyles(stylesOrCreator, options) {\n return Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_1__[\"withStyles\"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n }, options));\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withStyles);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/withStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/withTheme.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/withTheme.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ \"./node_modules/@material-ui/core/esm/styles/defaultTheme.js\");\n\n\nvar withTheme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_0__[\"withThemeCreator\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (withTheme);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/withTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/styles/zIndex.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/styles/zIndex.js ***! \*************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nvar zIndex = {\n mobileStepper: 1000,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (zIndex);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/styles/zIndex.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/transitions/utils.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/transitions/utils.js ***! \*****************************************************************/ /*! exports provided: reflow, getTransitionProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reflow\", function() { return reflow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getTransitionProps\", function() { return getTransitionProps; });\nvar reflow = function reflow(node) {\n return node.scrollTop;\n};\nfunction getTransitionProps(props, options) {\n var timeout = props.timeout,\n _props$style = props.style,\n style = _props$style === void 0 ? {} : _props$style;\n return {\n duration: style.transitionDuration || typeof timeout === 'number' ? timeout : timeout[options.mode] || 0,\n delay: style.transitionDelay\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/transitions/utils.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/useMediaQuery/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/useMediaQuery/index.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./useMediaQuery */ \"./node_modules/@material-ui/core/esm/useMediaQuery/useMediaQuery.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _useMediaQuery__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/useMediaQuery/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/useMediaQuery/useMediaQuery.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/useMediaQuery/useMediaQuery.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useMediaQuery; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n\n\n\nfunction useMediaQuery(queryInput) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var theme = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_2__[\"useTheme\"])();\n var props = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_2__[\"getThemeProps\"])({\n theme: theme,\n name: 'MuiUseMediaQuery',\n props: {}\n });\n\n if (true) {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['Material-UI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n var query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, ''); // Wait for jsdom to support the match media feature.\n // All the browsers Material-UI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n\n var supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n\n var _props$options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, options),\n _props$options$defaul = _props$options.defaultMatches,\n defaultMatches = _props$options$defaul === void 0 ? false : _props$options$defaul,\n _props$options$matchM = _props$options.matchMedia,\n matchMedia = _props$options$matchM === void 0 ? supportMatchMedia ? window.matchMedia : null : _props$options$matchM,\n _props$options$noSsr = _props$options.noSsr,\n noSsr = _props$options$noSsr === void 0 ? false : _props$options$noSsr,\n _props$options$ssrMat = _props$options.ssrMatchMedia,\n ssrMatchMedia = _props$options$ssrMat === void 0 ? null : _props$options$ssrMat;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"](function () {\n if (noSsr && supportMatchMedia) {\n return matchMedia(query).matches;\n }\n\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n } // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n\n\n return defaultMatches;\n }),\n match = _React$useState[0],\n setMatch = _React$useState[1];\n\n react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"](function () {\n var active = true;\n\n if (!supportMatchMedia) {\n return undefined;\n }\n\n var queryList = matchMedia(query);\n\n var updateMatch = function updateMatch() {\n // Workaround Safari wrong implementation of matchMedia\n // TODO can we remove it?\n // https://github.com/mui-org/material-ui/pull/17315#issuecomment-528286677\n if (active) {\n setMatch(queryList.matches);\n }\n };\n\n updateMatch();\n queryList.addListener(updateMatch);\n return function () {\n active = false;\n queryList.removeListener(updateMatch);\n };\n }, [query, matchMedia, supportMatchMedia]);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_1__[\"useDebugValue\"]({\n query: query,\n match: match\n });\n }\n\n return match;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/useMediaQuery/useMediaQuery.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/useScrollTrigger/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/useScrollTrigger/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _useScrollTrigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./useScrollTrigger */ \"./node_modules/@material-ui/core/esm/useScrollTrigger/useScrollTrigger.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _useScrollTrigger__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/useScrollTrigger/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/useScrollTrigger/useScrollTrigger.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/useScrollTrigger/useScrollTrigger.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useScrollTrigger; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\n\nfunction defaultTrigger(store, options) {\n var _options$disableHyste = options.disableHysteresis,\n disableHysteresis = _options$disableHyste === void 0 ? false : _options$disableHyste,\n _options$threshold = options.threshold,\n threshold = _options$threshold === void 0 ? 100 : _options$threshold,\n target = options.target;\n var previous = store.current;\n\n if (target) {\n // Get vertical scroll\n store.current = target.pageYOffset !== undefined ? target.pageYOffset : target.scrollTop;\n }\n\n if (!disableHysteresis && previous !== undefined) {\n if (store.current < previous) {\n return false;\n }\n }\n\n return store.current > threshold;\n}\n\nvar defaultTarget = typeof window !== 'undefined' ? window : null;\nfunction useScrollTrigger() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var _options$getTrigger = options.getTrigger,\n getTrigger = _options$getTrigger === void 0 ? defaultTrigger : _options$getTrigger,\n _options$target = options.target,\n target = _options$target === void 0 ? defaultTarget : _options$target,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(options, [\"getTrigger\", \"target\"]);\n\n var store = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](function () {\n return getTrigger(store, other);\n }),\n trigger = _React$useState[0],\n setTrigger = _React$useState[1];\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](function () {\n var handleScroll = function handleScroll() {\n setTrigger(getTrigger(store, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n target: target\n }, other)));\n };\n\n handleScroll(); // Re-evaluate trigger when dependencies change\n\n target.addEventListener('scroll', handleScroll);\n return function () {\n target.removeEventListener('scroll', handleScroll);\n }; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [target, getTrigger, JSON.stringify(other)]);\n return trigger;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/useScrollTrigger/useScrollTrigger.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/capitalize.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/capitalize.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return capitalize; });\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word a the sentence.\n// We only handle the first word.\nfunction capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error( true ? \"Material-UI: capitalize(string) expects a string argument.\" : undefined);\n }\n\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/capitalize.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/createChainedFunction.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/createChainedFunction.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createChainedFunction; });\n/**\n * Safe chained function\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n *\n * @param {function} functions to chain\n * @returns {function|null}\n */\nfunction createChainedFunction() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (acc, func) {\n if (func == null) {\n return acc;\n }\n\n if (true) {\n if (typeof func !== 'function') {\n console.error('Material-UI: Invalid Argument Type, must only provide functions, undefined, or null.');\n }\n }\n\n return function chainedFunction() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, function () {});\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/createChainedFunction.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/createSvgIcon.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/createSvgIcon.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createSvgIcon; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _SvgIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SvgIcon */ \"./node_modules/@material-ui/core/esm/SvgIcon/index.js\");\n\n\n\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nfunction createSvgIcon(path, displayName) {\n var Component = function Component(props, ref) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_SvgIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref\n }, props), path);\n };\n\n if (true) {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = \"\".concat(displayName, \"Icon\");\n }\n\n Component.muiName = _SvgIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"].muiName;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.memo( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.forwardRef(Component));\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/createSvgIcon.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/debounce.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/debounce.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return debounce; });\n// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nfunction debounce(func) {\n var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166;\n var timeout;\n\n function debounced() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n // eslint-disable-next-line consistent-this\n var that = this;\n\n var later = function later() {\n func.apply(that, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n\n debounced.clear = function () {\n clearTimeout(timeout);\n };\n\n return debounced;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/debounce.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/deprecatedPropType.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/deprecatedPropType.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deprecatedPropType; });\nfunction deprecatedPropType(validator, reason) {\n if (false) {}\n\n return function (props, propName, componentName, location, propFullName) {\n var componentNameSafe = componentName || '<>';\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The \".concat(location, \" `\").concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameSafe, \"` is deprecated. \").concat(reason));\n }\n\n return null;\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/deprecatedPropType.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/getScrollbarSize.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/getScrollbarSize.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getScrollbarSize; });\n// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/3ffe3a5d82f6f561b82ff78d82b32a7d14aed558/js/src/modal.js#L512-L519\nfunction getScrollbarSize() {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.width = '99px';\n scrollDiv.style.height = '99px';\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n var scrollbarSize = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n return scrollbarSize;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/getScrollbarSize.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/index.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/index.js ***! \***********************************************************/ /*! exports provided: capitalize, createChainedFunction, createSvgIcon, debounce, deprecatedPropType, isMuiElement, ownerDocument, ownerWindow, requirePropFactory, setRef, unsupportedProp, useControlled, useEventCallback, useForkRef, unstable_useId, useIsFocusVisible */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _capitalize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./capitalize */ \"./node_modules/@material-ui/core/esm/utils/capitalize.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"capitalize\", function() { return _capitalize__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _createChainedFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createChainedFunction */ \"./node_modules/@material-ui/core/esm/utils/createChainedFunction.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createChainedFunction\", function() { return _createChainedFunction__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _createSvgIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createSvgIcon */ \"./node_modules/@material-ui/core/esm/utils/createSvgIcon.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createSvgIcon\", function() { return _createSvgIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./debounce */ \"./node_modules/@material-ui/core/esm/utils/debounce.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"debounce\", function() { return _debounce__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _deprecatedPropType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./deprecatedPropType */ \"./node_modules/@material-ui/core/esm/utils/deprecatedPropType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deprecatedPropType\", function() { return _deprecatedPropType__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _isMuiElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./isMuiElement */ \"./node_modules/@material-ui/core/esm/utils/isMuiElement.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isMuiElement\", function() { return _isMuiElement__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ownerDocument\", function() { return _ownerDocument__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _ownerWindow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ownerWindow */ \"./node_modules/@material-ui/core/esm/utils/ownerWindow.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ownerWindow\", function() { return _ownerWindow__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./requirePropFactory */ \"./node_modules/@material-ui/core/esm/utils/requirePropFactory.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"requirePropFactory\", function() { return _requirePropFactory__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"setRef\", function() { return _setRef__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _unsupportedProp__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./unsupportedProp */ \"./node_modules/@material-ui/core/esm/utils/unsupportedProp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unsupportedProp\", function() { return _unsupportedProp__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony import */ var _useControlled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useControlled */ \"./node_modules/@material-ui/core/esm/utils/useControlled.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useControlled\", function() { return _useControlled__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony import */ var _useEventCallback__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./useEventCallback */ \"./node_modules/@material-ui/core/esm/utils/useEventCallback.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useEventCallback\", function() { return _useEventCallback__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _useForkRef__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./useForkRef */ \"./node_modules/@material-ui/core/esm/utils/useForkRef.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useForkRef\", function() { return _useForkRef__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony import */ var _unstable_useId__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./unstable_useId */ \"./node_modules/@material-ui/core/esm/utils/unstable_useId.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"unstable_useId\", function() { return _unstable_useId__WEBPACK_IMPORTED_MODULE_14__[\"default\"]; });\n\n/* harmony import */ var _useIsFocusVisible__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./useIsFocusVisible */ \"./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useIsFocusVisible\", function() { return _useIsFocusVisible__WEBPACK_IMPORTED_MODULE_15__[\"default\"]; });\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // eslint-disable-next-line camelcase\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/isMuiElement.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/isMuiElement.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return isMuiElement; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction isMuiElement(element, muiNames) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__[\"isValidElement\"](element) && muiNames.indexOf(element.type.muiName) !== -1;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/isMuiElement.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/ownerDocument.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/ownerDocument.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ownerDocument; });\nfunction ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/ownerDocument.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/ownerWindow.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/ownerWindow.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ownerWindow; });\n/* harmony import */ var _ownerDocument__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ownerDocument */ \"./node_modules/@material-ui/core/esm/utils/ownerDocument.js\");\n\nfunction ownerWindow(node) {\n var doc = Object(_ownerDocument__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(node);\n return doc.defaultView || window;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/ownerWindow.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/requirePropFactory.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/requirePropFactory.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return requirePropFactory; });\nfunction requirePropFactory(componentNameInError) {\n if (false) {}\n\n var requireProp = function requireProp(requiredProp) {\n return function (props, propName, componentName, location, propFullName) {\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` of \") + \"`\".concat(componentNameInError, \"` must be used on `\").concat(requiredProp, \"`.\"));\n }\n\n return null;\n };\n };\n\n return requireProp;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/requirePropFactory.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/scrollLeft.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/scrollLeft.js ***! \****************************************************************/ /*! exports provided: detectScrollType, getNormalizedScrollLeft */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"detectScrollType\", function() { return detectScrollType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNormalizedScrollLeft\", function() { return getNormalizedScrollLeft; });\n// Source from https://github.com/alitaheri/normalize-scroll-left\nvar cachedType;\n/**\n * Based on the jquery plugin https://github.com/othree/jquery.rtl-scroll-type\n *\n * Types of scrollLeft, assiming scrollWidth=100 and direction is rtl.\n *\n * Browser | Type | <- Most Left | Most Right -> | Initial\n * -------------- | ------------- | ------------ | ------------- | -------\n * WebKit | default | 0 | 100 | 100\n * Firefox/Opera | negative | -100 | 0 | 0\n * IE/Edge | reverse | 100 | 0 | 0\n */\n\nfunction detectScrollType() {\n if (cachedType) {\n return cachedType;\n }\n\n var dummy = document.createElement('div');\n dummy.appendChild(document.createTextNode('ABCD'));\n dummy.dir = 'rtl';\n dummy.style.fontSize = '14px';\n dummy.style.width = '4px';\n dummy.style.height = '1px';\n dummy.style.position = 'absolute';\n dummy.style.top = '-1000px';\n dummy.style.overflow = 'scroll';\n document.body.appendChild(dummy);\n cachedType = 'reverse';\n\n if (dummy.scrollLeft > 0) {\n cachedType = 'default';\n } else {\n dummy.scrollLeft = 1;\n\n if (dummy.scrollLeft === 0) {\n cachedType = 'negative';\n }\n }\n\n document.body.removeChild(dummy);\n return cachedType;\n} // Based on https://stackoverflow.com/a/24394376\n\nfunction getNormalizedScrollLeft(element, direction) {\n var scrollLeft = element.scrollLeft; // Perform the calculations only when direction is rtl to avoid messing up the ltr bahavior\n\n if (direction !== 'rtl') {\n return scrollLeft;\n }\n\n var type = detectScrollType();\n\n switch (type) {\n case 'negative':\n return element.scrollWidth - element.clientWidth + scrollLeft;\n\n case 'reverse':\n return element.scrollWidth - element.clientWidth - scrollLeft;\n\n default:\n return scrollLeft;\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/scrollLeft.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/setRef.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/setRef.js ***! \************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return setRef; });\n// TODO v5: consider to make it private\nfunction setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/setRef.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/unstable_useId.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/unstable_useId.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useId; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n/**\n * Private module reserved for @material-ui/x packages.\n */\n\nfunction useId(idOverride) {\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](idOverride),\n defaultId = _React$useState[0],\n setDefaultId = _React$useState[1];\n\n var id = idOverride || defaultId;\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the random value for client-side rendering only.\n // We can't use it server-side.\n setDefaultId(\"mui-\".concat(Math.round(Math.random() * 1e5)));\n }\n }, [defaultId]);\n return id;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/unstable_useId.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/unsupportedProp.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/unsupportedProp.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return unsupportedProp; });\nfunction unsupportedProp(props, propName, componentName, location, propFullName) {\n if (false) {}\n\n var propFullNameSafe = propFullName || propName;\n\n if (typeof props[propName] !== 'undefined') {\n return new Error(\"The prop `\".concat(propFullNameSafe, \"` is not supported. Please remove it.\"));\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/unsupportedProp.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/useControlled.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/useControlled.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useControlled; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\n\nfunction useControlled(_ref) {\n var controlled = _ref.controlled,\n defaultProp = _ref.default,\n name = _ref.name,\n _ref$state = _ref.state,\n state = _ref$state === void 0 ? 'value' : _ref$state;\n\n var _React$useRef = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](controlled !== undefined),\n isControlled = _React$useRef.current;\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](defaultProp),\n valueState = _React$useState[0],\n setValue = _React$useState[1];\n\n var value = isControlled ? controlled : valueState;\n\n if (true) {\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (isControlled !== (controlled !== undefined)) {\n console.error([\"Material-UI: A component is changing the \".concat(isControlled ? '' : 'un', \"controlled \").concat(state, \" state of \").concat(name, \" to be \").concat(isControlled ? 'un' : '', \"controlled.\"), 'Elements should not switch from uncontrolled to controlled (or vice versa).', \"Decide between using a controlled or uncontrolled \".concat(name, \" \") + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render, it's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [controlled]);\n\n var _React$useRef2 = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](defaultProp),\n defaultValue = _React$useRef2.current;\n\n react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"](function () {\n if (!isControlled && defaultValue !== defaultProp) {\n console.error([\"Material-UI: A component is changing the default \".concat(state, \" state of an uncontrolled \").concat(name, \" after being initialized. \") + \"To suppress this warning opt to use a controlled \".concat(name, \".\")].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n\n var setValueIfUncontrolled = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (newValue) {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/useControlled.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/useEventCallback.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/useEventCallback.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useEventCallback; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar useEnhancedEffect = typeof window !== 'undefined' ? react__WEBPACK_IMPORTED_MODULE_0__[\"useLayoutEffect\"] : react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"];\n/**\n * https://github.com/facebook/react/issues/14099#issuecomment-440013892\n *\n * @param {function} fn\n */\n\nfunction useEventCallback(fn) {\n var ref = react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"](fn);\n useEnhancedEffect(function () {\n ref.current = fn;\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function () {\n return (0, ref.current).apply(void 0, arguments);\n }, []);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/useEventCallback.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/useForkRef.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/useForkRef.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useForkRef; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _setRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./setRef */ \"./node_modules/@material-ui/core/esm/utils/setRef.js\");\n\n\nfunction useForkRef(refA, refB) {\n /**\n * This will create a new function if the ref props change and are defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior\n */\n return react__WEBPACK_IMPORTED_MODULE_0__[\"useMemo\"](function () {\n if (refA == null && refB == null) {\n return null;\n }\n\n return function (refValue) {\n Object(_setRef__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(refA, refValue);\n Object(_setRef__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(refB, refValue);\n };\n }, [refA, refB]);\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/useForkRef.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js ***! \***********************************************************************/ /*! exports provided: teardown, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"teardown\", function() { return teardown; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useIsFocusVisible; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"./node_modules/react-dom/index.js\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n// based on https://github.com/WICG/focus-visible/blob/v4.1.5/src/focus-visible.js\n\n\nvar hadKeyboardEvent = true;\nvar hadFocusVisibleRecently = false;\nvar hadFocusVisibleRecentlyTimeout = null;\nvar inputTypesWhitelist = {\n text: true,\n search: true,\n url: true,\n tel: true,\n email: true,\n password: true,\n number: true,\n date: true,\n month: true,\n week: true,\n time: true,\n datetime: true,\n 'datetime-local': true\n};\n/**\n * Computes whether the given element should automatically trigger the\n * `focus-visible` class being added, i.e. whether it should always match\n * `:focus-visible` when focused.\n * @param {Element} node\n * @return {boolean}\n */\n\nfunction focusTriggersKeyboardModality(node) {\n var type = node.type,\n tagName = node.tagName;\n\n if (tagName === 'INPUT' && inputTypesWhitelist[type] && !node.readOnly) {\n return true;\n }\n\n if (tagName === 'TEXTAREA' && !node.readOnly) {\n return true;\n }\n\n if (node.isContentEditable) {\n return true;\n }\n\n return false;\n}\n/**\n * Keep track of our keyboard modality state with `hadKeyboardEvent`.\n * If the most recent user interaction was via the keyboard;\n * and the key press did not include a meta, alt/option, or control key;\n * then the modality is keyboard. Otherwise, the modality is not keyboard.\n * @param {KeyboardEvent} event\n */\n\n\nfunction handleKeyDown(event) {\n if (event.metaKey || event.altKey || event.ctrlKey) {\n return;\n }\n\n hadKeyboardEvent = true;\n}\n/**\n * If at any point a user clicks with a pointing device, ensure that we change\n * the modality away from keyboard.\n * This avoids the situation where a user presses a key on an already focused\n * element, and then clicks on a different element, focusing it with a\n * pointing device, while we still think we're in keyboard modality.\n */\n\n\nfunction handlePointerDown() {\n hadKeyboardEvent = false;\n}\n\nfunction handleVisibilityChange() {\n if (this.visibilityState === 'hidden') {\n // If the tab becomes active again, the browser will handle calling focus\n // on the element (Safari actually calls it twice).\n // If this tab change caused a blur on an element with focus-visible,\n // re-apply the class when the user switches back to the tab.\n if (hadFocusVisibleRecently) {\n hadKeyboardEvent = true;\n }\n }\n}\n\nfunction prepare(doc) {\n doc.addEventListener('keydown', handleKeyDown, true);\n doc.addEventListener('mousedown', handlePointerDown, true);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n doc.addEventListener('touchstart', handlePointerDown, true);\n doc.addEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction teardown(doc) {\n doc.removeEventListener('keydown', handleKeyDown, true);\n doc.removeEventListener('mousedown', handlePointerDown, true);\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n doc.removeEventListener('touchstart', handlePointerDown, true);\n doc.removeEventListener('visibilitychange', handleVisibilityChange, true);\n}\n\nfunction isFocusVisible(event) {\n var target = event.target;\n\n try {\n return target.matches(':focus-visible');\n } catch (error) {// browsers not implementing :focus-visible will throw a SyntaxError\n // we use our own heuristic for those browsers\n // rethrow might be better if it's not the expected error but do we really\n // want to crash if focus-visible malfunctioned?\n } // no need for validFocusTarget check. the user does that by attaching it to\n // focusable events only\n\n\n return hadKeyboardEvent || focusTriggersKeyboardModality(target);\n}\n/**\n * Should be called if a blur event is fired on a focus-visible element\n */\n\n\nfunction handleBlurVisible() {\n // To detect a tab/window switch, we look for a blur event followed\n // rapidly by a visibility change.\n // If we don't see a visibility change within 100ms, it's probably a\n // regular focus change.\n hadFocusVisibleRecently = true;\n window.clearTimeout(hadFocusVisibleRecentlyTimeout);\n hadFocusVisibleRecentlyTimeout = window.setTimeout(function () {\n hadFocusVisibleRecently = false;\n }, 100);\n}\n\nfunction useIsFocusVisible() {\n var ref = react__WEBPACK_IMPORTED_MODULE_0__[\"useCallback\"](function (instance) {\n var node = react_dom__WEBPACK_IMPORTED_MODULE_1__[\"findDOMNode\"](instance);\n\n if (node != null) {\n prepare(node.ownerDocument);\n }\n }, []);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__[\"useDebugValue\"](isFocusVisible);\n }\n\n return {\n isFocusVisible: isFocusVisible,\n onBlurVisible: handleBlurVisible,\n ref: ref\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/utils/useIsFocusVisible.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/withMobileDialog/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/withMobileDialog/index.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _withMobileDialog__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./withMobileDialog */ \"./node_modules/@material-ui/core/esm/withMobileDialog/withMobileDialog.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _withMobileDialog__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/withMobileDialog/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/withMobileDialog/withMobileDialog.js": /*!*********************************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/withMobileDialog/withMobileDialog.js ***! \*********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../withWidth */ \"./node_modules/@material-ui/core/esm/withWidth/index.js\");\n\n\n\n\n/**\n * Dialog will responsively be full screen *at or below* the given breakpoint\n * (defaults to 'sm' for mobile devices).\n * Notice that this Higher-order Component is incompatible with server-side rendering.\n */\n\nvar withMobileDialog = function withMobileDialog() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$breakpoint = options.breakpoint,\n breakpoint = _options$breakpoint === void 0 ? 'sm' : _options$breakpoint;\n\n function WithMobileDialog(props) {\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n fullScreen: Object(_withWidth__WEBPACK_IMPORTED_MODULE_3__[\"isWidthDown\"])(breakpoint, props.width)\n }, props));\n }\n\n true ? WithMobileDialog.propTypes = {\n width: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']).isRequired\n } : undefined;\n return Object(_withWidth__WEBPACK_IMPORTED_MODULE_3__[\"default\"])()(WithMobileDialog);\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withMobileDialog);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/withMobileDialog/withMobileDialog.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/withWidth/index.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/withWidth/index.js ***! \***************************************************************/ /*! exports provided: default, isWidthUp, isWidthDown */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _withWidth__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./withWidth */ \"./node_modules/@material-ui/core/esm/withWidth/withWidth.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isWidthUp\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__[\"isWidthUp\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"isWidthDown\", function() { return _withWidth__WEBPACK_IMPORTED_MODULE_0__[\"isWidthDown\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/withWidth/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/core/esm/withWidth/withWidth.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/core/esm/withWidth/withWidth.js ***! \*******************************************************************/ /*! exports provided: isWidthUp, isWidthDown, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isWidthUp\", function() { return isWidthUp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isWidthDown\", function() { return isWidthDown; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _material_ui_styles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/styles */ \"./node_modules/@material-ui/styles/esm/index.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useTheme */ \"./node_modules/@material-ui/core/esm/styles/useTheme.js\");\n/* harmony import */ var _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/createBreakpoints */ \"./node_modules/@material-ui/core/esm/styles/createBreakpoints.js\");\n/* harmony import */ var _useMediaQuery__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../useMediaQuery */ \"./node_modules/@material-ui/core/esm/useMediaQuery/index.js\");\n\n\n\n\n\n\n\n\n\n // By default, returns true if screen width is the same or greater than the given breakpoint.\n\nvar isWidthUp = function isWidthUp(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(breakpoint) <= _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(width);\n }\n\n return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(breakpoint) < _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(width);\n}; // By default, returns true if screen width is the same or less than the given breakpoint.\n\nvar isWidthDown = function isWidthDown(breakpoint, width) {\n var inclusive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (inclusive) {\n return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(width) <= _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(breakpoint);\n }\n\n return _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(width) < _styles_createBreakpoints__WEBPACK_IMPORTED_MODULE_8__[\"keys\"].indexOf(breakpoint);\n};\nvar useEnhancedEffect = typeof window === 'undefined' ? react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"] : react__WEBPACK_IMPORTED_MODULE_2__[\"useLayoutEffect\"];\n\nvar withWidth = function withWidth() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return function (Component) {\n var _options$withTheme = options.withTheme,\n withThemeOption = _options$withTheme === void 0 ? false : _options$withTheme,\n _options$noSSR = options.noSSR,\n noSSR = _options$noSSR === void 0 ? false : _options$noSSR,\n initialWidthOption = options.initialWidth;\n\n function WithWidth(props) {\n var contextTheme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_7__[\"default\"])();\n var theme = props.theme || contextTheme;\n\n var _getThemeProps = Object(_material_ui_styles__WEBPACK_IMPORTED_MODULE_5__[\"getThemeProps\"])({\n theme: theme,\n name: 'MuiWithWidth',\n props: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props)\n }),\n initialWidth = _getThemeProps.initialWidth,\n width = _getThemeProps.width,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_getThemeProps, [\"initialWidth\", \"width\"]);\n\n var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false),\n mountedState = _React$useState[0],\n setMountedState = _React$useState[1];\n\n useEnhancedEffect(function () {\n setMountedState(true);\n }, []);\n /**\n * innerWidth |xs sm md lg xl\n * |-------|-------|-------|-------|------>\n * width | xs | sm | md | lg | xl\n */\n\n var keys = theme.breakpoints.keys.slice().reverse();\n var widthComputed = keys.reduce(function (output, key) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n var matches = Object(_useMediaQuery__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(theme.breakpoints.up(key));\n return !output && matches ? key : output;\n }, null);\n\n var more = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n width: width || (mountedState || noSSR ? widthComputed : undefined) || initialWidth || initialWidthOption\n }, withThemeOption ? {\n theme: theme\n } : {}, other); // When rendering the component on the server,\n // we have no idea about the client browser screen width.\n // In order to prevent blinks and help the reconciliation of the React tree\n // we are not rendering the child component.\n //\n // An alternative is to use the `initialWidth` property.\n\n\n if (more.width === undefined) {\n return null;\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](Component, more);\n }\n\n true ? WithWidth.propTypes = {\n /**\n * As `window.innerWidth` is unavailable on the server,\n * we default to rendering an empty component during the first mount.\n * You might want to use an heuristic to approximate\n * the screen width of the client browser screen width.\n *\n * For instance, you could be using the user-agent or the client-hints.\n * https://caniuse.com/#search=client%20hint\n */\n initialWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),\n\n /**\n * @ignore\n */\n theme: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Bypass the width calculation logic.\n */\n width: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['xs', 'sm', 'md', 'lg', 'xl'])\n } : undefined;\n\n if (true) {\n WithWidth.displayName = \"WithWidth(\".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_4__[\"getDisplayName\"])(Component), \")\");\n }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(WithWidth, Component);\n return WithWidth;\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withWidth);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/core/esm/withWidth/withWidth.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js": /*!*************************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js ***! \*************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return ServerStyleSheets; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ \"./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../StylesProvider */ \"./node_modules/@material-ui/styles/esm/StylesProvider/index.js\");\n/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../createGenerateClassName */ \"./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js\");\n\n\n\n\n\n\n\n\nvar ServerStyleSheets = /*#__PURE__*/function () {\n function ServerStyleSheets() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(this, ServerStyleSheets);\n\n this.options = options;\n }\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(ServerStyleSheets, [{\n key: \"collect\",\n value: function collect(children) {\n // This is needed in order to deduplicate the injection of CSS in the page.\n var sheetsManager = new Map(); // This is needed in order to inject the critical CSS.\n\n this.sheetsRegistry = new jss__WEBPACK_IMPORTED_MODULE_4__[\"SheetsRegistry\"](); // A new class name generator\n\n var generateClassName = Object(_createGenerateClassName__WEBPACK_IMPORTED_MODULE_6__[\"default\"])();\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(_StylesProvider__WEBPACK_IMPORTED_MODULE_5__[\"default\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n sheetsManager: sheetsManager,\n serverGenerateClassName: generateClassName,\n sheetsRegistry: this.sheetsRegistry\n }, this.options), children);\n }\n }, {\n key: \"toString\",\n value: function toString() {\n return this.sheetsRegistry ? this.sheetsRegistry.toString() : '';\n }\n }, {\n key: \"getStyleElement\",\n value: function getStyleElement(props) {\n return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement('style', Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: 'jss-server-side',\n key: 'jss-server-side',\n dangerouslySetInnerHTML: {\n __html: this.toString()\n }\n }, props));\n }\n }]);\n\n return ServerStyleSheets;\n}();\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/ServerStyleSheets/index.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/ServerStyleSheets/index.js ***! \*************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ServerStyleSheets */ \"./node_modules/@material-ui/styles/esm/ServerStyleSheets/ServerStyleSheets.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/ServerStyleSheets/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js ***! \*******************************************************************************/ /*! exports provided: sheetsManager, StylesContext, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sheetsManager\", function() { return sheetsManager; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"StylesContext\", function() { return StylesContext; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return StylesProvider; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../createGenerateClassName */ \"./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js\");\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n/* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../jssPreset */ \"./node_modules/@material-ui/styles/esm/jssPreset/index.js\");\n\n\n\n\n\n\n\n // Default JSS instance.\n\nvar jss = Object(jss__WEBPACK_IMPORTED_MODULE_6__[\"create\"])(Object(_jssPreset__WEBPACK_IMPORTED_MODULE_7__[\"default\"])()); // Use a singleton or the provided one by the context.\n//\n// The counter-based approach doesn't tolerate any mistake.\n// It's much safer to use the same counter everywhere.\n\nvar generateClassName = Object(_createGenerateClassName__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(); // Exported for test purposes\n\nvar sheetsManager = new Map();\nvar defaultOptions = {\n disableGeneration: false,\n generateClassName: generateClassName,\n jss: jss,\n sheetsCache: null,\n sheetsManager: sheetsManager,\n sheetsRegistry: null\n};\nvar StylesContext = react__WEBPACK_IMPORTED_MODULE_2___default.a.createContext(defaultOptions);\n\nif (true) {\n StylesContext.displayName = 'StylesContext';\n}\n\nvar injectFirstNode;\nfunction StylesProvider(props) {\n var children = props.children,\n _props$injectFirst = props.injectFirst,\n injectFirst = _props$injectFirst === void 0 ? false : _props$injectFirst,\n _props$disableGenerat = props.disableGeneration,\n disableGeneration = _props$disableGenerat === void 0 ? false : _props$disableGenerat,\n localOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"injectFirst\", \"disableGeneration\"]);\n\n var outerOptions = react__WEBPACK_IMPORTED_MODULE_2___default.a.useContext(StylesContext);\n\n var context = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, outerOptions), {}, {\n disableGeneration: disableGeneration\n }, localOptions);\n\n if (true) {\n if (typeof window === 'undefined' && !context.sheetsManager) {\n console.error('Material-UI: You need to use the ServerStyleSheets API when rendering on the server.');\n }\n }\n\n if (true) {\n if (context.jss.options.insertionPoint && injectFirst) {\n console.error('Material-UI: You cannot use a custom insertionPoint and at the same time.');\n }\n }\n\n if (true) {\n if (injectFirst && localOptions.jss) {\n console.error('Material-UI: You cannot use the jss and injectFirst props at the same time.');\n }\n }\n\n if (!context.jss.options.insertionPoint && injectFirst && typeof window !== 'undefined') {\n if (!injectFirstNode) {\n var head = document.head;\n injectFirstNode = document.createComment('mui-inject-first');\n head.insertBefore(injectFirstNode, head.firstChild);\n }\n\n context.jss = Object(jss__WEBPACK_IMPORTED_MODULE_6__[\"create\"])({\n plugins: Object(_jssPreset__WEBPACK_IMPORTED_MODULE_7__[\"default\"])().plugins,\n insertionPoint: injectFirstNode\n });\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(StylesContext.Provider, {\n value: context\n }, children);\n}\n true ? StylesProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node.isRequired,\n\n /**\n * You can disable the generation of the styles with this option.\n * It can be useful when traversing the React tree outside of the HTML\n * rendering step on the server.\n * Let's say you are using react-apollo to extract all\n * the queries made by the interface server-side - you can significantly speed up the traversal with this prop.\n */\n disableGeneration: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * JSS's class name generator.\n */\n generateClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * By default, the styles are injected last in the element of the page.\n * As a result, they gain more specificity than any other style sheet.\n * If you want to override Material-UI's styles, set this prop.\n */\n injectFirst: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * JSS's instance.\n */\n jss: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n serverGenerateClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * @ignore\n *\n * Beta feature.\n *\n * Cache for the sheets.\n */\n sheetsCache: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n *\n * The sheetsManager is used to deduplicate style sheet injection in the page.\n * It's deduplicating using the (theme, styles) couple.\n * On the server, you should provide a new instance for each request.\n */\n sheetsManager: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n *\n * Collect the sheets.\n */\n sheetsRegistry: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n\nif (true) {\n true ? StylesProvider.propTypes = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_4__[\"exactProp\"])(StylesProvider.propTypes) : undefined;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/StylesProvider/index.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/StylesProvider/index.js ***! \**********************************************************************/ /*! exports provided: default, sheetsManager, StylesContext */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./StylesProvider */ \"./node_modules/@material-ui/styles/esm/StylesProvider/StylesProvider.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sheetsManager\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__[\"sheetsManager\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StylesContext\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_0__[\"StylesContext\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/StylesProvider/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js ***! \*****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _useTheme_ThemeContext__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../useTheme/ThemeContext */ \"./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js\");\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/index.js\");\n/* harmony import */ var _nested__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nested */ \"./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js\");\n\n\n\n\n\n\n // To support composition of theme.\n\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n var mergedTheme = localTheme(outerTheme);\n\n if (true) {\n if (!mergedTheme) {\n console.error(['Material-UI: You should return an object from your theme function, i.e.', ' ({})} />'].join('\\n'));\n }\n }\n\n return mergedTheme;\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, outerTheme), localTheme);\n}\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\n\n\nfunction ThemeProvider(props) {\n var children = props.children,\n localTheme = props.theme;\n var outerTheme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n\n if (true) {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['Material-UI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n\n var theme = react__WEBPACK_IMPORTED_MODULE_1___default.a.useMemo(function () {\n var output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);\n\n if (output != null) {\n output[_nested__WEBPACK_IMPORTED_MODULE_6__[\"default\"]] = outerTheme !== null;\n }\n\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_useTheme_ThemeContext__WEBPACK_IMPORTED_MODULE_4__[\"default\"].Provider, {\n value: theme\n }, children);\n}\n\n true ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.node.isRequired,\n\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.func]).isRequired\n} : undefined;\n\nif (true) {\n true ? ThemeProvider.propTypes = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_3__[\"exactProp\"])(ThemeProvider.propTypes) : undefined;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemeProvider);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/ThemeProvider/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/ThemeProvider/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _ThemeProvider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ThemeProvider */ \"./node_modules/@material-ui/styles/esm/ThemeProvider/ThemeProvider.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _ThemeProvider__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/ThemeProvider/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\n/* harmony default export */ __webpack_exports__[\"default\"] = (hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__');\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js": /*!*************************************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js ***! \*************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createGenerateClassName; });\n/* harmony import */ var _ThemeProvider_nested__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ThemeProvider/nested */ \"./node_modules/@material-ui/styles/esm/ThemeProvider/nested.js\");\n\n/**\n * This is the list of the style rule name we use as drop in replacement for the built-in\n * pseudo classes (:checked, :disabled, :focused, etc.).\n *\n * Why do they exist in the first place?\n * These classes are used at a specificity of 2.\n * It allows them to override previously definied styles as well as\n * being untouched by simple user overrides.\n */\n\nvar pseudoClasses = ['checked', 'disabled', 'error', 'focused', 'focusVisible', 'required', 'expanded', 'selected']; // Returns a function which generates unique class names based on counters.\n// When new generator function is created, rule counter is reset.\n// We need to reset the rule counter for SSR for each request.\n//\n// It's inspired by\n// https://github.com/cssinjs/jss/blob/4e6a05dd3f7b6572fdd3ab216861d9e446c20331/src/utils/createGenerateClassName.js\n\nfunction createGenerateClassName() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _options$disableGloba = options.disableGlobal,\n disableGlobal = _options$disableGloba === void 0 ? false : _options$disableGloba,\n _options$productionPr = options.productionPrefix,\n productionPrefix = _options$productionPr === void 0 ? 'jss' : _options$productionPr,\n _options$seed = options.seed,\n seed = _options$seed === void 0 ? '' : _options$seed;\n var seedPrefix = seed === '' ? '' : \"\".concat(seed, \"-\");\n var ruleCounter = 0;\n\n var getNextCounterId = function getNextCounterId() {\n ruleCounter += 1;\n\n if (true) {\n if (ruleCounter >= 1e10) {\n console.warn(['Material-UI: You might have a memory leak.', 'The ruleCounter is not supposed to grow that much.'].join(''));\n }\n }\n\n return ruleCounter;\n };\n\n return function (rule, styleSheet) {\n var name = styleSheet.options.name; // Is a global static MUI style?\n\n if (name && name.indexOf('Mui') === 0 && !styleSheet.options.link && !disableGlobal) {\n // We can use a shorthand class name, we never use the keys to style the components.\n if (pseudoClasses.indexOf(rule.key) !== -1) {\n return \"Mui-\".concat(rule.key);\n }\n\n var prefix = \"\".concat(seedPrefix).concat(name, \"-\").concat(rule.key);\n\n if (!styleSheet.options.theme[_ThemeProvider_nested__WEBPACK_IMPORTED_MODULE_0__[\"default\"]] || seed !== '') {\n return prefix;\n }\n\n return \"\".concat(prefix, \"-\").concat(getNextCounterId());\n }\n\n if (false) {}\n\n var suffix = \"\".concat(rule.key, \"-\").concat(getNextCounterId()); // Help with debuggability.\n\n if (styleSheet.options.classNamePrefix) {\n return \"\".concat(seedPrefix).concat(styleSheet.options.classNamePrefix, \"-\").concat(suffix);\n }\n\n return \"\".concat(seedPrefix).concat(suffix);\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js": /*!*******************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js ***! \*******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createGenerateClassName */ \"./node_modules/@material-ui/styles/esm/createGenerateClassName/createGenerateClassName.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createGenerateClassName__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/createStyles/createStyles.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/createStyles/createStyles.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return createStyles; });\nfunction createStyles(styles) {\n return styles;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/createStyles/createStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/createStyles/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/createStyles/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createStyles */ \"./node_modules/@material-ui/styles/esm/createStyles/createStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/createStyles/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js": /*!***********************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js ***! \***********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getStylesCreator; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _noopTheme__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./noopTheme */ \"./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js\");\n\n\n\n\nfunction getStylesCreator(stylesOrCreator) {\n var themingEnabled = typeof stylesOrCreator === 'function';\n\n if (true) {\n if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(stylesOrCreator) !== 'object' && !themingEnabled) {\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You need to provide a function generating the styles or a styles object.'].join('\\n'));\n }\n }\n\n return {\n create: function create(theme, name) {\n var styles;\n\n try {\n styles = themingEnabled ? stylesOrCreator(theme) : stylesOrCreator;\n } catch (err) {\n if (true) {\n if (themingEnabled === true && theme === _noopTheme__WEBPACK_IMPORTED_MODULE_3__[\"default\"]) {\n // TODO: prepend error message/name instead\n console.error(['Material-UI: The `styles` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n\n throw err;\n }\n\n if (!name || !theme.overrides || !theme.overrides[name]) {\n return styles;\n }\n\n var overrides = theme.overrides[name];\n\n var stylesWithOverrides = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, styles);\n\n Object.keys(overrides).forEach(function (key) {\n if (true) {\n if (!stylesWithOverrides[key]) {\n console.warn(['Material-UI: You are trying to override a style that does not exist.', \"Fix the `\".concat(key, \"` key of `theme.overrides.\").concat(name, \"`.\")].join('\\n'));\n }\n }\n\n stylesWithOverrides[key] = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_2__[\"deepmerge\"])(stylesWithOverrides[key], overrides[key]);\n });\n return stylesWithOverrides;\n },\n options: {}\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/getStylesCreator/index.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/getStylesCreator/index.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _getStylesCreator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getStylesCreator */ \"./node_modules/@material-ui/styles/esm/getStylesCreator/getStylesCreator.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _getStylesCreator__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/getStylesCreator/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js": /*!****************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js ***! \****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n// We use the same empty object to ref count the styles that don't need a theme object.\nvar noopTheme = {};\n/* harmony default export */ __webpack_exports__[\"default\"] = (noopTheme);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js": /*!*****************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js ***! \*****************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getThemeProps; });\n/* eslint-disable no-restricted-syntax */\nfunction getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/getThemeProps/index.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/getThemeProps/index.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getThemeProps */ \"./node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _getThemeProps__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/getThemeProps/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/index.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/index.js ***! \*******************************************************/ /*! exports provided: createGenerateClassName, createStyles, getThemeProps, jssPreset, makeStyles, mergeClasses, ServerStyleSheets, styled, StylesProvider, ThemeProvider, useTheme, withStyles, withTheme, sheetsManager, StylesContext, withThemeCreator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _createGenerateClassName__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./createGenerateClassName */ \"./node_modules/@material-ui/styles/esm/createGenerateClassName/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createGenerateClassName\", function() { return _createGenerateClassName__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createStyles */ \"./node_modules/@material-ui/styles/esm/createStyles/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createStyles\", function() { return _createStyles__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./getThemeProps */ \"./node_modules/@material-ui/styles/esm/getThemeProps/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getThemeProps\", function() { return _getThemeProps__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./jssPreset */ \"./node_modules/@material-ui/styles/esm/jssPreset/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"jssPreset\", function() { return _jssPreset__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./makeStyles */ \"./node_modules/@material-ui/styles/esm/makeStyles/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"makeStyles\", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./mergeClasses */ \"./node_modules/@material-ui/styles/esm/mergeClasses/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"mergeClasses\", function() { return _mergeClasses__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ServerStyleSheets */ \"./node_modules/@material-ui/styles/esm/ServerStyleSheets/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ServerStyleSheets\", function() { return _ServerStyleSheets__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./styled */ \"./node_modules/@material-ui/styles/esm/styled/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"styled\", function() { return _styled__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./StylesProvider */ \"./node_modules/@material-ui/styles/esm/StylesProvider/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StylesProvider\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sheetsManager\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__[\"sheetsManager\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"StylesContext\", function() { return _StylesProvider__WEBPACK_IMPORTED_MODULE_9__[\"StylesContext\"]; });\n\n/* harmony import */ var _ThemeProvider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./ThemeProvider */ \"./node_modules/@material-ui/styles/esm/ThemeProvider/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ThemeProvider\", function() { return _ThemeProvider__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"useTheme\", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./withStyles */ \"./node_modules/@material-ui/styles/esm/withStyles/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withStyles\", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* empty/unused harmony star reexport *//* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./withTheme */ \"./node_modules/@material-ui/styles/esm/withTheme/index.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withTheme\", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withThemeCreator\", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_13__[\"withThemeCreator\"]; });\n\n/** @license Material-UI v4.10.0\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable import/export */\n\n/* Warning if there are several instances of @material-ui/styles */\n\nif ( true && typeof window !== 'undefined') {\n _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"ponyfillGlobal\"]['__@material-ui/styles-init__'] = _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"ponyfillGlobal\"]['__@material-ui/styles-init__'] || 0;\n\n if (_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"ponyfillGlobal\"]['__@material-ui/styles-init__'] === 1) {\n console.warn(['It looks like there are several instances of `@material-ui/styles` initialized in this application.', 'This may cause theme propagation issues, broken class names, ' + 'specificity issues, and makes your application bigger without a good reason.', '', 'See https://material-ui.com/r/styles-instance-warning for more info.'].join('\\n'));\n }\n\n _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"ponyfillGlobal\"]['__@material-ui/styles-init__'] += 1;\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/jssPreset/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/jssPreset/index.js ***! \*****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _jssPreset__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jssPreset */ \"./node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _jssPreset__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/jssPreset/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js ***! \*********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return jssPreset; });\n/* harmony import */ var jss_plugin_rule_value_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jss-plugin-rule-value-function */ \"./node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js\");\n/* harmony import */ var jss_plugin_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jss-plugin-global */ \"./node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js\");\n/* harmony import */ var jss_plugin_nested__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jss-plugin-nested */ \"./node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js\");\n/* harmony import */ var jss_plugin_camel_case__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jss-plugin-camel-case */ \"./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js\");\n/* harmony import */ var jss_plugin_default_unit__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! jss-plugin-default-unit */ \"./node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js\");\n/* harmony import */ var jss_plugin_vendor_prefixer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! jss-plugin-vendor-prefixer */ \"./node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js\");\n/* harmony import */ var jss_plugin_props_sort__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! jss-plugin-props-sort */ \"./node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js\");\n\n\n\n\n\n\n // Subset of jss-preset-default with only the plugins the Material-UI components are using.\n\nfunction jssPreset() {\n return {\n plugins: [Object(jss_plugin_rule_value_function__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(), Object(jss_plugin_global__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(), Object(jss_plugin_nested__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(), Object(jss_plugin_camel_case__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), Object(jss_plugin_default_unit__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(), // Disable the vendor prefixer server-side, it does nothing.\n // This way, we can get a performance boost.\n // In the documentation, we are using `autoprefixer` to solve this problem.\n typeof window === 'undefined' ? null : Object(jss_plugin_vendor_prefixer__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(), Object(jss_plugin_props_sort__WEBPACK_IMPORTED_MODULE_6__[\"default\"])()]\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/jssPreset/jssPreset.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/makeStyles/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/makeStyles/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./makeStyles */ \"./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _makeStyles__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/makeStyles/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js": /*!*************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js ***! \*************************************************************************/ /*! exports provided: increment */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"increment\", function() { return increment; });\n/* eslint-disable import/prefer-default-export */\n// Global index counter to preserve source order.\n// We create the style sheet during the creation of the component,\n// children are handled after the parents, so the order of style elements would be parent->child.\n// It is a problem though when a parent passes a className\n// which needs to override any child's styles.\n// StyleSheet of the child has a higher specificity, because of the source order.\n// So our solution is to render sheets them in the reverse order child->sheet, so\n// that parent has a higher specificity.\nvar indexCounter = -1e9;\nfunction increment() {\n indexCounter += 1;\n\n if (true) {\n if (indexCounter >= 0) {\n console.warn(['Material-UI: You might have a memory leak.', 'The indexCounter is not supposed to grow that much.'].join('\\n'));\n }\n }\n\n return indexCounter;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return makeStyles; });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n/* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../mergeClasses */ \"./node_modules/@material-ui/styles/esm/mergeClasses/index.js\");\n/* harmony import */ var _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./multiKeyStore */ \"./node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js\");\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/index.js\");\n/* harmony import */ var _StylesProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../StylesProvider */ \"./node_modules/@material-ui/styles/esm/StylesProvider/index.js\");\n/* harmony import */ var _indexCounter__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./indexCounter */ \"./node_modules/@material-ui/styles/esm/makeStyles/indexCounter.js\");\n/* harmony import */ var _getStylesCreator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../getStylesCreator */ \"./node_modules/@material-ui/styles/esm/getStylesCreator/index.js\");\n/* harmony import */ var _getStylesCreator_noopTheme__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../getStylesCreator/noopTheme */ \"./node_modules/@material-ui/styles/esm/getStylesCreator/noopTheme.js\");\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getClasses(_ref, classes, Component) {\n var state = _ref.state,\n stylesOptions = _ref.stylesOptions;\n\n if (stylesOptions.disableGeneration) {\n return classes || {};\n }\n\n if (!state.cacheClasses) {\n state.cacheClasses = {\n // Cache for the finalized classes value.\n value: null,\n // Cache for the last used classes prop pointer.\n lastProp: null,\n // Cache for the last used rendered classes pointer.\n lastJSS: {}\n };\n } // Tracks if either the rendered classes or classes prop has changed,\n // requiring the generation of a new finalized classes object.\n\n\n var generate = false;\n\n if (state.classes !== state.cacheClasses.lastJSS) {\n state.cacheClasses.lastJSS = state.classes;\n generate = true;\n }\n\n if (classes !== state.cacheClasses.lastProp) {\n state.cacheClasses.lastProp = classes;\n generate = true;\n }\n\n if (generate) {\n state.cacheClasses.value = Object(_mergeClasses__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n baseClasses: state.cacheClasses.lastJSS,\n newClasses: classes,\n Component: Component\n });\n }\n\n return state.cacheClasses.value;\n}\n\nfunction attach(_ref2, props) {\n var state = _ref2.state,\n theme = _ref2.theme,\n stylesOptions = _ref2.stylesOptions,\n stylesCreator = _ref2.stylesCreator,\n name = _ref2.name;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get(stylesOptions.sheetsManager, stylesCreator, theme);\n\n if (!sheetManager) {\n sheetManager = {\n refs: 0,\n staticSheet: null,\n dynamicStyles: null\n };\n _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].set(stylesOptions.sheetsManager, stylesCreator, theme, sheetManager);\n }\n\n var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, stylesCreator.options), stylesOptions), {}, {\n theme: theme,\n flip: typeof stylesOptions.flip === 'boolean' ? stylesOptions.flip : theme.direction === 'rtl'\n });\n\n options.generateId = options.serverGenerateClassName || options.generateClassName;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n var staticSheet;\n\n if (stylesOptions.sheetsCache) {\n staticSheet = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get(stylesOptions.sheetsCache, stylesCreator, theme);\n }\n\n var styles = stylesCreator.create(theme, name);\n\n if (!staticSheet) {\n staticSheet = stylesOptions.jss.createStyleSheet(styles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n link: false\n }, options));\n staticSheet.attach();\n\n if (stylesOptions.sheetsCache) {\n _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].set(stylesOptions.sheetsCache, stylesCreator, theme, staticSheet);\n }\n }\n\n if (sheetsRegistry) {\n sheetsRegistry.add(staticSheet);\n }\n\n sheetManager.staticSheet = staticSheet;\n sheetManager.dynamicStyles = Object(jss__WEBPACK_IMPORTED_MODULE_3__[\"getDynamicStyles\"])(styles);\n }\n\n if (sheetManager.dynamicStyles) {\n var dynamicSheet = stylesOptions.jss.createStyleSheet(sheetManager.dynamicStyles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n link: true\n }, options));\n dynamicSheet.update(props);\n dynamicSheet.attach();\n state.dynamicSheet = dynamicSheet;\n state.classes = Object(_mergeClasses__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n baseClasses: sheetManager.staticSheet.classes,\n newClasses: dynamicSheet.classes\n });\n\n if (sheetsRegistry) {\n sheetsRegistry.add(dynamicSheet);\n }\n } else {\n state.classes = sheetManager.staticSheet.classes;\n }\n\n sheetManager.refs += 1;\n}\n\nfunction update(_ref3, props) {\n var state = _ref3.state;\n\n if (state.dynamicSheet) {\n state.dynamicSheet.update(props);\n }\n}\n\nfunction detach(_ref4) {\n var state = _ref4.state,\n theme = _ref4.theme,\n stylesOptions = _ref4.stylesOptions,\n stylesCreator = _ref4.stylesCreator;\n\n if (stylesOptions.disableGeneration) {\n return;\n }\n\n var sheetManager = _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].get(stylesOptions.sheetsManager, stylesCreator, theme);\n sheetManager.refs -= 1;\n var sheetsRegistry = stylesOptions.sheetsRegistry;\n\n if (sheetManager.refs === 0) {\n _multiKeyStore__WEBPACK_IMPORTED_MODULE_5__[\"default\"].delete(stylesOptions.sheetsManager, stylesCreator, theme);\n stylesOptions.jss.removeStyleSheet(sheetManager.staticSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(sheetManager.staticSheet);\n }\n }\n\n if (state.dynamicSheet) {\n stylesOptions.jss.removeStyleSheet(state.dynamicSheet);\n\n if (sheetsRegistry) {\n sheetsRegistry.remove(state.dynamicSheet);\n }\n }\n}\n\nfunction useSynchronousEffect(func, values) {\n var key = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef([]);\n var output; // Store \"generation\" key. Just returns a new object every time\n\n var currentKey = react__WEBPACK_IMPORTED_MODULE_2___default.a.useMemo(function () {\n return {};\n }, values); // eslint-disable-line react-hooks/exhaustive-deps\n // \"the first render\", or \"memo dropped the value\"\n\n if (key.current !== currentKey) {\n key.current = currentKey;\n output = func();\n }\n\n react__WEBPACK_IMPORTED_MODULE_2___default.a.useEffect(function () {\n return function () {\n if (output) {\n output();\n }\n };\n }, [currentKey] // eslint-disable-line react-hooks/exhaustive-deps\n );\n}\n\nfunction makeStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n classNamePrefixOption = options.classNamePrefix,\n Component = options.Component,\n _options$defaultTheme = options.defaultTheme,\n defaultTheme = _options$defaultTheme === void 0 ? _getStylesCreator_noopTheme__WEBPACK_IMPORTED_MODULE_10__[\"default\"] : _options$defaultTheme,\n stylesOptions2 = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(options, [\"name\", \"classNamePrefix\", \"Component\", \"defaultTheme\"]);\n\n var stylesCreator = Object(_getStylesCreator__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(stylesOrCreator);\n var classNamePrefix = name || classNamePrefixOption || 'makeStyles';\n stylesCreator.options = {\n index: Object(_indexCounter__WEBPACK_IMPORTED_MODULE_8__[\"increment\"])(),\n name: name,\n meta: classNamePrefix,\n classNamePrefix: classNamePrefix\n };\n\n var useStyles = function useStyles() {\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() || defaultTheme;\n\n var stylesOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, react__WEBPACK_IMPORTED_MODULE_2___default.a.useContext(_StylesProvider__WEBPACK_IMPORTED_MODULE_7__[\"StylesContext\"])), stylesOptions2);\n\n var instance = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef();\n var shouldUpdate = react__WEBPACK_IMPORTED_MODULE_2___default.a.useRef();\n useSynchronousEffect(function () {\n var current = {\n name: name,\n state: {},\n stylesCreator: stylesCreator,\n stylesOptions: stylesOptions,\n theme: theme\n };\n attach(current, props);\n shouldUpdate.current = false;\n instance.current = current;\n return function () {\n detach(current);\n };\n }, [theme, stylesCreator]);\n react__WEBPACK_IMPORTED_MODULE_2___default.a.useEffect(function () {\n if (shouldUpdate.current) {\n update(instance.current, props);\n }\n\n shouldUpdate.current = true;\n });\n var classes = getClasses(instance.current, props.classes, Component);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_2___default.a.useDebugValue(classes);\n }\n\n return classes;\n };\n\n return useStyles;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/makeStyles/makeStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js": /*!**************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js ***! \**************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n// Used https://github.com/thinkloop/multi-key-cache as inspiration\nvar multiKeyStore = {\n set: function set(cache, key1, key2, value) {\n var subCache = cache.get(key1);\n\n if (!subCache) {\n subCache = new Map();\n cache.set(key1, subCache);\n }\n\n subCache.set(key2, value);\n },\n get: function get(cache, key1, key2) {\n var subCache = cache.get(key1);\n return subCache ? subCache.get(key2) : undefined;\n },\n delete: function _delete(cache, key1, key2) {\n var subCache = cache.get(key1);\n subCache.delete(key2);\n }\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (multiKeyStore);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/makeStyles/multiKeyStore.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/mergeClasses/index.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/mergeClasses/index.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _mergeClasses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeClasses */ \"./node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _mergeClasses__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/mergeClasses/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js": /*!***************************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js ***! \***************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return mergeClasses; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\nfunction mergeClasses() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var baseClasses = options.baseClasses,\n newClasses = options.newClasses,\n Component = options.Component;\n\n if (!newClasses) {\n return baseClasses;\n }\n\n var nextClasses = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, baseClasses);\n\n if (true) {\n if (typeof newClasses === 'string') {\n console.error([\"Material-UI: The value `\".concat(newClasses, \"` \") + \"provided to the classes prop of \".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_1__[\"getDisplayName\"])(Component), \" is incorrect.\"), 'You might want to use the className prop instead.'].join('\\n'));\n return baseClasses;\n }\n }\n\n Object.keys(newClasses).forEach(function (key) {\n if (true) {\n if (!baseClasses[key] && newClasses[key]) {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not implemented in \".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_1__[\"getDisplayName\"])(Component), \".\"), \"You can only override one of the following: \".concat(Object.keys(baseClasses).join(','), \".\")].join('\\n'));\n }\n\n if (newClasses[key] && typeof newClasses[key] !== 'string') {\n console.error([\"Material-UI: The key `\".concat(key, \"` \") + \"provided to the classes prop is not valid for \".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_1__[\"getDisplayName\"])(Component), \".\"), \"You need to provide a non empty string instead of: \".concat(newClasses[key], \".\")].join('\\n'));\n }\n }\n\n if (newClasses[key]) {\n nextClasses[key] = \"\".concat(baseClasses[key], \" \").concat(newClasses[key]);\n }\n });\n return nextClasses;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/mergeClasses/mergeClasses.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/styled/index.js": /*!**************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/styled/index.js ***! \**************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./styled */ \"./node_modules/@material-ui/styles/esm/styled/styled.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _styled__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/styled/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/styled/styled.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/styled/styled.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return styled; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! clsx */ \"./node_modules/clsx/dist/clsx.m.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../makeStyles */ \"./node_modules/@material-ui/styles/esm/makeStyles/index.js\");\n\n\n\n\n\n\n\n\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n} // styled-components's API removes the mapping between components and styles.\n// Using components as a low-level styling construct can be simpler.\n\n\nfunction styled(Component) {\n var componentCreator = function componentCreator(style) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var name = options.name,\n stylesOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(options, [\"name\"]);\n\n if ( true && Component === undefined) {\n throw new Error(['You are calling styled(Component)(style) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n\n var classNamePrefix = name;\n\n if (true) {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"getDisplayName\"])(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var stylesOrCreator = typeof style === 'function' ? function (theme) {\n return {\n root: function root(props) {\n return style(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n theme: theme\n }, props));\n }\n };\n } : {\n root: style\n };\n var useStyles = Object(_makeStyles__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var filterProps;\n var propTypes = {};\n\n if (style.filterProps) {\n filterProps = style.filterProps;\n delete style.filterProps;\n }\n /* eslint-disable react/forbid-foreign-prop-types */\n\n\n if (style.propTypes) {\n propTypes = style.propTypes;\n delete style.propTypes;\n }\n /* eslint-enable react/forbid-foreign-prop-types */\n\n\n var StyledComponent = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function StyledComponent(props, ref) {\n var children = props.children,\n classNameProp = props.className,\n clone = props.clone,\n ComponentProp = props.component,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"children\", \"className\", \"clone\", \"component\"]);\n\n var classes = useStyles(props);\n var className = Object(clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(classes.root, classNameProp);\n var spread = other;\n\n if (filterProps) {\n spread = omit(spread, filterProps);\n }\n\n if (clone) {\n return react__WEBPACK_IMPORTED_MODULE_2___default.a.cloneElement(children, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(children.props.className, className)\n }, spread));\n }\n\n if (typeof children === 'function') {\n return children(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n className: className\n }, spread));\n }\n\n var FinalComponent = ComponentProp || Component;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(FinalComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: ref,\n className: className\n }, spread), children);\n });\n true ? StyledComponent.propTypes = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n /**\n * A render function or node.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.node, prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.func]),\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.string,\n\n /**\n * If `true`, the component will recycle it's children HTML element.\n * It's using `React.cloneElement` internally.\n *\n * This prop will be deprecated and removed in v5\n */\n clone: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.bool, function (props) {\n if (props.clone && props.component) {\n return new Error('You can not use the clone and component prop at the same time.');\n }\n\n return null;\n }),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_4___default.a.elementType\n }, propTypes) : undefined;\n\n if (true) {\n StyledComponent.displayName = \"Styled(\".concat(classNamePrefix, \")\");\n }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_6___default()(StyledComponent, Component);\n return StyledComponent;\n };\n\n return componentCreator;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/styled/styled.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nvar ThemeContext = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext(null);\n\nif (true) {\n ThemeContext.displayName = 'ThemeContext';\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (ThemeContext);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/useTheme/index.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/useTheme/index.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/useTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _useTheme__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/useTheme/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/useTheme/useTheme.js": /*!*******************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/useTheme/useTheme.js ***! \*******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return useTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ThemeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ThemeContext */ \"./node_modules/@material-ui/styles/esm/useTheme/ThemeContext.js\");\n\n\nfunction useTheme() {\n var theme = react__WEBPACK_IMPORTED_MODULE_0___default.a.useContext(_ThemeContext__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0___default.a.useDebugValue(theme);\n }\n\n return theme;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/useTheme/useTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/withStyles/index.js": /*!******************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/withStyles/index.js ***! \******************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _withStyles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./withStyles */ \"./node_modules/@material-ui/styles/esm/withStyles/withStyles.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _withStyles__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/withStyles/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/withStyles/withStyles.js": /*!***********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/withStyles/withStyles.js ***! \***********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _makeStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../makeStyles */ \"./node_modules/@material-ui/styles/esm/makeStyles/index.js\");\n/* harmony import */ var _getThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../getThemeProps */ \"./node_modules/@material-ui/styles/esm/getThemeProps/index.js\");\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/index.js\");\n\n\n\n\n\n\n\n\n // Link a style sheet with a component.\n// It does not modify the component passed to it;\n// instead, it returns a new component, with a `classes` property.\n\nvar withStyles = function withStyles(stylesOrCreator) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return function (Component) {\n var defaultTheme = options.defaultTheme,\n _options$withTheme = options.withTheme,\n withTheme = _options$withTheme === void 0 ? false : _options$withTheme,\n name = options.name,\n stylesOptions = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(options, [\"defaultTheme\", \"withTheme\", \"name\"]);\n\n if (true) {\n if (Component === undefined) {\n throw new Error(['You are calling withStyles(styles)(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var classNamePrefix = name;\n\n if (true) {\n if (!name) {\n // Provide a better DX outside production.\n var displayName = Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"getDisplayName\"])(Component);\n\n if (displayName !== undefined) {\n classNamePrefix = displayName;\n }\n }\n }\n\n var useStyles = Object(_makeStyles__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(stylesOrCreator, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n defaultTheme: defaultTheme,\n Component: Component,\n name: name || Component.displayName,\n classNamePrefix: classNamePrefix\n }, stylesOptions));\n var WithStyles = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function WithStyles(props, ref) {\n var classesProp = props.classes,\n innerRef = props.innerRef,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"classes\", \"innerRef\"]); // The wrapper receives only user supplied props, which could be a subset of\n // the actual props Component might receive due to merging with defaultProps.\n // So copying it here would give us the same result in the wrapper as well.\n\n\n var classes = useStyles(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, Component.defaultProps), props));\n var theme;\n var more = other;\n\n if (typeof name === 'string' || withTheme) {\n // name and withTheme are invariant in the outer scope\n // eslint-disable-next-line react-hooks/rules-of-hooks\n theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_8__[\"default\"])() || defaultTheme;\n\n if (name) {\n more = Object(_getThemeProps__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n theme: theme,\n name: name,\n props: other\n });\n } // Provide the theme to the wrapped component.\n // So we don't have to use the `withTheme()` Higher-order Component.\n\n\n if (withTheme && !more.theme) {\n more.theme = theme;\n }\n }\n\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ref: innerRef || ref,\n classes: classes\n }, more));\n });\n true ? WithStyles.propTypes = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return null; // return new Error(\n // 'Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' +\n // 'Refs are now automatically forwarded to the inner component.',\n // );\n })\n } : undefined;\n\n if (true) {\n WithStyles.displayName = \"WithStyles(\".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"getDisplayName\"])(Component), \")\");\n }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(WithStyles, Component);\n\n if (true) {\n // Exposed for test purposes.\n WithStyles.Naked = Component;\n WithStyles.options = options;\n WithStyles.useStyles = useStyles;\n }\n\n return WithStyles;\n };\n};\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (withStyles);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/withStyles/withStyles.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/withTheme/index.js": /*!*****************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/withTheme/index.js ***! \*****************************************************************/ /*! exports provided: default, withThemeCreator */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _withTheme__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./withTheme */ \"./node_modules/@material-ui/styles/esm/withTheme/withTheme.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"withThemeCreator\", function() { return _withTheme__WEBPACK_IMPORTED_MODULE_0__[\"withThemeCreator\"]; });\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/withTheme/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/styles/esm/withTheme/withTheme.js": /*!*********************************************************************!*\ !*** ./node_modules/@material-ui/styles/esm/withTheme/withTheme.js ***! \*********************************************************************/ /*! exports provided: withThemeCreator, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"withThemeCreator\", function() { return withThemeCreator; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! hoist-non-react-statics */ \"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js\");\n/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n/* harmony import */ var _useTheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../useTheme */ \"./node_modules/@material-ui/styles/esm/useTheme/index.js\");\n\n\n\n\n\n\n\nfunction withThemeCreator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultTheme = options.defaultTheme;\n\n var withTheme = function withTheme(Component) {\n if (true) {\n if (Component === undefined) {\n throw new Error(['You are calling withTheme(Component) with an undefined component.', 'You may have forgotten to import it.'].join('\\n'));\n }\n }\n\n var WithTheme = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef(function WithTheme(props, ref) {\n var innerRef = props.innerRef,\n other = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(props, [\"innerRef\"]);\n\n var theme = Object(_useTheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"])() || defaultTheme;\n return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n theme: theme,\n ref: innerRef || ref\n }, other));\n });\n true ? WithTheme.propTypes = {\n /**\n * Use that prop to pass a ref to the decorated component.\n * @deprecated\n */\n innerRef: Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"chainPropTypes\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]), function (props) {\n if (props.innerRef == null) {\n return null;\n }\n\n return new Error('Material-UI: The `innerRef` prop is deprecated and will be removed in v5. ' + 'Refs are now automatically forwarded to the inner component.');\n })\n } : undefined;\n\n if (true) {\n WithTheme.displayName = \"WithTheme(\".concat(Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_5__[\"getDisplayName\"])(Component), \")\");\n }\n\n hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_4___default()(WithTheme, Component);\n\n if (true) {\n // Exposed for test purposes.\n WithTheme.Naked = Component;\n }\n\n return WithTheme;\n };\n\n return withTheme;\n} // Provide the theme object as a prop to the input component.\n// It's an alternative API to useTheme().\n// We encourage the usage of useTheme() where possible.\n\nvar withTheme = withThemeCreator();\n/* harmony default export */ __webpack_exports__[\"default\"] = (withTheme);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/styles/esm/withTheme/withTheme.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/borders.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/borders.js ***! \*********************************************************/ /*! exports provided: border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"border\", function() { return border; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderTop\", function() { return borderTop; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderRight\", function() { return borderRight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderBottom\", function() { return borderBottom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderLeft\", function() { return borderLeft; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderColor\", function() { return borderColor; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"borderRadius\", function() { return borderRadius; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\n\nfunction getBorder(value) {\n if (typeof value !== 'number') {\n return value;\n }\n\n return \"\".concat(value, \"px solid\");\n}\n\nvar border = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'border',\n themeKey: 'borders',\n transform: getBorder\n});\nvar borderTop = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderTop',\n themeKey: 'borders',\n transform: getBorder\n});\nvar borderRight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderRight',\n themeKey: 'borders',\n transform: getBorder\n});\nvar borderBottom = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderBottom',\n themeKey: 'borders',\n transform: getBorder\n});\nvar borderLeft = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderLeft',\n themeKey: 'borders',\n transform: getBorder\n});\nvar borderColor = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderColor',\n themeKey: 'palette'\n});\nvar borderRadius = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'borderRadius',\n themeKey: 'shape'\n});\nvar borders = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius);\n/* harmony default export */ __webpack_exports__[\"default\"] = (borders);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/borders.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/breakpoints.js": /*!*************************************************************!*\ !*** ./node_modules/@material-ui/system/esm/breakpoints.js ***! \*************************************************************/ /*! exports provided: handleBreakpoints, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"handleBreakpoints\", function() { return handleBreakpoints; });\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./merge */ \"./node_modules/@material-ui/system/esm/merge.js\");\n\n\n\n\n // The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\n\nvar values = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920\n};\nvar defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: function up(key) {\n return \"@media (min-width:\".concat(values[key], \"px)\");\n }\n};\nfunction handleBreakpoints(props, propValue, styleFromPropValue) {\n if (true) {\n if (!props.theme) {\n console.error('Material-UI: You are calling a style function without a theme value.');\n }\n }\n\n if (Array.isArray(propValue)) {\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n return propValue.reduce(function (acc, item, index) {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n\n if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(propValue) === 'object') {\n var _themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n\n return Object.keys(propValue).reduce(function (acc, breakpoint) {\n acc[_themeBreakpoints.up(breakpoint)] = styleFromPropValue(propValue[breakpoint]);\n return acc;\n }, {});\n }\n\n var output = styleFromPropValue(propValue);\n return output;\n}\n\nfunction breakpoints(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var base = styleFunction(props);\n var themeBreakpoints = props.theme.breakpoints || defaultBreakpoints;\n var extended = themeBreakpoints.keys.reduce(function (acc, key) {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n theme: props.theme\n }, props[key]));\n }\n\n return acc;\n }, null);\n return Object(_merge__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(base, extended);\n };\n\n newStyleFunction.propTypes = true ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, styleFunction.propTypes), {}, {\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n }) : undefined;\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl'].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(styleFunction.filterProps));\n return newStyleFunction;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (breakpoints);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/breakpoints.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/compose.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/compose.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./merge */ \"./node_modules/@material-ui/system/esm/merge.js\");\n\n\n\nfunction compose() {\n for (var _len = arguments.length, styles = new Array(_len), _key = 0; _key < _len; _key++) {\n styles[_key] = arguments[_key];\n }\n\n var fn = function fn(props) {\n return styles.reduce(function (acc, style) {\n var output = style(props);\n\n if (output) {\n return Object(_merge__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(acc, output);\n }\n\n return acc;\n }, {});\n }; // Alternative approach that doesn't yield any performance gain.\n // const handlers = styles.reduce((acc, style) => {\n // style.filterProps.forEach(prop => {\n // acc[prop] = style;\n // });\n // return acc;\n // }, {});\n // const fn = props => {\n // return Object.keys(props).reduce((acc, prop) => {\n // if (handlers[prop]) {\n // return merge(acc, handlers[prop](props));\n // }\n // return acc;\n // }, {});\n // };\n\n\n fn.propTypes = true ? styles.reduce(function (acc, style) {\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(acc, style.propTypes);\n }, {}) : undefined;\n fn.filterProps = styles.reduce(function (acc, style) {\n return acc.concat(style.filterProps);\n }, []);\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (compose);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/compose.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/css.js": /*!*****************************************************!*\ !*** ./node_modules/@material-ui/system/esm/css.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge */ \"./node_modules/@material-ui/system/esm/merge.js\");\n\n\n\n\n\nfunction omit(input, fields) {\n var output = {};\n Object.keys(input).forEach(function (prop) {\n if (fields.indexOf(prop) === -1) {\n output[prop] = input[prop];\n }\n });\n return output;\n}\n\nfunction css(styleFunction) {\n var newStyleFunction = function newStyleFunction(props) {\n var output = styleFunction(props);\n\n if (props.css) {\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, Object(_merge__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(output, styleFunction(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n theme: props.theme\n }, props.css)))), omit(props.css, [styleFunction.filterProps]));\n }\n\n return output;\n };\n\n newStyleFunction.propTypes = true ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, styleFunction.propTypes), {}, {\n css: prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object\n }) : undefined;\n newStyleFunction.filterProps = ['css'].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(styleFunction.filterProps));\n return newStyleFunction;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (css);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/css.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/display.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/display.js ***! \*********************************************************/ /*! exports provided: displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"displayPrint\", function() { return displayPrint; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"displayRaw\", function() { return displayRaw; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"overflow\", function() { return overflow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"textOverflow\", function() { return textOverflow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"visibility\", function() { return visibility; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"whiteSpace\", function() { return whiteSpace; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar displayPrint = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'displayPrint',\n cssProperty: false,\n transform: function transform(value) {\n return {\n '@media print': {\n display: value\n }\n };\n }\n});\nvar displayRaw = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'display'\n});\nvar overflow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'overflow'\n});\nvar textOverflow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'textOverflow'\n});\nvar visibility = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'visibility'\n});\nvar whiteSpace = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'whiteSpace'\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(displayPrint, displayRaw, overflow, textOverflow, visibility, whiteSpace));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/display.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/flexbox.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/flexbox.js ***! \*********************************************************/ /*! exports provided: flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flexBasis\", function() { return flexBasis; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flexDirection\", function() { return flexDirection; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flexWrap\", function() { return flexWrap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"justifyContent\", function() { return justifyContent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alignItems\", function() { return alignItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alignContent\", function() { return alignContent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"order\", function() { return order; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flex\", function() { return flex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flexGrow\", function() { return flexGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"flexShrink\", function() { return flexShrink; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"alignSelf\", function() { return alignSelf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"justifyItems\", function() { return justifyItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"justifySelf\", function() { return justifySelf; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar flexBasis = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flexBasis'\n});\nvar flexDirection = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flexDirection'\n});\nvar flexWrap = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flexWrap'\n});\nvar justifyContent = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'justifyContent'\n});\nvar alignItems = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'alignItems'\n});\nvar alignContent = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'alignContent'\n});\nvar order = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'order'\n});\nvar flex = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flex'\n});\nvar flexGrow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flexGrow'\n});\nvar flexShrink = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'flexShrink'\n});\nvar alignSelf = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'alignSelf'\n});\nvar justifyItems = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'justifyItems'\n});\nvar justifySelf = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'justifySelf'\n});\nvar flexbox = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf);\n/* harmony default export */ __webpack_exports__[\"default\"] = (flexbox);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/flexbox.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/grid.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/system/esm/grid.js ***! \******************************************************/ /*! exports provided: gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridGap\", function() { return gridGap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridColumnGap\", function() { return gridColumnGap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridRowGap\", function() { return gridRowGap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridColumn\", function() { return gridColumn; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridRow\", function() { return gridRow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridAutoFlow\", function() { return gridAutoFlow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridAutoColumns\", function() { return gridAutoColumns; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridAutoRows\", function() { return gridAutoRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateColumns\", function() { return gridTemplateColumns; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateRows\", function() { return gridTemplateRows; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateAreas\", function() { return gridTemplateAreas; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gridArea\", function() { return gridArea; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar gridGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridGap'\n});\nvar gridColumnGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridColumnGap'\n});\nvar gridRowGap = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridRowGap'\n});\nvar gridColumn = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridColumn'\n});\nvar gridRow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridRow'\n});\nvar gridAutoFlow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridAutoFlow'\n});\nvar gridAutoColumns = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridAutoColumns'\n});\nvar gridAutoRows = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridAutoRows'\n});\nvar gridTemplateColumns = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridTemplateColumns'\n});\nvar gridTemplateRows = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridTemplateRows'\n});\nvar gridTemplateAreas = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridTemplateAreas'\n});\nvar gridArea = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'gridArea'\n});\nvar grid = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\n/* harmony default export */ __webpack_exports__[\"default\"] = (grid);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/grid.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/index.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/system/esm/index.js ***! \*******************************************************/ /*! exports provided: borders, breakpoints, compose, css, display, flexbox, grid, palette, positions, shadows, sizing, spacing, style, typography, border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderRadius, flexBasis, flexDirection, flexWrap, justifyContent, alignItems, alignContent, order, flex, flexGrow, flexShrink, alignSelf, justifyItems, justifySelf, gridGap, gridColumnGap, gridRowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea, color, bgcolor, position, zIndex, top, right, bottom, left, width, maxWidth, minWidth, height, maxHeight, minHeight, sizeWidth, sizeHeight, boxSizing, createUnarySpacing, fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _borders__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./borders */ \"./node_modules/@material-ui/system/esm/borders.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borders\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"border\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"border\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderTop\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderTop\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderRight\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderRight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderBottom\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderBottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderLeft\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderLeft\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderColor\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderColor\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"borderRadius\", function() { return _borders__WEBPACK_IMPORTED_MODULE_0__[\"borderRadius\"]; });\n\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./breakpoints */ \"./node_modules/@material-ui/system/esm/breakpoints.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"breakpoints\", function() { return _breakpoints__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return _compose__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./css */ \"./node_modules/@material-ui/system/esm/css.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"css\", function() { return _css__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _display__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./display */ \"./node_modules/@material-ui/system/esm/display.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"display\", function() { return _display__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _flexbox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./flexbox */ \"./node_modules/@material-ui/system/esm/flexbox.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexbox\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexBasis\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flexBasis\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexDirection\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flexDirection\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexWrap\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flexWrap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"justifyContent\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"justifyContent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"alignItems\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"alignItems\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"alignContent\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"alignContent\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"order\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"order\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flex\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexGrow\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flexGrow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"flexShrink\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"flexShrink\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"alignSelf\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"alignSelf\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"justifyItems\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"justifyItems\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"justifySelf\", function() { return _flexbox__WEBPACK_IMPORTED_MODULE_5__[\"justifySelf\"]; });\n\n/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./grid */ \"./node_modules/@material-ui/system/esm/grid.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"grid\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridGap\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridGap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridColumnGap\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridColumnGap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridRowGap\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridRowGap\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridColumn\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridColumn\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridRow\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridRow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridAutoFlow\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridAutoFlow\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridAutoColumns\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridAutoColumns\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridAutoRows\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridAutoRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateColumns\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridTemplateColumns\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateRows\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridTemplateRows\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridTemplateAreas\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridTemplateAreas\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"gridArea\", function() { return _grid__WEBPACK_IMPORTED_MODULE_6__[\"gridArea\"]; });\n\n/* harmony import */ var _palette__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./palette */ \"./node_modules/@material-ui/system/esm/palette.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"palette\", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__[\"color\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bgcolor\", function() { return _palette__WEBPACK_IMPORTED_MODULE_7__[\"bgcolor\"]; });\n\n/* harmony import */ var _positions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./positions */ \"./node_modules/@material-ui/system/esm/positions.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"positions\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"position\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"position\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"zIndex\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"zIndex\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"top\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"top\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"right\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"right\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"bottom\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"bottom\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"left\", function() { return _positions__WEBPACK_IMPORTED_MODULE_8__[\"left\"]; });\n\n/* harmony import */ var _shadows__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./shadows */ \"./node_modules/@material-ui/system/esm/shadows.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"shadows\", function() { return _shadows__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/* harmony import */ var _sizing__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./sizing */ \"./node_modules/@material-ui/system/esm/sizing.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sizing\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"width\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"width\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxWidth\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"maxWidth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minWidth\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"minWidth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"height\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"height\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"maxHeight\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"maxHeight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"minHeight\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"minHeight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sizeWidth\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"sizeWidth\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"sizeHeight\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"sizeHeight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"boxSizing\", function() { return _sizing__WEBPACK_IMPORTED_MODULE_10__[\"boxSizing\"]; });\n\n/* harmony import */ var _spacing__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./spacing */ \"./node_modules/@material-ui/system/esm/spacing.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"spacing\", function() { return _spacing__WEBPACK_IMPORTED_MODULE_11__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"createUnarySpacing\", function() { return _spacing__WEBPACK_IMPORTED_MODULE_11__[\"createUnarySpacing\"]; });\n\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"style\", function() { return _style__WEBPACK_IMPORTED_MODULE_12__[\"default\"]; });\n\n/* harmony import */ var _typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./typography */ \"./node_modules/@material-ui/system/esm/typography.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"typography\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"default\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fontFamily\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"fontFamily\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fontSize\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"fontSize\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fontStyle\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"fontStyle\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"fontWeight\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"fontWeight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"letterSpacing\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"letterSpacing\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"lineHeight\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"lineHeight\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"textAlign\", function() { return _typography__WEBPACK_IMPORTED_MODULE_13__[\"textAlign\"]; });\n\n/** @license Material-UI v4.9.14\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/memoize.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/memoize.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return memoize; });\nfunction memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n\n return cache[arg];\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/memoize.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/merge.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/system/esm/merge.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _material_ui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @material-ui/utils */ \"./node_modules/@material-ui/utils/esm/index.js\");\n\n\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n\n return Object(_material_ui_utils__WEBPACK_IMPORTED_MODULE_0__[\"deepmerge\"])(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (merge);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/merge.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/palette.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/palette.js ***! \*********************************************************/ /*! exports provided: color, bgcolor, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"color\", function() { return color; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bgcolor\", function() { return bgcolor; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar color = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'color',\n themeKey: 'palette'\n});\nvar bgcolor = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette'\n});\nvar palette = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(color, bgcolor);\n/* harmony default export */ __webpack_exports__[\"default\"] = (palette);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/palette.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/positions.js": /*!***********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/positions.js ***! \***********************************************************/ /*! exports provided: position, zIndex, top, right, bottom, left, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"position\", function() { return position; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"zIndex\", function() { return zIndex; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"top\", function() { return top; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"right\", function() { return right; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"bottom\", function() { return bottom; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"left\", function() { return left; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar position = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'position'\n});\nvar zIndex = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'zIndex',\n themeKey: 'zIndex'\n});\nvar top = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'top'\n});\nvar right = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'right'\n});\nvar bottom = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'bottom'\n});\nvar left = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'left'\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(position, zIndex, top, right, bottom, left));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/positions.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/responsivePropType.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/system/esm/responsivePropType.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n\nvar responsivePropType = true ? prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.array]) : undefined;\n/* harmony default export */ __webpack_exports__[\"default\"] = (responsivePropType);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/responsivePropType.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/shadows.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/shadows.js ***! \*********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n\nvar boxShadow = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'boxShadow',\n themeKey: 'shadows'\n});\n/* harmony default export */ __webpack_exports__[\"default\"] = (boxShadow);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/shadows.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/sizing.js": /*!********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/sizing.js ***! \********************************************************/ /*! exports provided: width, maxWidth, minWidth, height, maxHeight, minHeight, sizeWidth, sizeHeight, boxSizing, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"width\", function() { return width; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"maxWidth\", function() { return maxWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minWidth\", function() { return minWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"height\", function() { return height; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"maxHeight\", function() { return maxHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"minHeight\", function() { return minHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sizeWidth\", function() { return sizeWidth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sizeHeight\", function() { return sizeHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"boxSizing\", function() { return boxSizing; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\n\nfunction transform(value) {\n return value <= 1 ? \"\".concat(value * 100, \"%\") : value;\n}\n\nvar width = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'width',\n transform: transform\n});\nvar maxWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'maxWidth',\n transform: transform\n});\nvar minWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'minWidth',\n transform: transform\n});\nvar height = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'height',\n transform: transform\n});\nvar maxHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'maxHeight',\n transform: transform\n});\nvar minHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'minHeight',\n transform: transform\n});\nvar sizeWidth = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'size',\n cssProperty: 'width',\n transform: transform\n});\nvar sizeHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'size',\n cssProperty: 'height',\n transform: transform\n});\nvar boxSizing = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'boxSizing'\n});\nvar sizing = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\n/* harmony default export */ __webpack_exports__[\"default\"] = (sizing);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/sizing.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/spacing.js": /*!*********************************************************!*\ !*** ./node_modules/@material-ui/system/esm/spacing.js ***! \*********************************************************/ /*! exports provided: createUnarySpacing, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createUnarySpacing\", function() { return createUnarySpacing; });\n/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ \"./node_modules/@babel/runtime/helpers/esm/slicedToArray.js\");\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ \"./node_modules/@material-ui/system/esm/responsivePropType.js\");\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ \"./node_modules/@material-ui/system/esm/breakpoints.js\");\n/* harmony import */ var _merge__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./merge */ \"./node_modules/@material-ui/system/esm/merge.js\");\n/* harmony import */ var _memoize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./memoize */ \"./node_modules/@material-ui/system/esm/memoize.js\");\n\n\n\n\n\nvar properties = {\n m: 'margin',\n p: 'padding'\n};\nvar directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nvar aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n}; // memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\n\nvar getCssProperties = Object(_memoize__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(function (prop) {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n\n var _prop$split = prop.split(''),\n _prop$split2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(_prop$split, 2),\n a = _prop$split2[0],\n b = _prop$split2[1];\n\n var property = properties[a];\n var direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(function (dir) {\n return property + dir;\n }) : [property + direction];\n});\nvar spacingKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY'];\nfunction createUnarySpacing(theme) {\n var themeSpacing = theme.spacing || 8;\n\n if (typeof themeSpacing === 'number') {\n return function (abs) {\n if (true) {\n if (typeof abs !== 'number') {\n console.error(\"Material-UI: Expected spacing argument to be a number, got \".concat(abs, \".\"));\n }\n }\n\n return themeSpacing * abs;\n };\n }\n\n if (Array.isArray(themeSpacing)) {\n return function (abs) {\n if (true) {\n if (abs > themeSpacing.length - 1) {\n console.error([\"Material-UI: The value provided (\".concat(abs, \") overflows.\"), \"The supported values are: \".concat(JSON.stringify(themeSpacing), \".\"), \"\".concat(abs, \" > \").concat(themeSpacing.length - 1, \", you need to add the missing values.\")].join('\\n'));\n }\n }\n\n return themeSpacing[abs];\n };\n }\n\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n\n if (true) {\n console.error([\"Material-UI: The `theme.spacing` value (\".concat(themeSpacing, \") is invalid.\"), 'It should be a number, an array or a function.'].join('\\n'));\n }\n\n return function () {\n return undefined;\n };\n}\n\nfunction getValue(transformer, propValue) {\n if (typeof propValue === 'string') {\n return propValue;\n }\n\n var abs = Math.abs(propValue);\n var transformed = transformer(abs);\n\n if (propValue >= 0) {\n return transformed;\n }\n\n if (typeof transformed === 'number') {\n return -transformed;\n }\n\n return \"-\".concat(transformed);\n}\n\nfunction getStyleFromPropValue(cssProperties, transformer) {\n return function (propValue) {\n return cssProperties.reduce(function (acc, cssProperty) {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n };\n}\n\nfunction spacing(props) {\n var theme = props.theme;\n var transformer = createUnarySpacing(theme);\n return Object.keys(props).map(function (prop) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (spacingKeys.indexOf(prop) === -1) {\n return null;\n }\n\n var cssProperties = getCssProperties(prop);\n var styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n var propValue = props[prop];\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[\"handleBreakpoints\"])(props, propValue, styleFromPropValue);\n }).reduce(_merge__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {});\n}\n\nspacing.propTypes = true ? spacingKeys.reduce(function (obj, key) {\n obj[key] = _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n return obj;\n}, {}) : undefined;\nspacing.filterProps = spacingKeys;\n/* harmony default export */ __webpack_exports__[\"default\"] = (spacing);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/spacing.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/style.js": /*!*******************************************************!*\ !*** ./node_modules/@material-ui/system/esm/style.js ***! \*******************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ \"./node_modules/@material-ui/system/esm/responsivePropType.js\");\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ \"./node_modules/@material-ui/system/esm/breakpoints.js\");\n\n\n\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce(function (acc, item) {\n return acc && acc[item] ? acc[item] : null;\n }, obj);\n}\n\nfunction style(options) {\n var prop = options.prop,\n _options$cssProperty = options.cssProperty,\n cssProperty = _options$cssProperty === void 0 ? options.prop : _options$cssProperty,\n themeKey = options.themeKey,\n transform = options.transform;\n\n var fn = function fn(props) {\n if (props[prop] == null) {\n return null;\n }\n\n var propValue = props[prop];\n var theme = props.theme;\n var themeMapping = getPath(theme, themeKey) || {};\n\n var styleFromPropValue = function styleFromPropValue(propValueFinal) {\n var value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || propValueFinal;\n } else {\n value = getPath(themeMapping, propValueFinal) || propValueFinal;\n\n if (transform) {\n value = transform(value);\n }\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, cssProperty, value);\n };\n\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[\"handleBreakpoints\"])(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = true ? Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, prop, _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[\"default\"]) : undefined;\n fn.filterProps = [prop];\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (style);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/style.js?"); /***/ }), /***/ "./node_modules/@material-ui/system/esm/typography.js": /*!************************************************************!*\ !*** ./node_modules/@material-ui/system/esm/typography.js ***! \************************************************************/ /*! exports provided: fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fontFamily\", function() { return fontFamily; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fontSize\", function() { return fontSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fontStyle\", function() { return fontStyle; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fontWeight\", function() { return fontWeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"letterSpacing\", function() { return letterSpacing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"lineHeight\", function() { return lineHeight; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"textAlign\", function() { return textAlign; });\n/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./style */ \"./node_modules/@material-ui/system/esm/style.js\");\n/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./compose */ \"./node_modules/@material-ui/system/esm/compose.js\");\n\n\nvar fontFamily = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'fontFamily',\n themeKey: 'typography'\n});\nvar fontSize = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'fontSize',\n themeKey: 'typography'\n});\nvar fontStyle = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'fontStyle',\n themeKey: 'typography'\n});\nvar fontWeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'fontWeight',\n themeKey: 'typography'\n});\nvar letterSpacing = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'letterSpacing'\n});\nvar lineHeight = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'lineHeight'\n});\nvar textAlign = Object(_style__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n prop: 'textAlign'\n});\nvar typography = Object(_compose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(fontFamily, fontSize, fontStyle, fontWeight, letterSpacing, lineHeight, textAlign);\n/* harmony default export */ __webpack_exports__[\"default\"] = (typography);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/system/esm/typography.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/HTMLElementType.js": /*!****************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/HTMLElementType.js ***! \****************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return HTMLElementType; });\nfunction HTMLElementType(props, propName, componentName, location, propFullName) {\n if (false) {}\n\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n if (propValue && propValue.nodeType !== 1) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an HTMLElement.\");\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/HTMLElementType.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/chainPropTypes.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/chainPropTypes.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return chainPropTypes; });\nfunction chainPropTypes(propType1, propType2) {\n if (false) {}\n\n return function validate() {\n return propType1.apply(void 0, arguments) || propType2.apply(void 0, arguments);\n };\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/chainPropTypes.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/deepmerge.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/deepmerge.js ***! \**********************************************************/ /*! exports provided: isPlainObject, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isPlainObject\", function() { return isPlainObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return deepmerge; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n\n\nfunction isPlainObject(item) {\n return item && Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(item) === 'object' && item.constructor === Object;\n}\nfunction deepmerge(target, source) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {\n clone: true\n };\n var output = options.clone ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, target) : target;\n\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(function (key) {\n // Avoid prototype pollution\n if (key === '__proto__') {\n return;\n }\n\n if (isPlainObject(source[key]) && key in target) {\n output[key] = deepmerge(target[key], source[key], options);\n } else {\n output[key] = source[key];\n }\n });\n }\n\n return output;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/deepmerge.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/elementAcceptingRef.js": /*!********************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/elementAcceptingRef.js ***! \********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chainPropTypes */ \"./node_modules/@material-ui/utils/esm/chainPropTypes.js\");\n\n\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction acceptingRef(props, propName, componentName, location, propFullName) {\n var element = props[propName];\n var safePropName = propFullName || propName;\n\n if (element == null) {\n return null;\n }\n\n var warningHint;\n var elementType = element.type;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof elementType === 'function' && !isClassComponent(elementType)) {\n warningHint = 'Did you accidentally use a plain function component for an element instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\nvar elementAcceptingRef = Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.element, acceptingRef);\nelementAcceptingRef.isRequired = Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.element.isRequired, acceptingRef);\n/* harmony default export */ __webpack_exports__[\"default\"] = (elementAcceptingRef);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/elementAcceptingRef.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js": /*!************************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js ***! \************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chainPropTypes */ \"./node_modules/@material-ui/utils/esm/chainPropTypes.js\");\n\n\n\nfunction isClassComponent(elementType) {\n // elementType.prototype?.isReactComponent\n var _elementType$prototyp = elementType.prototype,\n prototype = _elementType$prototyp === void 0 ? {} : _elementType$prototyp;\n return Boolean(prototype.isReactComponent);\n}\n\nfunction elementTypeAcceptingRef(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var safePropName = propFullName || propName;\n\n if (propValue == null) {\n return null;\n }\n\n var warningHint;\n /**\n * Blacklisting instead of whitelisting\n *\n * Blacklisting will miss some components, such as React.Fragment. Those will at least\n * trigger a warning in React.\n * We can't whitelist because there is no safe way to detect React.forwardRef\n * or class components. \"Safe\" means there's no public API.\n *\n */\n\n if (typeof propValue === 'function' && !isClassComponent(propValue)) {\n warningHint = 'Did you accidentally provide a plain function component instead?';\n }\n\n if (warningHint !== undefined) {\n return new Error(\"Invalid \".concat(location, \" `\").concat(safePropName, \"` supplied to `\").concat(componentName, \"`. \") + \"Expected an element type that can hold a ref. \".concat(warningHint, \" \") + 'For more information see https://material-ui.com/r/caveat-with-refs-guide');\n }\n\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Object(_chainPropTypes__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(prop_types__WEBPACK_IMPORTED_MODULE_0__[\"elementType\"], elementTypeAcceptingRef));\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/exactProp.js": /*!**********************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/exactProp.js ***! \**********************************************************/ /*! exports provided: specialProperty, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"specialProperty\", function() { return specialProperty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return exactProp; });\n/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ \"./node_modules/@babel/runtime/helpers/esm/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n\n\n// This module is based on https://github.com/airbnb/prop-types-exact repository.\n// However, in order to reduce the number of dependencies and to remove some extra safe checks\n// the module was forked.\n// Only exported for test purposes.\nvar specialProperty = \"exact-prop: \\u200B\";\nfunction exactProp(propTypes) {\n if (false) {}\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, propTypes, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, specialProperty, function (props) {\n var unsupportedProps = Object.keys(props).filter(function (prop) {\n return !propTypes.hasOwnProperty(prop);\n });\n\n if (unsupportedProps.length > 0) {\n return new Error(\"The following props are not supported: \".concat(unsupportedProps.map(function (prop) {\n return \"`\".concat(prop, \"`\");\n }).join(', '), \". Please remove them.\"));\n }\n\n return null;\n }));\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/exactProp.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js": /*!**********************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return formatMuiErrorMessage; });\n/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@material-ui/utils/macros/MuiError.macro` instead.\n * @param {number} code\n */\nfunction formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe iff we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n\n /* eslint-disable prefer-template */\n var url = 'https://material-ui.com/production-error/?code=' + code;\n\n for (var i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n\n return 'Minified Material-UI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/getDisplayName.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/getDisplayName.js ***! \***************************************************************/ /*! exports provided: getFunctionName, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getFunctionName\", function() { return getFunctionName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return getDisplayName; });\n/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ \"./node_modules/@babel/runtime/helpers/esm/typeof.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_1__);\n\n // Simplified polyfill for IE 11 support\n// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3\n\nvar fnNameMatchRegex = /^\\s*function(?:\\s|\\s*\\/\\*.*\\*\\/\\s*)+([^(\\s/]*)\\s*/;\nfunction getFunctionName(fn) {\n var match = \"\".concat(fn).match(fnNameMatchRegex);\n var name = match && match[1];\n return name || '';\n}\n/**\n * @param {function} Component\n * @param {string} fallback\n * @returns {string | undefined}\n */\n\nfunction getFunctionComponentName(Component) {\n var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return Component.displayName || Component.name || getFunctionName(Component) || fallback;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = getFunctionComponentName(innerType);\n return outerType.displayName || (functionName !== '' ? \"\".concat(wrapperName, \"(\").concat(functionName, \")\") : wrapperName);\n}\n/**\n * cherry-pick from\n * https://github.com/facebook/react/blob/769b1f270e1251d9dbdce0fcbd9e92e502d059b8/packages/shared/getComponentName.js\n * originally forked from recompose/getDisplayName with added IE 11 support\n *\n * @param {React.ReactType} Component\n * @returns {string | undefined}\n */\n\n\nfunction getDisplayName(Component) {\n if (Component == null) {\n return undefined;\n }\n\n if (typeof Component === 'string') {\n return Component;\n }\n\n if (typeof Component === 'function') {\n return getFunctionComponentName(Component, 'Component');\n }\n\n if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(Component) === 'object') {\n switch (Component.$$typeof) {\n case react_is__WEBPACK_IMPORTED_MODULE_1__[\"ForwardRef\"]:\n return getWrappedName(Component, Component.render, 'ForwardRef');\n\n case react_is__WEBPACK_IMPORTED_MODULE_1__[\"Memo\"]:\n return getWrappedName(Component, Component.type, 'memo');\n\n default:\n return undefined;\n }\n }\n\n return undefined;\n}\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/getDisplayName.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/index.js": /*!******************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/index.js ***! \******************************************************/ /*! exports provided: chainPropTypes, deepmerge, elementAcceptingRef, elementTypeAcceptingRef, exactProp, formatMuiErrorMessage, getDisplayName, HTMLElementType, ponyfillGlobal, refType */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _chainPropTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./chainPropTypes */ \"./node_modules/@material-ui/utils/esm/chainPropTypes.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"chainPropTypes\", function() { return _chainPropTypes__WEBPACK_IMPORTED_MODULE_0__[\"default\"]; });\n\n/* harmony import */ var _deepmerge__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./deepmerge */ \"./node_modules/@material-ui/utils/esm/deepmerge.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"deepmerge\", function() { return _deepmerge__WEBPACK_IMPORTED_MODULE_1__[\"default\"]; });\n\n/* harmony import */ var _elementAcceptingRef__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./elementAcceptingRef */ \"./node_modules/@material-ui/utils/esm/elementAcceptingRef.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"elementAcceptingRef\", function() { return _elementAcceptingRef__WEBPACK_IMPORTED_MODULE_2__[\"default\"]; });\n\n/* harmony import */ var _elementTypeAcceptingRef__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./elementTypeAcceptingRef */ \"./node_modules/@material-ui/utils/esm/elementTypeAcceptingRef.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"elementTypeAcceptingRef\", function() { return _elementTypeAcceptingRef__WEBPACK_IMPORTED_MODULE_3__[\"default\"]; });\n\n/* harmony import */ var _exactProp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./exactProp */ \"./node_modules/@material-ui/utils/esm/exactProp.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"exactProp\", function() { return _exactProp__WEBPACK_IMPORTED_MODULE_4__[\"default\"]; });\n\n/* harmony import */ var _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./formatMuiErrorMessage */ \"./node_modules/@material-ui/utils/esm/formatMuiErrorMessage.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"formatMuiErrorMessage\", function() { return _formatMuiErrorMessage__WEBPACK_IMPORTED_MODULE_5__[\"default\"]; });\n\n/* harmony import */ var _getDisplayName__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./getDisplayName */ \"./node_modules/@material-ui/utils/esm/getDisplayName.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"getDisplayName\", function() { return _getDisplayName__WEBPACK_IMPORTED_MODULE_6__[\"default\"]; });\n\n/* harmony import */ var _HTMLElementType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./HTMLElementType */ \"./node_modules/@material-ui/utils/esm/HTMLElementType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"HTMLElementType\", function() { return _HTMLElementType__WEBPACK_IMPORTED_MODULE_7__[\"default\"]; });\n\n/* harmony import */ var _ponyfillGlobal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./ponyfillGlobal */ \"./node_modules/@material-ui/utils/esm/ponyfillGlobal.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"ponyfillGlobal\", function() { return _ponyfillGlobal__WEBPACK_IMPORTED_MODULE_8__[\"default\"]; });\n\n/* harmony import */ var _refType__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./refType */ \"./node_modules/@material-ui/utils/esm/refType.js\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"refType\", function() { return _refType__WEBPACK_IMPORTED_MODULE_9__[\"default\"]; });\n\n/** @license Material-UI v4.10.2\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/index.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/ponyfillGlobal.js": /*!***************************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/ponyfillGlobal.js ***! \***************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\n/* harmony default export */ __webpack_exports__[\"default\"] = (typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')());\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/ponyfillGlobal.js?"); /***/ }), /***/ "./node_modules/@material-ui/utils/esm/refType.js": /*!********************************************************!*\ !*** ./node_modules/@material-ui/utils/esm/refType.js ***! \********************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);\n\nvar refType = prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func, prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object]);\n/* harmony default export */ __webpack_exports__[\"default\"] = (refType);\n\n//# sourceURL=webpack:///./node_modules/@material-ui/utils/esm/refType.js?"); /***/ }), /***/ "./node_modules/clsx/dist/clsx.m.js": /*!******************************************!*\ !*** ./node_modules/clsx/dist/clsx.m.js ***! \******************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\nfunction toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n});\n\n\n//# sourceURL=webpack:///./node_modules/clsx/dist/clsx.m.js?"); /***/ }), /***/ "./node_modules/css-vendor/dist/css-vendor.esm.js": /*!********************************************************!*\ !*** ./node_modules/css-vendor/dist/css-vendor.esm.js ***! \********************************************************/ /*! exports provided: prefix, supportedKeyframes, supportedProperty, supportedValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prefix\", function() { return prefix; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"supportedKeyframes\", function() { return supportedKeyframes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"supportedProperty\", function() { return supportedProperty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"supportedValue\", function() { return supportedValue; });\n/* harmony import */ var is_in_browser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-in-browser */ \"./node_modules/is-in-browser/dist/module.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ \"./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\");\n\n\n\n// Export javascript style and css style vendor prefixes.\nvar js = '';\nvar css = '';\nvar vendor = '';\nvar browser = '';\nvar isTouch = is_in_browser__WEBPACK_IMPORTED_MODULE_0__[\"default\"] && 'ontouchstart' in document.documentElement; // We should not do anything if required serverside.\n\nif (is_in_browser__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n // Order matters. We need to check Webkit the last one because\n // other vendors use to add Webkit prefixes to some properties\n var jsCssMap = {\n Moz: '-moz-',\n ms: '-ms-',\n O: '-o-',\n Webkit: '-webkit-'\n };\n\n var _document$createEleme = document.createElement('p'),\n style = _document$createEleme.style;\n\n var testProp = 'Transform';\n\n for (var key in jsCssMap) {\n if (key + testProp in style) {\n js = key;\n css = jsCssMap[key];\n break;\n }\n } // Correctly detect the Edge browser.\n\n\n if (js === 'Webkit' && 'msHyphens' in style) {\n js = 'ms';\n css = jsCssMap.ms;\n browser = 'edge';\n } // Correctly detect the Safari browser.\n\n\n if (js === 'Webkit' && '-apple-trailing-word' in style) {\n vendor = 'apple';\n }\n}\n/**\n * Vendor prefix string for the current browser.\n *\n * @type {{js: String, css: String, vendor: String, browser: String}}\n * @api public\n */\n\n\nvar prefix = {\n js: js,\n css: css,\n vendor: vendor,\n browser: browser,\n isTouch: isTouch\n};\n\n/**\n * Test if a keyframe at-rule should be prefixed or not\n *\n * @param {String} vendor prefix string for the current browser.\n * @return {String}\n * @api public\n */\n\nfunction supportedKeyframes(key) {\n // Keyframes is already prefixed. e.g. key = '@-webkit-keyframes a'\n if (key[1] === '-') return key; // No need to prefix IE/Edge. Older browsers will ignore unsupported rules.\n // https://caniuse.com/#search=keyframes\n\n if (prefix.js === 'ms') return key;\n return \"@\" + prefix.css + \"keyframes\" + key.substr(10);\n}\n\n// https://caniuse.com/#search=appearance\n\nvar appearence = {\n noPrefill: ['appearance'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'appearance') return false;\n if (prefix.js === 'ms') return \"-webkit-\" + prop;\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=color-adjust\n\nvar colorAdjust = {\n noPrefill: ['color-adjust'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'color-adjust') return false;\n if (prefix.js === 'Webkit') return prefix.css + \"print-\" + prop;\n return prop;\n }\n};\n\nvar regExp = /[-\\s]+(.)?/g;\n/**\n * Replaces the letter with the capital letter\n *\n * @param {String} match\n * @param {String} c\n * @return {String}\n * @api private\n */\n\nfunction toUpper(match, c) {\n return c ? c.toUpperCase() : '';\n}\n/**\n * Convert dash separated strings to camel-cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\n\nfunction camelize(str) {\n return str.replace(regExp, toUpper);\n}\n\n/**\n * Convert dash separated strings to pascal cased.\n *\n * @param {String} str\n * @return {String}\n * @api private\n */\n\nfunction pascalize(str) {\n return camelize(\"-\" + str);\n}\n\n// but we can use a longhand property instead.\n// https://caniuse.com/#search=mask\n\nvar mask = {\n noPrefill: ['mask'],\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^mask/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var longhand = 'mask-image';\n\n if (camelize(longhand) in style) {\n return prop;\n }\n\n if (prefix.js + pascalize(longhand) in style) {\n return prefix.css + prop;\n }\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=text-orientation\n\nvar textOrientation = {\n noPrefill: ['text-orientation'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'text-orientation') return false;\n\n if (prefix.vendor === 'apple' && !prefix.isTouch) {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=transform\n\nvar transform = {\n noPrefill: ['transform'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transform') return false;\n\n if (options.transform) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=transition\n\nvar transition = {\n noPrefill: ['transition'],\n supportedProperty: function supportedProperty(prop, style, options) {\n if (prop !== 'transition') return false;\n\n if (options.transition) {\n return prop;\n }\n\n return prefix.css + prop;\n }\n};\n\n// https://caniuse.com/#search=writing-mode\n\nvar writingMode = {\n noPrefill: ['writing-mode'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'writing-mode') return false;\n\n if (prefix.js === 'Webkit' || prefix.js === 'ms' && prefix.browser !== 'edge') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=user-select\n\nvar userSelect = {\n noPrefill: ['user-select'],\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'user-select') return false;\n\n if (prefix.js === 'Moz' || prefix.js === 'ms' || prefix.vendor === 'apple') {\n return prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=multicolumn\n// https://github.com/postcss/autoprefixer/issues/491\n// https://github.com/postcss/autoprefixer/issues/177\n\nvar breakPropsOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^break-/.test(prop)) return false;\n\n if (prefix.js === 'Webkit') {\n var jsProp = \"WebkitColumn\" + pascalize(prop);\n return jsProp in style ? prefix.css + \"column-\" + prop : false;\n }\n\n if (prefix.js === 'Moz') {\n var _jsProp = \"page\" + pascalize(prop);\n\n return _jsProp in style ? \"page-\" + prop : false;\n }\n\n return false;\n }\n};\n\n// See https://github.com/postcss/autoprefixer/issues/324.\n\nvar inlineLogicalOld = {\n supportedProperty: function supportedProperty(prop, style) {\n if (!/^(border|margin|padding)-inline/.test(prop)) return false;\n if (prefix.js === 'Moz') return prop;\n var newProp = prop.replace('-inline', '');\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\n// Camelization is required because we can't test using.\n// CSS syntax for e.g. in FF.\n\nvar unprefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n return camelize(prop) in style ? prop : false;\n }\n};\n\nvar prefixed = {\n supportedProperty: function supportedProperty(prop, style) {\n var pascalized = pascalize(prop); // Return custom CSS variable without prefixing.\n\n if (prop[0] === '-') return prop; // Return already prefixed value without prefixing.\n\n if (prop[0] === '-' && prop[1] === '-') return prop;\n if (prefix.js + pascalized in style) return prefix.css + prop; // Try webkit fallback.\n\n if (prefix.js !== 'Webkit' && \"Webkit\" + pascalized in style) return \"-webkit-\" + prop;\n return false;\n }\n};\n\n// https://caniuse.com/#search=scroll-snap\n\nvar scrollSnap = {\n supportedProperty: function supportedProperty(prop) {\n if (prop.substring(0, 11) !== 'scroll-snap') return false;\n\n if (prefix.js === 'ms') {\n return \"\" + prefix.css + prop;\n }\n\n return prop;\n }\n};\n\n// https://caniuse.com/#search=overscroll-behavior\n\nvar overscrollBehavior = {\n supportedProperty: function supportedProperty(prop) {\n if (prop !== 'overscroll-behavior') return false;\n\n if (prefix.js === 'ms') {\n return prefix.css + \"scroll-chaining\";\n }\n\n return prop;\n }\n};\n\nvar propMap = {\n 'flex-grow': 'flex-positive',\n 'flex-shrink': 'flex-negative',\n 'flex-basis': 'flex-preferred-size',\n 'justify-content': 'flex-pack',\n order: 'flex-order',\n 'align-items': 'flex-align',\n 'align-content': 'flex-line-pack' // 'align-self' is handled by 'align-self' plugin.\n\n}; // Support old flex spec from 2012.\n\nvar flex2012 = {\n supportedProperty: function supportedProperty(prop, style) {\n var newProp = propMap[prop];\n if (!newProp) return false;\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n};\n\nvar propMap$1 = {\n flex: 'box-flex',\n 'flex-grow': 'box-flex',\n 'flex-direction': ['box-orient', 'box-direction'],\n order: 'box-ordinal-group',\n 'align-items': 'box-align',\n 'flex-flow': ['box-orient', 'box-direction'],\n 'justify-content': 'box-pack'\n};\nvar propKeys = Object.keys(propMap$1);\n\nvar prefixCss = function prefixCss(p) {\n return prefix.css + p;\n}; // Support old flex spec from 2009.\n\n\nvar flex2009 = {\n supportedProperty: function supportedProperty(prop, style, _ref) {\n var multiple = _ref.multiple;\n\n if (propKeys.indexOf(prop) > -1) {\n var newProp = propMap$1[prop];\n\n if (!Array.isArray(newProp)) {\n return prefix.js + pascalize(newProp) in style ? prefix.css + newProp : false;\n }\n\n if (!multiple) return false;\n\n for (var i = 0; i < newProp.length; i++) {\n if (!(prefix.js + pascalize(newProp[0]) in style)) {\n return false;\n }\n }\n\n return newProp.map(prefixCss);\n }\n\n return false;\n }\n};\n\n// plugins = [\n// ...plugins,\n// breakPropsOld,\n// inlineLogicalOld,\n// unprefixed,\n// prefixed,\n// scrollSnap,\n// flex2012,\n// flex2009\n// ]\n// Plugins without 'noPrefill' value, going last.\n// 'flex-*' plugins should be at the bottom.\n// 'flex2009' going after 'flex2012'.\n// 'prefixed' going after 'unprefixed'\n\nvar plugins = [appearence, colorAdjust, mask, textOrientation, transform, transition, writingMode, userSelect, breakPropsOld, inlineLogicalOld, unprefixed, prefixed, scrollSnap, overscrollBehavior, flex2012, flex2009];\nvar propertyDetectors = plugins.filter(function (p) {\n return p.supportedProperty;\n}).map(function (p) {\n return p.supportedProperty;\n});\nvar noPrefill = plugins.filter(function (p) {\n return p.noPrefill;\n}).reduce(function (a, p) {\n a.push.apply(a, Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(p.noPrefill));\n return a;\n}, []);\n\nvar el;\nvar cache = {};\n\nif (is_in_browser__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) {\n el = document.createElement('p'); // We test every property on vendor prefix requirement.\n // Once tested, result is cached. It gives us up to 70% perf boost.\n // http://jsperf.com/element-style-object-access-vs-plain-object\n //\n // Prefill cache with known css properties to reduce amount of\n // properties we need to feature test at runtime.\n // http://davidwalsh.name/vendor-prefix\n\n var computed = window.getComputedStyle(document.documentElement, '');\n\n for (var key$1 in computed) {\n // eslint-disable-next-line no-restricted-globals\n if (!isNaN(key$1)) cache[computed[key$1]] = computed[key$1];\n } // Properties that cannot be correctly detected using the\n // cache prefill method.\n\n\n noPrefill.forEach(function (x) {\n return delete cache[x];\n });\n}\n/**\n * Test if a property is supported, returns supported property with vendor\n * prefix if required. Returns `false` if not supported.\n *\n * @param {String} prop dash separated\n * @param {Object} [options]\n * @return {String|Boolean}\n * @api public\n */\n\n\nfunction supportedProperty(prop, options) {\n if (options === void 0) {\n options = {};\n }\n\n // For server-side rendering.\n if (!el) return prop; // Remove cache for benchmark tests or return property from the cache.\n\n if ( true && cache[prop] != null) {\n return cache[prop];\n } // Check if 'transition' or 'transform' natively supported in browser.\n\n\n if (prop === 'transition' || prop === 'transform') {\n options[prop] = prop in el.style;\n } // Find a plugin for current prefix property.\n\n\n for (var i = 0; i < propertyDetectors.length; i++) {\n cache[prop] = propertyDetectors[i](prop, el.style, options); // Break loop, if value found.\n\n if (cache[prop]) break;\n } // Reset styles for current property.\n // Firefox can even throw an error for invalid properties, e.g., \"0\".\n\n\n try {\n el.style[prop] = '';\n } catch (err) {\n return false;\n }\n\n return cache[prop];\n}\n\nvar cache$1 = {};\nvar transitionProperties = {\n transition: 1,\n 'transition-property': 1,\n '-webkit-transition': 1,\n '-webkit-transition-property': 1\n};\nvar transPropsRegExp = /(^\\s*[\\w-]+)|, (\\s*[\\w-]+)(?![^()]*\\))/g;\nvar el$1;\n/**\n * Returns prefixed value transition/transform if needed.\n *\n * @param {String} match\n * @param {String} p1\n * @param {String} p2\n * @return {String}\n * @api private\n */\n\nfunction prefixTransitionCallback(match, p1, p2) {\n if (p1 === 'var') return 'var';\n if (p1 === 'all') return 'all';\n if (p2 === 'all') return ', all';\n var prefixedValue = p1 ? supportedProperty(p1) : \", \" + supportedProperty(p2);\n if (!prefixedValue) return p1 || p2;\n return prefixedValue;\n}\n\nif (is_in_browser__WEBPACK_IMPORTED_MODULE_0__[\"default\"]) el$1 = document.createElement('p');\n/**\n * Returns prefixed value if needed. Returns `false` if value is not supported.\n *\n * @param {String} property\n * @param {String} value\n * @return {String|Boolean}\n * @api public\n */\n\nfunction supportedValue(property, value) {\n // For server-side rendering.\n var prefixedValue = value;\n if (!el$1 || property === 'content') return value; // It is a string or a number as a string like '1'.\n // We want only prefixable values here.\n // eslint-disable-next-line no-restricted-globals\n\n if (typeof prefixedValue !== 'string' || !isNaN(parseInt(prefixedValue, 10))) {\n return prefixedValue;\n } // Create cache key for current value.\n\n\n var cacheKey = property + prefixedValue; // Remove cache for benchmark tests or return value from cache.\n\n if ( true && cache$1[cacheKey] != null) {\n return cache$1[cacheKey];\n } // IE can even throw an error in some cases, for e.g. style.content = 'bar'.\n\n\n try {\n // Test value as it is.\n el$1.style[property] = prefixedValue;\n } catch (err) {\n // Return false if value not supported.\n cache$1[cacheKey] = false;\n return false;\n } // If 'transition' or 'transition-property' property.\n\n\n if (transitionProperties[property]) {\n prefixedValue = prefixedValue.replace(transPropsRegExp, prefixTransitionCallback);\n } else if (el$1.style[property] === '') {\n // Value with a vendor prefix.\n prefixedValue = prefix.css + prefixedValue; // Hardcode test to convert \"flex\" to \"-ms-flexbox\" for IE10.\n\n if (prefixedValue === '-ms-flex') el$1.style[property] = '-ms-flexbox'; // Test prefixed value.\n\n el$1.style[property] = prefixedValue; // Return false if value not supported.\n\n if (el$1.style[property] === '') {\n cache$1[cacheKey] = false;\n return false;\n }\n } // Reset styles for current property.\n\n\n el$1.style[property] = ''; // Write current value to cache.\n\n cache$1[cacheKey] = prefixedValue;\n return cache$1[cacheKey];\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/css-vendor/dist/css-vendor.esm.js?"); /***/ }), /***/ "./node_modules/dom-helpers/esm/addClass.js": /*!**************************************************!*\ !*** ./node_modules/dom-helpers/esm/addClass.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return addClass; });\n/* harmony import */ var _hasClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./hasClass */ \"./node_modules/dom-helpers/esm/hasClass.js\");\n\nfunction addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!Object(_hasClass__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/addClass.js?"); /***/ }), /***/ "./node_modules/dom-helpers/esm/hasClass.js": /*!**************************************************!*\ !*** ./node_modules/dom-helpers/esm/hasClass.js ***! \**************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return hasClass; });\nfunction hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/hasClass.js?"); /***/ }), /***/ "./node_modules/dom-helpers/esm/removeClass.js": /*!*****************************************************!*\ !*** ./node_modules/dom-helpers/esm/removeClass.js ***! \*****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return removeClass; });\nfunction replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n\nfunction removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n ;\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}\n\n//# sourceURL=webpack:///./node_modules/dom-helpers/esm/removeClass.js?"); /***/ }), /***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js": /*!**********************************************************************************!*\ !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("\n\nvar reactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n\n\n//# sourceURL=webpack:///./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js?"); /***/ }), /***/ "./node_modules/hyphenate-style-name/index.js": /*!****************************************************!*\ !*** ./node_modules/hyphenate-style-name/index.js ***! \****************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (hyphenateStyleName);\n\n\n//# sourceURL=webpack:///./node_modules/hyphenate-style-name/index.js?"); /***/ }), /***/ "./node_modules/is-in-browser/dist/module.js": /*!***************************************************!*\ !*** ./node_modules/is-in-browser/dist/module.js ***! \***************************************************/ /*! exports provided: isBrowser, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isBrowser\", function() { return isBrowser; });\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar isBrowser = (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\" && (typeof document === \"undefined\" ? \"undefined\" : _typeof(document)) === 'object' && document.nodeType === 9;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (isBrowser);\n\n\n//# sourceURL=webpack:///./node_modules/is-in-browser/dist/module.js?"); /***/ }), /***/ "./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js": /*!******************************************************************************!*\ !*** ./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hyphenate-style-name */ \"./node_modules/hyphenate-style-name/index.js\");\n\n\n/**\n * Convert camel cased property names to dash separated.\n *\n * @param {Object} style\n * @return {Object}\n */\n\nfunction convertCase(style) {\n var converted = {};\n\n for (var prop in style) {\n var key = prop.indexOf('--') === 0 ? prop : Object(hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(prop);\n converted[key] = style[prop];\n }\n\n if (style.fallbacks) {\n if (Array.isArray(style.fallbacks)) converted.fallbacks = style.fallbacks.map(convertCase);else converted.fallbacks = convertCase(style.fallbacks);\n }\n\n return converted;\n}\n/**\n * Allow camel cased property names by converting them back to dasherized.\n *\n * @param {Rule} rule\n */\n\n\nfunction camelCase() {\n function onProcessStyle(style) {\n if (Array.isArray(style)) {\n // Handle rules like @font-face, which can have multiple styles in an array\n for (var index = 0; index < style.length; index++) {\n style[index] = convertCase(style[index]);\n }\n\n return style;\n }\n\n return convertCase(style);\n }\n\n function onChangeValue(value, prop, rule) {\n if (prop.indexOf('--') === 0) {\n return value;\n }\n\n var hyphenatedProp = Object(hyphenate_style_name__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(prop); // There was no camel case in place\n\n if (prop === hyphenatedProp) return value;\n rule.prop(hyphenatedProp, value); // Core will ignore that property value we set the proper one above.\n\n return null;\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (camelCase);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-camel-case/dist/jss-plugin-camel-case.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js": /*!**********************************************************************************!*\ !*** ./node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js ***! \**********************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n\n\nvar px = jss__WEBPACK_IMPORTED_MODULE_0__[\"hasCSSTOMSupport\"] && CSS ? CSS.px : 'px';\nvar ms = jss__WEBPACK_IMPORTED_MODULE_0__[\"hasCSSTOMSupport\"] && CSS ? CSS.ms : 'ms';\nvar percent = jss__WEBPACK_IMPORTED_MODULE_0__[\"hasCSSTOMSupport\"] && CSS ? CSS.percent : '%';\n/**\n * Generated jss-plugin-default-unit CSS property units\n *\n * @type object\n */\n\nvar defaultUnits = {\n // Animation properties\n 'animation-delay': ms,\n 'animation-duration': ms,\n // Background properties\n 'background-position': px,\n 'background-position-x': px,\n 'background-position-y': px,\n 'background-size': px,\n // Border Properties\n border: px,\n 'border-bottom': px,\n 'border-bottom-left-radius': px,\n 'border-bottom-right-radius': px,\n 'border-bottom-width': px,\n 'border-left': px,\n 'border-left-width': px,\n 'border-radius': px,\n 'border-right': px,\n 'border-right-width': px,\n 'border-top': px,\n 'border-top-left-radius': px,\n 'border-top-right-radius': px,\n 'border-top-width': px,\n 'border-width': px,\n // Margin properties\n margin: px,\n 'margin-bottom': px,\n 'margin-left': px,\n 'margin-right': px,\n 'margin-top': px,\n // Padding properties\n padding: px,\n 'padding-bottom': px,\n 'padding-left': px,\n 'padding-right': px,\n 'padding-top': px,\n // Mask properties\n 'mask-position-x': px,\n 'mask-position-y': px,\n 'mask-size': px,\n // Width and height properties\n height: px,\n width: px,\n 'min-height': px,\n 'max-height': px,\n 'min-width': px,\n 'max-width': px,\n // Position properties\n bottom: px,\n left: px,\n top: px,\n right: px,\n // Shadow properties\n 'box-shadow': px,\n 'text-shadow': px,\n // Column properties\n 'column-gap': px,\n 'column-rule': px,\n 'column-rule-width': px,\n 'column-width': px,\n // Font and text properties\n 'font-size': px,\n 'font-size-delta': px,\n 'letter-spacing': px,\n 'text-indent': px,\n 'text-stroke': px,\n 'text-stroke-width': px,\n 'word-spacing': px,\n // Motion properties\n motion: px,\n 'motion-offset': px,\n // Outline properties\n outline: px,\n 'outline-offset': px,\n 'outline-width': px,\n // Perspective properties\n perspective: px,\n 'perspective-origin-x': percent,\n 'perspective-origin-y': percent,\n // Transform properties\n 'transform-origin': percent,\n 'transform-origin-x': percent,\n 'transform-origin-y': percent,\n 'transform-origin-z': percent,\n // Transition properties\n 'transition-delay': ms,\n 'transition-duration': ms,\n // Alignment properties\n 'vertical-align': px,\n 'flex-basis': px,\n // Some random properties\n 'shape-margin': px,\n size: px,\n // Grid properties\n grid: px,\n 'grid-gap': px,\n 'grid-row-gap': px,\n 'grid-column-gap': px,\n 'grid-template-rows': px,\n 'grid-template-columns': px,\n 'grid-auto-rows': px,\n 'grid-auto-columns': px,\n // Not existing properties.\n // Used to avoid issues with jss-plugin-expand integration.\n 'box-shadow-x': px,\n 'box-shadow-y': px,\n 'box-shadow-blur': px,\n 'box-shadow-spread': px,\n 'font-line-height': px,\n 'text-shadow-x': px,\n 'text-shadow-y': px,\n 'text-shadow-blur': px\n};\n\n/**\n * Clones the object and adds a camel cased property version.\n */\nfunction addCamelCasedVersion(obj) {\n var regExp = /(-[a-z])/g;\n\n var replace = function replace(str) {\n return str[1].toUpperCase();\n };\n\n var newObj = {};\n\n for (var _key in obj) {\n newObj[_key] = obj[_key];\n newObj[_key.replace(regExp, replace)] = obj[_key];\n }\n\n return newObj;\n}\n\nvar units = addCamelCasedVersion(defaultUnits);\n/**\n * Recursive deep style passing function\n */\n\nfunction iterate(prop, value, options) {\n if (!value) return value;\n\n if (Array.isArray(value)) {\n for (var i = 0; i < value.length; i++) {\n value[i] = iterate(prop, value[i], options);\n }\n } else if (typeof value === 'object') {\n if (prop === 'fallbacks') {\n for (var innerProp in value) {\n value[innerProp] = iterate(innerProp, value[innerProp], options);\n }\n } else {\n for (var _innerProp in value) {\n value[_innerProp] = iterate(prop + \"-\" + _innerProp, value[_innerProp], options);\n }\n }\n } else if (typeof value === 'number') {\n var unit = options[prop] || units[prop];\n\n if (unit) {\n return typeof unit === 'function' ? unit(value).toString() : \"\" + value + unit;\n }\n\n return value.toString();\n }\n\n return value;\n}\n/**\n * Add unit to numeric values.\n */\n\n\nfunction defaultUnit(options) {\n if (options === void 0) {\n options = {};\n }\n\n var camelCasedOptions = addCamelCasedVersion(options);\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n\n for (var prop in style) {\n style[prop] = iterate(prop, style[prop], camelCasedOptions);\n }\n\n return style;\n }\n\n function onChangeValue(value, prop) {\n return iterate(prop, value, camelCasedOptions);\n }\n\n return {\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaultUnit);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-default-unit/dist/jss-plugin-default-unit.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js": /*!**********************************************************************!*\ !*** ./node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n\n\n\nvar at = '@global';\nvar atPrefix = '@global ';\n\nvar GlobalContainerRule =\n/*#__PURE__*/\nfunction () {\n function GlobalContainerRule(key, styles, options) {\n this.type = 'global';\n this.at = at;\n this.rules = void 0;\n this.options = void 0;\n this.key = void 0;\n this.isProcessed = false;\n this.key = key;\n this.options = options;\n this.rules = new jss__WEBPACK_IMPORTED_MODULE_1__[\"RuleList\"](Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n parent: this\n }));\n\n for (var selector in styles) {\n this.rules.add(selector, styles[selector]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = GlobalContainerRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString() {\n return this.rules.toString();\n };\n\n return GlobalContainerRule;\n}();\n\nvar GlobalPrefixedRule =\n/*#__PURE__*/\nfunction () {\n function GlobalPrefixedRule(key, style, options) {\n this.type = 'global';\n this.at = at;\n this.options = void 0;\n this.rule = void 0;\n this.isProcessed = false;\n this.key = void 0;\n this.key = key;\n this.options = options;\n var selector = key.substr(atPrefix.length);\n this.rule = options.jss.createRule(selector, style, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n parent: this\n }));\n }\n\n var _proto2 = GlobalPrefixedRule.prototype;\n\n _proto2.toString = function toString(options) {\n return this.rule ? this.rule.toString(options) : '';\n };\n\n return GlobalPrefixedRule;\n}();\n\nvar separatorRegExp = /\\s*,\\s*/g;\n\nfunction addScope(selector, scope) {\n var parts = selector.split(separatorRegExp);\n var scoped = '';\n\n for (var i = 0; i < parts.length; i++) {\n scoped += scope + \" \" + parts[i].trim();\n if (parts[i + 1]) scoped += ', ';\n }\n\n return scoped;\n}\n\nfunction handleNestedGlobalContainerRule(rule) {\n var options = rule.options,\n style = rule.style;\n var rules = style ? style[at] : null;\n if (!rules) return;\n\n for (var name in rules) {\n options.sheet.addRule(name, rules[name], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n selector: addScope(name, rule.selector)\n }));\n }\n\n delete style[at];\n}\n\nfunction handlePrefixedGlobalRule(rule) {\n var options = rule.options,\n style = rule.style;\n\n for (var prop in style) {\n if (prop[0] !== '@' || prop.substr(0, at.length) !== at) continue;\n var selector = addScope(prop.substr(at.length), rule.selector);\n options.sheet.addRule(selector, style[prop], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n selector: selector\n }));\n delete style[prop];\n }\n}\n/**\n * Convert nested rules to separate, remove them from original styles.\n *\n * @param {Rule} rule\n * @api public\n */\n\n\nfunction jssGlobal() {\n function onCreateRule(name, styles, options) {\n if (!name) return null;\n\n if (name === at) {\n return new GlobalContainerRule(name, styles, options);\n }\n\n if (name[0] === '@' && name.substr(0, atPrefix.length) === atPrefix) {\n return new GlobalPrefixedRule(name, styles, options);\n }\n\n var parent = options.parent;\n\n if (parent) {\n if (parent.type === 'global' || parent.options.parent && parent.options.parent.type === 'global') {\n options.scoped = false;\n }\n }\n\n if (options.scoped === false) {\n options.selector = name;\n }\n\n return null;\n }\n\n function onProcessRule(rule) {\n if (rule.type !== 'style') return;\n handleNestedGlobalContainerRule(rule);\n handlePrefixedGlobalRule(rule);\n }\n\n return {\n onCreateRule: onCreateRule,\n onProcessRule: onProcessRule\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (jssGlobal);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-global/dist/jss-plugin-global.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js": /*!**********************************************************************!*\ !*** ./node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js ***! \**********************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n\n\n\nvar separatorRegExp = /\\s*,\\s*/g;\nvar parentRegExp = /&/g;\nvar refRegExp = /\\$([\\w-]+)/g;\n/**\n * Convert nested rules to separate, remove them from original styles.\n *\n * @param {Rule} rule\n * @api public\n */\n\nfunction jssNested() {\n // Get a function to be used for $ref replacement.\n function getReplaceRef(container, sheet) {\n return function (match, key) {\n var rule = container.getRule(key) || sheet && sheet.getRule(key);\n\n if (rule) {\n rule = rule;\n return rule.selector;\n }\n\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(false, \"[JSS] Could not find the referenced rule \\\"\" + key + \"\\\" in \\\"\" + (container.options.meta || container.toString()) + \"\\\".\") : undefined;\n return key;\n };\n }\n\n function replaceParentRefs(nestedProp, parentProp) {\n var parentSelectors = parentProp.split(separatorRegExp);\n var nestedSelectors = nestedProp.split(separatorRegExp);\n var result = '';\n\n for (var i = 0; i < parentSelectors.length; i++) {\n var parent = parentSelectors[i];\n\n for (var j = 0; j < nestedSelectors.length; j++) {\n var nested = nestedSelectors[j];\n if (result) result += ', '; // Replace all & by the parent or prefix & with the parent.\n\n result += nested.indexOf('&') !== -1 ? nested.replace(parentRegExp, parent) : parent + \" \" + nested;\n }\n }\n\n return result;\n }\n\n function getOptions(rule, container, prevOptions) {\n // Options has been already created, now we only increase index.\n if (prevOptions) return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, prevOptions, {\n index: prevOptions.index + 1\n });\n var nestingLevel = rule.options.nestingLevel;\n nestingLevel = nestingLevel === undefined ? 1 : nestingLevel + 1;\n\n var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, rule.options, {\n nestingLevel: nestingLevel,\n index: container.indexOf(rule) + 1 // We don't need the parent name to be set options for chlid.\n\n });\n\n delete options.name;\n return options;\n }\n\n function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style') return style;\n var styleRule = rule;\n var container = styleRule.options.parent;\n var options;\n var replaceRef;\n\n for (var prop in style) {\n var isNested = prop.indexOf('&') !== -1;\n var isNestedConditional = prop[0] === '@';\n if (!isNested && !isNestedConditional) continue;\n options = getOptions(styleRule, container, options);\n\n if (isNested) {\n var selector = replaceParentRefs(prop, styleRule.selector); // Lazily create the ref replacer function just once for\n // all nested rules within the sheet.\n\n if (!replaceRef) replaceRef = getReplaceRef(container, sheet); // Replace all $refs.\n\n selector = selector.replace(refRegExp, replaceRef);\n container.addRule(selector, style[prop], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n selector: selector\n }));\n } else if (isNestedConditional) {\n // Place conditional right after the parent rule to ensure right ordering.\n container.addRule(prop, {}, options) // Flow expects more options but they aren't required\n // And flow doesn't know this will always be a StyleRule which has the addRule method\n // $FlowFixMe\n .addRule(styleRule.key, style[prop], {\n selector: styleRule.selector\n });\n }\n\n delete style[prop];\n }\n\n return style;\n }\n\n return {\n onProcessStyle: onProcessStyle\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (jssNested);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-nested/dist/jss-plugin-nested.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js": /*!******************************************************************************!*\ !*** ./node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js ***! \******************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/**\n * Sort props by length.\n */\nfunction jssPropsSort() {\n var sort = function sort(prop0, prop1) {\n if (prop0.length === prop1.length) {\n return prop0 > prop1 ? 1 : -1;\n }\n\n return prop0.length - prop1.length;\n };\n\n return {\n onProcessStyle: function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n var newStyle = {};\n var props = Object.keys(style).sort(sort);\n\n for (var i = 0; i < props.length; i++) {\n newStyle[props[i]] = style[props[i]];\n }\n\n return newStyle;\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (jssPropsSort);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-props-sort/dist/jss-plugin-props-sort.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js": /*!************************************************************************************************!*\ !*** ./node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js ***! \************************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n\n\n\nvar now = Date.now();\nvar fnValuesNs = \"fnValues\" + now;\nvar fnRuleNs = \"fnStyle\" + ++now;\nfunction functionPlugin() {\n return {\n onCreateRule: function onCreateRule(name, decl, options) {\n if (typeof decl !== 'function') return null;\n var rule = Object(jss__WEBPACK_IMPORTED_MODULE_1__[\"createRule\"])(name, {}, options);\n rule[fnRuleNs] = decl;\n return rule;\n },\n onProcessStyle: function onProcessStyle(style, rule) {\n // We need to extract function values from the declaration, so that we can keep core unaware of them.\n // We need to do that only once.\n // We don't need to extract functions on each style update, since this can happen only once.\n // We don't support function values inside of function rules.\n if (fnValuesNs in rule || fnRuleNs in rule) return style;\n var fnValues = {};\n\n for (var prop in style) {\n var value = style[prop];\n if (typeof value !== 'function') continue;\n delete style[prop];\n fnValues[prop] = value;\n } // $FlowFixMe\n\n\n rule[fnValuesNs] = fnValues;\n return style;\n },\n onUpdate: function onUpdate(data, rule, sheet, options) {\n var styleRule = rule;\n var fnRule = styleRule[fnRuleNs]; // If we have a style function, the entire rule is dynamic and style object\n // will be returned from that function.\n\n if (fnRule) {\n // Empty object will remove all currently defined props\n // in case function rule returns a falsy value.\n styleRule.style = fnRule(data) || {};\n\n if (true) {\n for (var prop in styleRule.style) {\n if (typeof styleRule.style[prop] === 'function') {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(false, '[JSS] Function values inside function rules are not supported.') : undefined;\n break;\n }\n }\n }\n }\n\n var fnValues = styleRule[fnValuesNs]; // If we have a fn values map, it is a rule with function values.\n\n if (fnValues) {\n for (var _prop in fnValues) {\n styleRule.prop(_prop, fnValues[_prop](data), options);\n }\n }\n }\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (functionPlugin);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-rule-value-function/dist/jss-plugin-rule-value-function.esm.js?"); /***/ }), /***/ "./node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js": /*!****************************************************************************************!*\ !*** ./node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js ***! \****************************************************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var css_vendor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! css-vendor */ \"./node_modules/css-vendor/dist/css-vendor.esm.js\");\n/* harmony import */ var jss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jss */ \"./node_modules/jss/dist/jss.esm.js\");\n\n\n\n/**\n * Add vendor prefix to a property name when needed.\n *\n * @api public\n */\n\nfunction jssVendorPrefixer() {\n function onProcessRule(rule) {\n if (rule.type === 'keyframes') {\n var atRule = rule;\n atRule.at = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__[\"supportedKeyframes\"])(atRule.at);\n }\n }\n\n function prefixStyle(style) {\n for (var prop in style) {\n var value = style[prop];\n\n if (prop === 'fallbacks' && Array.isArray(value)) {\n style[prop] = value.map(prefixStyle);\n continue;\n }\n\n var changeProp = false;\n var supportedProp = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__[\"supportedProperty\"])(prop);\n if (supportedProp && supportedProp !== prop) changeProp = true;\n var changeValue = false;\n var supportedValue$1 = Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__[\"supportedValue\"])(supportedProp, Object(jss__WEBPACK_IMPORTED_MODULE_1__[\"toCssValue\"])(value));\n if (supportedValue$1 && supportedValue$1 !== value) changeValue = true;\n\n if (changeProp || changeValue) {\n if (changeProp) delete style[prop];\n style[supportedProp || prop] = supportedValue$1 || value;\n }\n }\n\n return style;\n }\n\n function onProcessStyle(style, rule) {\n if (rule.type !== 'style') return style;\n return prefixStyle(style);\n }\n\n function onChangeValue(value, prop) {\n return Object(css_vendor__WEBPACK_IMPORTED_MODULE_0__[\"supportedValue\"])(prop, Object(jss__WEBPACK_IMPORTED_MODULE_1__[\"toCssValue\"])(value)) || value;\n }\n\n return {\n onProcessRule: onProcessRule,\n onProcessStyle: onProcessStyle,\n onChangeValue: onChangeValue\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (jssVendorPrefixer);\n\n\n//# sourceURL=webpack:///./node_modules/jss-plugin-vendor-prefixer/dist/jss-plugin-vendor-prefixer.esm.js?"); /***/ }), /***/ "./node_modules/jss/dist/jss.esm.js": /*!******************************************!*\ !*** ./node_modules/jss/dist/jss.esm.js ***! \******************************************/ /*! exports provided: default, RuleList, SheetsManager, SheetsRegistry, create, createGenerateId, createRule, getDynamicStyles, hasCSSTOMSupport, sheets, toCssValue */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"RuleList\", function() { return RuleList; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SheetsManager\", function() { return SheetsManager; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"SheetsRegistry\", function() { return SheetsRegistry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"create\", function() { return create; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createGenerateId\", function() { return createGenerateId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createRule\", function() { return createRule; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getDynamicStyles\", function() { return getDynamicStyles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCSSTOMSupport\", function() { return hasCSSTOMSupport; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"sheets\", function() { return sheets; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"toCssValue\", function() { return toCssValue; });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"./node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var is_in_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! is-in-browser */ \"./node_modules/is-in-browser/dist/module.js\");\n/* harmony import */ var tiny_warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tiny-warning */ \"./node_modules/tiny-warning/dist/tiny-warning.esm.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ \"./node_modules/@babel/runtime/helpers/esm/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ \"./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/assertThisInitialized */ \"./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n\n\n\n\n\n\n\n\nvar plainObjectConstrurctor = {}.constructor;\nfunction cloneStyle(style) {\n if (style == null || typeof style !== 'object') return style;\n if (Array.isArray(style)) return style.map(cloneStyle);\n if (style.constructor !== plainObjectConstrurctor) return style;\n var newStyle = {};\n\n for (var name in style) {\n newStyle[name] = cloneStyle(style[name]);\n }\n\n return newStyle;\n}\n\n/**\n * Create a rule instance.\n */\n\nfunction createRule(name, decl, options) {\n if (name === void 0) {\n name = 'unnamed';\n }\n\n var jss = options.jss;\n var declCopy = cloneStyle(decl);\n var rule = jss.plugins.onCreateRule(name, declCopy, options);\n if (rule) return rule; // It is an at-rule and it has no instance.\n\n if (name[0] === '@') {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] Unknown rule \" + name) : undefined;\n }\n\n return null;\n}\n\nvar join = function join(value, by) {\n var result = '';\n\n for (var i = 0; i < value.length; i++) {\n // Remove !important from the value, it will be readded later.\n if (value[i] === '!important') break;\n if (result) result += by;\n result += value[i];\n }\n\n return result;\n};\n/**\n * Converts array values to string.\n *\n * `margin: [['5px', '10px']]` > `margin: 5px 10px;`\n * `border: ['1px', '2px']` > `border: 1px, 2px;`\n * `margin: [['5px', '10px'], '!important']` > `margin: 5px 10px !important;`\n * `color: ['red', !important]` > `color: red !important;`\n */\n\n\nfunction toCssValue(value, ignoreImportant) {\n if (ignoreImportant === void 0) {\n ignoreImportant = false;\n }\n\n if (!Array.isArray(value)) return value;\n var cssValue = ''; // Support space separated values via `[['5px', '10px']]`.\n\n if (Array.isArray(value[0])) {\n for (var i = 0; i < value.length; i++) {\n if (value[i] === '!important') break;\n if (cssValue) cssValue += ', ';\n cssValue += join(value[i], ' ');\n }\n } else cssValue = join(value, ', '); // Add !important, because it was ignored.\n\n\n if (!ignoreImportant && value[value.length - 1] === '!important') {\n cssValue += ' !important';\n }\n\n return cssValue;\n}\n\n/**\n * Indent a string.\n * http://jsperf.com/array-join-vs-for\n */\nfunction indentStr(str, indent) {\n var result = '';\n\n for (var index = 0; index < indent; index++) {\n result += ' ';\n }\n\n return result + str;\n}\n/**\n * Converts a Rule to CSS string.\n */\n\n\nfunction toCss(selector, style, options) {\n if (options === void 0) {\n options = {};\n }\n\n var result = '';\n if (!style) return result;\n var _options = options,\n _options$indent = _options.indent,\n indent = _options$indent === void 0 ? 0 : _options$indent;\n var fallbacks = style.fallbacks;\n if (selector) indent++; // Apply fallbacks first.\n\n if (fallbacks) {\n // Array syntax {fallbacks: [{prop: value}]}\n if (Array.isArray(fallbacks)) {\n for (var index = 0; index < fallbacks.length; index++) {\n var fallback = fallbacks[index];\n\n for (var prop in fallback) {\n var value = fallback[prop];\n\n if (value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(prop + \": \" + toCssValue(value) + \";\", indent);\n }\n }\n }\n } else {\n // Object syntax {fallbacks: {prop: value}}\n for (var _prop in fallbacks) {\n var _value = fallbacks[_prop];\n\n if (_value != null) {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop + \": \" + toCssValue(_value) + \";\", indent);\n }\n }\n }\n }\n\n for (var _prop2 in style) {\n var _value2 = style[_prop2];\n\n if (_value2 != null && _prop2 !== 'fallbacks') {\n if (result) result += '\\n';\n result += \"\" + indentStr(_prop2 + \": \" + toCssValue(_value2) + \";\", indent);\n }\n } // Allow empty style in this case, because properties will be added dynamically.\n\n\n if (!result && !options.allowEmpty) return result; // When rule is being stringified before selector was defined.\n\n if (!selector) return result;\n indent--;\n if (result) result = \"\\n\" + result + \"\\n\";\n return indentStr(selector + \" {\" + result, indent) + indentStr('}', indent);\n}\n\nvar escapeRegex = /([[\\].#*$><+~=|^:(),\"'`\\s])/g;\nvar nativeEscape = typeof CSS !== 'undefined' && CSS.escape;\nvar escape = (function (str) {\n return nativeEscape ? nativeEscape(str) : str.replace(escapeRegex, '\\\\$1');\n});\n\nvar BaseStyleRule =\n/*#__PURE__*/\nfunction () {\n function BaseStyleRule(key, style, options) {\n this.type = 'style';\n this.key = void 0;\n this.isProcessed = false;\n this.style = void 0;\n this.renderer = void 0;\n this.renderable = void 0;\n this.options = void 0;\n var sheet = options.sheet,\n Renderer = options.Renderer;\n this.key = key;\n this.options = options;\n this.style = style;\n if (sheet) this.renderer = sheet.renderer;else if (Renderer) this.renderer = new Renderer();\n }\n /**\n * Get or set a style property.\n */\n\n\n var _proto = BaseStyleRule.prototype;\n\n _proto.prop = function prop(name, value, options) {\n // It's a getter.\n if (value === undefined) return this.style[name]; // Don't do anything if the value has not changed.\n\n var force = options ? options.force : false;\n if (!force && this.style[name] === value) return this;\n var newValue = value;\n\n if (!options || options.process !== false) {\n newValue = this.options.jss.plugins.onChangeValue(value, name, this);\n }\n\n var isEmpty = newValue == null || newValue === false;\n var isDefined = name in this.style; // Value is empty and wasn't defined before.\n\n if (isEmpty && !isDefined && !force) return this; // We are going to remove this value.\n\n var remove = isEmpty && isDefined;\n if (remove) delete this.style[name];else this.style[name] = newValue; // Renderable is defined if StyleSheet option `link` is true.\n\n if (this.renderable && this.renderer) {\n if (remove) this.renderer.removeProperty(this.renderable, name);else this.renderer.setProperty(this.renderable, name, newValue);\n return this;\n }\n\n var sheet = this.options.sheet;\n\n if (sheet && sheet.attached) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, '[JSS] Rule is not linked. Missing sheet option \"link: true\".') : undefined;\n }\n\n return this;\n };\n\n return BaseStyleRule;\n}();\nvar StyleRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(StyleRule, _BaseStyleRule);\n\n function StyleRule(key, style, options) {\n var _this;\n\n _this = _BaseStyleRule.call(this, key, style, options) || this;\n _this.selectorText = void 0;\n _this.id = void 0;\n _this.renderable = void 0;\n var selector = options.selector,\n scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n\n if (selector) {\n _this.selectorText = selector;\n } else if (scoped !== false) {\n _this.id = generateId(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(Object(_babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(_this)), sheet);\n _this.selectorText = \".\" + escape(_this.id);\n }\n\n return _this;\n }\n /**\n * Set selector string.\n * Attention: use this with caution. Most browsers didn't implement\n * selectorText setter, so this may result in rerendering of entire Style Sheet.\n */\n\n\n var _proto2 = StyleRule.prototype;\n\n /**\n * Apply rule to an element inline.\n */\n _proto2.applyTo = function applyTo(renderable) {\n var renderer = this.renderer;\n\n if (renderer) {\n var json = this.toJSON();\n\n for (var prop in json) {\n renderer.setProperty(renderable, prop, json[prop]);\n }\n }\n\n return this;\n }\n /**\n * Returns JSON representation of the rule.\n * Fallbacks are not supported.\n * Useful for inline styles.\n */\n ;\n\n _proto2.toJSON = function toJSON() {\n var json = {};\n\n for (var prop in this.style) {\n var value = this.style[prop];\n if (typeof value !== 'object') json[prop] = value;else if (Array.isArray(value)) json[prop] = toCssValue(value);\n }\n\n return json;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto2.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.selectorText, this.style, opts);\n };\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(StyleRule, [{\n key: \"selector\",\n set: function set(selector) {\n if (selector === this.selectorText) return;\n this.selectorText = selector;\n var renderer = this.renderer,\n renderable = this.renderable;\n if (!renderable || !renderer) return;\n var hasChanged = renderer.setSelector(renderable, selector); // If selector setter is not implemented, rerender the rule.\n\n if (!hasChanged) {\n renderer.replaceRule(renderable, this);\n }\n }\n /**\n * Get selector string.\n */\n ,\n get: function get() {\n return this.selectorText;\n }\n }]);\n\n return StyleRule;\n}(BaseStyleRule);\nvar pluginStyleRule = {\n onCreateRule: function onCreateRule(name, style, options) {\n if (name[0] === '@' || options.parent && options.parent.type === 'keyframes') {\n return null;\n }\n\n return new StyleRule(name, style, options);\n }\n};\n\nvar defaultToStringOptions = {\n indent: 1,\n children: true\n};\nvar atRegExp = /@([\\w-]+)/;\n/**\n * Conditional rule for @media, @supports\n */\n\nvar ConditionalRule =\n/*#__PURE__*/\nfunction () {\n function ConditionalRule(key, styles, options) {\n this.type = 'conditional';\n this.at = void 0;\n this.key = void 0;\n this.query = void 0;\n this.rules = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key; // Key might contain a unique suffix in case the `name` passed by user was duplicate.\n\n this.query = options.name;\n var atMatch = key.match(atRegExp);\n this.at = atMatch ? atMatch[1] : 'unknown';\n this.options = options;\n this.rules = new RuleList(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n parent: this\n }));\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Get a rule.\n */\n\n\n var _proto = ConditionalRule.prototype;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Create and register rule, run plugins.\n */\n ;\n\n _proto.addRule = function addRule(name, style, options) {\n var rule = this.rules.add(name, style, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Generates a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions;\n }\n\n if (options.indent == null) options.indent = defaultToStringOptions.indent;\n if (options.children == null) options.children = defaultToStringOptions.children;\n\n if (options.children === false) {\n return this.query + \" {}\";\n }\n\n var children = this.rules.toString(options);\n return children ? this.query + \" {\\n\" + children + \"\\n}\" : '';\n };\n\n return ConditionalRule;\n}();\nvar keyRegExp = /@media|@supports\\s+/;\nvar pluginConditionalRule = {\n onCreateRule: function onCreateRule(key, styles, options) {\n return keyRegExp.test(key) ? new ConditionalRule(key, styles, options) : null;\n }\n};\n\nvar defaultToStringOptions$1 = {\n indent: 1,\n children: true\n};\nvar nameRegExp = /@keyframes\\s+([\\w-]+)/;\n/**\n * Rule for @keyframes\n */\n\nvar KeyframesRule =\n/*#__PURE__*/\nfunction () {\n function KeyframesRule(key, frames, options) {\n this.type = 'keyframes';\n this.at = '@keyframes';\n this.key = void 0;\n this.name = void 0;\n this.id = void 0;\n this.rules = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n var nameMatch = key.match(nameRegExp);\n\n if (nameMatch && nameMatch[1]) {\n this.name = nameMatch[1];\n } else {\n this.name = 'noname';\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] Bad keyframes name \" + key) : undefined;\n }\n\n this.key = this.type + \"-\" + this.name;\n this.options = options;\n var scoped = options.scoped,\n sheet = options.sheet,\n generateId = options.generateId;\n this.id = scoped === false ? this.name : escape(generateId(this, sheet));\n this.rules = new RuleList(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n parent: this\n }));\n\n for (var name in frames) {\n this.rules.add(name, frames[name], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n parent: this\n }));\n }\n\n this.rules.process();\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = KeyframesRule.prototype;\n\n _proto.toString = function toString(options) {\n if (options === void 0) {\n options = defaultToStringOptions$1;\n }\n\n if (options.indent == null) options.indent = defaultToStringOptions$1.indent;\n if (options.children == null) options.children = defaultToStringOptions$1.children;\n\n if (options.children === false) {\n return this.at + \" \" + this.id + \" {}\";\n }\n\n var children = this.rules.toString(options);\n if (children) children = \"\\n\" + children + \"\\n\";\n return this.at + \" \" + this.id + \" {\" + children + \"}\";\n };\n\n return KeyframesRule;\n}();\nvar keyRegExp$1 = /@keyframes\\s+/;\nvar refRegExp = /\\$([\\w-]+)/g;\n\nvar findReferencedKeyframe = function findReferencedKeyframe(val, keyframes) {\n if (typeof val === 'string') {\n return val.replace(refRegExp, function (match, name) {\n if (name in keyframes) {\n return keyframes[name];\n }\n\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] Referenced keyframes rule \\\"\" + name + \"\\\" is not defined.\") : undefined;\n return match;\n });\n }\n\n return val;\n};\n/**\n * Replace the reference for a animation name.\n */\n\n\nvar replaceRef = function replaceRef(style, prop, keyframes) {\n var value = style[prop];\n var refKeyframe = findReferencedKeyframe(value, keyframes);\n\n if (refKeyframe !== value) {\n style[prop] = refKeyframe;\n }\n};\n\nvar plugin = {\n onCreateRule: function onCreateRule(key, frames, options) {\n return typeof key === 'string' && keyRegExp$1.test(key) ? new KeyframesRule(key, frames, options) : null;\n },\n // Animation name ref replacer.\n onProcessStyle: function onProcessStyle(style, rule, sheet) {\n if (rule.type !== 'style' || !sheet) return style;\n if ('animation-name' in style) replaceRef(style, 'animation-name', sheet.keyframes);\n if ('animation' in style) replaceRef(style, 'animation', sheet.keyframes);\n return style;\n },\n onChangeValue: function onChangeValue(val, prop, rule) {\n var sheet = rule.options.sheet;\n\n if (!sheet) {\n return val;\n }\n\n switch (prop) {\n case 'animation':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n case 'animation-name':\n return findReferencedKeyframe(val, sheet.keyframes);\n\n default:\n return val;\n }\n }\n};\n\nvar KeyframeRule =\n/*#__PURE__*/\nfunction (_BaseStyleRule) {\n Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(KeyframeRule, _BaseStyleRule);\n\n function KeyframeRule() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _BaseStyleRule.call.apply(_BaseStyleRule, [this].concat(args)) || this;\n _this.renderable = void 0;\n return _this;\n }\n\n var _proto = KeyframeRule.prototype;\n\n /**\n * Generates a CSS string.\n */\n _proto.toString = function toString(options) {\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n var opts = link ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n allowEmpty: true\n }) : options;\n return toCss(this.key, this.style, opts);\n };\n\n return KeyframeRule;\n}(BaseStyleRule);\nvar pluginKeyframeRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n if (options.parent && options.parent.type === 'keyframes') {\n return new KeyframeRule(key, style, options);\n }\n\n return null;\n }\n};\n\nvar FontFaceRule =\n/*#__PURE__*/\nfunction () {\n function FontFaceRule(key, style, options) {\n this.type = 'font-face';\n this.at = '@font-face';\n this.key = void 0;\n this.style = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = FontFaceRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.style)) {\n var str = '';\n\n for (var index = 0; index < this.style.length; index++) {\n str += toCss(this.at, this.style[index]);\n if (this.style[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return toCss(this.at, this.style, options);\n };\n\n return FontFaceRule;\n}();\nvar keyRegExp$2 = /@font-face/;\nvar pluginFontFaceRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return keyRegExp$2.test(key) ? new FontFaceRule(key, style, options) : null;\n }\n};\n\nvar ViewportRule =\n/*#__PURE__*/\nfunction () {\n function ViewportRule(key, style, options) {\n this.type = 'viewport';\n this.at = '@viewport';\n this.key = void 0;\n this.style = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.style = style;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n\n\n var _proto = ViewportRule.prototype;\n\n _proto.toString = function toString(options) {\n return toCss(this.key, this.style, options);\n };\n\n return ViewportRule;\n}();\nvar pluginViewportRule = {\n onCreateRule: function onCreateRule(key, style, options) {\n return key === '@viewport' || key === '@-ms-viewport' ? new ViewportRule(key, style, options) : null;\n }\n};\n\nvar SimpleRule =\n/*#__PURE__*/\nfunction () {\n function SimpleRule(key, value, options) {\n this.type = 'simple';\n this.key = void 0;\n this.value = void 0;\n this.options = void 0;\n this.isProcessed = false;\n this.renderable = void 0;\n this.key = key;\n this.value = value;\n this.options = options;\n }\n /**\n * Generates a CSS string.\n */\n // eslint-disable-next-line no-unused-vars\n\n\n var _proto = SimpleRule.prototype;\n\n _proto.toString = function toString(options) {\n if (Array.isArray(this.value)) {\n var str = '';\n\n for (var index = 0; index < this.value.length; index++) {\n str += this.key + \" \" + this.value[index] + \";\";\n if (this.value[index + 1]) str += '\\n';\n }\n\n return str;\n }\n\n return this.key + \" \" + this.value + \";\";\n };\n\n return SimpleRule;\n}();\nvar keysMap = {\n '@charset': true,\n '@import': true,\n '@namespace': true\n};\nvar pluginSimpleRule = {\n onCreateRule: function onCreateRule(key, value, options) {\n return key in keysMap ? new SimpleRule(key, value, options) : null;\n }\n};\n\nvar plugins = [pluginStyleRule, pluginConditionalRule, plugin, pluginKeyframeRule, pluginFontFaceRule, pluginViewportRule, pluginSimpleRule];\n\nvar defaultUpdateOptions = {\n process: true\n};\nvar forceUpdateOptions = {\n force: true,\n process: true\n /**\n * Contains rules objects and allows adding/removing etc.\n * Is used for e.g. by `StyleSheet` or `ConditionalRule`.\n */\n\n};\n\nvar RuleList =\n/*#__PURE__*/\nfunction () {\n // Rules registry for access by .get() method.\n // It contains the same rule registered by name and by selector.\n // Original styles object.\n // Used to ensure correct rules order.\n function RuleList(options) {\n this.map = {};\n this.raw = {};\n this.index = [];\n this.counter = 0;\n this.options = void 0;\n this.classes = void 0;\n this.keyframes = void 0;\n this.options = options;\n this.classes = options.classes;\n this.keyframes = options.keyframes;\n }\n /**\n * Create and register rule.\n *\n * Will not render after Style Sheet was rendered the first time.\n */\n\n\n var _proto = RuleList.prototype;\n\n _proto.add = function add(name, decl, ruleOptions) {\n var _this$options = this.options,\n parent = _this$options.parent,\n sheet = _this$options.sheet,\n jss = _this$options.jss,\n Renderer = _this$options.Renderer,\n generateId = _this$options.generateId,\n scoped = _this$options.scoped;\n\n var options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n classes: this.classes,\n parent: parent,\n sheet: sheet,\n jss: jss,\n Renderer: Renderer,\n generateId: generateId,\n scoped: scoped,\n name: name,\n keyframes: this.keyframes,\n selector: undefined\n }, ruleOptions); // When user uses .createStyleSheet(), duplicate names are not possible, but\n // `sheet.addRule()` opens the door for any duplicate rule name. When this happens\n // we need to make the key unique within this RuleList instance scope.\n\n\n var key = name;\n\n if (name in this.raw) {\n key = name + \"-d\" + this.counter++;\n } // We need to save the original decl before creating the rule\n // because cache plugin needs to use it as a key to return a cached rule.\n\n\n this.raw[key] = decl;\n\n if (key in this.classes) {\n // E.g. rules inside of @media container\n options.selector = \".\" + escape(this.classes[key]);\n }\n\n var rule = createRule(key, decl, options);\n if (!rule) return null;\n this.register(rule);\n var index = options.index === undefined ? this.index.length : options.index;\n this.index.splice(index, 0, rule);\n return rule;\n }\n /**\n * Get a rule.\n */\n ;\n\n _proto.get = function get(name) {\n return this.map[name];\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.remove = function remove(rule) {\n this.unregister(rule);\n delete this.raw[rule.key];\n this.index.splice(this.index.indexOf(rule), 1);\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.index.indexOf(rule);\n }\n /**\n * Run `onProcessRule()` plugins on every rule.\n */\n ;\n\n _proto.process = function process() {\n var plugins = this.options.jss.plugins; // We need to clone array because if we modify the index somewhere else during a loop\n // we end up with very hard-to-track-down side effects.\n\n this.index.slice(0).forEach(plugins.onProcessRule, plugins);\n }\n /**\n * Register a rule in `.map`, `.classes` and `.keyframes` maps.\n */\n ;\n\n _proto.register = function register(rule) {\n this.map[rule.key] = rule;\n\n if (rule instanceof StyleRule) {\n this.map[rule.selector] = rule;\n if (rule.id) this.classes[rule.key] = rule.id;\n } else if (rule instanceof KeyframesRule && this.keyframes) {\n this.keyframes[rule.name] = rule.id;\n }\n }\n /**\n * Unregister a rule.\n */\n ;\n\n _proto.unregister = function unregister(rule) {\n delete this.map[rule.key];\n\n if (rule instanceof StyleRule) {\n delete this.map[rule.selector];\n delete this.classes[rule.key];\n } else if (rule instanceof KeyframesRule) {\n delete this.keyframes[rule.name];\n }\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var name;\n var data;\n var options;\n\n if (typeof (arguments.length <= 0 ? undefined : arguments[0]) === 'string') {\n name = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe\n\n data = arguments.length <= 1 ? undefined : arguments[1]; // $FlowFixMe\n\n options = arguments.length <= 2 ? undefined : arguments[2];\n } else {\n data = arguments.length <= 0 ? undefined : arguments[0]; // $FlowFixMe\n\n options = arguments.length <= 1 ? undefined : arguments[1];\n name = null;\n }\n\n if (name) {\n this.updateOne(this.map[name], data, options);\n } else {\n for (var index = 0; index < this.index.length; index++) {\n this.updateOne(this.index[index], data, options);\n }\n }\n }\n /**\n * Execute plugins, update rule props.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n if (options === void 0) {\n options = defaultUpdateOptions;\n }\n\n var _this$options2 = this.options,\n plugins = _this$options2.jss.plugins,\n sheet = _this$options2.sheet; // It is a rules container like for e.g. ConditionalRule.\n\n if (rule.rules instanceof RuleList) {\n rule.rules.update(data, options);\n return;\n }\n\n var styleRule = rule;\n var style = styleRule.style;\n plugins.onUpdate(data, rule, sheet, options); // We rely on a new `style` ref in case it was mutated during onUpdate hook.\n\n if (options.process && style && style !== styleRule.style) {\n // We need to run the plugins in case new `style` relies on syntax plugins.\n plugins.onProcessStyle(styleRule.style, styleRule, sheet); // Update and add props.\n\n for (var prop in styleRule.style) {\n var nextValue = styleRule.style[prop];\n var prevValue = style[prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (nextValue !== prevValue) {\n styleRule.prop(prop, nextValue, forceUpdateOptions);\n }\n } // Remove props.\n\n\n for (var _prop in style) {\n var _nextValue = styleRule.style[_prop];\n var _prevValue = style[_prop]; // We need to use `force: true` because `rule.style` has been updated during onUpdate hook, so `rule.prop()` will not update the CSSOM rule.\n // We do this comparison to avoid unneeded `rule.prop()` calls, since we have the old `style` object here.\n\n if (_nextValue == null && _nextValue !== _prevValue) {\n styleRule.prop(_prop, null, forceUpdateOptions);\n }\n }\n }\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n var str = '';\n var sheet = this.options.sheet;\n var link = sheet ? sheet.options.link : false;\n\n for (var index = 0; index < this.index.length; index++) {\n var rule = this.index[index];\n var css = rule.toString(options); // No need to render an empty rule.\n\n if (!css && !link) continue;\n if (str) str += '\\n';\n str += css;\n }\n\n return str;\n };\n\n return RuleList;\n}();\n\nvar StyleSheet =\n/*#__PURE__*/\nfunction () {\n function StyleSheet(styles, options) {\n this.options = void 0;\n this.deployed = void 0;\n this.attached = void 0;\n this.rules = void 0;\n this.renderer = void 0;\n this.classes = void 0;\n this.keyframes = void 0;\n this.queue = void 0;\n this.attached = false;\n this.deployed = false;\n this.classes = {};\n this.keyframes = {};\n this.options = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n sheet: this,\n parent: this,\n classes: this.classes,\n keyframes: this.keyframes\n });\n\n if (options.Renderer) {\n this.renderer = new options.Renderer(this);\n }\n\n this.rules = new RuleList(this.options);\n\n for (var name in styles) {\n this.rules.add(name, styles[name]);\n }\n\n this.rules.process();\n }\n /**\n * Attach renderable to the render tree.\n */\n\n\n var _proto = StyleSheet.prototype;\n\n _proto.attach = function attach() {\n if (this.attached) return this;\n if (this.renderer) this.renderer.attach();\n this.attached = true; // Order is important, because we can't use insertRule API if style element is not attached.\n\n if (!this.deployed) this.deploy();\n return this;\n }\n /**\n * Remove renderable from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n if (!this.attached) return this;\n if (this.renderer) this.renderer.detach();\n this.attached = false;\n return this;\n }\n /**\n * Add a rule to the current stylesheet.\n * Will insert a rule also after the stylesheet has been rendered first time.\n */\n ;\n\n _proto.addRule = function addRule(name, decl, options) {\n var queue = this.queue; // Plugins can create rules.\n // In order to preserve the right order, we need to queue all `.addRule` calls,\n // which happen after the first `rules.add()` call.\n\n if (this.attached && !queue) this.queue = [];\n var rule = this.rules.add(name, decl, options);\n if (!rule) return null;\n this.options.jss.plugins.onProcessRule(rule);\n\n if (this.attached) {\n if (!this.deployed) return rule; // Don't insert rule directly if there is no stringified version yet.\n // It will be inserted all together when .attach is called.\n\n if (queue) queue.push(rule);else {\n this.insertRule(rule);\n\n if (this.queue) {\n this.queue.forEach(this.insertRule, this);\n this.queue = undefined;\n }\n }\n return rule;\n } // We can't add rules to a detached style node.\n // We will redeploy the sheet once user will attach it.\n\n\n this.deployed = false;\n return rule;\n }\n /**\n * Insert rule into the StyleSheet\n */\n ;\n\n _proto.insertRule = function insertRule(rule) {\n if (this.renderer) {\n this.renderer.insertRule(rule);\n }\n }\n /**\n * Create and add rules.\n * Will render also after Style Sheet was rendered the first time.\n */\n ;\n\n _proto.addRules = function addRules(styles, options) {\n var added = [];\n\n for (var name in styles) {\n var rule = this.addRule(name, styles[name], options);\n if (rule) added.push(rule);\n }\n\n return added;\n }\n /**\n * Get a rule by name.\n */\n ;\n\n _proto.getRule = function getRule(name) {\n return this.rules.get(name);\n }\n /**\n * Delete a rule by name.\n * Returns `true`: if rule has been deleted from the DOM.\n */\n ;\n\n _proto.deleteRule = function deleteRule(name) {\n var rule = typeof name === 'object' ? name : this.rules.get(name);\n if (!rule) return false;\n this.rules.remove(rule);\n\n if (this.attached && rule.renderable && this.renderer) {\n return this.renderer.deleteRule(rule.renderable);\n }\n\n return true;\n }\n /**\n * Get index of a rule.\n */\n ;\n\n _proto.indexOf = function indexOf(rule) {\n return this.rules.indexOf(rule);\n }\n /**\n * Deploy pure CSS string to a renderable.\n */\n ;\n\n _proto.deploy = function deploy() {\n if (this.renderer) this.renderer.deploy();\n this.deployed = true;\n return this;\n }\n /**\n * Update the function values with a new data.\n */\n ;\n\n _proto.update = function update() {\n var _this$rules;\n\n (_this$rules = this.rules).update.apply(_this$rules, arguments);\n\n return this;\n }\n /**\n * Updates a single rule.\n */\n ;\n\n _proto.updateOne = function updateOne(rule, data, options) {\n this.rules.updateOne(rule, data, options);\n return this;\n }\n /**\n * Convert rules to a CSS string.\n */\n ;\n\n _proto.toString = function toString(options) {\n return this.rules.toString(options);\n };\n\n return StyleSheet;\n}();\n\nvar PluginsRegistry =\n/*#__PURE__*/\nfunction () {\n function PluginsRegistry() {\n this.plugins = {\n internal: [],\n external: []\n };\n this.registry = void 0;\n }\n\n var _proto = PluginsRegistry.prototype;\n\n /**\n * Call `onCreateRule` hooks and return an object if returned by a hook.\n */\n _proto.onCreateRule = function onCreateRule(name, decl, options) {\n for (var i = 0; i < this.registry.onCreateRule.length; i++) {\n var rule = this.registry.onCreateRule[i](name, decl, options);\n if (rule) return rule;\n }\n\n return null;\n }\n /**\n * Call `onProcessRule` hooks.\n */\n ;\n\n _proto.onProcessRule = function onProcessRule(rule) {\n if (rule.isProcessed) return;\n var sheet = rule.options.sheet;\n\n for (var i = 0; i < this.registry.onProcessRule.length; i++) {\n this.registry.onProcessRule[i](rule, sheet);\n }\n\n if (rule.style) this.onProcessStyle(rule.style, rule, sheet);\n rule.isProcessed = true;\n }\n /**\n * Call `onProcessStyle` hooks.\n */\n ;\n\n _proto.onProcessStyle = function onProcessStyle(style, rule, sheet) {\n for (var i = 0; i < this.registry.onProcessStyle.length; i++) {\n // $FlowFixMe\n rule.style = this.registry.onProcessStyle[i](rule.style, rule, sheet);\n }\n }\n /**\n * Call `onProcessSheet` hooks.\n */\n ;\n\n _proto.onProcessSheet = function onProcessSheet(sheet) {\n for (var i = 0; i < this.registry.onProcessSheet.length; i++) {\n this.registry.onProcessSheet[i](sheet);\n }\n }\n /**\n * Call `onUpdate` hooks.\n */\n ;\n\n _proto.onUpdate = function onUpdate(data, rule, sheet, options) {\n for (var i = 0; i < this.registry.onUpdate.length; i++) {\n this.registry.onUpdate[i](data, rule, sheet, options);\n }\n }\n /**\n * Call `onChangeValue` hooks.\n */\n ;\n\n _proto.onChangeValue = function onChangeValue(value, prop, rule) {\n var processedValue = value;\n\n for (var i = 0; i < this.registry.onChangeValue.length; i++) {\n processedValue = this.registry.onChangeValue[i](processedValue, prop, rule);\n }\n\n return processedValue;\n }\n /**\n * Register a plugin.\n */\n ;\n\n _proto.use = function use(newPlugin, options) {\n if (options === void 0) {\n options = {\n queue: 'external'\n };\n }\n\n var plugins = this.plugins[options.queue]; // Avoids applying same plugin twice, at least based on ref.\n\n if (plugins.indexOf(newPlugin) !== -1) {\n return;\n }\n\n plugins.push(newPlugin);\n this.registry = [].concat(this.plugins.external, this.plugins.internal).reduce(function (registry, plugin) {\n for (var name in plugin) {\n if (name in registry) {\n registry[name].push(plugin[name]);\n } else {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] Unknown hook \\\"\" + name + \"\\\".\") : undefined;\n }\n }\n\n return registry;\n }, {\n onCreateRule: [],\n onProcessRule: [],\n onProcessStyle: [],\n onProcessSheet: [],\n onChangeValue: [],\n onUpdate: []\n });\n };\n\n return PluginsRegistry;\n}();\n\n/**\n * Sheets registry to access them all at one place.\n */\nvar SheetsRegistry =\n/*#__PURE__*/\nfunction () {\n function SheetsRegistry() {\n this.registry = [];\n }\n\n var _proto = SheetsRegistry.prototype;\n\n /**\n * Register a Style Sheet.\n */\n _proto.add = function add(sheet) {\n var registry = this.registry;\n var index = sheet.options.index;\n if (registry.indexOf(sheet) !== -1) return;\n\n if (registry.length === 0 || index >= this.index) {\n registry.push(sheet);\n return;\n } // Find a position.\n\n\n for (var i = 0; i < registry.length; i++) {\n if (registry[i].options.index > index) {\n registry.splice(i, 0, sheet);\n return;\n }\n }\n }\n /**\n * Reset the registry.\n */\n ;\n\n _proto.reset = function reset() {\n this.registry = [];\n }\n /**\n * Remove a Style Sheet.\n */\n ;\n\n _proto.remove = function remove(sheet) {\n var index = this.registry.indexOf(sheet);\n this.registry.splice(index, 1);\n }\n /**\n * Convert all attached sheets to a CSS string.\n */\n ;\n\n _proto.toString = function toString(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n attached = _ref.attached,\n options = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(_ref, [\"attached\"]);\n\n var css = '';\n\n for (var i = 0; i < this.registry.length; i++) {\n var sheet = this.registry[i];\n\n if (attached != null && sheet.attached !== attached) {\n continue;\n }\n\n if (css) css += '\\n';\n css += sheet.toString(options);\n }\n\n return css;\n };\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(SheetsRegistry, [{\n key: \"index\",\n\n /**\n * Current highest index number.\n */\n get: function get() {\n return this.registry.length === 0 ? 0 : this.registry[this.registry.length - 1].options.index;\n }\n }]);\n\n return SheetsRegistry;\n}();\n\n/**\n * This is a global sheets registry. Only DomRenderer will add sheets to it.\n * On the server one should use an own SheetsRegistry instance and add the\n * sheets to it, because you need to make sure to create a new registry for\n * each request in order to not leak sheets across requests.\n */\n\nvar sheets = new SheetsRegistry();\n\n/* eslint-disable */\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar globalThis = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();\n\nvar ns = '2f1acc6c3a606b082e5eef5e54414ffb';\nif (globalThis[ns] == null) globalThis[ns] = 0; // Bundle may contain multiple JSS versions at the same time. In order to identify\n// the current version with just one short number and use it for classes generation\n// we use a counter. Also it is more accurate, because user can manually reevaluate\n// the module.\n\nvar moduleId = globalThis[ns]++;\n\nvar maxRules = 1e10;\n\n/**\n * Returns a function which generates unique class names based on counters.\n * When new generator function is created, rule counter is reseted.\n * We need to reset the rule counter for SSR for each request.\n */\nvar createGenerateId = function createGenerateId(options) {\n if (options === void 0) {\n options = {};\n }\n\n var ruleCounter = 0;\n return function (rule, sheet) {\n ruleCounter += 1;\n\n if (ruleCounter > maxRules) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] You might have a memory leak. Rule counter is at \" + ruleCounter + \".\") : undefined;\n }\n\n var jssId = '';\n var prefix = '';\n\n if (sheet) {\n if (sheet.options.classNamePrefix) {\n prefix = sheet.options.classNamePrefix;\n }\n\n if (sheet.options.jss.id != null) {\n jssId = String(sheet.options.jss.id);\n }\n }\n\n if (options.minify) {\n // Using \"c\" because a number can't be the first char in a class name.\n return \"\" + (prefix || 'c') + moduleId + jssId + ruleCounter;\n }\n\n return prefix + rule.key + \"-\" + moduleId + (jssId ? \"-\" + jssId : '') + \"-\" + ruleCounter;\n };\n};\n\n/**\n * Cache the value from the first time a function is called.\n */\nvar memoize = function memoize(fn) {\n var value;\n return function () {\n if (!value) value = fn();\n return value;\n };\n};\n/**\n * Get a style property value.\n */\n\n\nfunction getPropertyValue(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n return cssRule.attributeStyleMap.get(prop);\n }\n\n return cssRule.style.getPropertyValue(prop);\n } catch (err) {\n // IE may throw if property is unknown.\n return '';\n }\n}\n/**\n * Set a style property.\n */\n\n\nfunction setProperty(cssRule, prop, value) {\n try {\n var cssValue = value;\n\n if (Array.isArray(value)) {\n cssValue = toCssValue(value, true);\n\n if (value[value.length - 1] === '!important') {\n cssRule.style.setProperty(prop, cssValue, 'important');\n return true;\n }\n } // Support CSSTOM.\n\n\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.set(prop, cssValue);\n } else {\n cssRule.style.setProperty(prop, cssValue);\n }\n } catch (err) {\n // IE may throw if property is unknown.\n return false;\n }\n\n return true;\n}\n/**\n * Remove a style property.\n */\n\n\nfunction removeProperty(cssRule, prop) {\n try {\n // Support CSSTOM.\n if (cssRule.attributeStyleMap) {\n cssRule.attributeStyleMap.delete(prop);\n } else {\n cssRule.style.removeProperty(prop);\n }\n } catch (err) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] DOMException \\\"\" + err.message + \"\\\" was thrown. Tried to remove property \\\"\" + prop + \"\\\".\") : undefined;\n }\n}\n/**\n * Set the selector.\n */\n\n\nfunction setSelector(cssRule, selectorText) {\n cssRule.selectorText = selectorText; // Return false if setter was not successful.\n // Currently works in chrome only.\n\n return cssRule.selectorText === selectorText;\n}\n/**\n * Gets the `head` element upon the first call and caches it.\n * We assume it can't be null.\n */\n\n\nvar getHead = memoize(function () {\n return document.querySelector('head');\n});\n/**\n * Find attached sheet with an index higher than the passed one.\n */\n\nfunction findHigherSheet(registry, options) {\n for (var i = 0; i < registry.length; i++) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.index > options.index && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find attached sheet with the highest index.\n */\n\n\nfunction findHighestSheet(registry, options) {\n for (var i = registry.length - 1; i >= 0; i--) {\n var sheet = registry[i];\n\n if (sheet.attached && sheet.options.insertionPoint === options.insertionPoint) {\n return sheet;\n }\n }\n\n return null;\n}\n/**\n * Find a comment with \"jss\" inside.\n */\n\n\nfunction findCommentNode(text) {\n var head = getHead();\n\n for (var i = 0; i < head.childNodes.length; i++) {\n var node = head.childNodes[i];\n\n if (node.nodeType === 8 && node.nodeValue.trim() === text) {\n return node;\n }\n }\n\n return null;\n}\n\n/**\n * Find a node before which we can insert the sheet.\n */\nfunction findPrevNode(options) {\n var registry = sheets.registry;\n\n if (registry.length > 0) {\n // Try to insert before the next higher sheet.\n var sheet = findHigherSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element\n };\n } // Otherwise insert after the last attached.\n\n\n sheet = findHighestSheet(registry, options);\n\n if (sheet && sheet.renderer) {\n return {\n parent: sheet.renderer.element.parentNode,\n node: sheet.renderer.element.nextSibling\n };\n }\n } // Try to find a comment placeholder if registry is empty.\n\n\n var insertionPoint = options.insertionPoint;\n\n if (insertionPoint && typeof insertionPoint === 'string') {\n var comment = findCommentNode(insertionPoint);\n\n if (comment) {\n return {\n parent: comment.parentNode,\n node: comment.nextSibling\n };\n } // If user specifies an insertion point and it can't be found in the document -\n // bad specificity issues may appear.\n\n\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] Insertion point \\\"\" + insertionPoint + \"\\\" not found.\") : undefined;\n }\n\n return false;\n}\n/**\n * Insert style element into the DOM.\n */\n\n\nfunction insertStyle(style, options) {\n var insertionPoint = options.insertionPoint;\n var nextNode = findPrevNode(options);\n\n if (nextNode !== false && nextNode.parent) {\n nextNode.parent.insertBefore(style, nextNode.node);\n return;\n } // Works with iframes and any node types.\n\n\n if (insertionPoint && typeof insertionPoint.nodeType === 'number') {\n // https://stackoverflow.com/questions/41328728/force-casting-in-flow\n var insertionPointElement = insertionPoint;\n var parentNode = insertionPointElement.parentNode;\n if (parentNode) parentNode.insertBefore(style, insertionPointElement.nextSibling);else true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, '[JSS] Insertion point is not in the DOM.') : undefined;\n return;\n }\n\n getHead().appendChild(style);\n}\n/**\n * Read jss nonce setting from the page if the user has set it.\n */\n\n\nvar getNonce = memoize(function () {\n var node = document.querySelector('meta[property=\"csp-nonce\"]');\n return node ? node.getAttribute('content') : null;\n});\n\nvar _insertRule = function insertRule(container, rule, index) {\n var maxIndex = container.cssRules.length; // In case previous insertion fails, passed index might be wrong\n\n if (index === undefined || index > maxIndex) {\n // eslint-disable-next-line no-param-reassign\n index = maxIndex;\n }\n\n try {\n if ('insertRule' in container) {\n var c = container;\n c.insertRule(rule, index);\n } // Keyframes rule.\n else if ('appendRule' in container) {\n var _c = container;\n\n _c.appendRule(rule);\n }\n } catch (err) {\n true ? Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] \" + err.message) : undefined;\n return false;\n }\n\n return container.cssRules[index];\n};\n\nvar createStyle = function createStyle() {\n var el = document.createElement('style'); // Without it, IE will have a broken source order specificity if we\n // insert rules after we insert the style tag.\n // It seems to kick-off the source order specificity algorithm.\n\n el.textContent = '\\n';\n return el;\n};\n\nvar DomRenderer =\n/*#__PURE__*/\nfunction () {\n // HTMLStyleElement needs fixing https://github.com/facebook/flow/issues/2696\n function DomRenderer(sheet) {\n this.getPropertyValue = getPropertyValue;\n this.setProperty = setProperty;\n this.removeProperty = removeProperty;\n this.setSelector = setSelector;\n this.element = void 0;\n this.sheet = void 0;\n this.hasInsertedRules = false;\n // There is no sheet when the renderer is used from a standalone StyleRule.\n if (sheet) sheets.add(sheet);\n this.sheet = sheet;\n\n var _ref = this.sheet ? this.sheet.options : {},\n media = _ref.media,\n meta = _ref.meta,\n element = _ref.element;\n\n this.element = element || createStyle();\n this.element.setAttribute('data-jss', '');\n if (media) this.element.setAttribute('media', media);\n if (meta) this.element.setAttribute('data-meta', meta);\n var nonce = getNonce();\n if (nonce) this.element.setAttribute('nonce', nonce);\n }\n /**\n * Insert style element into render tree.\n */\n\n\n var _proto = DomRenderer.prototype;\n\n _proto.attach = function attach() {\n // In the case the element node is external and it is already in the DOM.\n if (this.element.parentNode || !this.sheet) return;\n insertStyle(this.element, this.sheet.options); // When rules are inserted using `insertRule` API, after `sheet.detach().attach()`\n // most browsers create a new CSSStyleSheet, except of all IEs.\n\n var deployed = Boolean(this.sheet && this.sheet.deployed);\n\n if (this.hasInsertedRules && deployed) {\n this.hasInsertedRules = false;\n this.deploy();\n }\n }\n /**\n * Remove style element from render tree.\n */\n ;\n\n _proto.detach = function detach() {\n var parentNode = this.element.parentNode;\n if (parentNode) parentNode.removeChild(this.element);\n }\n /**\n * Inject CSS string into element.\n */\n ;\n\n _proto.deploy = function deploy() {\n var sheet = this.sheet;\n if (!sheet) return;\n\n if (sheet.options.link) {\n this.insertRules(sheet.rules);\n return;\n }\n\n this.element.textContent = \"\\n\" + sheet.toString() + \"\\n\";\n }\n /**\n * Insert RuleList into an element.\n */\n ;\n\n _proto.insertRules = function insertRules(rules, nativeParent) {\n for (var i = 0; i < rules.index.length; i++) {\n this.insertRule(rules.index[i], i, nativeParent);\n }\n }\n /**\n * Insert a rule into element.\n */\n ;\n\n _proto.insertRule = function insertRule(rule, index, nativeParent) {\n if (nativeParent === void 0) {\n nativeParent = this.element.sheet;\n }\n\n if (rule.rules) {\n var parent = rule;\n var latestNativeParent = nativeParent;\n\n if (rule.type === 'conditional' || rule.type === 'keyframes') {\n // We need to render the container without children first.\n latestNativeParent = _insertRule(nativeParent, parent.toString({\n children: false\n }), index);\n\n if (latestNativeParent === false) {\n return false;\n }\n }\n\n this.insertRules(parent.rules, latestNativeParent);\n return latestNativeParent;\n } // IE keeps the CSSStyleSheet after style node has been reattached,\n // so we need to check if the `renderable` reference the right style sheet and not\n // rerender those rules.\n\n\n if (rule.renderable && rule.renderable.parentStyleSheet === this.element.sheet) {\n return rule.renderable;\n }\n\n var ruleStr = rule.toString();\n if (!ruleStr) return false;\n\n var nativeRule = _insertRule(nativeParent, ruleStr, index);\n\n if (nativeRule === false) {\n return false;\n }\n\n this.hasInsertedRules = true;\n rule.renderable = nativeRule;\n return nativeRule;\n }\n /**\n * Delete a rule.\n */\n ;\n\n _proto.deleteRule = function deleteRule(cssRule) {\n var sheet = this.element.sheet;\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n sheet.deleteRule(index);\n return true;\n }\n /**\n * Get index of a CSS Rule.\n */\n ;\n\n _proto.indexOf = function indexOf(cssRule) {\n var cssRules = this.element.sheet.cssRules;\n\n for (var index = 0; index < cssRules.length; index++) {\n if (cssRule === cssRules[index]) return index;\n }\n\n return -1;\n }\n /**\n * Generate a new CSS rule and replace the existing one.\n *\n * Only used for some old browsers because they can't set a selector.\n */\n ;\n\n _proto.replaceRule = function replaceRule(cssRule, rule) {\n var index = this.indexOf(cssRule);\n if (index === -1) return false;\n this.element.sheet.deleteRule(index);\n return this.insertRule(rule, index);\n }\n /**\n * Get all rules elements.\n */\n ;\n\n _proto.getRules = function getRules() {\n return this.element.sheet.cssRules;\n };\n\n return DomRenderer;\n}();\n\nvar instanceCounter = 0;\n\nvar Jss =\n/*#__PURE__*/\nfunction () {\n function Jss(options) {\n this.id = instanceCounter++;\n this.version = \"10.4.0\";\n this.plugins = new PluginsRegistry();\n this.options = {\n id: {\n minify: false\n },\n createGenerateId: createGenerateId,\n Renderer: is_in_browser__WEBPACK_IMPORTED_MODULE_1__[\"default\"] ? DomRenderer : null,\n plugins: []\n };\n this.generateId = createGenerateId({\n minify: false\n });\n\n for (var i = 0; i < plugins.length; i++) {\n this.plugins.use(plugins[i], {\n queue: 'internal'\n });\n }\n\n this.setup(options);\n }\n /**\n * Prepares various options, applies plugins.\n * Should not be used twice on the same instance, because there is no plugins\n * deduplication logic.\n */\n\n\n var _proto = Jss.prototype;\n\n _proto.setup = function setup(options) {\n if (options === void 0) {\n options = {};\n }\n\n if (options.createGenerateId) {\n this.options.createGenerateId = options.createGenerateId;\n }\n\n if (options.id) {\n this.options.id = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, this.options.id, options.id);\n }\n\n if (options.createGenerateId || options.id) {\n this.generateId = this.options.createGenerateId(this.options.id);\n }\n\n if (options.insertionPoint != null) this.options.insertionPoint = options.insertionPoint;\n\n if ('Renderer' in options) {\n this.options.Renderer = options.Renderer;\n } // eslint-disable-next-line prefer-spread\n\n\n if (options.plugins) this.use.apply(this, options.plugins);\n return this;\n }\n /**\n * Create a Style Sheet.\n */\n ;\n\n _proto.createStyleSheet = function createStyleSheet(styles, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n index = _options.index;\n\n if (typeof index !== 'number') {\n index = sheets.index === 0 ? 0 : sheets.index + 1;\n }\n\n var sheet = new StyleSheet(styles, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n jss: this,\n generateId: options.generateId || this.generateId,\n insertionPoint: this.options.insertionPoint,\n Renderer: this.options.Renderer,\n index: index\n }));\n this.plugins.onProcessSheet(sheet);\n return sheet;\n }\n /**\n * Detach the Style Sheet and remove it from the registry.\n */\n ;\n\n _proto.removeStyleSheet = function removeStyleSheet(sheet) {\n sheet.detach();\n sheets.remove(sheet);\n return this;\n }\n /**\n * Create a rule without a Style Sheet.\n * [Deprecated] will be removed in the next major version.\n */\n ;\n\n _proto.createRule = function createRule$1(name, style, options) {\n if (style === void 0) {\n style = {};\n }\n\n if (options === void 0) {\n options = {};\n }\n\n // Enable rule without name for inline styles.\n if (typeof name === 'object') {\n // $FlowIgnore\n return this.createRule(undefined, name, style);\n } // $FlowIgnore\n\n\n var ruleOptions = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, options, {\n name: name,\n jss: this,\n Renderer: this.options.Renderer\n });\n\n if (!ruleOptions.generateId) ruleOptions.generateId = this.generateId;\n if (!ruleOptions.classes) ruleOptions.classes = {};\n if (!ruleOptions.keyframes) ruleOptions.keyframes = {};\n\n var rule = createRule(name, style, ruleOptions);\n\n if (rule) this.plugins.onProcessRule(rule);\n return rule;\n }\n /**\n * Register plugin. Passed function will be invoked with a rule instance.\n */\n ;\n\n _proto.use = function use() {\n var _this = this;\n\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n _this.plugins.use(plugin);\n });\n return this;\n };\n\n return Jss;\n}();\n\n/**\n * Extracts a styles object with only props that contain function values.\n */\nfunction getDynamicStyles(styles) {\n var to = null;\n\n for (var key in styles) {\n var value = styles[key];\n var type = typeof value;\n\n if (type === 'function') {\n if (!to) to = {};\n to[key] = value;\n } else if (type === 'object' && value !== null && !Array.isArray(value)) {\n var extracted = getDynamicStyles(value);\n\n if (extracted) {\n if (!to) to = {};\n to[key] = extracted;\n }\n }\n }\n\n return to;\n}\n\n/**\n * SheetsManager is like a WeakMap which is designed to count StyleSheet\n * instances and attach/detach automatically.\n */\nvar SheetsManager =\n/*#__PURE__*/\nfunction () {\n function SheetsManager() {\n this.length = 0;\n this.sheets = new WeakMap();\n }\n\n var _proto = SheetsManager.prototype;\n\n _proto.get = function get(key) {\n var entry = this.sheets.get(key);\n return entry && entry.sheet;\n };\n\n _proto.add = function add(key, sheet) {\n if (this.sheets.has(key)) return;\n this.length++;\n this.sheets.set(key, {\n sheet: sheet,\n refs: 0\n });\n };\n\n _proto.manage = function manage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs === 0) {\n entry.sheet.attach();\n }\n\n entry.refs++;\n return entry.sheet;\n }\n\n Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"[JSS] SheetsManager: can't find sheet to manage\");\n return undefined;\n };\n\n _proto.unmanage = function unmanage(key) {\n var entry = this.sheets.get(key);\n\n if (entry) {\n if (entry.refs > 0) {\n entry.refs--;\n if (entry.refs === 0) entry.sheet.detach();\n }\n } else {\n Object(tiny_warning__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(false, \"SheetsManager: can't find sheet to unmanage\");\n }\n };\n\n Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(SheetsManager, [{\n key: \"size\",\n get: function get() {\n return this.length;\n }\n }]);\n\n return SheetsManager;\n}();\n\n/**\n * A better abstraction over CSS.\n *\n * @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present\n * @website https://github.com/cssinjs/jss\n * @license MIT\n */\n\n/**\n * Export a constant indicating if this browser has CSSTOM support.\n * https://developers.google.com/web/updates/2018/03/cssom\n */\nvar hasCSSTOMSupport = typeof CSS !== 'undefined' && CSS && 'number' in CSS;\n/**\n * Creates a new instance of Jss.\n */\n\nvar create = function create(options) {\n return new Jss(options);\n};\n/**\n * A global Jss instance.\n */\n\nvar index = create();\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (index);\n\n\n\n//# sourceURL=webpack:///./node_modules/jss/dist/jss.esm.js?"); /***/ }), /***/ "./node_modules/object-assign/index.js": /*!*********************************************!*\ !*** ./node_modules/object-assign/index.js ***! \*********************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n//# sourceURL=webpack:///./node_modules/object-assign/index.js?"); /***/ }), /***/ "./node_modules/p5/lib/p5.js": /*!***********************************!*\ !*** ./node_modules/p5/lib/p5.js ***! \***********************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/* WEBPACK VAR INJECTION */(function(global) {var require;var require;/*! p5.js v0.8.0 April 08, 2019 */\n(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;iEach color stores the color mode and level maxes that applied at the\\ntime of its construction. These are used to interpret the input arguments\\n(at construction and later for that instance of color) and to format the\\noutput e.g. when saturation() is requested.\\nInternally we store an array representing the ideal RGBA values in floating\\npoint form, normalized from 0 to 1. From this we calculate the closest\\nscreen color (RGBA levels from 0 to 255) and expose this to the renderer.\\nWe also cache normalized, floating point components of the color in various\\nrepresentations as they are calculated. This is done to prevent repeating a\\nconversion that has already been performed.\\n\"\n },\n \"Setting\": {\n \"name\": \"Setting\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Color\",\n \"namespace\": \"\",\n \"file\": \"src/color/setting.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Shape\": {\n \"name\": \"Shape\",\n \"submodules\": {\n \"2D Primitives\": 1,\n \"Curves\": 1,\n \"Vertex\": 1,\n \"3D Primitives\": 1,\n \"3D Models\": 1\n },\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {}\n },\n \"2D Primitives\": {\n \"name\": \"2D Primitives\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Shape\",\n \"namespace\": \"\",\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Attributes\": {\n \"name\": \"Attributes\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Typography\",\n \"namespace\": \"\",\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Curves\": {\n \"name\": \"Curves\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Shape\",\n \"namespace\": \"\",\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Vertex\": {\n \"name\": \"Vertex\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Shape\",\n \"namespace\": \"\",\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Constants\": {\n \"name\": \"Constants\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Constants\",\n \"file\": \"src/core/constants.js\",\n \"line\": 1\n },\n \"Environment\": {\n \"name\": \"Environment\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Environment\",\n \"file\": \"src/core/environment.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Structure\": {\n \"name\": \"Structure\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"IO\",\n \"file\": \"src/core/main.js\",\n \"line\": 1,\n \"requires\": [\n \"constants\"\n ]\n },\n \"DOM\": {\n \"name\": \"DOM\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Element\": 1\n },\n \"fors\": {\n \"p5.Element\": 1\n },\n \"namespaces\": {},\n \"module\": \"DOM\",\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 11,\n \"description\": \"Base class for all elements added to a sketch, including canvas,\\ngraphics buffers, and other HTML elements. Methods in blue are\\nincluded in the core functionality, methods in brown are added\\nwith the p5.dom\\nlibrary.\\nIt is not called directly, but p5.Element\\nobjects are created by calling createCanvas, createGraphics,\\nor in the p5.dom library, createDiv, createImg, createInput, etc.\\n\"\n },\n \"Rendering\": {\n \"name\": \"Rendering\",\n \"submodules\": {\n \"undefined\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.RendererGL\": 1,\n \"p5.Graphics\": 1,\n \"p5.Renderer\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Rendering\",\n \"file\": \"src/webgl/p5.RendererGL.js\",\n \"line\": 474,\n \"description\": \"Thin wrapper around a renderer, to be used for creating a\\ngraphics buffer object. Use this class if you need\\nto draw into an off-screen graphics buffer. The two parameters define the\\nwidth and height in pixels. The fields and methods for this class are\\nextensive, but mirror the normal drawing API for p5.\\n\"\n },\n \"Transform\": {\n \"name\": \"Transform\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Transform\",\n \"file\": \"src/core/transform.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Data\": {\n \"name\": \"Data\",\n \"submodules\": {\n \"Dictionary\": 1,\n \"Array Functions\": 1,\n \"Conversion\": 1,\n \"String Functions\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.TypedDict\": 1,\n \"p5.StringDict\": 1,\n \"p5.NumberDict\": 1\n },\n \"fors\": {\n \"p5.TypedDict\": 1,\n \"p5\": 1\n },\n \"namespaces\": {},\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 422\n },\n \"Dictionary\": {\n \"name\": \"Dictionary\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.TypedDict\": 1,\n \"p5.StringDict\": 1,\n \"p5.NumberDict\": 1\n },\n \"fors\": {\n \"p5.TypedDict\": 1,\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Data\",\n \"namespace\": \"\",\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 422,\n \"requires\": [\n \"core\\n\\nThis module defines the p5 methods for the p5 Dictionary classes.\\nThe classes StringDict and NumberDict are for storing and working\\nwith key-value pairs.\"\n ],\n \"description\": \"Base class for all p5.Dictionary types. Specifically\\n typed Dictionary classes inherit from this class.\\n\"\n },\n \"Events\": {\n \"name\": \"Events\",\n \"submodules\": {\n \"Acceleration\": 1,\n \"Keyboard\": 1,\n \"Mouse\": 1,\n \"Touch\": 1\n },\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {}\n },\n \"Acceleration\": {\n \"name\": \"Acceleration\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Events\",\n \"namespace\": \"\",\n \"file\": \"src/events/acceleration.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Keyboard\": {\n \"name\": \"Keyboard\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Events\",\n \"namespace\": \"\",\n \"file\": \"src/events/keyboard.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Mouse\": {\n \"name\": \"Mouse\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Events\",\n \"namespace\": \"\",\n \"file\": \"src/events/mouse.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Touch\": {\n \"name\": \"Touch\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Events\",\n \"namespace\": \"\",\n \"file\": \"src/events/touch.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Image\": {\n \"name\": \"Image\",\n \"submodules\": {\n \"Pixels\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.Image\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Image\",\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 23,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"Creates a new p5.Image. A p5.Image is a canvas backed representation of an\\nimage.\\n\\np5 can display .gif, .jpg and .png images. Images may be displayed\\nin 2D and 3D space. Before an image is used, it must be loaded with the\\nloadImage() function. The p5.Image class contains fields for the width and\\nheight of the image, as well as an array called pixels[] that contains the\\nvalues for every pixel in the image.\\n\\nThe methods described below allow easy access to the image's pixels and\\nalpha channel and simplify the process of compositing.\\n\\nBefore using the pixels[] array, be sure to use the loadPixels() method on\\nthe image to make sure that the pixel data is properly loaded.\\n\"\n },\n \"Loading & Displaying\": {\n \"name\": \"Loading & Displaying\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Typography\",\n \"namespace\": \"\",\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Pixels\": {\n \"name\": \"Pixels\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Image\",\n \"namespace\": \"\",\n \"file\": \"src/image/pixels.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"IO\": {\n \"name\": \"IO\",\n \"submodules\": {\n \"Structure\": 1,\n \"Input\": 1,\n \"Output\": 1,\n \"Table\": 1,\n \"XML\": 1,\n \"Time & Date\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5\": 1,\n \"p5.PrintWriter\": 1,\n \"p5.Table\": 1,\n \"p5.TableRow\": 1,\n \"p5.XML\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 11\n },\n \"Input\": {\n \"name\": \"Input\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"IO\",\n \"namespace\": \"\",\n \"file\": \"src/io/files.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Output\": {\n \"name\": \"Output\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5\": 1,\n \"p5.PrintWriter\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"IO\",\n \"namespace\": \"\",\n \"file\": \"src/io/files.js\",\n \"line\": 1231,\n \"description\": \"This is the p5 instance constructor.\\nA p5 instance holds all the properties and methods related to\\na p5 sketch. It expects an incoming sketch closure and it can also\\ntake an optional node parameter for attaching the generated p5 canvas\\nto a node. The sketch closure takes the newly created p5 instance as\\nits sole argument and may optionally set preload(), setup(), and/or\\ndraw() properties on it for running a sketch.\\nA p5 sketch can run in "global" or "instance" mode:\\n"global" - all properties and methods are attached to the window\\n"instance" - all properties and methods are bound to this p5 object\\n\"\n },\n \"Table\": {\n \"name\": \"Table\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Table\": 1,\n \"p5.TableRow\": 1\n },\n \"fors\": {},\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"IO\",\n \"namespace\": \"\",\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 11,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"Table objects store data with multiple rows and columns, much\\nlike in a traditional spreadsheet. Tables can be generated from\\nscratch, dynamically, or using data from an existing file.\\n\"\n },\n \"XML\": {\n \"name\": \"XML\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.XML\": 1\n },\n \"fors\": {},\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"IO\",\n \"namespace\": \"\",\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 11,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"XML is a representation of an XML object, able to parse XML code. Use\\nloadXML() to load external XML files and create XML objects.\\n\"\n },\n \"Math\": {\n \"name\": \"Math\",\n \"submodules\": {\n \"Calculation\": 1,\n \"Noise\": 1,\n \"Random\": 1,\n \"Trigonometry\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.Vector\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"Math\",\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 12,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"A class to describe a two or three dimensional vector, specifically\\na Euclidean (also known as geometric) vector. A vector is an entity\\nthat has both magnitude and direction. The datatype, however, stores\\nthe components of the vector (x, y for 2D, and x, y, z for 3D). The magnitude\\nand direction can be accessed via the methods mag() and heading().\\n\\nIn many of the p5.js examples, you will see p5.Vector used to describe a\\nposition, velocity, or acceleration. For example, if you consider a rectangle\\nmoving across the screen, at any given instant it has a position (a vector\\nthat points from the origin to its location), a velocity (the rate at which\\nthe object's position changes per time unit, expressed as a vector), and\\nacceleration (the rate at which the object's velocity changes per time\\nunit, expressed as a vector).\\n\\nSince vectors represent groupings of values, we cannot simply use\\ntraditional addition/multiplication/etc. Instead, we'll need to do some\\n"vector" math, which is made easy by the methods inside the p5.Vector class.\\n\"\n },\n \"Calculation\": {\n \"name\": \"Calculation\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Math\",\n \"namespace\": \"\",\n \"file\": \"src/math/calculation.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Noise\": {\n \"name\": \"Noise\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Math\",\n \"namespace\": \"\",\n \"file\": \"src/math/noise.js\",\n \"line\": 14,\n \"requires\": [\n \"core\"\n ]\n },\n \"Random\": {\n \"name\": \"Random\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Math\",\n \"namespace\": \"\",\n \"file\": \"src/math/random.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Trigonometry\": {\n \"name\": \"Trigonometry\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Math\",\n \"namespace\": \"\",\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Typography\": {\n \"name\": \"Typography\",\n \"submodules\": {\n \"Attributes\": 1,\n \"Loading & Displaying\": 1,\n \"Font\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.Font\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"namespaces\": {},\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 15\n },\n \"Font\": {\n \"name\": \"Font\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Font\": 1\n },\n \"fors\": {},\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Typography\",\n \"namespace\": \"\",\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 15,\n \"description\": \"This module defines the p5.Font class and functions for\\ndrawing text to the display canvas.\\n\",\n \"requires\": [\n \"core\",\n \"constants\"\n ]\n },\n \"Array Functions\": {\n \"name\": \"Array Functions\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Data\",\n \"namespace\": \"\",\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Conversion\": {\n \"name\": \"Conversion\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Data\",\n \"namespace\": \"\",\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"String Functions\": {\n \"name\": \"String Functions\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Data\",\n \"namespace\": \"\",\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Time & Date\": {\n \"name\": \"Time & Date\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"IO\",\n \"namespace\": \"\",\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"3D Primitives\": {\n \"name\": \"3D Primitives\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Shape\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"p5.Geometry\"\n ]\n },\n \"Lights, Camera\": {\n \"name\": \"Lights, Camera\",\n \"submodules\": {\n \"Interaction\": 1,\n \"Lights\": 1,\n \"Material\": 1,\n \"Camera\": 1,\n \"Shaders\": 1\n },\n \"elements\": {},\n \"classes\": {\n \"p5.Camera\": 1,\n \"p5.Geometry\": 1,\n \"p5.Matrix\": 1,\n \"p5.Shader\": 1,\n \"p5.Texture\": 1,\n \"ImageInfos\": 1,\n \"FontInfo\": 1,\n \"Cubic\": 1\n },\n \"fors\": {\n \"p5\": 1,\n \"p5.Camera\": 1\n },\n \"namespaces\": {},\n \"file\": \"src/webgl/text.js\",\n \"line\": 259\n },\n \"Interaction\": {\n \"name\": \"Interaction\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/interaction.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"Lights\": {\n \"name\": \"Lights\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/light.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ]\n },\n \"3D Models\": {\n \"name\": \"3D Models\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {},\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Shape\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/loading.js\",\n \"line\": 1,\n \"requires\": [\n \"core\",\n \"p5.Geometry\"\n ]\n },\n \"Material\": {\n \"name\": \"Material\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Texture\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Texture.js\",\n \"line\": 14,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"This module defines the p5.Texture class\\n\"\n },\n \"Camera\": {\n \"name\": \"Camera\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Camera\": 1\n },\n \"fors\": {\n \"p5\": 1,\n \"p5.Camera\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 209,\n \"requires\": [\n \"core\"\n ],\n \"description\": \"This class describes a camera for use in p5's\\n\\nWebGL mode. It contains camera position, orientation, and projection\\ninformation necessary for rendering a 3D scene.\\nNew p5.Camera objects can be made through the\\ncreateCamera() function and controlled through\\nthe methods described below. A camera created in this way will use a default\\nposition in the scene and a default perspective projection until these\\nproperties are changed through the various methods available. It is possible\\nto create multiple cameras, in which case the current camera\\ncan be set through the setCamera() method.\\nNote:\\nThe methods below operate in two coordinate systems: the 'world' coordinate\\nsystem describe positions in terms of their relationship to the origin along\\nthe X, Y and Z axes whereas the camera's 'local' coordinate system\\ndescribes positions from the camera's point of view: left-right, up-down,\\nand forward-backward. The move() method,\\nfor instance, moves the camera along its own axes, whereas the\\nsetPosition()\\nmethod sets the camera's position in world-space.\\n\"\n },\n \"Shaders\": {\n \"name\": \"Shaders\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.Shader\": 1\n },\n \"fors\": {\n \"p5\": 1\n },\n \"is_submodule\": 1,\n \"namespaces\": {},\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Shader.js\",\n \"line\": 13,\n \"description\": \"This module defines the p5.Shader class\\n\",\n \"requires\": [\n \"core\"\n ]\n },\n \"p5.dom\": {\n \"name\": \"p5.dom\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.MediaElement\": 1,\n \"p5.File\": 1\n },\n \"fors\": {\n \"p5\": 1,\n \"p5.Element\": 1\n },\n \"namespaces\": {},\n \"module\": \"p5.dom\",\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3331,\n \"description\": \"The web is much more than just canvas and p5.dom makes it easy to interact\\nwith other HTML5 objects, including text, hyperlink, image, input, video,\\naudio, and webcam.\\nThere is a set of creation methods, DOM manipulation methods, and\\nan extended p5.Element that supports a range of HTML elements. See the\\n\\nbeyond the canvas tutorial for a full overview of how this addon works.\\nMethods and properties shown in black are part of the p5.js core, items in\\nblue are part of the p5.dom library. You will need to include an extra file\\nin order to access the blue functions. See the\\nusing a library\\nsection for information on how to include this library. p5.dom comes with\\np5 complete or you can download the single file\\n\\nhere.\\nSee tutorial: beyond the canvas\\nfor more info on how to use this library.\\n\",\n \"tag\": \"main\",\n \"itemtype\": \"main\"\n },\n \"p5.sound\": {\n \"name\": \"p5.sound\",\n \"submodules\": {},\n \"elements\": {},\n \"classes\": {\n \"p5.sound\": 1,\n \"p5.SoundFile\": 1,\n \"p5.Amplitude\": 1,\n \"p5.FFT\": 1,\n \"p5.Signal\": 1,\n \"p5.Oscillator\": 1,\n \"p5.SinOsc\": 1,\n \"p5.TriOsc\": 1,\n \"p5.SawOsc\": 1,\n \"p5.SqrOsc\": 1,\n \"p5.Envelope\": 1,\n \"p5.Pulse\": 1,\n \"p5.Noise\": 1,\n \"p5.AudioIn\": 1,\n \"p5.Effect\": 1,\n \"p5.Filter\": 1,\n \"p5.LowPass\": 1,\n \"p5.HighPass\": 1,\n \"p5.BandPass\": 1,\n \"p5.EQ\": 1,\n \"p5.Panner3D\": 1,\n \"p5.Delay\": 1,\n \"p5.Reverb\": 1,\n \"p5.Convolver\": 1,\n \"p5.Phrase\": 1,\n \"p5.Part\": 1,\n \"p5.Score\": 1,\n \"p5.SoundLoop\": 1,\n \"p5.Compressor\": 1,\n \"p5.SoundRecorder\": 1,\n \"p5.PeakDetect\": 1,\n \"p5.Gain\": 1,\n \"p5.AudioVoice\": 1,\n \"p5.MonoSynth\": 1,\n \"p5.PolySynth\": 1,\n \"p5.Distortion\": 1\n },\n \"fors\": {\n \"p5.sound\": 1,\n \"p5\": 1\n },\n \"namespaces\": {},\n \"module\": \"p5.sound\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12767,\n \"description\": \"p5.sound extends p5 with Web Audio functionality including audio input,\\nplayback, analysis and synthesis.\\n\\np5.SoundFile: Load and play sound files.\\np5.Amplitude: Get the current volume of a sound.\\np5.AudioIn: Get sound from an input source, typically\\n a computer microphone.\\np5.FFT: Analyze the frequency of sound. Returns\\n results from the frequency spectrum or time domain (waveform).\\np5.Oscillator: Generate Sine,\\n Triangle, Square and Sawtooth waveforms. Base class of\\n p5.Noise and p5.Pulse.\\n \\np5.Envelope: An Envelope is a series\\n of fades over time. Often used to control an object's\\n output gain level as an "ADSR Envelope" (Attack, Decay,\\n Sustain, Release). Can also modulate other parameters.\\np5.Delay: A delay effect with\\n parameters for feedback, delayTime, and lowpass filter.\\np5.Filter: Filter the frequency range of a\\n sound.\\n\\np5.Reverb: Add reverb to a sound by specifying\\n duration and decay. \\np5.Convolver: Extends\\np5.Reverb to simulate the sound of real\\n physical spaces through convolution.\\np5.SoundRecorder: Record sound for playback\\n / save the .wav file.\\np5.Phrase, p5.Part and\\np5.Score: Compose musical sequences.\\n\\np5.sound is on GitHub.\\nDownload the latest version\\nhere.\\n\",\n \"tag\": \"main\",\n \"itemtype\": \"main\"\n }\n },\n \"classes\": {\n \"p5\": {\n \"name\": \"p5\",\n \"shortname\": \"p5\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"IO\",\n \"submodule\": \"Output\",\n \"namespace\": \"\",\n \"file\": \"src/core/main.js\",\n \"line\": 15,\n \"description\": \"This is the p5 instance constructor.\\nA p5 instance holds all the properties and methods related to\\na p5 sketch. It expects an incoming sketch closure and it can also\\ntake an optional node parameter for attaching the generated p5 canvas\\nto a node. The sketch closure takes the newly created p5 instance as\\nits sole argument and may optionally set preload(), setup(), and/or\\ndraw() properties on it for running a sketch.\\nA p5 sketch can run in "global" or "instance" mode:\\n"global" - all properties and methods are attached to the window\\n"instance" - all properties and methods are bound to this p5 object\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"sketch\",\n \"description\": \"a closure that can set optional preload(),\\n setup(), and/or draw() properties on the\\n given p5 instance\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"node\",\n \"description\": \"element to attach canvas to, if a\\n boolean is passed in use it as sync\\n\",\n \"type\": \"HTMLElement|Boolean\",\n \"optional\": true\n },\n {\n \"name\": \"sync\",\n \"description\": \"start synchronously (optional)\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"a p5 instance\",\n \"type\": \"P5\"\n }\n },\n \"p5.Color\": {\n \"name\": \"p5.Color\",\n \"shortname\": \"p5.Color\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\",\n \"namespace\": \"\",\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 16,\n \"description\": \"Each color stores the color mode and level maxes that applied at the\\ntime of its construction. These are used to interpret the input arguments\\n(at construction and later for that instance of color) and to format the\\noutput e.g. when saturation() is requested.\\nInternally we store an array representing the ideal RGBA values in floating\\npoint form, normalized from 0 to 1. From this we calculate the closest\\nscreen color (RGBA levels from 0 to 255) and expose this to the renderer.\\nWe also cache normalized, floating point components of the color in various\\nrepresentations as they are calculated. This is done to prevent repeating a\\nconversion that has already been performed.\\n\"\n },\n \"p5.Element\": {\n \"name\": \"p5.Element\",\n \"shortname\": \"p5.Element\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"DOM\",\n \"submodule\": \"DOM\",\n \"namespace\": \"\",\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 11,\n \"description\": \"Base class for all elements added to a sketch, including canvas,\\ngraphics buffers, and other HTML elements. Methods in blue are\\nincluded in the core functionality, methods in brown are added\\nwith the p5.dom\\nlibrary.\\nIt is not called directly, but p5.Element\\nobjects are created by calling createCanvas, createGraphics,\\nor in the p5.dom library, createDiv, createImg, createInput, etc.\\n\",\n \"params\": [\n {\n \"name\": \"elt\",\n \"description\": \"DOM node that is wrapped\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"pInst\",\n \"description\": \"pointer to p5 instance\\n\",\n \"type\": \"P5\",\n \"optional\": true\n }\n ]\n },\n \"p5.Graphics\": {\n \"name\": \"p5.Graphics\",\n \"shortname\": \"p5.Graphics\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\",\n \"namespace\": \"\",\n \"file\": \"src/core/p5.Graphics.js\",\n \"line\": 12,\n \"description\": \"Thin wrapper around a renderer, to be used for creating a\\ngraphics buffer object. Use this class if you need\\nto draw into an off-screen graphics buffer. The two parameters define the\\nwidth and height in pixels. The fields and methods for this class are\\nextensive, but mirror the normal drawing API for p5.\\n\",\n \"extends\": \"p5.Element\",\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"renderer\",\n \"description\": \"the renderer to use, either P2D or WEBGL\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"pInst\",\n \"description\": \"pointer to p5 instance\\n\",\n \"type\": \"P5\",\n \"optional\": true\n }\n ]\n },\n \"p5.Renderer\": {\n \"name\": \"p5.Renderer\",\n \"shortname\": \"p5.Renderer\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\",\n \"namespace\": \"\",\n \"file\": \"src/core/p5.Renderer.js\",\n \"line\": 12,\n \"description\": \"Main graphics and rendering context, as well as the base API\\nimplementation for p5.js "core". To be used as the superclass for\\nRenderer2D and Renderer3D classes, respecitvely.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Element\",\n \"params\": [\n {\n \"name\": \"elt\",\n \"description\": \"DOM node that is wrapped\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"pInst\",\n \"description\": \"pointer to p5 instance\\n\",\n \"type\": \"P5\",\n \"optional\": true\n },\n {\n \"name\": \"isMainCanvas\",\n \"description\": \"whether we're using it as main canvas\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ]\n },\n \"p5.TypedDict\": {\n \"name\": \"p5.TypedDict\",\n \"shortname\": \"p5.TypedDict\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"namespace\": \"\",\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 84,\n \"description\": \"Base class for all p5.Dictionary types. Specifically\\n typed Dictionary classes inherit from this class.\\n\"\n },\n \"p5.StringDict\": {\n \"name\": \"p5.StringDict\",\n \"shortname\": \"p5.StringDict\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"namespace\": \"\",\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 403,\n \"description\": \"A simple Dictionary class for Strings.\\n\",\n \"extends\": \"p5.TypedDict\"\n },\n \"p5.NumberDict\": {\n \"name\": \"p5.NumberDict\",\n \"shortname\": \"p5.NumberDict\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"namespace\": \"\",\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 422,\n \"description\": \"A simple Dictionary class for Numbers.\\n\",\n \"extends\": \"p5.TypedDict\"\n },\n \"p5.Image\": {\n \"name\": \"p5.Image\",\n \"shortname\": \"p5.Image\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"namespace\": \"\",\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 23,\n \"description\": \"Creates a new p5.Image. A p5.Image is a canvas backed representation of an\\nimage.\\n\\np5 can display .gif, .jpg and .png images. Images may be displayed\\nin 2D and 3D space. Before an image is used, it must be loaded with the\\nloadImage() function. The p5.Image class contains fields for the width and\\nheight of the image, as well as an array called pixels[] that contains the\\nvalues for every pixel in the image.\\n\\nThe methods described below allow easy access to the image's pixels and\\nalpha channel and simplify the process of compositing.\\n\\nBefore using the pixels[] array, be sure to use the loadPixels() method on\\nthe image to make sure that the pixel data is properly loaded.\\n\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n let img = createImage(100, 100); // same as new p5.Image(100, 100);\\n img.loadPixels();\\n createCanvas(100, 100);\\n background(0);\\n\\n // helper for writing color to array\\n function writeColor(image, x, y, red, green, blue, alpha) {\\n let index = (x + y * width) * 4;\\n image.pixels[index] = red;\\n image.pixels[index + 1] = green;\\n image.pixels[index + 2] = blue;\\n image.pixels[index + 3] = alpha;\\n }\\n\\n let x, y;\\n // fill with random colors\\n for (y = 0; y < img.height; y++) {\\n for (x = 0; x < img.width; x++) {\\n let red = random(255);\\n let green = random(255);\\n let blue = random(255);\\n let alpha = 255;\\n writeColor(img, x, y, red, green, blue, alpha);\\n }\\n }\\n\\n // draw a red line\\n y = 0;\\n for (x = 0; x < img.width; x++) {\\n writeColor(img, x, y, 255, 0, 0, 255);\\n }\\n\\n // draw a green line\\n y = img.height - 1;\\n for (x = 0; x < img.width; x++) {\\n writeColor(img, x, y, 0, 255, 0, 255);\\n }\\n\\n img.updatePixels();\\n image(img, 0, 0);\\n}\\n\"\n ],\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"height\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ]\n },\n \"p5.PrintWriter\": {\n \"name\": \"p5.PrintWriter\",\n \"shortname\": \"p5.PrintWriter\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"IO\",\n \"submodule\": \"Output\",\n \"namespace\": \"\",\n \"file\": \"src/io/files.js\",\n \"line\": 1231,\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"extension\",\n \"description\": \"\",\n \"type\": \"String\",\n \"optional\": true\n }\n ]\n },\n \"p5.Table\": {\n \"name\": \"p5.Table\",\n \"shortname\": \"p5.Table\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"IO\",\n \"submodule\": \"Table\",\n \"namespace\": \"\",\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 35,\n \"description\": \"Table objects store data with multiple rows and columns, much\\nlike in a traditional spreadsheet. Tables can be generated from\\nscratch, dynamically, or using data from an existing file.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"rows\",\n \"description\": \"An array of p5.TableRow objects\\n\",\n \"type\": \"p5.TableRow[]\",\n \"optional\": true\n }\n ]\n },\n \"p5.TableRow\": {\n \"name\": \"p5.TableRow\",\n \"shortname\": \"p5.TableRow\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"IO\",\n \"submodule\": \"Table\",\n \"namespace\": \"\",\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 11,\n \"description\": \"A TableRow object represents a single row of data values,\\nstored in columns, from a table.\\nA Table Row contains both an ordered array, and an unordered\\nJSON object.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"optional: populate the row with a\\n string of values, separated by the\\n separator\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"separator\",\n \"description\": \"comma separated values (csv) by default\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ]\n },\n \"p5.XML\": {\n \"name\": \"p5.XML\",\n \"shortname\": \"p5.XML\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"IO\",\n \"submodule\": \"XML\",\n \"namespace\": \"\",\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 11,\n \"description\": \"XML is a representation of an XML object, able to parse XML code. Use\\nloadXML() to load external XML files and create XML objects.\\n\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let children = xml.getChildren('animal');\\n\\n for (let i = 0; i < children.length; i++) {\\n let id = children[i].getNum('id');\\n let coloring = children[i].getString('species');\\n let name = children[i].getContent();\\n print(id + ', ' + coloring + ', ' + name);\\n }\\n}\\n\\n// Sketch prints:\\n// 0, Capra hircus, Goat\\n// 1, Panthera pardus, Leopard\\n// 2, Equus zebra, Zebra\\n\"\n ],\n \"alt\": \"no image displayed\"\n },\n \"p5.Vector\": {\n \"name\": \"p5.Vector\",\n \"shortname\": \"p5.Vector\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"namespace\": \"\",\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 12,\n \"description\": \"A class to describe a two or three dimensional vector, specifically\\na Euclidean (also known as geometric) vector. A vector is an entity\\nthat has both magnitude and direction. The datatype, however, stores\\nthe components of the vector (x, y for 2D, and x, y, z for 3D). The magnitude\\nand direction can be accessed via the methods mag() and heading().\\n\\nIn many of the p5.js examples, you will see p5.Vector used to describe a\\nposition, velocity, or acceleration. For example, if you consider a rectangle\\nmoving across the screen, at any given instant it has a position (a vector\\nthat points from the origin to its location), a velocity (the rate at which\\nthe object's position changes per time unit, expressed as a vector), and\\nacceleration (the rate at which the object's velocity changes per time\\nunit, expressed as a vector).\\n\\nSince vectors represent groupings of values, we cannot simply use\\ntraditional addition/multiplication/etc. Instead, we'll need to do some\\n"vector" math, which is made easy by the methods inside the p5.Vector class.\\n\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"y component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"z component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(40, 50);\\nlet v2 = createVector(40, 50);\\n\\nellipse(v1.x, v1.y, 50, 50);\\nellipse(v2.x, v2.y, 50, 50);\\nv1.add(v2);\\nellipse(v1.x, v1.y, 50, 50);\\n\\n\"\n ],\n \"alt\": \"2 white ellipses. One center-left the other bottom right and off canvas\"\n },\n \"p5.Font\": {\n \"name\": \"p5.Font\",\n \"shortname\": \"p5.Font\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Typography\",\n \"submodule\": \"Font\",\n \"namespace\": \"\",\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 15,\n \"description\": \"Base class for font handling\\n\",\n \"params\": [\n {\n \"name\": \"pInst\",\n \"description\": \"pointer to p5 instance\\n\",\n \"type\": \"P5\",\n \"optional\": true\n }\n ]\n },\n \"p5.Camera\": {\n \"name\": \"p5.Camera\",\n \"shortname\": \"p5.Camera\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 209,\n \"description\": \"This class describes a camera for use in p5's\\n\\nWebGL mode. It contains camera position, orientation, and projection\\ninformation necessary for rendering a 3D scene.\\nNew p5.Camera objects can be made through the\\ncreateCamera() function and controlled through\\nthe methods described below. A camera created in this way will use a default\\nposition in the scene and a default perspective projection until these\\nproperties are changed through the various methods available. It is possible\\nto create multiple cameras, in which case the current camera\\ncan be set through the setCamera() method.\\nNote:\\nThe methods below operate in two coordinate systems: the 'world' coordinate\\nsystem describe positions in terms of their relationship to the origin along\\nthe X, Y and Z axes whereas the camera's 'local' coordinate system\\ndescribes positions from the camera's point of view: left-right, up-down,\\nand forward-backward. The move() method,\\nfor instance, moves the camera along its own axes, whereas the\\nsetPosition()\\nmethod sets the camera's position in world-space.\\n\",\n \"params\": [\n {\n \"name\": \"rendererGL\",\n \"description\": \"instance of WebGL renderer\\n\",\n \"type\": \"RendererGL\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet cam;\\nlet delta = 0.01;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n // set initial pan angle\\n cam.pan(-0.8);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // pan camera according to angle 'delta'\\n cam.pan(delta);\\n\\n // every 160 frames, switch direction\\n if (frameCount % 160 === 0) {\\n delta *= -1;\\n }\\n\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"camera view pans left and right across a series of rotating 3D boxes.\"\n },\n \"p5.Geometry\": {\n \"name\": \"p5.Geometry\",\n \"shortname\": \"p5.Geometry\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Lights, Camera\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 6,\n \"description\": \"p5 Geometry class\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"detailX\",\n \"description\": \"number of vertices on horizontal surface\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of vertices on horizontal surface\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to call upon object instantiation.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ]\n },\n \"p5.Shader\": {\n \"name\": \"p5.Shader\",\n \"shortname\": \"p5.Shader\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Shaders\",\n \"namespace\": \"\",\n \"file\": \"src/webgl/p5.Shader.js\",\n \"line\": 13,\n \"description\": \"Shader class for WEBGL Mode\\n\",\n \"params\": [\n {\n \"name\": \"renderer\",\n \"description\": \"an instance of p5.RendererGL that\\nwill provide the GL context for this new p5.Shader\\n\",\n \"type\": \"p5.RendererGL\"\n },\n {\n \"name\": \"vertSrc\",\n \"description\": \"source code for the vertex shader (as a string)\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"fragSrc\",\n \"description\": \"source code for the fragment shader (as a string)\\n\",\n \"type\": \"String\"\n }\n ]\n },\n \"p5.MediaElement\": {\n \"name\": \"p5.MediaElement\",\n \"shortname\": \"p5.MediaElement\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2228,\n \"description\": \"Extends p5.Element to handle audio and video. In addition to the methods\\nof p5.Element, it also contains methods for controlling media. It is not\\ncalled directly, but p5.MediaElements are created by calling createVideo,\\ncreateAudio, and createCapture.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"elt\",\n \"description\": \"DOM node that is wrapped\\n\",\n \"type\": \"String\"\n }\n ]\n },\n \"p5.File\": {\n \"name\": \"p5.File\",\n \"shortname\": \"p5.File\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3331,\n \"description\": \"Base class for a file.\\nUsed for Element.drop and createFileInput.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"file\",\n \"description\": \"File that is wrapped\\n\",\n \"type\": \"File\"\n }\n ]\n },\n \"p5.sound\": {\n \"name\": \"p5.sound\",\n \"shortname\": \"p5.sound\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\"\n },\n \"p5.SoundFile\": {\n \"name\": \"p5.SoundFile\",\n \"shortname\": \"p5.SoundFile\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1645,\n \"description\": \"SoundFile object with a path to a file.\\n\\nThe p5.SoundFile may not be available immediately because\\nit loads the file information asynchronously.\\n\\nTo do something with the sound as soon as it loads\\npass the name of a function as the second parameter.\\n\\nOnly one file path is required. However, audio file formats\\n(i.e. mp3, ogg, wav and m4a/aac) are not supported by all\\nweb browsers. If you want to ensure compatability, instead of a single\\nfile path, you may include an Array of filepaths, and the browser will\\nchoose a format that works.\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to a sound file (String). Optionally,\\n you may include multiple file formats in\\n an array. Alternately, accepts an object\\n from the HTML5 File API, or a p5.File.\\n\",\n \"type\": \"String|Array\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"Name of a function to call once file loads\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"Name of a function to call if file fails to\\n load. This function will receive an error or\\n XMLHttpRequest object with information\\n about what went wrong.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"whileLoadingCallback\",\n \"description\": \"Name of a function to call while file\\n is loading. That function will\\n receive progress of the request to\\n load the sound file\\n (between 0 and 1) as its first\\n parameter. This progress\\n does not account for the additional\\n time needed to decode the audio data.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction preload() {\\n soundFormats('mp3', 'ogg');\\n mySound = loadSound('assets/doorbell.mp3');\\n}\\n\\nfunction setup() {\\n mySound.setVolume(0.1);\\n mySound.play();\\n}\\n\\n \"\n ]\n },\n \"p5.Amplitude\": {\n \"name\": \"p5.Amplitude\",\n \"shortname\": \"p5.Amplitude\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3179,\n \"description\": \"Amplitude measures volume between 0.0 and 1.0.\\nListens to all p5sound by default, or use setInput()\\nto listen to a specific sound source. Accepts an optional\\nsmoothing value, which defaults to 0.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"smoothing\",\n \"description\": \"between 0.0 and .999 to smooth\\n amplitude readings (defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar sound, amplitude, cnv;\\n\\nfunction preload(){\\n sound = loadSound('assets/beat.mp3');\\n}\\nfunction setup() {\\n cnv = createCanvas(100,100);\\n amplitude = new p5.Amplitude();\\n\\n // start / stop the sound when canvas is clicked\\n cnv.mouseClicked(function() {\\n if (sound.isPlaying() ){\\n sound.stop();\\n } else {\\n sound.play();\\n }\\n });\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\n\\n\"\n ]\n },\n \"p5.FFT\": {\n \"name\": \"p5.FFT\",\n \"shortname\": \"p5.FFT\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3458,\n \"description\": \"FFT (Fast Fourier Transform) is an analysis algorithm that\\nisolates individual\\n\\naudio frequencies within a waveform.\\n\\nOnce instantiated, a p5.FFT object can return an array based on\\ntwo types of analyses: • FFT.waveform() computes\\namplitude values along the time domain. The array indices correspond\\nto samples across a brief moment in time. Each value represents\\namplitude of the waveform at that sample of time.\\n• FFT.analyze() computes amplitude values along the\\nfrequency domain. The array indices correspond to frequencies (i.e.\\npitches), from the lowest to the highest that humans can hear. Each\\nvalue represents amplitude at that slice of the frequency spectrum.\\nUse with getEnergy() to measure amplitude at specific\\nfrequencies, or within a range of frequencies. \\n\\nFFT analyzes a very short snapshot of sound called a sample\\nbuffer. It returns an array of amplitude measurements, referred\\nto as bins. The array is 1024 bins long by default.\\nYou can change the bin array length, but it must be a power of 2\\nbetween 16 and 1024 in order for the FFT algorithm to function\\ncorrectly. The actual size of the FFT buffer is twice the\\nnumber of bins, so given a standard sample rate, the buffer is\\n2048/44100 seconds long.\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"smoothing\",\n \"description\": \"Smooth results of Freq Spectrum.\\n 0.0 < smoothing < 1.0.\\n Defaults to 0.8.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"bins\",\n \"description\": \"Length of resulting array.\\n Must be a power of two between\\n 16 and 1024. Defaults to 1024.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nfunction preload(){\\n sound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup(){\\n var cnv = createCanvas(100,100);\\n cnv.mouseClicked(togglePlay);\\n fft = new p5.FFT();\\n sound.amp(0.2);\\n}\\n\\nfunction draw(){\\n background(0);\\n\\n var spectrum = fft.analyze();\\n noStroke();\\n fill(0,255,0); // spectrum is green\\n for (var i = 0; i< spectrum.length; i++){\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width / spectrum.length, h )\\n }\\n\\n var waveform = fft.waveform();\\n noFill();\\n beginShape();\\n stroke(255,0,0); // waveform is red\\n strokeWeight(1);\\n for (var i = 0; i< waveform.length; i++){\\n var x = map(i, 0, waveform.length, 0, width);\\n var y = map( waveform[i], -1, 1, 0, height);\\n vertex(x,y);\\n }\\n endShape();\\n\\n text('click to play/pause', 4, 10);\\n}\\n\\n// fade sound if mouse is over canvas\\nfunction togglePlay() {\\n if (sound.isPlaying()) {\\n sound.pause();\\n } else {\\n sound.loop();\\n }\\n}\\n\"\n ]\n },\n \"p5.Signal\": {\n \"name\": \"p5.Signal\",\n \"shortname\": \"p5.Signal\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5223,\n \"description\": \"p5.Signal is a constant audio-rate signal used by p5.Oscillator\\nand p5.Envelope for modulation math.\\n\\nThis is necessary because Web Audio is processed on a seprate clock.\\nFor example, the p5 draw loop runs about 60 times per second. But\\nthe audio clock must process samples 44100 times per second. If we\\nwant to add a value to each of those samples, we can't do it in the\\ndraw loop, but we can do it by adding a constant-rate audio signal.</p.\\n\\nThis class mostly functions behind the scenes in p5.sound, and returns\\na Tone.Signal from the Tone.js library by Yotam Mann.\\nIf you want to work directly with audio signals for modular\\nsynthesis, check out\\ntone.js.\",\n \"is_constructor\": 1,\n \"return\": {\n \"description\": \"A Signal object from the Tone.js library\",\n \"type\": \"Tone.Signal\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n carrier = new p5.Oscillator('sine');\\n carrier.amp(1); // set amplitude\\n carrier.freq(220); // set frequency\\n carrier.start(); // start oscillating\\n\\n modulator = new p5.Oscillator('sawtooth');\\n modulator.disconnect();\\n modulator.amp(1);\\n modulator.freq(4);\\n modulator.start();\\n\\n // Modulator's default amplitude range is -1 to 1.\\n // Multiply it by -200, so the range is -200 to 200\\n // then add 220 so the range is 20 to 420\\n carrier.freq( modulator.mult(-200).add(220) );\\n}\\n\"\n ]\n },\n \"p5.Oscillator\": {\n \"name\": \"p5.Oscillator\",\n \"shortname\": \"p5.Oscillator\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5369,\n \"description\": \"Creates a signal that oscillates between -1.0 and 1.0.\\nBy default, the oscillation takes the form of a sinusoidal\\nshape ('sine'). Additional types include 'triangle',\\n'sawtooth' and 'square'. The frequency defaults to\\n440 oscillations per second (440Hz, equal to the pitch of an\\n'A' note).\\n\\nSet the type of oscillation with setType(), or by instantiating a\\nspecific oscillator: p5.SinOsc, p5.TriOsc, p5.SqrOsc, or p5.SawOsc.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"frequency defaults to 440Hz\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"type\",\n \"description\": \"type of oscillator. Options:\\n 'sine' (default), 'triangle',\\n 'sawtooth', 'square'\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar osc;\\nvar playing = false;\\n\\nfunction setup() {\\n backgroundColor = color(255,0,255);\\n textAlign(CENTER);\\n\\n osc = new p5.Oscillator();\\n osc.setType('sine');\\n osc.freq(240);\\n osc.amp(0);\\n osc.start();\\n}\\n\\nfunction draw() {\\n background(backgroundColor)\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY < height && mouseY > 0) {\\n if (!playing) {\\n // ramp amplitude to 0.5 over 0.05 seconds\\n osc.amp(0.5, 0.05);\\n playing = true;\\n backgroundColor = color(0,255,255);\\n } else {\\n // ramp amplitude to 0 over 0.5 seconds\\n osc.amp(0, 0.5);\\n playing = false;\\n backgroundColor = color(255,0,255);\\n }\\n }\\n}\\n \"\n ]\n },\n \"p5.SinOsc\": {\n \"name\": \"p5.SinOsc\",\n \"shortname\": \"p5.SinOsc\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5810,\n \"description\": \"Constructor: new p5.SinOsc().\\nThis creates a Sine Wave Oscillator and is\\nequivalent to new p5.Oscillator('sine')\\n or creating a p5.Oscillator and then calling\\nits method setType('sine').\\nSee p5.Oscillator for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Oscillator\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Set the frequency\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n \"p5.TriOsc\": {\n \"name\": \"p5.TriOsc\",\n \"shortname\": \"p5.TriOsc\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5827,\n \"description\": \"Constructor: new p5.TriOsc().\\nThis creates a Triangle Wave Oscillator and is\\nequivalent to new p5.Oscillator('triangle')\\n or creating a p5.Oscillator and then calling\\nits method setType('triangle').\\nSee p5.Oscillator for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Oscillator\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Set the frequency\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n \"p5.SawOsc\": {\n \"name\": \"p5.SawOsc\",\n \"shortname\": \"p5.SawOsc\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5844,\n \"description\": \"Constructor: new p5.SawOsc().\\nThis creates a SawTooth Wave Oscillator and is\\nequivalent to new p5.Oscillator('sawtooth')\\n or creating a p5.Oscillator and then calling\\nits method setType('sawtooth').\\nSee p5.Oscillator for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Oscillator\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Set the frequency\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n \"p5.SqrOsc\": {\n \"name\": \"p5.SqrOsc\",\n \"shortname\": \"p5.SqrOsc\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5861,\n \"description\": \"Constructor: new p5.SqrOsc().\\nThis creates a Square Wave Oscillator and is\\nequivalent to new p5.Oscillator('square')\\n or creating a p5.Oscillator and then calling\\nits method setType('square').\\nSee p5.Oscillator for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Oscillator\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Set the frequency\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n \"p5.Envelope\": {\n \"name\": \"p5.Envelope\",\n \"shortname\": \"p5.Envelope\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6316,\n \"description\": \"Envelopes are pre-defined amplitude distribution over time.\\nTypically, envelopes are used to control the output volume\\nof an object, a series of fades referred to as Attack, Decay,\\nSustain and Release (\\nADSR\\n). Envelopes can also control other Web Audio Parameters—for example, a p5.Envelope can\\ncontrol an Oscillator's frequency like this: osc.freq(env).\\nUse setRange to change the attack/release level.\\nUse setADSR to change attackTime, decayTime, sustainPercent and releaseTime.\\nUse the play method to play the entire envelope,\\nthe ramp method for a pingable trigger,\\nor triggerAttack/\\ntriggerRelease to trigger noteOn/noteOff.\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n env.play();\\n}\\n\"\n ]\n },\n \"p5.Pulse\": {\n \"name\": \"p5.Pulse\",\n \"shortname\": \"p5.Pulse\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7114,\n \"description\": \"Creates a Pulse object, an oscillator that implements\\nPulse Width Modulation.\\nThe pulse is created with two oscillators.\\nAccepts a parameter for frequency, and to set the\\nwidth between the pulses. See \\np5.Oscillator for a full list of methods.\\n\",\n \"extends\": \"p5.Oscillator\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Frequency in oscillations per second (Hz)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"w\",\n \"description\": \"Width between the pulses (0 to 1.0,\\n defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar pulse;\\nfunction setup() {\\n background(0);\\n\\n // Create and start the pulse wave oscillator\\n pulse = new p5.Pulse();\\n pulse.amp(0.5);\\n pulse.freq(220);\\n pulse.start();\\n}\\n\\nfunction draw() {\\n var w = map(mouseX, 0, width, 0, 1);\\n w = constrain(w, 0, 1);\\n pulse.width(w)\\n}\\n\"\n ]\n },\n \"p5.Noise\": {\n \"name\": \"p5.Noise\",\n \"shortname\": \"p5.Noise\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7293,\n \"description\": \"Noise is a type of oscillator that generates a buffer with random values.\\n\",\n \"extends\": \"p5.Oscillator\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"Type of noise can be 'white' (default),\\n 'brown' or 'pink'.\\n\",\n \"type\": \"String\"\n }\n ]\n },\n \"p5.AudioIn\": {\n \"name\": \"p5.AudioIn\",\n \"shortname\": \"p5.AudioIn\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7441,\n \"description\": \"Get audio from an input, i.e. your computer's microphone.\\n\\nTurn the mic on/off with the start() and stop() methods. When the mic\\nis on, its volume can be measured with getLevel or by connecting an\\nFFT object.\\n\\nIf you want to hear the AudioIn, use the .connect() method.\\nAudioIn does not connect to p5.sound output by default to prevent\\nfeedback.\\n\\nNote: This uses the getUserMedia/\\nStream API, which is not supported by certain browsers. Access in Chrome browser\\nis limited to localhost and https, but access over http may be limited.\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"errorCallback\",\n \"description\": \"A function to call if there is an error\\n accessing the AudioIn. For example,\\n Safari and iOS devices do not\\n currently allow microphone access.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar mic;\\nfunction setup(){\\n mic = new p5.AudioIn()\\n mic.start();\\n}\\nfunction draw(){\\n background(0);\\n micLevel = mic.getLevel();\\n ellipse(width/2, constrain(height-micLevel*height*5, 0, height), 10, 10);\\n}\\n\"\n ]\n },\n \"p5.Effect\": {\n \"name\": \"p5.Effect\",\n \"shortname\": \"p5.Effect\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8357,\n \"description\": \"Effect is a base class for audio effects in p5. \\nThis module handles the nodes and methods that are \\ncommon and useful for current and future effects.\\nThis class is extended by p5.Distortion, \\np5.Compressor,\\np5.Delay, \\np5.Filter, \\np5.Reverb.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"ac\",\n \"description\": \"Reference to the audio context of the p5 object\\n\",\n \"type\": \"Object\",\n \"optional\": true\n },\n {\n \"name\": \"input\",\n \"description\": \"Gain Node effect wrapper\\n\",\n \"type\": \"AudioNode\",\n \"optional\": true\n },\n {\n \"name\": \"output\",\n \"description\": \"Gain Node effect wrapper\\n\",\n \"type\": \"AudioNode\",\n \"optional\": true\n },\n {\n \"name\": \"_drywet\",\n \"description\": \"Tone.JS CrossFade node (defaults to value: 1)\\n\",\n \"type\": \"Object\",\n \"optional\": true\n },\n {\n \"name\": \"wet\",\n \"description\": \"Effects that extend this class should connect\\n to the wet signal to this gain node, so that dry and wet \\n signals are mixed properly.\\n\",\n \"type\": \"AudioNode\",\n \"optional\": true\n }\n ]\n },\n \"p5.Filter\": {\n \"name\": \"p5.Filter\",\n \"shortname\": \"p5.Filter\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8499,\n \"description\": \"A p5.Filter uses a Web Audio Biquad Filter to filter\\nthe frequency response of an input source. Subclasses\\ninclude:\\n\\np5.LowPass:\\nAllows frequencies below the cutoff frequency to pass through,\\nand attenuates frequencies above the cutoff.\\np5.HighPass:\\nThe opposite of a lowpass filter. \\np5.BandPass:\\nAllows a range of frequencies to pass through and attenuates\\nthe frequencies below and above this frequency range.\\n\\nThe .res() method controls either width of the\\nbandpass, or resonance of the low/highpass cutoff frequency.\\nThis class extends p5.Effect.Methods amp(), chain(), \\ndrywet(), connect(), and \\ndisconnect() are available.\\n\",\n \"extends\": \"p5.Effect\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"'lowpass' (default), 'highpass', 'bandpass'\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar fft, noise, filter;\\n\\nfunction setup() {\\n fill(255, 40, 255);\\n\\n filter = new p5.BandPass();\\n\\n noise = new p5.Noise();\\n // disconnect unfiltered noise,\\n // and connect to filter\\n noise.disconnect();\\n noise.connect(filter);\\n noise.start();\\n\\n fft = new p5.FFT();\\n}\\n\\nfunction draw() {\\n background(30);\\n\\n // set the BandPass frequency based on mouseX\\n var freq = map(mouseX, 0, width, 20, 10000);\\n filter.freq(freq);\\n // give the filter a narrow band (lower res = wider bandpass)\\n filter.res(50);\\n\\n // draw filtered spectrum\\n var spectrum = fft.analyze();\\n noStroke();\\n for (var i = 0; i < spectrum.length; i++) {\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width/spectrum.length, h);\\n }\\n\\n isMouseOverCanvas();\\n}\\n\\nfunction isMouseOverCanvas() {\\n var mX = mouseX, mY = mouseY;\\n if (mX > 0 && mX < width && mY < height && mY > 0) {\\n noise.amp(0.5, 0.2);\\n } else {\\n noise.amp(0, 0.2);\\n }\\n}\\n\"\n ]\n },\n \"p5.LowPass\": {\n \"name\": \"p5.LowPass\",\n \"shortname\": \"p5.LowPass\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8730,\n \"description\": \"Constructor: new p5.LowPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('lowpass').\\nSee p5.Filter for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Filter\"\n },\n \"p5.HighPass\": {\n \"name\": \"p5.HighPass\",\n \"shortname\": \"p5.HighPass\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8744,\n \"description\": \"Constructor: new p5.HighPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('highpass').\\nSee p5.Filter for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Filter\"\n },\n \"p5.BandPass\": {\n \"name\": \"p5.BandPass\",\n \"shortname\": \"p5.BandPass\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8758,\n \"description\": \"Constructor: new p5.BandPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('bandpass').\\nSee p5.Filter for methods.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Filter\"\n },\n \"p5.EQ\": {\n \"name\": \"p5.EQ\",\n \"shortname\": \"p5.EQ\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8829,\n \"description\": \"p5.EQ is an audio effect that performs the function of a multiband\\naudio equalizer. Equalization is used to adjust the balance of\\nfrequency compoenents of an audio signal. This process is commonly used\\nin sound production and recording to change the waveform before it reaches\\na sound output device. EQ can also be used as an audio effect to create\\ninteresting distortions by filtering out parts of the spectrum. p5.EQ is\\nbuilt using a chain of Web Audio Biquad Filter Nodes and can be\\ninstantiated with 3 or 8 bands. Bands can be added or removed from\\nthe EQ by directly modifying p5.EQ.bands (the array that stores filters).\\nThis class extends p5.Effect.\\nMethods amp(), chain(),\\ndrywet(), connect(), and\\ndisconnect() are available.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Effect\",\n \"params\": [\n {\n \"name\": \"_eqsize\",\n \"description\": \"Constructor will accept 3 or 8, defaults to 3\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"p5.EQ object\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\nvar eq;\\nvar band_names;\\nvar band_index;\\n\\nvar soundFile, play;\\n\\nfunction preload() {\\n soundFormats('mp3', 'ogg');\\n soundFile = loadSound('assets/beat');\\n}\\n\\nfunction setup() {\\n eq = new p5.EQ(3);\\n soundFile.disconnect();\\n eq.process(soundFile);\\n\\n band_names = ['lows','mids','highs'];\\n band_index = 0;\\n play = false;\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(30);\\n noStroke();\\n fill(255);\\n text('click to kill',50,25);\\n\\n fill(255, 40, 255);\\n textSize(26);\\n text(band_names[band_index],50,55);\\n\\n fill(255);\\n textSize(9);\\n text('space = play/pause',50,80);\\n}\\n\\n//If mouse is over canvas, cycle to the next band and kill the frequency\\nfunction mouseClicked() {\\n for (var i = 0; i < eq.bands.length; i++) {\\n eq.bands[i].gain(0);\\n }\\n eq.bands[band_index].gain(-40);\\n if (mouseX > 0 && mouseX < width && mouseY < height && mouseY > 0) {\\n band_index === 2 ? band_index = 0 : band_index++;\\n }\\n}\\n\\n//use space bar to trigger play / pause\\nfunction keyPressed() {\\n if (key===' ') {\\n play = !play\\n play ? soundFile.loop() : soundFile.pause();\\n }\\n}\\n\"\n ]\n },\n \"p5.Panner3D\": {\n \"name\": \"p5.Panner3D\",\n \"shortname\": \"p5.Panner3D\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9021,\n \"description\": \"Panner3D is based on the \\nWeb Audio Spatial Panner Node.\\nThis panner is a spatial processing node that allows audio to be positioned\\nand oriented in 3D space.\\nThe position is relative to an \\nAudio Context Listener, which can be accessed\\nby p5.soundOut.audiocontext.listener\\n\",\n \"is_constructor\": 1\n },\n \"p5.Delay\": {\n \"name\": \"p5.Delay\",\n \"shortname\": \"p5.Delay\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9472,\n \"description\": \"Delay is an echo effect. It processes an existing sound source,\\nand outputs a delayed version of that sound. The p5.Delay can\\nproduce different effects depending on the delayTime, feedback,\\nfilter, and type. In the example below, a feedback of 0.5 (the\\ndefaul value) will produce a looping delay that decreases in\\nvolume by 50% each repeat. A filter will cut out the high\\nfrequencies so that the delay does not sound as piercing as the\\noriginal source.\\nThis class extends p5.Effect.Methods amp(), chain(), \\ndrywet(), connect(), and \\ndisconnect() are available.\\n\",\n \"extends\": \"p5.Effect\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\nvar noise, env, delay;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n noise = new p5.Noise('brown');\\n noise.amp(0);\\n noise.start();\\n\\n delay = new p5.Delay();\\n\\n // delay.process() accepts 4 parameters:\\n // source, delayTime, feedback, filter frequency\\n // play with these numbers!!\\n delay.process(noise, .12, .7, 2300);\\n\\n // play the noise with an envelope,\\n // a series of fades ( time / value pairs )\\n env = new p5.Envelope(.01, 0.2, .2, .1);\\n}\\n\\n// mouseClick triggers envelope\\nfunction mouseClicked() {\\n // is mouse over canvas?\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n env.play(noise);\\n }\\n}\\n\"\n ]\n },\n \"p5.Reverb\": {\n \"name\": \"p5.Reverb\",\n \"shortname\": \"p5.Reverb\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9749,\n \"description\": \"Reverb adds depth to a sound through a large number of decaying\\nechoes. It creates the perception that sound is occurring in a\\nphysical space. The p5.Reverb has paramters for Time (how long does the\\nreverb last) and decayRate (how much the sound decays with each echo)\\nthat can be set with the .set() or .process() methods. The p5.Convolver\\nextends p5.Reverb allowing you to recreate the sound of actual physical\\nspaces through convolution.\\nThis class extends p5.Effect.\\nMethods amp(), chain(),\\ndrywet(), connect(), and\\ndisconnect() are available.\\n\",\n \"extends\": \"p5.Effect\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\nvar soundFile, reverb;\\nfunction preload() {\\n soundFile = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n reverb = new p5.Reverb();\\n soundFile.disconnect(); // so we'll only hear reverb...\\n\\n // connect soundFile to reverb, process w/\\n // 3 second reverbTime, decayRate of 2%\\n reverb.process(soundFile, 3, 2);\\n soundFile.play();\\n}\\n\"\n ]\n },\n \"p5.Convolver\": {\n \"name\": \"p5.Convolver\",\n \"shortname\": \"p5.Convolver\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9920,\n \"description\": \"p5.Convolver extends p5.Reverb. It can emulate the sound of real\\nphysical spaces through a process called \\nconvolution.\\n\\nConvolution multiplies any audio input by an "impulse response"\\nto simulate the dispersion of sound over time. The impulse response is\\ngenerated from an audio file that you provide. One way to\\ngenerate an impulse response is to pop a balloon in a reverberant space\\nand record the echo. Convolution can also be used to experiment with\\nsound.\\n\\nUse the method createConvolution(path) to instantiate a\\np5.Convolver with a path to your impulse response audio file.\",\n \"extends\": \"p5.Effect\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to a sound file\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to call when loading succeeds\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to call if loading fails.\\n This function will receive an error or\\n XMLHttpRequest object with information\\n about what went wrong.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar cVerb, sound;\\nfunction preload() {\\n // We have both MP3 and OGG versions of all sound assets\\n soundFormats('ogg', 'mp3');\\n\\n // Try replacing 'bx-spring' with other soundfiles like\\n // 'concrete-tunnel' 'small-plate' 'drum' 'beatbox'\\n cVerb = createConvolver('assets/bx-spring.mp3');\\n\\n // Try replacing 'Damscray_DancingTiger' with\\n // 'beat', 'doorbell', lucky_dragons_-_power_melody'\\n sound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n // disconnect from master output...\\n sound.disconnect();\\n\\n // ...and process with cVerb\\n // so that we only hear the convolution\\n cVerb.process(sound);\\n\\n sound.play();\\n}\\n\"\n ]\n },\n \"p5.Phrase\": {\n \"name\": \"p5.Phrase\",\n \"shortname\": \"p5.Phrase\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10476,\n \"description\": \"A phrase is a pattern of musical events over time, i.e.\\na series of notes and rests.\\n\\nPhrases must be added to a p5.Part for playback, and\\neach part can play multiple phrases at the same time.\\nFor example, one Phrase might be a kick drum, another\\ncould be a snare, and another could be the bassline.\\n\\nThe first parameter is a name so that the phrase can be\\nmodified or deleted later. The callback is a a function that\\nthis phrase will call at every step—for example it might be\\ncalled playNote(value){}. The array determines\\nwhich value is passed into the callback at each step of the\\nphrase. It can be numbers, an object with multiple numbers,\\nor a zero (0) indicates a rest so the callback won't be called).\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"Name so that you can access the Phrase.\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"The name of a function that this phrase\\n will call. Typically it will play a sound,\\n and accept two parameters: a time at which\\n to play the sound (in seconds from now),\\n and a value from the sequence array. The\\n time should be passed into the play() or\\n start() method to ensure precision.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"sequence\",\n \"description\": \"Array of values to pass into the callback\\n at each step of the phrase.\\n\",\n \"type\": \"Array\"\n }\n ],\n \"example\": [\n \"\\n\\nvar mySound, myPhrase, myPart;\\nvar pattern = [1,0,0,2,0,2,0,0];\\nvar msg = 'click to play';\\n\\nfunction preload() {\\n mySound = loadSound('assets/beatbox.mp3');\\n}\\n\\nfunction setup() {\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n masterVolume(0.1);\\n\\n myPhrase = new p5.Phrase('bbox', makeSound, pattern);\\n myPart = new p5.Part();\\n myPart.addPhrase(myPhrase);\\n myPart.setBPM(60);\\n}\\n\\nfunction draw() {\\n background(0);\\n text(msg, width/2, height/2);\\n}\\n\\nfunction makeSound(time, playbackRate) {\\n mySound.rate(playbackRate);\\n mySound.play(time);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n myPart.start();\\n msg = 'playing pattern';\\n }\\n}\\n\\n\"\n ]\n },\n \"p5.Part\": {\n \"name\": \"p5.Part\",\n \"shortname\": \"p5.Part\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10561,\n \"description\": \"A p5.Part plays back one or more p5.Phrases. Instantiate a part\\nwith steps and tatums. By default, each step represents a 1/16th note.\\n\\nSee p5.Phrase for more about musical timing.\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"steps\",\n \"description\": \"Steps in the part\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"tatums\",\n \"description\": \"Divisions of a beat, e.g. use 1/4, or 0.25 for a quater note (default is 1/16, a sixteenth note)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar box, drum, myPart;\\nvar boxPat = [1,0,0,2,0,2,0,0];\\nvar drumPat = [0,1,1,0,2,0,1,0];\\nvar msg = 'click to play';\\n\\nfunction preload() {\\n box = loadSound('assets/beatbox.mp3');\\n drum = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n masterVolume(0.1);\\n\\n var boxPhrase = new p5.Phrase('box', playBox, boxPat);\\n var drumPhrase = new p5.Phrase('drum', playDrum, drumPat);\\n myPart = new p5.Part();\\n myPart.addPhrase(boxPhrase);\\n myPart.addPhrase(drumPhrase);\\n myPart.setBPM(60);\\n masterVolume(0.1);\\n}\\n\\nfunction draw() {\\n background(0);\\n text(msg, width/2, height/2);\\n}\\n\\nfunction playBox(time, playbackRate) {\\n box.rate(playbackRate);\\n box.play(time);\\n}\\n\\nfunction playDrum(time, playbackRate) {\\n drum.rate(playbackRate);\\n drum.play(time);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n myPart.start();\\n msg = 'playing part';\\n }\\n}\\n\"\n ]\n },\n \"p5.Score\": {\n \"name\": \"p5.Score\",\n \"shortname\": \"p5.Score\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10814,\n \"description\": \"A Score consists of a series of Parts. The parts will\\nbe played back in order. For example, you could have an\\nA part, a B part, and a C part, and play them back in this order\\nnew p5.Score(a, a, b, a, c)\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"parts\",\n \"description\": \"One or multiple parts, to be played in sequence.\\n\",\n \"type\": \"p5.Part\",\n \"optional\": true,\n \"multiple\": true\n }\n ]\n },\n \"p5.SoundLoop\": {\n \"name\": \"p5.SoundLoop\",\n \"shortname\": \"p5.SoundLoop\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10945,\n \"description\": \"SoundLoop\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"this function will be called on each iteration of theloop\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"interval\",\n \"description\": \"amount of time or beats for each iteration of the loop\\n defaults to 1\\n\",\n \"type\": \"Number|String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar click;\\nvar looper1;\\n\\nfunction preload() {\\n click = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n //the looper's callback is passed the timeFromNow\\n //this value should be used as a reference point from \\n //which to schedule sounds \\n looper1 = new p5.SoundLoop(function(timeFromNow){\\n click.play(timeFromNow);\\n background(255 * (looper1.iterations % 2));\\n }, 2);\\n\\n //stop after 10 iteratios;\\n looper1.maxIterations = 10;\\n //start the loop\\n looper1.start();\\n}\\n\"\n ]\n },\n \"p5.Compressor\": {\n \"name\": \"p5.Compressor\",\n \"shortname\": \"p5.Compressor\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11205,\n \"description\": \"Compressor is an audio effect class that performs dynamics compression\\non an audio input source. This is a very commonly used technique in music\\nand sound production. Compression creates an overall louder, richer, \\nand fuller sound by lowering the volume of louds and raising that of softs.\\nCompression can be used to avoid clipping (sound distortion due to \\npeaks in volume) and is especially useful when many sounds are played \\nat once. Compression can be used on indivudal sound sources in addition\\nto the master output. \\nThis class extends p5.Effect.Methods amp(), chain(), \\ndrywet(), connect(), and \\ndisconnect() are available.\\n\",\n \"is_constructor\": 1,\n \"extends\": \"p5.Effect\"\n },\n \"p5.SoundRecorder\": {\n \"name\": \"p5.SoundRecorder\",\n \"shortname\": \"p5.SoundRecorder\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11417,\n \"description\": \"Record sounds for playback and/or to save as a .wav file.\\nThe p5.SoundRecorder records all sound output from your sketch,\\nor can be assigned a specific source with setInput().\\nThe record() method accepts a p5.SoundFile as a parameter.\\nWhen playback is stopped (either after the given amount of time,\\nor with the stop() method), the p5.SoundRecorder will send its\\nrecording to that p5.SoundFile for playback.\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\nvar mic, recorder, soundFile;\\nvar state = 0;\\n\\nfunction setup() {\\n background(200);\\n // create an audio in\\n mic = new p5.AudioIn();\\n\\n // prompts user to enable their browser mic\\n mic.start();\\n\\n // create a sound recorder\\n recorder = new p5.SoundRecorder();\\n\\n // connect the mic to the recorder\\n recorder.setInput(mic);\\n\\n // this sound file will be used to\\n // playback & save the recording\\n soundFile = new p5.SoundFile();\\n\\n text('keyPress to record', 20, 20);\\n}\\n\\nfunction keyPressed() {\\n // make sure user enabled the mic\\n if (state === 0 && mic.enabled) {\\n\\n // record to our p5.SoundFile\\n recorder.record(soundFile);\\n\\n background(255,0,0);\\n text('Recording!', 20, 20);\\n state++;\\n }\\n else if (state === 1) {\\n background(0,255,0);\\n\\n // stop recorder and\\n // send result to soundFile\\n recorder.stop();\\n\\n text('Stopped', 20, 20);\\n state++;\\n }\\n\\n else if (state === 2) {\\n soundFile.play(); // play the result!\\n save(soundFile, 'mySound.wav');\\n state++;\\n }\\n}\\n\"\n ]\n },\n \"p5.PeakDetect\": {\n \"name\": \"p5.PeakDetect\",\n \"shortname\": \"p5.PeakDetect\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11655,\n \"description\": \"PeakDetect works in conjunction with p5.FFT to\\nlook for onsets in some or all of the frequency spectrum.\\n\\n\\nTo use p5.PeakDetect, call update in the draw loop\\nand pass in a p5.FFT object.\\n\\n\\nYou can listen for a specific part of the frequency spectrum by\\nsetting the range between freq1 and freq2.\\n\\n\\nthreshold is the threshold for detecting a peak,\\nscaled between 0 and 1. It is logarithmic, so 0.1 is half as loud\\nas 1.0.\\n\\n\\nThe update method is meant to be run in the draw loop, and\\nframes determines how many loops must pass before\\nanother peak can be detected.\\nFor example, if the frameRate() = 60, you could detect the beat of a\\n120 beat-per-minute song with this equation:\\n framesPerPeak = 60 / (estimatedBPM / 60 );\\n\\n\\n\\nBased on example contribtued by @b2renger, and a simple beat detection\\nexplanation by Felix Turner.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"freq1\",\n \"description\": \"lowFrequency - defaults to 20Hz\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"freq2\",\n \"description\": \"highFrequency - defaults to 20000 Hz\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"threshold\",\n \"description\": \"Threshold for detecting a beat between 0 and 1\\n scaled logarithmically where 0.1 is 1/2 the loudness\\n of 1.0. Defaults to 0.35.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"framesPerPeak\",\n \"description\": \"Defaults to 20.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nvar cnv, soundFile, fft, peakDetect;\\nvar ellipseWidth = 10;\\n\\nfunction preload() {\\n soundFile = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n\\n // p5.PeakDetect requires a p5.FFT\\n fft = new p5.FFT();\\n peakDetect = new p5.PeakDetect();\\n}\\n\\nfunction draw() {\\n background(0);\\n text('click to play/pause', width/2, height/2);\\n\\n // peakDetect accepts an fft post-analysis\\n fft.analyze();\\n peakDetect.update(fft);\\n\\n if ( peakDetect.isDetected ) {\\n ellipseWidth = 50;\\n } else {\\n ellipseWidth *= 0.95;\\n }\\n\\n ellipse(width/2, height/2, ellipseWidth, ellipseWidth);\\n}\\n\\n// toggle play/stop when canvas is clicked\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n if (soundFile.isPlaying() ) {\\n soundFile.stop();\\n } else {\\n soundFile.play();\\n }\\n }\\n}\\n\"\n ]\n },\n \"p5.Gain\": {\n \"name\": \"p5.Gain\",\n \"shortname\": \"p5.Gain\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11879,\n \"description\": \"A gain node is usefull to set the relative volume of sound.\\nIt's typically used to build mixers.\\n\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\n\\n // load two soundfile and crossfade beetween them\\n var sound1,sound2;\\n var gain1, gain2, gain3;\\n\\n function preload(){\\n soundFormats('ogg', 'mp3');\\n sound1 = loadSound('assets/Damscray_-_Dancing_Tiger_01');\\n sound2 = loadSound('assets/beat.mp3');\\n }\\n\\n function setup() {\\n createCanvas(400,200);\\n\\n // create a 'master' gain to which we will connect both soundfiles\\n gain3 = new p5.Gain();\\n gain3.connect();\\n\\n // setup first sound for playing\\n sound1.rate(1);\\n sound1.loop();\\n sound1.disconnect(); // diconnect from p5 output\\n\\n gain1 = new p5.Gain(); // setup a gain node\\n gain1.setInput(sound1); // connect the first sound to its input\\n gain1.connect(gain3); // connect its output to the 'master'\\n\\n sound2.rate(1);\\n sound2.disconnect();\\n sound2.loop();\\n\\n gain2 = new p5.Gain();\\n gain2.setInput(sound2);\\n gain2.connect(gain3);\\n\\n }\\n\\n function draw(){\\n background(180);\\n\\n // calculate the horizontal distance beetween the mouse and the right of the screen\\n var d = dist(mouseX,0,width,0);\\n\\n // map the horizontal position of the mouse to values useable for volume control of sound1\\n var vol1 = map(mouseX,0,width,0,1);\\n var vol2 = 1-vol1; // when sound1 is loud, sound2 is quiet and vice versa\\n\\n gain1.amp(vol1,0.5,0);\\n gain2.amp(vol2,0.5,0);\\n\\n // map the vertical position of the mouse to values useable for 'master volume control'\\n var vol3 = map(mouseY,0,height,0,1);\\n gain3.amp(vol3,0.5,0);\\n }\\n\\n\"\n ]\n },\n \"p5.AudioVoice\": {\n \"name\": \"p5.AudioVoice\",\n \"shortname\": \"p5.AudioVoice\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12020,\n \"description\": \"Base class for monophonic synthesizers. Any extensions of this class\\nshould follow the API and implement the methods below in order to \\nremain compatible with p5.PolySynth();\\n\",\n \"is_constructor\": 1\n },\n \"p5.MonoSynth\": {\n \"name\": \"p5.MonoSynth\",\n \"shortname\": \"p5.MonoSynth\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12073,\n \"description\": \"A MonoSynth is used as a single voice for sound synthesis.\\nThis is a class to be used in conjunction with the PolySynth\\nclass. Custom synthetisers should be built inheriting from\\nthis class.\\n\",\n \"is_constructor\": 1,\n \"example\": [\n \"\\n\\nvar monoSynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n monoSynth = new p5.MonoSynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // time from now (in seconds)\\n var time = 0;\\n // note duration (in seconds)\\n var dur = 0.25;\\n // velocity (volume, from 0 to 1)\\n var v = 0.2;\\n\\n monoSynth.play(\\\"G3\\\", v, time, dur);\\n monoSynth.play(\\\"C4\\\", v, time += dur, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n\"\n ]\n },\n \"p5.PolySynth\": {\n \"name\": \"p5.PolySynth\",\n \"shortname\": \"p5.PolySynth\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12362,\n \"description\": \"An AudioVoice is used as a single voice for sound synthesis.\\nThe PolySynth class holds an array of AudioVoice, and deals\\nwith voices allocations, with setting notes to be played, and\\nparameters to be set.\\n\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"synthVoice\",\n \"description\": \"A monophonic synth voice inheriting\\n the AudioVoice class. Defaults to p5.MonoSynth\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"maxVoices\",\n \"description\": \"Number of voices, defaults to 8;\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar polySynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n polySynth = new p5.PolySynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // note duration (in seconds)\\n var dur = 1.5;\\n\\n // time from now (in seconds)\\n var time = 0;\\n\\n // velocity (volume, from 0 to 1)\\n var vel = 0.1;\\n\\n // notes can overlap with each other\\n polySynth.play(\\\"G2\\\", vel, 0, dur);\\n polySynth.play(\\\"C3\\\", vel, time += 1/3, dur);\\n polySynth.play(\\\"G3\\\", vel, time += 1/3, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n\"\n ]\n },\n \"p5.Distortion\": {\n \"name\": \"p5.Distortion\",\n \"shortname\": \"p5.Distortion\",\n \"classitems\": [],\n \"plugins\": [],\n \"extensions\": [],\n \"plugin_for\": [],\n \"extension_for\": [],\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\",\n \"namespace\": \"\",\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12767,\n \"description\": \"A Distortion effect created with a Waveshaper Node,\\nwith an approach adapted from\\nKevin Ennis\\nThis class extends p5.Effect.Methods amp(), chain(), \\ndrywet(), connect(), and \\ndisconnect() are available.\\n\",\n \"extends\": \"p5.Effect\",\n \"is_constructor\": 1,\n \"params\": [\n {\n \"name\": \"amount\",\n \"description\": \"Unbounded distortion amount.\\n Normal values range from 0-1.\\n\",\n \"type\": \"Number\",\n \"optional\": true,\n \"optdefault\": \"0.25\"\n },\n {\n \"name\": \"oversample\",\n \"description\": \"'none', '2x', or '4x'.\\n\",\n \"type\": \"String\",\n \"optional\": true,\n \"optdefault\": \"'none'\"\n }\n ]\n }\n },\n \"elements\": {},\n \"classitems\": [\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 10,\n \"description\": \"Conversions adapted from http://www.easyrgb.com/en/math.php.\\nIn these functions, hue is always in the range [0, 1], just like all other\\ncomponents are in the range [0, 1]. 'Brightness' and 'value' are used\\ninterchangeably.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 21,\n \"description\": \"Convert an HSBA array to HSLA.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 47,\n \"description\": \"Convert an HSBA array to RGBA.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 102,\n \"description\": \"Convert an HSLA array to HSBA.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 125,\n \"description\": \"Convert an HSLA array to RGBA.\\nWe need to change basis from HSLA to something that can be more easily be\\nprojected onto RGBA. We will choose hue and brightness as our first two\\ncomponents, and pick a convenient third one ('zest') so that we don't need\\nto calculate formal HSBA saturation.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 189,\n \"description\": \"Convert an RGBA array to HSBA.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/color_conversion.js\",\n \"line\": 228,\n \"description\": \"Convert an RGBA array to HSLA.\\n\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Color Conversion\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 16,\n \"description\": \"Extracts the alpha value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"alpha\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the alpha value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoStroke();\\nlet c = color(0, 126, 255, 102);\\nfill(c);\\nrect(15, 15, 35, 70);\\nlet value = alpha(c); // Sets 'value' to 102\\nfill(value);\\nrect(50, 15, 35, 70);\\n\\n\"\n ],\n \"alt\": \"Left half of canvas light blue and right half light charcoal grey.\\nLeft half of canvas light purple and right half a royal blue.\\nLeft half of canvas salmon pink and the right half white.\\nYellow rect in middle right of canvas, with 55 pixel width and height.\\nYellow ellipse in top left canvas, black ellipse in bottom right,both 80x80.\\nBright fuchsia rect in middle of canvas, 60 pixel width and height.\\nTwo bright green rects on opposite sides of the canvas, both 45x80.\\nFour blue rects in each corner of the canvas, each are 35x35.\\nBright sea green rect on left and darker rect on right of canvas, both 45x80.\\nDark green rect on left and light green rect on right of canvas, both 45x80.\\nDark blue rect on left and light teal rect on right of canvas, both 45x80.\\nblue rect on left and green on right, both with black outlines & 35x60.\\nsalmon pink rect on left and black on right, both 35x60.\\n4 rects, tan, brown, brownish purple and purple, with white outlines & 20x60.\\nlight pastel green rect on left and dark grey rect on right, both 35x60.\\nyellow rect on left and red rect on right, both with black outlines & 35x60.\\ngrey canvas\\ndeep pink rect on left and grey rect on right, both 35x60.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 61,\n \"description\": \"Extracts the blue value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"blue\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the blue value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet c = color(175, 100, 220); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet blueValue = blue(c); // Get blue in 'c'\\nprint(blueValue); // Prints \\\"220.0\\\"\\nfill(0, 0, blueValue); // Use 'blueValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n\\n\"\n ],\n \"alt\": \"Left half of canvas light purple and right half a royal blue.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 91,\n \"description\": \"Extracts the HSB brightness value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"brightness\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the brightness value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = brightness(c); // Sets 'value' to 255\\nfill(value);\\nrect(50, 20, 35, 60);\\n\\n\\n\\n\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color('hsb(60, 100%, 50%)');\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = brightness(c); // A 'value' of 50% is 127.5\\nfill(value);\\nrect(50, 20, 35, 60);\\n\\n\"\n ],\n \"alt\": \"Left half of canvas salmon pink and the right half white.\\nLeft half of canvas yellow at half brightness and the right gray .\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 134,\n \"description\": \"Creates colors for storing in variables of the color datatype. The\\nparameters are interpreted as RGB or HSB values depending on the\\ncurrent colorMode(). The default mode is RGB values from 0 to 255\\nand, therefore, the function call color(255, 204, 0) will return a\\nbright yellow color.\\n\\nNote that if only one value is provided to color(), it will be interpreted\\nas a grayscale value. Add a second value, and it will be used for alpha\\ntransparency. When three values are specified, they are interpreted as\\neither RGB or HSB values. Adding a fourth value applies alpha\\ntransparency.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color\\nstrings and all named color strings are supported. In this case, an alpha\\nnumber value as a second argument is not supported, the RGBA form should be\\nused.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"color\",\n \"return\": {\n \"description\": \"resulting color\",\n \"type\": \"p5.Color\"\n },\n \"example\": [\n \"\\n\\n\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nrect(30, 20, 55, 55); // Draw rectangle\\n\\n\\n\\n\\n\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nellipse(25, 25, 80, 80); // Draw left circle\\n\\n// Using only one value with color()\\n// generates a grayscale value.\\nc = color(65); // Update 'c' with grayscale value\\nfill(c); // Use updated 'c' as fill color\\nellipse(75, 75, 80, 80); // Draw right circle\\n\\n\\n\\n\\n\\n// Named SVG & CSS colors may be used,\\nlet c = color('magenta');\\nfill(c); // Use 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nrect(20, 20, 60, 60); // Draw rectangle\\n\\n\\n\\n\\n\\n// as can hex color codes:\\nnoStroke(); // Don't draw a stroke around shapes\\nlet c = color('#0f0');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('#00ff00');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n\\n\\n\\n\\n\\n// RGB and RGBA color strings are also supported:\\n// these all set to the same color (solid blue)\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('rgb(0,0,255)');\\nfill(c); // Use 'c' as fill color\\nrect(10, 10, 35, 35); // Draw rectangle\\n\\nc = color('rgb(0%, 0%, 100%)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 35, 35); // Draw rectangle\\n\\nc = color('rgba(0, 0, 255, 1)');\\nfill(c); // Use updated 'c' as fill color\\nrect(10, 55, 35, 35); // Draw rectangle\\n\\nc = color('rgba(0%, 0%, 100%, 1)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 55, 35, 35); // Draw rectangle\\n\\n\\n\\n\\n\\n// HSL color is also supported and can be specified\\n// by value\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('hsl(160, 100%, 50%)');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('hsla(160, 100%, 50%, 0.5)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n\\n\\n\\n\\n\\n// HSB color is also supported and can be specified\\n// by value\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('hsb(160, 100%, 50%)');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('hsba(160, 100%, 50%, 0.5)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n\\n\\n\\n\\n\\nlet c; // Declare color 'c'\\nnoStroke(); // Don't draw a stroke around shapes\\n\\n// If no colorMode is specified, then the\\n// default of RGB with scale of 0-255 is used.\\nc = color(50, 55, 100); // Create a color for 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(0, 10, 45, 80); // Draw left rect\\n\\ncolorMode(HSB, 100); // Use HSB with scale of 0-100\\nc = color(50, 55, 100); // Update 'c' with new color\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw right rect\\n\\n\"\n ],\n \"alt\": \"Yellow rect in middle right of canvas, with 55 pixel width and height.\\nYellow ellipse in top left of canvas, black ellipse in bottom right,both 80x80.\\nBright fuchsia rect in middle of canvas, 60 pixel width and height.\\nTwo bright green rects on opposite sides of the canvas, both 45x80.\\nFour blue rects in each corner of the canvas, each are 35x35.\\nBright sea green rect on left and darker rect on right of canvas, both 45x80.\\nDark green rect on left and lighter green rect on right of canvas, both 45x80.\\nDark blue rect on left and light teal rect on right of canvas, both 45x80.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\",\n \"overloads\": [\n {\n \"line\": 134,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"number specifying value between white\\n and black.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"alpha value relative to current color range\\n (default is 0-255)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"resulting color\",\n \"type\": \"p5.Color\"\n }\n },\n {\n \"line\": 293,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value relative to\\n the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Color\"\n }\n },\n {\n \"line\": 305,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"a color string\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Color\"\n }\n },\n {\n \"line\": 310,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red,green,blue &\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Color\"\n }\n },\n {\n \"line\": 316,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"\",\n \"type\": \"p5.Color\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Color\"\n }\n }\n ]\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 332,\n \"description\": \"Extracts the green value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"green\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the green value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet c = color(20, 75, 200); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet greenValue = green(c); // Get green in 'c'\\nprint(greenValue); // Print \\\"75.0\\\"\\nfill(0, greenValue, 0); // Use 'greenValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n\\n\"\n ],\n \"alt\": \"blue rect on left and green on right, both with black outlines & 35x60.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 363,\n \"description\": \"Extracts the hue value from a color or pixel array.\\nHue exists in both HSB and HSL. This function will return the\\nHSB-normalized hue when supplied with an HSB color object (or when supplied\\nwith a pixel array while the color mode is HSB), but will default to the\\nHSL-normalized hue otherwise. (The values will only be different if the\\nmaximum hue setting for each system is different.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hue\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the hue\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = hue(c); // Sets 'value' to \\\"0\\\"\\nfill(value);\\nrect(50, 20, 35, 60);\\n\\n\"\n ],\n \"alt\": \"salmon pink rect on left and black on right, both 35x60.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 400,\n \"description\": \"Blends two colors to find a third color somewhere between them. The amt\\nparameter is the amount to interpolate between the two values where 0.0\\nequal to the first color, 0.1 is very near the first color, 0.5 is halfway\\nin between, etc. An amount below 0 will be treated as 0. Likewise, amounts\\nabove 1 will be capped at 1. This is different from the behavior of lerp(),\\nbut necessary because otherwise numbers outside the range will produce\\nstrange and unexpected colors.\\n\\nThe way that colours are interpolated depends on the current color mode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lerpColor\",\n \"params\": [\n {\n \"name\": \"c1\",\n \"description\": \"interpolate from this color\\n\",\n \"type\": \"p5.Color\"\n },\n {\n \"name\": \"c2\",\n \"description\": \"interpolate to this color\\n\",\n \"type\": \"p5.Color\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"number between 0 and 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"interpolated color\",\n \"type\": \"p5.Color\"\n },\n \"example\": [\n \"\\n\\n\\ncolorMode(RGB);\\nstroke(255);\\nbackground(51);\\nlet from = color(218, 165, 32);\\nlet to = color(72, 61, 139);\\ncolorMode(RGB); // Try changing to HSB.\\nlet interA = lerpColor(from, to, 0.33);\\nlet interB = lerpColor(from, to, 0.66);\\nfill(from);\\nrect(10, 20, 20, 60);\\nfill(interA);\\nrect(30, 20, 20, 60);\\nfill(interB);\\nrect(50, 20, 20, 60);\\nfill(to);\\nrect(70, 20, 20, 60);\\n\\n\"\n ],\n \"alt\": \"4 rects one tan, brown, brownish purple, purple, with white outlines & 20x60\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 497,\n \"description\": \"Extracts the HSL lightness value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lightness\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the lightness\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoStroke();\\ncolorMode(HSL);\\nlet c = color(156, 100, 50, 1);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = lightness(c); // Sets 'value' to 50\\nfill(value);\\nrect(50, 20, 35, 60);\\n\\n\"\n ],\n \"alt\": \"light pastel green rect on left and dark grey rect on right, both 35x60.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 527,\n \"description\": \"Extracts the red value from a color or pixel array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"red\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the red value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet redValue = red(c); // Get red in 'c'\\nprint(redValue); // Print \\\"255.0\\\"\\nfill(redValue, 0, 0); // Use 'redValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n\\n\\n\\n\\n\\ncolorMode(RGB, 255); // Sets the range for red, green, and blue to 255\\nlet c = color(127, 255, 0);\\ncolorMode(RGB, 1); // Sets the range for red, green, and blue to 1\\nlet myColor = red(c);\\nprint(myColor); // 0.4980392156862745\\n\\n\"\n ],\n \"alt\": \"yellow rect on left and red rect on right, both with black outlines and 35x60.\\ngrey canvas\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/creating_reading.js\",\n \"line\": 567,\n \"description\": \"Extracts the saturation value from a color or pixel array.\\nSaturation is scaled differently in HSB and HSL. This function will return\\nthe HSB saturation when supplied with an HSB color object (or when supplied\\nwith a pixel array while the color mode is HSB), but will default to the\\nHSL saturation otherwise.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saturation\",\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"p5.Color object, color components,\\n or CSS color\\n\",\n \"type\": \"p5.Color|Number[]|String\"\n }\n ],\n \"return\": {\n \"description\": \"the saturation value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = saturation(c); // Sets 'value' to 126\\nfill(value);\\nrect(50, 20, 35, 60);\\n\\n\"\n ],\n \"alt\": \"deep pink rect on left and grey rect on right, both 35x60.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 52,\n \"description\": \"This function returns the color formatted as a string. This can be useful\\nfor debugging, or for using p5.js with other libraries.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toString\",\n \"params\": [\n {\n \"name\": \"format\",\n \"description\": \"How the color string will be formatted.\\nLeaving this empty formats the string as rgba(r, g, b, a).\\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the formatted string\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nlet myColor;\\nfunction setup() {\\n createCanvas(200, 200);\\n stroke(255);\\n myColor = color(100, 100, 250);\\n fill(myColor);\\n}\\n\\nfunction draw() {\\n rotate(HALF_PI);\\n text(myColor.toString(), 0, -5);\\n text(myColor.toString('#rrggbb'), 0, -30);\\n text(myColor.toString('rgba%'), 0, -55);\\n}\\n\\n\"\n ],\n \"alt\": \"canvas with text representation of color\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 253,\n \"itemtype\": \"method\",\n \"name\": \"setRed\",\n \"params\": [\n {\n \"name\": \"red\",\n \"description\": \"the new red value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setRed(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n\\n\"\n ],\n \"alt\": \"canvas with gradually changing background color\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 280,\n \"itemtype\": \"method\",\n \"name\": \"setGreen\",\n \"params\": [\n {\n \"name\": \"green\",\n \"description\": \"the new green value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n\\n\"\n ],\n \"alt\": \"canvas with gradually changing background color\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 307,\n \"itemtype\": \"method\",\n \"name\": \"setBlue\",\n \"params\": [\n {\n \"name\": \"blue\",\n \"description\": \"the new blue value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n\\n\"\n ],\n \"alt\": \"canvas with gradually changing background color\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 334,\n \"itemtype\": \"method\",\n \"name\": \"setAlpha\",\n \"params\": [\n {\n \"name\": \"alpha\",\n \"description\": \"the new alpha value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet squareColor;\\n\\nfunction setup() {\\n ellipseMode(CORNERS);\\n strokeWeight(4);\\n squareColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n background(255);\\n\\n noFill();\\n stroke(0);\\n ellipse(10, 10, width - 10, height - 10);\\n\\n squareColor.setAlpha(128 + 128 * sin(millis() / 1000));\\n fill(squareColor);\\n noStroke();\\n rect(13, 13, width - 26, height - 26);\\n}\\n\\n\"\n ],\n \"alt\": \"circle behind a square with gradually changing opacity\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 415,\n \"description\": \"Hue is the same in HSB and HSL, but the maximum value may be different.\\nThis function will return the HSB-normalized saturation when supplied with\\nan HSB color object, but will default to the HSL-normalized saturation\\notherwise.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 446,\n \"description\": \"Saturation is scaled differently in HSB and HSL. This function will return\\nthe HSB saturation when supplied with an HSB color object, but will default\\nto the HSL saturation otherwise.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 465,\n \"description\": \"CSS named colors.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 618,\n \"description\": \"These regular expressions are used to build up the patterns for matching\\nviable CSS color strings: fragmenting the regexes in this way increases the\\nlegibility and comprehensibility of the code.\\nNote that RGB values of .9 are not parsed by IE, but are supported here for\\ncolor string consistency.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 631,\n \"description\": \"Full color string patterns. The capture groups are necessary.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/p5.Color.js\",\n \"line\": 994,\n \"description\": \"For HSB and HSL, interpret the gray level as a brightness/lightness\\nvalue (they are equivalent when chroma is zero). For RGB, normalize the\\ngray level according to the blue maximum.\\n\",\n \"class\": \"p5.Color\",\n \"module\": \"Color\",\n \"submodule\": \"Creating & Reading\"\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 15,\n \"description\": \"The background() function sets the color used for the background of the\\np5.js canvas. The default background is transparent. This function is\\ntypically used within draw() to clear the display window at the beginning\\nof each frame, but it can be used inside setup() to set the background on\\nthe first frame of animation or if the background need only be set once.\\n\\nThe color is either specified in terms of the RGB, HSB, or HSL color\\ndepending on the current colorMode. (The default color space is RGB, with\\neach value in the range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color strings\\nand all named color strings are supported. In this case, an alpha number\\nvalue as a second argument is not supported, the RGBA form should be used.\\n\\nA p5.Color object can also be provided to set the background color.\\n\\nA p5.Image can also be provided to set the background image.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"background\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Grayscale integer value\\nbackground(51);\\n\\n\\n\\n\\n\\n// R, G & B integer values\\nbackground(255, 204, 0);\\n\\n\\n\\n\\n\\n// H, S & B integer values\\ncolorMode(HSB);\\nbackground(255, 204, 100);\\n\\n\\n\\n\\n\\n// Named SVG/CSS color string\\nbackground('red');\\n\\n\\n\\n\\n\\n// three-digit hexadecimal RGB notation\\nbackground('#fae');\\n\\n\\n\\n\\n\\n// six-digit hexadecimal RGB notation\\nbackground('#222222');\\n\\n\\n\\n\\n\\n// integer RGB notation\\nbackground('rgb(0,255,0)');\\n\\n\\n\\n\\n\\n// integer RGBA notation\\nbackground('rgba(0,255,0, 0.25)');\\n\\n\\n\\n\\n\\n// percentage RGB notation\\nbackground('rgb(100%,0%,10%)');\\n\\n\\n\\n\\n\\n// percentage RGBA notation\\nbackground('rgba(100%,0%,100%,0.5)');\\n\\n\\n\\n\\n\\n// p5 Color object\\nbackground(color(0, 0, 255));\\n\\n\"\n ],\n \"alt\": \"canvas with darkest charcoal grey background.\\ncanvas with yellow background.\\ncanvas with royal blue background.\\ncanvas with red background.\\ncanvas with pink background.\\ncanvas with black background.\\ncanvas with bright green background.\\ncanvas with soft green background.\\ncanvas with red background.\\ncanvas with light purple background.\\ncanvas with blue background.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\",\n \"overloads\": [\n {\n \"line\": 15,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"any value created by the color() function\\n\",\n \"type\": \"p5.Color\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 131,\n \"params\": [\n {\n \"name\": \"colorstring\",\n \"description\": \"color string, possible formats include: integer\\n rgb() or rgba(), percentage rgb() or rgba(),\\n 3-digit hex, 6-digit hex\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"a\",\n \"description\": \"opacity of the background relative to current\\n color range (default is 0-255)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 141,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"specifies a value between white and black\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"a\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 148,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value (depending on the current color\\n mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value (depending on the current\\n color mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value (depending on the current\\n color mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"a\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 160,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red, green, blue\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 167,\n \"params\": [\n {\n \"name\": \"image\",\n \"description\": \"image created with loadImage() or createImage(),\\n to set as background\\n (must be same size as the sketch window)\\n\",\n \"type\": \"p5.Image\"\n },\n {\n \"name\": \"a\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 181,\n \"description\": \"Clears the pixels within a buffer. This function only clears the canvas.\\nIt will not clear objects created by createX() methods such as\\ncreateVideo() or createDiv().\\nUnlike the main graphics context, pixels in additional graphics areas created\\nwith createGraphics() can be entirely\\nor partially transparent. This function clears everything to make all of\\nthe pixels 100% transparent.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clear\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Clear the screen on mouse press.\\nfunction setup() {\\n createCanvas(100, 100);\\n}\\n\\nfunction draw() {\\n ellipse(mouseX, mouseY, 20, 20);\\n}\\n\\nfunction mousePressed() {\\n clear();\\n}\\n\\n\"\n ],\n \"alt\": \"20x20 white ellipses are continually drawn at mouse x and y coordinates.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\"\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 220,\n \"description\": \"colorMode() changes the way p5.js interprets color data. By default, the\\nparameters for fill(), stroke(), background(), and color() are defined by\\nvalues between 0 and 255 using the RGB color model. This is equivalent to\\nsetting colorMode(RGB, 255). Setting colorMode(HSB) lets you use the HSB\\nsystem instead. By default, this is colorMode(HSB, 360, 100, 100, 1). You\\ncan also use HSL.\\n\\nNote: existing color objects remember the mode that they were created in,\\nso you can change modes as you like without affecting their appearance.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"colorMode\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoStroke();\\ncolorMode(RGB, 100);\\nfor (let i = 0; i < 100; i++) {\\n for (let j = 0; j < 100; j++) {\\n stroke(i, j, 0);\\n point(i, j);\\n }\\n}\\n\\n\\n\\n\\n\\nnoStroke();\\ncolorMode(HSB, 100);\\nfor (let i = 0; i < 100; i++) {\\n for (let j = 0; j < 100; j++) {\\n stroke(i, j, 100);\\n point(i, j);\\n }\\n}\\n\\n\\n\\n\\n\\ncolorMode(RGB, 255);\\nlet c = color(127, 255, 0);\\n\\ncolorMode(RGB, 1);\\nlet myColor = c._getRed();\\ntext(myColor, 10, 10, 80, 80);\\n\\n\\n\\n\\n\\nnoFill();\\ncolorMode(RGB, 255, 255, 255, 1);\\nbackground(255);\\n\\nstrokeWeight(4);\\nstroke(255, 0, 10, 0.3);\\nellipse(40, 40, 50, 50);\\nellipse(50, 50, 40, 40);\\n\\n\"\n ],\n \"alt\": \"Green to red gradient from bottom L to top R. shading originates from top left.\\nRainbow gradient from left to right. Brightness increasing to white at top.\\nunknown image.\\n50x50 ellipse at middle L & 40x40 ellipse at center. Translucent pink outlines.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\",\n \"overloads\": [\n {\n \"line\": 220,\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either RGB, HSB or HSL, corresponding to\\n Red/Green/Blue and Hue/Saturation/Brightness\\n (or Lightness)\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"max\",\n \"description\": \"range for all values\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 297,\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"max1\",\n \"description\": \"range for the red or hue depending on the\\n current color mode\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"max2\",\n \"description\": \"range for the green or saturation depending\\n on the current color mode\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"max3\",\n \"description\": \"range for the blue or brightness/lightness\\n depending on the current color mode\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"maxA\",\n \"description\": \"range for the alpha\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 341,\n \"description\": \"Sets the color used to fill shapes. For example, if you run\\nfill(204, 102, 0), all subsequent shapes will be filled with orange. This\\ncolor is either specified in terms of the RGB or HSB color depending on\\nthe current colorMode(). (The default color space is RGB, with each value\\nin the range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color strings\\nand all named color strings are supported. In this case, an alpha number\\nvalue as a second argument is not supported, the RGBA form should be used.\\n\\nA p5 Color object can also be provided to set the fill color.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"fill\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Grayscale integer value\\nfill(51);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// R, G & B integer values\\nfill(255, 204, 0);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// H, S & B integer values\\ncolorMode(HSB);\\nfill(255, 204, 100);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// Named SVG/CSS color string\\nfill('red');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// three-digit hexadecimal RGB notation\\nfill('#fae');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// six-digit hexadecimal RGB notation\\nfill('#222222');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// integer RGB notation\\nfill('rgb(0,255,0)');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// integer RGBA notation\\nfill('rgba(0,255,0, 0.25)');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// percentage RGB notation\\nfill('rgb(100%,0%,10%)');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// percentage RGBA notation\\nfill('rgba(100%,0%,100%,0.5)');\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// p5 Color object\\nfill(color(0, 0, 255));\\nrect(20, 20, 60, 60);\\n\\n\"\n ],\n \"alt\": \"60x60 dark charcoal grey rect with black outline in center of canvas.\\n60x60 yellow rect with black outline in center of canvas.\\n60x60 royal blue rect with black outline in center of canvas.\\n60x60 red rect with black outline in center of canvas.\\n60x60 pink rect with black outline in center of canvas.\\n60x60 black rect with black outline in center of canvas.\\n60x60 light green rect with black outline in center of canvas.\\n60x60 soft green rect with black outline in center of canvas.\\n60x60 red rect with black outline in center of canvas.\\n60x60 dark fuchsia rect with black outline in center of canvas.\\n60x60 blue rect with black outline in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\",\n \"overloads\": [\n {\n \"line\": 341,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value relative to\\n the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 466,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"a color string\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 472,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"a gray value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 479,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red,green,blue &\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 486,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"the fill color\\n\",\n \"type\": \"p5.Color\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 498,\n \"description\": \"Disables filling geometry. If both noStroke() and noFill() are called,\\nnothing will be drawn to the screen.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noFill\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nrect(15, 10, 55, 55);\\nnoFill();\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n noFill();\\n stroke(100, 100, 240);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(45, 45, 45);\\n}\\n\\n\"\n ],\n \"alt\": \"white rect top middle and noFill rect center. Both 60x60 with black outlines.\\nblack canvas with purple cube wireframe spinning\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\"\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 539,\n \"description\": \"Disables drawing the stroke (outline). If both noStroke() and noFill()\\nare called, nothing will be drawn to the screen.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noStroke\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoStroke();\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n noStroke();\\n fill(240, 150, 150);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(45, 45, 45);\\n}\\n\\n\"\n ],\n \"alt\": \"60x60 white rect at center. no outline.\\nblack canvas with pink cube spinning\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\"\n },\n {\n \"file\": \"src/color/setting.js\",\n \"line\": 579,\n \"description\": \"Sets the color used to draw lines and borders around shapes. This color\\nis either specified in terms of the RGB or HSB color depending on the\\ncurrent colorMode() (the default color space is RGB, with each value in\\nthe range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color\\nstrings and all named color strings are supported. In this case, an alpha\\nnumber value as a second argument is not supported, the RGBA form should be\\nused.\\n\\nA p5 Color object can also be provided to set the stroke color.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stroke\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Grayscale integer value\\nstrokeWeight(4);\\nstroke(51);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// R, G & B integer values\\nstroke(255, 204, 0);\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// H, S & B integer values\\ncolorMode(HSB);\\nstrokeWeight(4);\\nstroke(255, 204, 100);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// Named SVG/CSS color string\\nstroke('red');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// three-digit hexadecimal RGB notation\\nstroke('#fae');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// six-digit hexadecimal RGB notation\\nstroke('#222222');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// integer RGB notation\\nstroke('rgb(0,255,0)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// integer RGBA notation\\nstroke('rgba(0,255,0,0.25)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// percentage RGB notation\\nstroke('rgb(100%,0%,10%)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// percentage RGBA notation\\nstroke('rgba(100%,0%,100%,0.5)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\\n\\n\\n\\n// p5 Color object\\nstroke(color(0, 0, 255));\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n\\n\"\n ],\n \"alt\": \"60x60 white rect at center. Dark charcoal grey outline.\\n60x60 white rect at center. Yellow outline.\\n60x60 white rect at center. Royal blue outline.\\n60x60 white rect at center. Red outline.\\n60x60 white rect at center. Pink outline.\\n60x60 white rect at center. Black outline.\\n60x60 white rect at center. Bright green outline.\\n60x60 white rect at center. Soft green outline.\\n60x60 white rect at center. Red outline.\\n60x60 white rect at center. Dark fuchsia outline.\\n60x60 white rect at center. Blue outline.\",\n \"class\": \"p5\",\n \"module\": \"Color\",\n \"submodule\": \"Setting\",\n \"overloads\": [\n {\n \"line\": 579,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value relative to\\n the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 718,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"a color string\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 724,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"a gray value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 731,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red,green,blue &\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 738,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"the stroke color\\n\",\n \"type\": \"p5.Color\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 16,\n \"description\": \"This function does 3 things:\\n\\nBounds the desired start/stop angles for an arc (in radians) so that:\\n0 <= start < TWO_PI ; start <= stop < start + TWO_PI\\nThis means that the arc rendering functions don't have to be concerned\\nwith what happens if stop is smaller than start, or if the arc 'goes\\nround more than once', etc.: they can just start at start and increase\\nuntil stop and the correct arc will be drawn.\\n\\nOptionally adjusts the angles within each quadrant to counter the naive\\nscaling of the underlying ellipse up from the unit circle. Without\\nthis, the angles become arbitrary when width != height: 45 degrees\\nmight be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on\\na 'tall' ellipse.\\n\\nFlags up when start and stop correspond to the same place on the\\nunderlying ellipse. This is useful if you want to do something special\\nthere (like rendering a whole ellipse instead).\\n\\n\\n\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 102,\n \"description\": \"Draw an arc to the screen. If called with only x, y, w, h, start, and\\nstop, the arc will be drawn and filled as an open pie segment. If a mode parameter is provided, the arc\\nwill be filled like an open semi-circle (OPEN) , a closed semi-circle (CHORD), or as a closed pie segment (PIE). The\\norigin may be changed with the ellipseMode() function.\\nThe arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.\\nAdding or subtracting TWO_PI to either angle does not change where they fall.\\nIf both start and stop fall at the same place, a full ellipse will be drawn.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"arc\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the arc's ellipse\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the arc's ellipse\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"width of the arc's ellipse by default\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the arc's ellipse by default\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"start\",\n \"description\": \"angle to start the arc, specified in radians\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"stop\",\n \"description\": \"angle to stop the arc, specified in radians\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"mode\",\n \"description\": \"optional parameter to determine the way of drawing\\n the arc. either CHORD, PIE or OPEN\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n },\n {\n \"name\": \"detail\",\n \"description\": \"optional parameter for WebGL mode only. This is to\\n specify the number of vertices that makes up the\\n perimeter of the arc. Default value is 25.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\narc(50, 55, 50, 50, 0, HALF_PI);\\nnoFill();\\narc(50, 55, 60, 60, HALF_PI, PI);\\narc(50, 55, 70, 70, PI, PI + QUARTER_PI);\\narc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\\n\\n\\n\\n\\n\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI);\\n\\n\\n\\n\\n\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\\n\\n\\n\\n\\n\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\\n\\n\\n\\n\\n\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\\n\\n\"\n ],\n \"alt\": \"shattered outline of an ellipse with a quarter of a white circle bottom-right.\\nwhite ellipse with top right quarter missing.\\nwhite ellipse with black outline with top right missing.\\nwhite ellipse with top right missing with black outline around shape.\\nwhite ellipse with top right quarter missing with black outline around the shape.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 210,\n \"description\": \"Draws an ellipse (oval) to the screen. An ellipse with equal width and\\nheight is a circle. By default, the first two parameters set the location,\\nand the third and fourth parameters set the shape's width and height. If\\nno height is specified, the value of width is used for both the width and\\nheight. If a negative height or width is specified, the absolute value is taken.\\nThe origin may be changed with the ellipseMode() function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ellipse\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nellipse(56, 46, 55, 55);\\n\\n\"\n ],\n \"alt\": \"white ellipse with black outline in middle-right of canvas that is 55x55.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\",\n \"overloads\": [\n {\n \"line\": 210,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the ellipse.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the ellipse.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"width of the ellipse.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the ellipse.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 235,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"detail\",\n \"description\": \"number of radial sectors to draw (for WebGL mode)\\n\",\n \"type\": \"Integer\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 270,\n \"description\": \"Draws a circle to the screen. A circle is a simple closed shape.\\nIt is the set of all points in a plane that are at a given distance from a given point, the centre.\\nThis function is a special case of the ellipse() function, where the width and height of the ellipse are the same.\\nHeight and width of the ellipse correspond to the diameter of the circle.\\nBy default, the first two parameters set the location of the centre of the circle, the third sets the diameter of the circle.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"circle\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the centre of the circle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the centre of the circle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"diameter of the circle.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Draw a circle at location (30, 30) with a diameter of 20.\\ncircle(30, 30, 20);\\n\\n\"\n ],\n \"alt\": \"white circle with black outline in mid of canvas that is 55x55.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 300,\n \"description\": \"Draws a line (a direct path between two points) to the screen. The version\\nof line() with four parameters draws the line in 2D. To color a line, use\\nthe stroke() function. A line cannot be filled, therefore the fill()\\nfunction will not affect the color of a line. 2D lines are drawn with a\\nwidth of one pixel by default, but this can be changed with the\\nstrokeWeight() function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"line\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nline(30, 20, 85, 75);\\n\\n\\n\\n\\n\\nline(30, 20, 85, 20);\\nstroke(126);\\nline(85, 20, 85, 75);\\nstroke(255);\\nline(85, 75, 30, 75);\\n\\n\"\n ],\n \"alt\": \"line 78 pixels long running from mid-top to bottom-right of canvas.\\n3 lines of various stroke sizes. Form top, bottom and right sides of a square.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\",\n \"overloads\": [\n {\n \"line\": 300,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"the x-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"the y-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"the x-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"the y-coordinate of the second point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 336,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z1\",\n \"description\": \"the z-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"the z-coordinate of the second point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 356,\n \"description\": \"Draws a point, a coordinate in space at the dimension of one pixel.\\nThe first parameter is the horizontal value for the point, the second\\nvalue is the vertical value for the point. The color of the point is\\ndetermined by the current stroke.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"point\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x-coordinate\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"the y-coordinate\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"the z-coordinate (for WebGL mode)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\npoint(30, 20);\\npoint(85, 20);\\npoint(85, 75);\\npoint(30, 75);\\n\\n\"\n ],\n \"alt\": \"4 points centered in the middle-right of the canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 391,\n \"description\": \"Draw a quad. A quad is a quadrilateral, a four sided polygon. It is\\nsimilar to a rectangle, but the angles between its edges are not\\nconstrained to ninety degrees. The first pair of parameters (x1,y1)\\nsets the first vertex and the subsequent pairs should proceed\\nclockwise or counter-clockwise around the defined shape.\\nz-arguments only work when quad() is used in WEBGL mode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"quad\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nquad(38, 31, 86, 20, 69, 63, 30, 76);\\n\\n\"\n ],\n \"alt\": \"irregular white quadrilateral shape with black outline mid-right of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\",\n \"overloads\": [\n {\n \"line\": 391,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"the x-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"the y-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"the x-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"the y-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"the x-coordinate of the third point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"the y-coordinate of the third point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"the x-coordinate of the fourth point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"the y-coordinate of the fourth point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 421,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z1\",\n \"description\": \"the z-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"the z-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z3\",\n \"description\": \"the z-coordinate of the third point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z4\",\n \"description\": \"the z-coordinate of the fourth point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 458,\n \"description\": \"Draws a rectangle to the screen. A rectangle is a four-sided shape with\\nevery angle at ninety degrees. By default, the first two parameters set\\nthe location of the upper-left corner, the third sets the width, and the\\nfourth sets the height. The way these parameters are interpreted, however,\\nmay be changed with the rectMode() function.\\n\\nThe fifth, sixth, seventh and eighth parameters, if specified,\\ndetermine corner radius for the top-left, top-right, lower-right and\\nlower-left corners, respectively. An omitted corner radius parameter is set\\nto the value of the previously specified radius value in the parameter list.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rect\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Draw a rectangle at location (30, 20) with a width and height of 55.\\nrect(30, 20, 55, 55);\\n\\n\\n\\n\\n\\n// Draw a rectangle with rounded corners, each having a radius of 20.\\nrect(30, 20, 55, 55, 20);\\n\\n\\n\\n\\n\\n// Draw a rectangle with rounded corners having the following radii:\\n// top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\\nrect(30, 20, 55, 55, 20, 15, 10, 5);\\n\\n\"\n ],\n \"alt\": \"55x55 white rect with black outline in mid-right of canvas.\\n55x55 white rect with black outline and rounded edges in mid-right of canvas.\\n55x55 white rect with black outline and rounded edges of different radii.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\",\n \"overloads\": [\n {\n \"line\": 458,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the rectangle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the rectangle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"width of the rectangle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the rectangle.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"tl\",\n \"description\": \"optional radius of top-left corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"tr\",\n \"description\": \"optional radius of top-right corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"br\",\n \"description\": \"optional radius of bottom-right corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"bl\",\n \"description\": \"optional radius of bottom-left corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 508,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments in the x-direction (for WebGL mode)\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments in the y-direction (for WebGL mode)\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 541,\n \"description\": \"Draws a square to the screen. A square is a four-sided shape with\\nevery angle at ninety degrees, and equal side size.\\nThis function is a special case of the rect() function, where the width and height are the same, and the parameter is called "s" for side size.\\nBy default, the first two parameters set the location of the upper-left corner, the third sets the side size of the square.\\nThe way these parameters are interpreted, however,\\nmay be changed with the rectMode() function.\\n\\nThe fourth, fifth, sixth and seventh parameters, if specified,\\ndetermine corner radius for the top-left, top-right, lower-right and\\nlower-left corners, respectively. An omitted corner radius parameter is set\\nto the value of the previously specified radius value in the parameter list.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"square\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the square.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the square.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"s\",\n \"description\": \"side size of the square.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"tl\",\n \"description\": \"optional radius of top-left corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"tr\",\n \"description\": \"optional radius of top-right corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"br\",\n \"description\": \"optional radius of bottom-right corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"bl\",\n \"description\": \"optional radius of bottom-left corner.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Draw a square at location (30, 20) with a side size of 55.\\nsquare(30, 20, 55);\\n\\n\\n\\n\\n\\n// Draw a square with rounded corners, each having a radius of 20.\\nsquare(30, 20, 55, 20);\\n\\n\\n\\n\\n\\n// Draw a square with rounded corners having the following radii:\\n// top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\\nsquare(30, 20, 55, 20, 15, 10, 5);\\n\\n\"\n ],\n \"alt\": \"55x55 white square with black outline in mid-right of canvas.\\n55x55 white square with black outline and rounded edges in mid-right of canvas.\\n55x55 white square with black outline and rounded edges of different radii.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/2d_primitives.js\",\n \"line\": 595,\n \"description\": \"A triangle is a plane created by connecting three points. The first two\\narguments specify the first point, the middle two arguments specify the\\nsecond point, and the last two arguments specify the third point.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"triangle\",\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"x-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"y-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"x-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"y-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"x-coordinate of the third point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"y-coordinate of the third point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntriangle(30, 75, 58, 20, 86, 75);\\n\\n\"\n ],\n \"alt\": \"white triangle with black outline in mid-right of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"2D Primitives\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 14,\n \"description\": \"Modifies the location from which ellipses are drawn by changing the way\\nin which parameters given to ellipse() are interpreted.\\n\\nThe default mode is ellipseMode(CENTER), which interprets the first two\\nparameters of ellipse() as the shape's center point, while the third and\\nfourth parameters are its width and height.\\n\\nellipseMode(RADIUS) also uses the first two parameters of ellipse() as\\nthe shape's center point, but uses the third and fourth parameters to\\nspecify half of the shapes's width and height.\\n\\nellipseMode(CORNER) interprets the first two parameters of ellipse() as\\nthe upper-left corner of the shape, while the third and fourth parameters\\nare its width and height.\\n\\nellipseMode(CORNERS) interprets the first two parameters of ellipse() as\\nthe location of one corner of the ellipse's bounding box, and the third\\nand fourth parameters as the location of the opposite corner.\\n\\nThe parameter must be written in ALL CAPS because Javascript is a\\ncase-sensitive language.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ellipseMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either CENTER, RADIUS, CORNER, or CORNERS\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nellipseMode(RADIUS); // Set ellipseMode to RADIUS\\nfill(255); // Set fill to white\\nellipse(50, 50, 30, 30); // Draw white ellipse using RADIUS mode\\n\\nellipseMode(CENTER); // Set ellipseMode to CENTER\\nfill(100); // Set fill to gray\\nellipse(50, 50, 30, 30); // Draw gray ellipse using CENTER mode\\n\\n\\n\\n\\n\\nellipseMode(CORNER); // Set ellipseMode is CORNER\\nfill(255); // Set fill to white\\nellipse(25, 25, 50, 50); // Draw white ellipse using CORNER mode\\n\\nellipseMode(CORNERS); // Set ellipseMode to CORNERS\\nfill(100); // Set fill to gray\\nellipse(25, 25, 50, 50); // Draw gray ellipse using CORNERS mode\\n\\n\"\n ],\n \"alt\": \"60x60 white ellipse and 30x30 grey ellipse with black outlines at center.\\n60x60 white ellipse @center and 30x30 grey ellipse top-right, black outlines.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 83,\n \"description\": \"Draws all geometry with jagged (aliased) edges. Note that smooth() is\\nactive by default in 2D mode, so it is necessary to call noSmooth() to disable\\nsmoothing of geometry, images, and fonts. In 3D mode, noSmooth() is enabled\\nby default, so it is necessary to call smooth() if you would like\\nsmooth (antialiased) edges on your geometry.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noSmooth\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nbackground(0);\\nnoStroke();\\nsmooth();\\nellipse(30, 48, 36, 36);\\nnoSmooth();\\nellipse(70, 48, 36, 36);\\n\\n\"\n ],\n \"alt\": \"2 pixelated 36x36 white ellipses to left & right of center, black background\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 116,\n \"description\": \"Modifies the location from which rectangles are drawn by changing the way\\nin which parameters given to rect() are interpreted.\\n\\nThe default mode is rectMode(CORNER), which interprets the first two\\nparameters of rect() as the upper-left corner of the shape, while the\\nthird and fourth parameters are its width and height.\\n\\nrectMode(CORNERS) interprets the first two parameters of rect() as the\\nlocation of one corner, and the third and fourth parameters as the\\nlocation of the opposite corner.\\n\\nrectMode(CENTER) interprets the first two parameters of rect() as the\\nshape's center point, while the third and fourth parameters are its\\nwidth and height.\\n\\nrectMode(RADIUS) also uses the first two parameters of rect() as the\\nshape's center point, but uses the third and fourth parameters to specify\\nhalf of the shapes's width and height.\\n\\nThe parameter must be written in ALL CAPS because Javascript is a\\ncase-sensitive language.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rectMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either CORNER, CORNERS, CENTER, or RADIUS\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nrectMode(CORNER); // Default rectMode is CORNER\\nfill(255); // Set fill to white\\nrect(25, 25, 50, 50); // Draw white rect using CORNER mode\\n\\nrectMode(CORNERS); // Set rectMode to CORNERS\\nfill(100); // Set fill to gray\\nrect(25, 25, 50, 50); // Draw gray rect using CORNERS mode\\n\\n\\n\\n\\n\\nrectMode(RADIUS); // Set rectMode to RADIUS\\nfill(255); // Set fill to white\\nrect(50, 50, 30, 30); // Draw white rect using RADIUS mode\\n\\nrectMode(CENTER); // Set rectMode to CENTER\\nfill(100); // Set fill to gray\\nrect(50, 50, 30, 30); // Draw gray rect using CENTER mode\\n\\n\"\n ],\n \"alt\": \"50x50 white rect at center and 25x25 grey rect in the top left of the other.\\n50x50 white rect at center and 25x25 grey rect in the center of the other.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 185,\n \"description\": \"Draws all geometry with smooth (anti-aliased) edges. smooth() will also\\nimprove image quality of resized images. Note that smooth() is active by\\ndefault in 2D mode; noSmooth() can be used to disable smoothing of geometry,\\nimages, and fonts. In 3D mode, noSmooth() is enabled\\nby default, so it is necessary to call smooth() if you would like\\nsmooth (antialiased) edges on your geometry.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"smooth\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nbackground(0);\\nnoStroke();\\nsmooth();\\nellipse(30, 48, 36, 36);\\nnoSmooth();\\nellipse(70, 48, 36, 36);\\n\\n\"\n ],\n \"alt\": \"2 pixelated 36x36 white ellipses one left one right of center. On black.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 219,\n \"description\": \"Sets the style for rendering line endings. These ends are either squared,\\nextended, or rounded, each of which specified with the corresponding\\nparameters: SQUARE, PROJECT, and ROUND. The default cap is ROUND.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"strokeCap\",\n \"params\": [\n {\n \"name\": \"cap\",\n \"description\": \"either SQUARE, PROJECT, or ROUND\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(12.0);\\nstrokeCap(ROUND);\\nline(20, 30, 80, 30);\\nstrokeCap(SQUARE);\\nline(20, 50, 80, 50);\\nstrokeCap(PROJECT);\\nline(20, 70, 80, 70);\\n\\n\"\n ],\n \"alt\": \"3 lines. Top line: rounded ends, mid: squared, bottom:longer squared ends.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 256,\n \"description\": \"Sets the style of the joints which connect line segments. These joints\\nare either mitered, beveled, or rounded and specified with the\\ncorresponding parameters MITER, BEVEL, and ROUND. The default joint is\\nMITER.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"strokeJoin\",\n \"params\": [\n {\n \"name\": \"join\",\n \"description\": \"either MITER, BEVEL, ROUND\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(MITER);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n\\n\\n\\n\\n\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(BEVEL);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n\\n\\n\\n\\n\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(ROUND);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n\\n\"\n ],\n \"alt\": \"Right-facing arrowhead shape with pointed tip in center of canvas.\\nRight-facing arrowhead shape with flat tip in center of canvas.\\nRight-facing arrowhead shape with rounded tip in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/attributes.js\",\n \"line\": 323,\n \"description\": \"Sets the width of the stroke used for lines, points, and the border\\naround shapes. All widths are set in units of pixels.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"strokeWeight\",\n \"params\": [\n {\n \"name\": \"weight\",\n \"description\": \"the weight (in pixels) of the stroke\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(1); // Default\\nline(20, 20, 80, 20);\\nstrokeWeight(4); // Thicker\\nline(20, 40, 80, 40);\\nstrokeWeight(10); // Beastly\\nline(20, 70, 80, 70);\\n\\n\"\n ],\n \"alt\": \"3 horizontal black lines. Top line: thin, mid: medium, bottom:thick.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 13,\n \"description\": \"Draws a cubic Bezier curve on the screen. These curves are defined by a\\nseries of anchor and control points. The first two parameters specify\\nthe first anchor point and the last two parameters specify the other\\nanchor point, which become the first and last points on the curve. The\\nmiddle parameters specify the two control points which define the shape\\nof the curve. Approximately speaking, control points "pull" the curve\\ntowards them.Bezier curves were developed by French\\nautomotive engineer Pierre Bezier, and are commonly used in computer\\ngraphics to define gently sloping curves. See also curve().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"bezier\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoFill();\\nstroke(255, 102, 0);\\nline(85, 20, 10, 10);\\nline(90, 90, 15, 80);\\nstroke(0, 0, 0);\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\n\\n\\n\\n\\n\\nbackground(0, 0, 0);\\nnoFill();\\nstroke(255);\\nbezier(250, 250, 0, 100, 100, 0, 100, 0, 0, 0, 100, 0);\\n\\n\"\n ],\n \"alt\": \"stretched black s-shape in center with orange lines extending from end points.\\nstretched black s-shape with 10 5x5 white ellipses along the shape.\\nstretched black s-shape with 7 5x5 ellipses and orange lines along the shape.\\nstretched black s-shape with 17 small orange lines extending from under shape.\\nhorseshoe shape with orange ends facing left and black curved center.\\nhorseshoe shape with orange ends facing left and black curved center.\\nLine shaped like right-facing arrow,points move with mouse-x and warp shape.\\nhorizontal line that hooks downward on the right and 13 5x5 ellipses along it.\\nright curving line mid-right of canvas with 7 short lines radiating from it.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\",\n \"overloads\": [\n {\n \"line\": 13,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"x-coordinate for the first anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"y-coordinate for the first anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"x-coordinate for the first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"y-coordinate for the first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"x-coordinate for the second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"y-coordinate for the second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"x-coordinate for the second anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"y-coordinate for the second anchor point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 66,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z1\",\n \"description\": \"z-coordinate for the first anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"z-coordinate for the first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z3\",\n \"description\": \"z-coordinate for the second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z4\",\n \"description\": \"z-coordinate for the second anchor point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 96,\n \"description\": \"Sets the resolution at which Beziers display.\\nThe default value is 20.\\nThis function is only useful when using the WEBGL renderer\\nas the default canvas renderer does not use this information.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"bezierDetail\",\n \"params\": [\n {\n \"name\": \"detail\",\n \"description\": \"resolution of the curves\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noFill();\\n\\n bezierDetail(5);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n bezier(-40, -40, 0,\\n 90, -40, 0,\\n -90, 40, 0,\\n 40, 40, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"stretched black s-shape with a low level of bezier detail\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 139,\n \"description\": \"Evaluates the Bezier at position t for points a, b, c, d.\\nThe parameters a and d are the first and last points\\non the curve, and b and c are the control points.\\nThe final parameter t varies between 0 and 1.\\nThis can be done once with the x coordinates and a second time\\nwith the y coordinates to get the location of a bezier curve at t.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"bezierPoint\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"coordinate of first point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"coordinate of first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"coordinate of second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"coordinate of second point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"t\",\n \"description\": \"value between 0 and 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the value of the Bezier at position t\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoFill();\\nlet x1 = 85,\\n x2 = 10,\\n x3 = 90,\\n x4 = 15;\\nlet y1 = 20,\\n y2 = 10,\\n y3 = 90,\\n y4 = 80;\\nbezier(x1, y1, x2, y2, x3, y3, x4, y4);\\nfill(255);\\nlet steps = 10;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = bezierPoint(x1, x2, x3, x4, t);\\n let y = bezierPoint(y1, y2, y3, y4, t);\\n ellipse(x, y, 5, 5);\\n}\\n\\n\"\n ],\n \"alt\": \"stretched black s-shape with 17 small orange lines extending from under shape.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 194,\n \"description\": \"Evaluates the tangent to the Bezier at position t for points a, b, c, d.\\nThe parameters a and d are the first and last points\\non the curve, and b and c are the control points.\\nThe final parameter t varies between 0 and 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"bezierTangent\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"coordinate of first point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"coordinate of first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"coordinate of second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"coordinate of second point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"t\",\n \"description\": \"value between 0 and 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the tangent at position t\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoFill();\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\nlet steps = 6;\\nfill(255);\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n // Get the location of the point\\n let x = bezierPoint(85, 10, 90, 15, t);\\n let y = bezierPoint(20, 10, 90, 80, t);\\n // Get the tangent points\\n let tx = bezierTangent(85, 10, 90, 15, t);\\n let ty = bezierTangent(20, 10, 90, 80, t);\\n // Calculate an angle from the tangent points\\n let a = atan2(ty, tx);\\n a += PI;\\n stroke(255, 102, 0);\\n line(x, y, cos(a) * 30 + x, sin(a) * 30 + y);\\n // The following line of code makes a line\\n // inverse of the above line\\n //line(x, y, cos(a)*-30 + x, sin(a)*-30 + y);\\n stroke(0);\\n ellipse(x, y, 5, 5);\\n}\\n\\n\\n\\n\\n\\nnoFill();\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\nstroke(255, 102, 0);\\nlet steps = 16;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = bezierPoint(85, 10, 90, 15, t);\\n let y = bezierPoint(20, 10, 90, 80, t);\\n let tx = bezierTangent(85, 10, 90, 15, t);\\n let ty = bezierTangent(20, 10, 90, 80, t);\\n let a = atan2(ty, tx);\\n a -= HALF_PI;\\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\\n}\\n\\n\"\n ],\n \"alt\": \"s-shaped line with 17 short orange lines extending from underside of shape\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 273,\n \"description\": \"Draws a curved line on the screen between two points, given as the\\nmiddle four parameters. The first two parameters are a control point, as\\nif the curve came from this point even though it's not drawn. The last\\ntwo parameters similarly describe the other control point. \\nLonger curves can be created by putting a series of curve() functions\\ntogether or using curveVertex(). An additional function called\\ncurveTightness() provides control for the visual quality of the curve.\\nThe curve() function is an implementation of Catmull-Rom splines.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curve\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\\nstroke(0);\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nstroke(255, 102, 0);\\ncurve(73, 24, 73, 61, 15, 65, 15, 65);\\n\\n\\n\\n\\n// Define the curve points as JavaScript objects\\nlet p1 = { x: 5, y: 26 },\\n p2 = { x: 73, y: 24 };\\nlet p3 = { x: 73, y: 61 },\\n p4 = { x: 15, y: 65 };\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\\nstroke(0);\\ncurve(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);\\nstroke(255, 102, 0);\\ncurve(p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, p4.x, p4.y);\\n\\n\\n\\n\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(5, 26, 0, 5, 26, 0, 73, 24, 0, 73, 61, 0);\\nstroke(0);\\ncurve(5, 26, 0, 73, 24, 0, 73, 61, 0, 15, 65, 0);\\nstroke(255, 102, 0);\\ncurve(73, 24, 0, 73, 61, 0, 15, 65, 0, 15, 65, 0);\\n\\n\"\n ],\n \"alt\": \"horseshoe shape with orange ends facing left and black curved center.\\nhorseshoe shape with orange ends facing left and black curved center.\\ncurving black and orange lines.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\",\n \"overloads\": [\n {\n \"line\": 273,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"x-coordinate for the beginning control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"y-coordinate for the beginning control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"x-coordinate for the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"y-coordinate for the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"x-coordinate for the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"y-coordinate for the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"x-coordinate for the ending control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"y-coordinate for the ending control point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 338,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z1\",\n \"description\": \"z-coordinate for the beginning control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"z-coordinate for the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z3\",\n \"description\": \"z-coordinate for the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z4\",\n \"description\": \"z-coordinate for the ending control point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 364,\n \"description\": \"Sets the resolution at which curves display.\\nThe default value is 20 while the minimum value is 3.\\nThis function is only useful when using the WEBGL renderer\\nas the default canvas renderer does not use this\\ninformation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curveDetail\",\n \"params\": [\n {\n \"name\": \"resolution\",\n \"description\": \"resolution of the curves\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n\\n curveDetail(5);\\n}\\nfunction draw() {\\n background(200);\\n\\n curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"white arch shape with a low level of curve detail.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 406,\n \"description\": \"Modifies the quality of forms created with curve() and curveVertex().\\nThe parameter tightness determines how the curve fits to the vertex\\npoints. The value 0.0 is the default value for tightness (this value\\ndefines the curves to be Catmull-Rom splines) and the value 1.0 connects\\nall the points with straight lines. Values within the range -5.0 and 5.0\\nwill deform the curves but will leave them recognizable and as values\\nincrease in magnitude, they will continue to deform.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curveTightness\",\n \"params\": [\n {\n \"name\": \"amount\",\n \"description\": \"amount of deformation from the original vertices\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Move the mouse left and right to see the curve change\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(204);\\n let t = map(mouseX, 0, width, -5, 5);\\n curveTightness(t);\\n beginShape();\\n curveVertex(10, 26);\\n curveVertex(10, 26);\\n curveVertex(83, 24);\\n curveVertex(83, 61);\\n curveVertex(25, 65);\\n curveVertex(25, 65);\\n endShape();\\n}\\n\\n\"\n ],\n \"alt\": \"Line shaped like right-facing arrow,points move with mouse-x and warp shape.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 453,\n \"description\": \"Evaluates the curve at position t for points a, b, c, d.\\nThe parameter t varies between 0 and 1, a and d are control points\\nof the curve, and b and c are the start and end points of the curve.\\nThis can be done once with the x coordinates and a second time\\nwith the y coordinates to get the location of a curve at t.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curvePoint\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"coordinate of first control point of the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"coordinate of first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"coordinate of second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"coordinate of second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"t\",\n \"description\": \"value between 0 and 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"bezier value at position t\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoFill();\\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nfill(255);\\nellipseMode(CENTER);\\nlet steps = 6;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = curvePoint(5, 5, 73, 73, t);\\n let y = curvePoint(26, 26, 24, 61, t);\\n ellipse(x, y, 5, 5);\\n x = curvePoint(5, 73, 73, 15, t);\\n y = curvePoint(26, 24, 61, 65, t);\\n ellipse(x, y, 5, 5);\\n}\\n\\n\\n\\nline hooking down to right-bottom with 13 5x5 white ellipse points\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/curves.js\",\n \"line\": 502,\n \"description\": \"Evaluates the tangent to the curve at position t for points a, b, c, d.\\nThe parameter t varies between 0 and 1, a and d are points on the curve,\\nand b and c are the control points.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curveTangent\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"coordinate of first point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"coordinate of first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"coordinate of second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"coordinate of second point on the curve\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"t\",\n \"description\": \"value between 0 and 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the tangent at position t\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nnoFill();\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nlet steps = 6;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = curvePoint(5, 73, 73, 15, t);\\n let y = curvePoint(26, 24, 61, 65, t);\\n //ellipse(x, y, 5, 5);\\n let tx = curveTangent(5, 73, 73, 15, t);\\n let ty = curveTangent(26, 24, 61, 65, t);\\n let a = atan2(ty, tx);\\n a -= PI / 2.0;\\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\\n}\\n\\n\"\n ],\n \"alt\": \"right curving line mid-right of canvas with 7 short lines radiating from it.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Curves\"\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 22,\n \"description\": \"Use the beginContour() and endContour() functions to create negative\\nshapes within shapes such as the center of the letter 'O'. beginContour()\\nbegins recording vertices for the shape and endContour() stops recording.\\nThe vertices that define a negative shape must "wind" in the opposite\\ndirection from the exterior shape. First draw vertices for the exterior\\nclockwise order, then for internal shapes, draw vertices\\nshape in counter-clockwise.\\n\\nThese functions can only be used within a beginShape()/endShape() pair and\\ntransformations such as translate(), rotate(), and scale() do not work\\nwithin a beginContour()/endContour() pair. It is also not possible to use\\nother shapes, such as ellipse() or rect() within.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"beginContour\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(50, 50);\\nstroke(255, 0, 0);\\nbeginShape();\\n// Exterior part of shape, clockwise winding\\nvertex(-40, -40);\\nvertex(40, -40);\\nvertex(40, 40);\\nvertex(-40, 40);\\n// Interior part of shape, counter-clockwise winding\\nbeginContour();\\nvertex(-20, -20);\\nvertex(-20, 20);\\nvertex(20, 20);\\nvertex(20, -20);\\nendContour();\\nendShape(CLOSE);\\n\\n\"\n ],\n \"alt\": \"white rect and smaller grey rect with red outlines in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\"\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 70,\n \"description\": \"Using the beginShape() and endShape() functions allow creating more\\ncomplex forms. beginShape() begins recording vertices for a shape and\\nendShape() stops recording. The value of the kind parameter tells it which\\ntypes of shapes to create from the provided vertices. With no mode\\nspecified, the shape can be any irregular polygon.\\n\\nThe parameters available for beginShape() are POINTS, LINES, TRIANGLES,\\nTRIANGLE_FAN, TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the\\nbeginShape() function, a series of vertex() commands must follow. To stop\\ndrawing the shape, call endShape(). Each shape will be outlined with the\\ncurrent stroke color and filled with the fill color.\\n\\nTransformations such as translate(), rotate(), and scale() do not work\\nwithin beginShape(). It is also not possible to use other shapes, such as\\nellipse() or rect() within beginShape().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"beginShape\",\n \"params\": [\n {\n \"name\": \"kind\",\n \"description\": \"either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\\n TRIANGLE_STRIP, QUADS, or QUAD_STRIP\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape(CLOSE);\\n\\n\\n\\n\\n\\nbeginShape(POINTS);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape(LINES);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n\\n\\n\\n\\n\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n\\n\\n\\n\\n\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape(CLOSE);\\n\\n\\n\\n\\n\\nbeginShape(TRIANGLES);\\nvertex(30, 75);\\nvertex(40, 20);\\nvertex(50, 75);\\nvertex(60, 20);\\nvertex(70, 75);\\nvertex(80, 20);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape(TRIANGLE_STRIP);\\nvertex(30, 75);\\nvertex(40, 20);\\nvertex(50, 75);\\nvertex(60, 20);\\nvertex(70, 75);\\nvertex(80, 20);\\nvertex(90, 75);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape(TRIANGLE_FAN);\\nvertex(57.5, 50);\\nvertex(57.5, 15);\\nvertex(92, 50);\\nvertex(57.5, 85);\\nvertex(22, 50);\\nvertex(57.5, 15);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape(QUADS);\\nvertex(30, 20);\\nvertex(30, 75);\\nvertex(50, 75);\\nvertex(50, 20);\\nvertex(65, 20);\\nvertex(65, 75);\\nvertex(85, 75);\\nvertex(85, 20);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape(QUAD_STRIP);\\nvertex(30, 20);\\nvertex(30, 75);\\nvertex(50, 20);\\nvertex(50, 75);\\nvertex(65, 20);\\nvertex(65, 75);\\nvertex(85, 20);\\nvertex(85, 75);\\nendShape();\\n\\n\\n\\n\\n\\nbeginShape();\\nvertex(20, 20);\\nvertex(40, 20);\\nvertex(40, 40);\\nvertex(60, 40);\\nvertex(60, 60);\\nvertex(20, 60);\\nendShape(CLOSE);\\n\\n\"\n ],\n \"alt\": \"white square-shape with black outline in middle-right of canvas.\\n4 black points in a square shape in middle-right of canvas.\\n2 horizontal black lines. In the top-right and bottom-right of canvas.\\n3 line shape with horizontal on top, vertical in middle and horizontal bottom.\\nsquare line shape in middle-right of canvas.\\n2 white triangle shapes mid-right canvas. left one pointing up and right down.\\n5 horizontal interlocking and alternating white triangles in mid-right canvas.\\n4 interlocking white triangles in 45 degree rotated square-shape.\\n2 white rectangle shapes in mid-right canvas. Both 20x55.\\n3 side-by-side white rectangles center rect is smaller in mid-right canvas.\\nThick white l-shape with black outline mid-top-left of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\"\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 270,\n \"description\": \"Specifies vertex coordinates for Bezier curves. Each call to\\nbezierVertex() defines the position of two control points and\\none anchor point of a Bezier curve, adding a new segment to a\\nline or shape. For WebGL mode bezierVertex() can be used in 2D\\nas well as 3D mode. 2D mode expects 6 parameters, while 3D mode\\nexpects 9 parameters (including z coordinates).\\n\\nThe first time bezierVertex() is used within a beginShape()\\ncall, it must be prefaced with a call to vertex() to set the first anchor\\npoint. This function must be used between beginShape() and endShape()\\nand only when there is no MODE or POINTS parameter specified to\\nbeginShape().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"bezierVertex\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nbezierVertex(80, 0, 80, 75, 30, 75);\\nendShape();\\n\\n\",\n \"\\n\\n\\nbeginShape();\\nvertex(30, 20);\\nbezierVertex(80, 0, 80, 75, 30, 75);\\nbezierVertex(50, 80, 60, 25, 30, 20);\\nendShape();\\n\\n\",\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n setAttributes('antialias', true);\\n}\\nfunction draw() {\\n orbitControl();\\n background(50);\\n strokeWeight(4);\\n stroke(255);\\n point(-25, 30);\\n point(25, 30);\\n point(25, -30);\\n point(-25, -30);\\n\\n strokeWeight(1);\\n noFill();\\n\\n beginShape();\\n vertex(-25, 30);\\n bezierVertex(25, 30, 25, -30, -25, -30);\\n endShape();\\n\\n beginShape();\\n vertex(-25, 30, 20);\\n bezierVertex(25, 30, 20, 25, -30, 20, -25, -30, 20);\\n endShape();\\n}\\n\\n\"\n ],\n \"alt\": \"crescent shape in middle of canvas with another crescent shape on positive z-axis.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\",\n \"overloads\": [\n {\n \"line\": 270,\n \"params\": [\n {\n \"name\": \"x2\",\n \"description\": \"x-coordinate for the first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"y-coordinate for the first control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"x-coordinate for the second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"y-coordinate for the second control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"x-coordinate for the anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"y-coordinate for the anchor point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 358,\n \"params\": [\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"z-coordinate for the first control point (for WebGL mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z3\",\n \"description\": \"z-coordinate for the second control point (for WebGL mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y4\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z4\",\n \"description\": \"z-coordinate for the anchor point (for WebGL mode)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 398,\n \"description\": \"Specifies vertex coordinates for curves. This function may only\\nbe used between beginShape() and endShape() and only when there\\nis no MODE parameter specified to beginShape().\\nFor WebGL mode curveVertex() can be used in 2D as well as 3D mode.\\n2D mode expects 2 parameters, while 3D mode expects 3 parameters.\\n\\nThe first and last points in a series of curveVertex() lines will be used to\\nguide the beginning and end of a the curve. A minimum of four\\npoints is required to draw a tiny curve between the second and\\nthird points. Adding a fifth point with curveVertex() will draw\\nthe curve between the second, third, and fourth points. The\\ncurveVertex() function is an implementation of Catmull-Rom\\nsplines.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"curveVertex\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(5);\\npoint(84, 91);\\npoint(68, 19);\\npoint(21, 17);\\npoint(32, 91);\\nstrokeWeight(1);\\n\\nnoFill();\\nbeginShape();\\ncurveVertex(84, 91);\\ncurveVertex(84, 91);\\ncurveVertex(68, 19);\\ncurveVertex(21, 17);\\ncurveVertex(32, 91);\\ncurveVertex(32, 91);\\nendShape();\\n\\n\"\n ],\n \"alt\": \"Upside-down u-shape line, mid canvas. left point extends beyond canvas view.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\",\n \"overloads\": [\n {\n \"line\": 398,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the vertex\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the vertex\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 443,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z-coordinate of the vertex (for WebGL mode)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 508,\n \"description\": \"Use the beginContour() and endContour() functions to create negative\\nshapes within shapes such as the center of the letter 'O'. beginContour()\\nbegins recording vertices for the shape and endContour() stops recording.\\nThe vertices that define a negative shape must "wind" in the opposite\\ndirection from the exterior shape. First draw vertices for the exterior\\nclockwise order, then for internal shapes, draw vertices\\nshape in counter-clockwise.\\n\\nThese functions can only be used within a beginShape()/endShape() pair and\\ntransformations such as translate(), rotate(), and scale() do not work\\nwithin a beginContour()/endContour() pair. It is also not possible to use\\nother shapes, such as ellipse() or rect() within.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"endContour\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(50, 50);\\nstroke(255, 0, 0);\\nbeginShape();\\n// Exterior part of shape, clockwise winding\\nvertex(-40, -40);\\nvertex(40, -40);\\nvertex(40, 40);\\nvertex(-40, 40);\\n// Interior part of shape, counter-clockwise winding\\nbeginContour();\\nvertex(-20, -20);\\nvertex(-20, 20);\\nvertex(20, 20);\\nvertex(20, -20);\\nendContour();\\nendShape(CLOSE);\\n\\n\"\n ],\n \"alt\": \"white rect and smaller grey rect with red outlines in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\"\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 568,\n \"description\": \"The endShape() function is the companion to beginShape() and may only be\\ncalled after beginShape(). When endshape() is called, all of image data\\ndefined since the previous call to beginShape() is written into the image\\nbuffer. The constant CLOSE as the value for the MODE parameter to close\\nthe shape (to connect the beginning and the end).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"endShape\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"use CLOSE to close the shape\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nnoFill();\\n\\nbeginShape();\\nvertex(20, 20);\\nvertex(45, 20);\\nvertex(45, 80);\\nendShape(CLOSE);\\n\\nbeginShape();\\nvertex(50, 20);\\nvertex(75, 20);\\nvertex(75, 80);\\nendShape();\\n\\n\"\n ],\n \"alt\": \"Triangle line shape with smallest interior angle on bottom and upside-down L.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\"\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 654,\n \"description\": \"Specifies vertex coordinates for quadratic Bezier curves. Each call to\\nquadraticVertex() defines the position of one control points and one\\nanchor point of a Bezier curve, adding a new segment to a line or shape.\\nThe first time quadraticVertex() is used within a beginShape() call, it\\nmust be prefaced with a call to vertex() to set the first anchor point.\\nFor WebGL mode quadraticVertex() can be used in 2D as well as 3D mode.\\n2D mode expects 4 parameters, while 3D mode expects 6 parameters\\n(including z coordinates).\\n\\nThis function must be used between beginShape() and endShape()\\nand only when there is no MODE or POINTS parameter specified to\\nbeginShape().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"quadraticVertex\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(5);\\npoint(20, 20);\\npoint(80, 20);\\npoint(50, 50);\\n\\nnoFill();\\nstrokeWeight(1);\\nbeginShape();\\nvertex(20, 20);\\nquadraticVertex(80, 20, 50, 50);\\nendShape();\\n\\n\\n\\n\\n\\nstrokeWeight(5);\\npoint(20, 20);\\npoint(80, 20);\\npoint(50, 50);\\n\\npoint(20, 80);\\npoint(80, 80);\\npoint(80, 60);\\n\\nnoFill();\\nstrokeWeight(1);\\nbeginShape();\\nvertex(20, 20);\\nquadraticVertex(80, 20, 50, 50);\\nquadraticVertex(20, 80, 80, 80);\\nvertex(80, 60);\\nendShape();\\n\\n\"\n ],\n \"alt\": \"arched-shaped black line with 4 pixel thick stroke weight.\\nbackwards s-shaped black line with 4 pixel thick stroke weight.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\",\n \"overloads\": [\n {\n \"line\": 654,\n \"params\": [\n {\n \"name\": \"cx\",\n \"description\": \"x-coordinate for the control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"cy\",\n \"description\": \"y-coordinate for the control point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"x-coordinate for the anchor point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"y-coordinate for the anchor point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 720,\n \"params\": [\n {\n \"name\": \"cx\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"cy\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"cz\",\n \"description\": \"z-coordinate for the control point (for WebGL mode)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z3\",\n \"description\": \"z-coordinate for the anchor point (for WebGL mode)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/shape/vertex.js\",\n \"line\": 813,\n \"description\": \"All shapes are constructed by connecting a series of vertices. vertex()\\nis used to specify the vertex coordinates for points, lines, triangles,\\nquads, and polygons. It is used exclusively within the beginShape() and\\nendShape() functions.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"vertex\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(3);\\nbeginShape(POINTS);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n\\n\"\n ],\n \"alt\": \"8 points making 4 lines\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"Vertex\",\n \"overloads\": [\n {\n \"line\": 813,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the vertex\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the vertex\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 900,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z-coordinate of the vertex\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"u\",\n \"description\": \"the vertex's texture u-coordinate\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"v\",\n \"description\": \"the vertex's texture v-coordinate\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 13,\n \"itemtype\": \"property\",\n \"name\": \"P2D\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 18,\n \"itemtype\": \"property\",\n \"name\": \"WEBGL\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 25,\n \"itemtype\": \"property\",\n \"name\": \"ARROW\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 30,\n \"itemtype\": \"property\",\n \"name\": \"CROSS\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 35,\n \"itemtype\": \"property\",\n \"name\": \"HAND\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 40,\n \"itemtype\": \"property\",\n \"name\": \"MOVE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 45,\n \"itemtype\": \"property\",\n \"name\": \"TEXT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 50,\n \"itemtype\": \"property\",\n \"name\": \"WAIT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 58,\n \"description\": \"HALF_PI is a mathematical constant with the value\\n1.57079632679489661923. It is half the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"HALF_PI\",\n \"type\": \"Number\",\n \"final\": 1,\n \"example\": [\n \"\\n\\narc(50, 50, 80, 80, 0, HALF_PI);\\n\"\n ],\n \"alt\": \"80x80 white quarter-circle with curve toward bottom right of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 77,\n \"description\": \"PI is a mathematical constant with the value\\n3.14159265358979323846. It is the ratio of the circumference\\nof a circle to its diameter. It is useful in combination with\\nthe trigonometric functions sin() and cos().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"PI\",\n \"type\": \"Number\",\n \"final\": 1,\n \"example\": [\n \"\\n\\narc(50, 50, 80, 80, 0, PI);\\n\"\n ],\n \"alt\": \"white half-circle with curve toward bottom of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 96,\n \"description\": \"QUARTER_PI is a mathematical constant with the value 0.7853982.\\nIt is one quarter the ratio of the circumference of a circle to\\nits diameter. It is useful in combination with the trigonometric\\nfunctions sin() and cos().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"QUARTER_PI\",\n \"type\": \"Number\",\n \"final\": 1,\n \"example\": [\n \"\\n\\narc(50, 50, 80, 80, 0, QUARTER_PI);\\n\"\n ],\n \"alt\": \"white eighth-circle rotated about 40 degrees with curve bottom right canvas.\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 115,\n \"description\": \"TAU is an alias for TWO_PI, a mathematical constant with the\\nvalue 6.28318530717958647693. It is twice the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"TAU\",\n \"type\": \"Number\",\n \"final\": 1,\n \"example\": [\n \"\\n\\narc(50, 50, 80, 80, 0, TAU);\\n\"\n ],\n \"alt\": \"80x80 white ellipse shape in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 134,\n \"description\": \"TWO_PI is a mathematical constant with the value\\n6.28318530717958647693. It is twice the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"TWO_PI\",\n \"type\": \"Number\",\n \"final\": 1,\n \"example\": [\n \"\\n\\narc(50, 50, 80, 80, 0, TWO_PI);\\n\"\n ],\n \"alt\": \"80x80 white ellipse shape in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 153,\n \"description\": \"Constant to be used with angleMode() function, to set the mode which\\np5.js interprates and calculates angles (either DEGREES or RADIANS).\\n\",\n \"itemtype\": \"property\",\n \"name\": \"DEGREES\",\n \"type\": \"String\",\n \"final\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n angleMode(DEGREES);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 167,\n \"description\": \"Constant to be used with angleMode() function, to set the mode which\\np5.js interprates and calculates angles (either RADIANS or DEGREES).\\n\",\n \"itemtype\": \"property\",\n \"name\": \"RADIANS\",\n \"type\": \"String\",\n \"final\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n angleMode(RADIANS);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 185,\n \"itemtype\": \"property\",\n \"name\": \"CORNER\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 190,\n \"itemtype\": \"property\",\n \"name\": \"CORNERS\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 195,\n \"itemtype\": \"property\",\n \"name\": \"RADIUS\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 200,\n \"itemtype\": \"property\",\n \"name\": \"RIGHT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 205,\n \"itemtype\": \"property\",\n \"name\": \"LEFT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 210,\n \"itemtype\": \"property\",\n \"name\": \"CENTER\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 215,\n \"itemtype\": \"property\",\n \"name\": \"TOP\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 220,\n \"itemtype\": \"property\",\n \"name\": \"BOTTOM\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 225,\n \"itemtype\": \"property\",\n \"name\": \"BASELINE\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"alphabetic\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 231,\n \"itemtype\": \"property\",\n \"name\": \"POINTS\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0000\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 237,\n \"itemtype\": \"property\",\n \"name\": \"LINES\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0001\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 243,\n \"itemtype\": \"property\",\n \"name\": \"LINE_STRIP\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0003\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 249,\n \"itemtype\": \"property\",\n \"name\": \"LINE_LOOP\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0002\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 255,\n \"itemtype\": \"property\",\n \"name\": \"TRIANGLES\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0004\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 261,\n \"itemtype\": \"property\",\n \"name\": \"TRIANGLE_FAN\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0006\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 267,\n \"itemtype\": \"property\",\n \"name\": \"TRIANGLE_STRIP\",\n \"type\": \"Number\",\n \"final\": 1,\n \"default\": \"0x0005\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 273,\n \"itemtype\": \"property\",\n \"name\": \"QUADS\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 278,\n \"itemtype\": \"property\",\n \"name\": \"QUAD_STRIP\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"quad_strip\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 284,\n \"itemtype\": \"property\",\n \"name\": \"CLOSE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 289,\n \"itemtype\": \"property\",\n \"name\": \"OPEN\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 294,\n \"itemtype\": \"property\",\n \"name\": \"CHORD\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 299,\n \"itemtype\": \"property\",\n \"name\": \"PIE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 304,\n \"itemtype\": \"property\",\n \"name\": \"PROJECT\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"square\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 310,\n \"itemtype\": \"property\",\n \"name\": \"SQUARE\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"butt\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 316,\n \"itemtype\": \"property\",\n \"name\": \"ROUND\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 321,\n \"itemtype\": \"property\",\n \"name\": \"BEVEL\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 326,\n \"itemtype\": \"property\",\n \"name\": \"MITER\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 333,\n \"itemtype\": \"property\",\n \"name\": \"RGB\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 338,\n \"itemtype\": \"property\",\n \"name\": \"HSB\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 343,\n \"itemtype\": \"property\",\n \"name\": \"HSL\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 350,\n \"description\": \"AUTO allows us to automatically set the width or height of an element (but not both),\\nbased on the current height and width of the element. Only one parameter can\\nbe passed to the size function as AUTO, at a time.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"AUTO\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 377,\n \"itemtype\": \"property\",\n \"name\": \"BLEND\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"source-over\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 383,\n \"itemtype\": \"property\",\n \"name\": \"ADD\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"lighter\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 391,\n \"itemtype\": \"property\",\n \"name\": \"DARKEST\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 396,\n \"itemtype\": \"property\",\n \"name\": \"LIGHTEST\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"lighten\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 402,\n \"itemtype\": \"property\",\n \"name\": \"DIFFERENCE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 407,\n \"itemtype\": \"property\",\n \"name\": \"SUBTRACT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 412,\n \"itemtype\": \"property\",\n \"name\": \"EXCLUSION\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 417,\n \"itemtype\": \"property\",\n \"name\": \"MULTIPLY\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 422,\n \"itemtype\": \"property\",\n \"name\": \"SCREEN\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 427,\n \"itemtype\": \"property\",\n \"name\": \"REPLACE\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"copy\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 433,\n \"itemtype\": \"property\",\n \"name\": \"OVERLAY\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 438,\n \"itemtype\": \"property\",\n \"name\": \"HARD_LIGHT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 443,\n \"itemtype\": \"property\",\n \"name\": \"SOFT_LIGHT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 448,\n \"itemtype\": \"property\",\n \"name\": \"DODGE\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"color-dodge\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 454,\n \"itemtype\": \"property\",\n \"name\": \"BURN\",\n \"type\": \"String\",\n \"final\": 1,\n \"default\": \"color-burn\",\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 462,\n \"itemtype\": \"property\",\n \"name\": \"THRESHOLD\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 467,\n \"itemtype\": \"property\",\n \"name\": \"GRAY\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 472,\n \"itemtype\": \"property\",\n \"name\": \"OPAQUE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 477,\n \"itemtype\": \"property\",\n \"name\": \"INVERT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 482,\n \"itemtype\": \"property\",\n \"name\": \"POSTERIZE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 487,\n \"itemtype\": \"property\",\n \"name\": \"DILATE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 492,\n \"itemtype\": \"property\",\n \"name\": \"ERODE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 497,\n \"itemtype\": \"property\",\n \"name\": \"BLUR\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 504,\n \"itemtype\": \"property\",\n \"name\": \"NORMAL\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 509,\n \"itemtype\": \"property\",\n \"name\": \"ITALIC\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 514,\n \"itemtype\": \"property\",\n \"name\": \"BOLD\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 519,\n \"itemtype\": \"property\",\n \"name\": \"BOLDITALIC\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 544,\n \"itemtype\": \"property\",\n \"name\": \"IMAGE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 558,\n \"itemtype\": \"property\",\n \"name\": \"LANDSCAPE\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 563,\n \"itemtype\": \"property\",\n \"name\": \"PORTRAIT\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 573,\n \"itemtype\": \"property\",\n \"name\": \"GRID\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/constants.js\",\n \"line\": 579,\n \"itemtype\": \"property\",\n \"name\": \"AXES\",\n \"type\": \"String\",\n \"final\": 1,\n \"class\": \"p5\",\n \"module\": \"Constants\",\n \"submodule\": \"Constants\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 22,\n \"description\": \"The print() function writes to the console area of your browser.\\nThis function is often helpful for looking at the data a program is\\nproducing. This function creates a new line of text for each call to\\nthe function. Individual elements can be\\nseparated with quotes ("") and joined with the addition operator (+).\\nNote that calling print() without any arguments invokes the window.print()\\nfunction which opens the browser's print dialog. To print a blank line\\nto console you can write print('\\\\n').\\n\",\n \"itemtype\": \"method\",\n \"name\": \"print\",\n \"params\": [\n {\n \"name\": \"contents\",\n \"description\": \"any combination of Number, String, Object, Boolean,\\n Array to print\\n\",\n \"type\": \"Any\"\n }\n ],\n \"example\": [\n \"\\n\\nlet x = 10;\\nprint('The value of x is ' + x);\\n// prints \\\"The value of x is 10\\\"\\n\"\n ],\n \"alt\": \"default grey canvas\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 53,\n \"description\": \"The system variable frameCount contains the number of frames that have\\nbeen displayed since the program started. Inside setup() the value is 0,\\nafter the first iteration of draw it is 1, etc.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"frameCount\",\n \"type\": \"Integer\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n \\nfunction setup() {\\n frameRate(30);\\n textSize(30);\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(200);\\n text(frameCount, width / 2, height / 2);\\n}\\n\"\n ],\n \"alt\": \"numbers rapidly counting upward with frame count set to 30.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 80,\n \"description\": \"Confirms if the window a p5.js program is in is "focused," meaning that\\nthe sketch will accept mouse or keyboard input. This variable is\\n"true" if the window is focused and "false" if not.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"focused\",\n \"type\": \"Boolean\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n// To demonstrate, put two windows side by side.\\n// Click on the window that the p5 sketch isn't in!\\nfunction draw() {\\n background(200);\\n noStroke();\\n fill(0, 200, 0);\\n ellipse(25, 25, 50, 50);\\n\\n if (!focused) {\\n // or \\\"if (focused === false)\\\"\\n stroke(200, 0, 0);\\n line(0, 0, 100, 100);\\n line(100, 0, 0, 100);\\n }\\n}\\n\"\n ],\n \"alt\": \"green 50x50 ellipse at top left. Red X covers canvas when page focus changes\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 112,\n \"description\": \"Sets the cursor to a predefined symbol or an image, or makes it visible\\nif already hidden. If you are trying to set an image as the cursor, the\\nrecommended size is 16x16 or 32x32 pixels. The values for parameters x and y\\nmust be less than the dimensions of the image.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"cursor\",\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"Built-In: either ARROW, CROSS, HAND, MOVE, TEXT and WAIT\\n Native CSS properties: 'grab', 'progress', 'cell' etc.\\n External: path for cursor's images\\n (Allowed File extensions: .cur, .gif, .jpg, .jpeg, .png)\\n For more information on Native CSS cursors and url visit:\\n https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\\n\",\n \"type\": \"String|Constant\"\n },\n {\n \"name\": \"x\",\n \"description\": \"the horizontal active spot of the cursor (must be less than 32)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"the vertical active spot of the cursor (must be less than 32)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n// Move the mouse across the quadrants\\n// to see the cursor change\\nfunction draw() {\\n line(width / 2, 0, width / 2, height);\\n line(0, height / 2, width, height / 2);\\n if (mouseX < 50 && mouseY < 50) {\\n cursor(CROSS);\\n } else if (mouseX > 50 && mouseY < 50) {\\n cursor('progress');\\n } else if (mouseX > 50 && mouseY > 50) {\\n cursor('https://s3.amazonaws.com/mupublicdata/cursor.cur');\\n } else {\\n cursor('grab');\\n }\\n}\\n\"\n ],\n \"alt\": \"canvas is divided into four quadrants. cursor on first is a cross, second is a progress,\\nthird is a custom cursor using path to the cursor and fourth is a grab.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 181,\n \"description\": \"Specifies the number of frames to be displayed every second. For example,\\nthe function call frameRate(30) will attempt to refresh 30 times a second.\\nIf the processor is not fast enough to maintain the specified rate, the\\nframe rate will not be achieved. Setting the frame rate within setup() is\\nrecommended. The default frame rate is based on the frame rate of the display\\n(here also called "refresh rate"), which is set to 60 frames per second on most\\ncomputers. A frame rate of 24 frames per second (usual for movies) or above\\nwill be enough for smooth animations\\nThis is the same as setFrameRate(val).\\n\\nCalling frameRate() with no arguments returns the current framerate. The\\ndraw function must run at least once before it will return a value. This\\nis the same as getFrameRate().\\n\\nCalling frameRate() with arguments that are not of the type numbers\\nor are non positive also returns current framerate.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"frameRate\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet rectX = 0;\\nlet fr = 30; //starting FPS\\nlet clr;\\n\\nfunction setup() {\\n background(200);\\n frameRate(fr); // Attempt to refresh at starting FPS\\n clr = color(255, 0, 0);\\n}\\n\\nfunction draw() {\\n background(200);\\n rectX = rectX += 1; // Move Rectangle\\n\\n if (rectX >= width) {\\n // If you go off screen.\\n if (fr === 30) {\\n clr = color(0, 0, 255);\\n fr = 10;\\n frameRate(fr); // make frameRate 10 FPS\\n } else {\\n clr = color(255, 0, 0);\\n fr = 30;\\n frameRate(fr); // make frameRate 30 FPS\\n }\\n rectX = 0;\\n }\\n fill(clr);\\n rect(rectX, 40, 20, 20);\\n}\\n\"\n ],\n \"alt\": \"blue rect moves left to right, followed by red rect moving faster. Loops.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\",\n \"overloads\": [\n {\n \"line\": 181,\n \"params\": [\n {\n \"name\": \"fps\",\n \"description\": \"number of frames to be displayed every second\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 242,\n \"params\": [],\n \"return\": {\n \"description\": \"current frameRate\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 281,\n \"description\": \"Hides the cursor from view.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noCursor\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n noCursor();\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipse(mouseX, mouseY, 10, 10);\\n}\\n\"\n ],\n \"alt\": \"cursor becomes 10x 10 white ellipse the moves with mouse x and y.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 306,\n \"description\": \"System variable that stores the width of the screen display according to The\\ndefault pixelDensity. This is used to run a\\nfull-screen program on any display size. To return actual screen size,\\nmultiply this by pixelDensity.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"displayWidth\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\ncreateCanvas(displayWidth, displayHeight);\\n\"\n ],\n \"alt\": \"cursor becomes 10x 10 white ellipse the moves with mouse x and y.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 325,\n \"description\": \"System variable that stores the height of the screen display according to The\\ndefault pixelDensity. This is used to run a\\nfull-screen program on any display size. To return actual screen size,\\nmultiply this by pixelDensity.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"displayHeight\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\ncreateCanvas(displayWidth, displayHeight);\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 344,\n \"description\": \"System variable that stores the width of the inner window, it maps to\\nwindow.innerWidth.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"windowWidth\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\ncreateCanvas(windowWidth, windowHeight);\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 360,\n \"description\": \"System variable that stores the height of the inner window, it maps to\\nwindow.innerHeight.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"windowHeight\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\ncreateCanvas(windowWidth, windowHeight);\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 376,\n \"description\": \"The windowResized() function is called once every time the browser window\\nis resized. This is a good place to resize the canvas or do any other\\nadjustments to accommodate the new window size.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"windowResized\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(windowWidth, windowHeight);\\n}\\n\\nfunction draw() {\\n background(0, 100, 200);\\n}\\n\\nfunction windowResized() {\\n resizeCanvas(windowWidth, windowHeight);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 430,\n \"description\": \"System variable that stores the width of the drawing canvas. This value\\nis set by the first parameter of the createCanvas() function.\\nFor example, the function call createCanvas(320, 240) sets the width\\nvariable to the value 320. The value of width defaults to 100 if\\ncreateCanvas() is not used in a program.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"width\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 442,\n \"description\": \"System variable that stores the height of the drawing canvas. This value\\nis set by the second parameter of the createCanvas() function. For\\nexample, the function call createCanvas(320, 240) sets the height\\nvariable to the value 240. The value of height defaults to 100 if\\ncreateCanvas() is not used in a program.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"height\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 454,\n \"description\": \"If argument is given, sets the sketch to fullscreen or not based on the\\nvalue of the argument. If no argument is given, returns the current\\nfullscreen state. Note that due to browser restrictions this can only\\nbe called on user input, for example, on mouse press like the example\\nbelow.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"fullscreen\",\n \"params\": [\n {\n \"name\": \"val\",\n \"description\": \"whether the sketch should be in fullscreen mode\\nor not\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"current fullscreen state\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n\\n\\n// Clicking in the box toggles fullscreen on and off.\\nfunction setup() {\\n background(200);\\n}\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\\n let fs = fullscreen();\\n fullscreen(!fs);\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 505,\n \"description\": \"Sets the pixel scaling for high pixel density displays. By default\\npixel density is set to match display density, call pixelDensity(1)\\nto turn this off. Calling pixelDensity() with no arguments returns\\nthe current pixel density of the sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pixelDensity\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n pixelDensity(1);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n pixelDensity(3.0);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"fuzzy 50x50 white ellipse with black outline in center of canvas.\\nsharp 50x50 white ellipse with black outline in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\",\n \"overloads\": [\n {\n \"line\": 505,\n \"params\": [\n {\n \"name\": \"val\",\n \"description\": \"whether or how much the sketch should scale\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 540,\n \"params\": [],\n \"return\": {\n \"description\": \"current pixel density of the sketch\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 560,\n \"description\": \"Returns the pixel density of the current display the sketch is running on.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"displayDensity\",\n \"return\": {\n \"description\": \"current pixel density of the display\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let density = displayDensity();\\n pixelDensity(density);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 white ellipse with black outline in center of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 617,\n \"description\": \"Gets the current URL.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getURL\",\n \"return\": {\n \"description\": \"url\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nlet url;\\nlet x = 100;\\n\\nfunction setup() {\\n fill(0);\\n noStroke();\\n url = getURL();\\n}\\n\\nfunction draw() {\\n background(200);\\n text(url, x, height / 2);\\n x--;\\n}\\n\\n\"\n ],\n \"alt\": \"current url (http://p5js.org/reference/#/p5/getURL) moves right to left.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 648,\n \"description\": \"Gets the current URL path as an array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getURLPath\",\n \"return\": {\n \"description\": \"path components\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n let urlPath = getURLPath();\\n for (let i = 0; i < urlPath.length; i++) {\\n text(urlPath[i], 10, i * 20 + 20);\\n }\\n}\\n\"\n ],\n \"alt\": \"no display\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/environment.js\",\n \"line\": 671,\n \"description\": \"Gets the current URL params as an Object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getURLParams\",\n \"return\": {\n \"description\": \"URL params\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n\\n// Example: http://p5js.org?year=2014&month=May&day=15\\n\\nfunction setup() {\\n let params = getURLParams();\\n text(params.day, 10, 20);\\n text(params.month, 10, 40);\\n text(params.year, 10, 60);\\n}\\n\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"Environment\",\n \"submodule\": \"Environment\"\n },\n {\n \"file\": \"src/core/error_helpers.js\",\n \"line\": 1,\n \"requires\": [\n \"core\"\n ],\n \"class\": \"p5\",\n \"module\": \"Environment\"\n },\n {\n \"file\": \"src/core/error_helpers.js\",\n \"line\": 584,\n \"description\": \"Validates parameters\\nparam {String} func the name of the function\\nparam {Array} args user input arguments\\nexample:\\n var a;\\n ellipse(10,10,a,5);\\nconsole ouput:\\n "It looks like ellipse received an empty variable in spot #2."\\nexample:\\n ellipse(10,"foo",5,5);\\nconsole output:\\n "ellipse was expecting a number for parameter #1,\\n received "foo" instead."\\n\",\n \"class\": \"p5\",\n \"module\": \"Environment\"\n },\n {\n \"file\": \"src/core/error_helpers.js\",\n \"line\": 645,\n \"description\": \"Prints out all the colors in the color pallete with white text.\\nFor color blindness testing.\\n\",\n \"class\": \"p5\",\n \"module\": \"Environment\"\n },\n {\n \"file\": \"src/core/helpers.js\",\n \"line\": 1,\n \"requires\": [\n \"constants\"\n ],\n \"class\": \"p5\",\n \"module\": \"Environment\"\n },\n {\n \"file\": \"src/core/legacy.js\",\n \"line\": 1,\n \"requires\": [\n \"core\\nThese are functions that are part of the Processing API but are not part of\\nthe p5.js API. In some cases they have a new name\",\n \"in others\",\n \"they are\\nremoved completely. Not all unsupported Processing functions are listed here\\nbut we try to include ones that a user coming from Processing might likely\\ncall.\"\n ],\n \"class\": \"p5\",\n \"module\": \"Environment\"\n },\n {\n \"file\": \"src/core/main.js\",\n \"line\": 49,\n \"description\": \"Called directly before setup(), the preload() function is used to handle\\nasynchronous loading of external files in a blocking way. If a preload\\nfunction is defined, setup() will wait until any load calls within have\\nfinished. Nothing besides load calls (loadImage, loadJSON, loadFont,\\nloadStrings, etc.) should be inside the preload function. If asynchronous\\nloading is preferred, the load methods can instead be called in setup()\\nor anywhere else with the use of a callback parameter.\\n\\nBy default the text "loading..." will be displayed. To make your own\\nloading page, include an HTML element with id "p5_loading" in your\\npage. More information here.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"preload\",\n \"example\": [\n \"\\n\\nlet img;\\nlet c;\\nfunction preload() {\\n // preload() runs once\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n // setup() waits until preload() is done\\n img.loadPixels();\\n // get color of middle pixel\\n c = img.get(img.width / 2, img.height / 2);\\n}\\n\\nfunction draw() {\\n background(c);\\n image(img, 25, 25, 50, 50);\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/main.js\",\n \"line\": 90,\n \"description\": \"The setup() function is called once when the program starts. It's used to\\ndefine initial environment properties such as screen size and background\\ncolor and to load media such as images and fonts as the program starts.\\nThere can only be one setup() function for each program and it shouldn't\\nbe called again after its initial execution.\\n\\nNote: Variables declared within setup() are not accessible within other\\nfunctions, including draw().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setup\",\n \"example\": [\n \"\\n\\nlet a = 0;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(102);\\n}\\n\\nfunction draw() {\\n rect(a++ % width, 10, 2, 80);\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/main.js\",\n \"line\": 121,\n \"description\": \"Called directly after setup(), the draw() function continuously executes\\nthe lines of code contained inside its block until the program is stopped\\nor noLoop() is called. Note if noLoop() is called in setup(), draw() will\\nstill be executed once before stopping. draw() is called automatically and\\nshould never be called explicitly.\\n\\nIt should always be controlled with noLoop(), redraw() and loop(). After\\nnoLoop() stops the code in draw() from executing, redraw() causes the\\ncode inside draw() to execute once, and loop() will cause the code\\ninside draw() to resume executing continuously.\\n\\nThe number of times draw() executes in each second may be controlled with\\nthe frameRate() function.\\n\\nThere can only be one draw() function for each sketch, and draw() must\\nexist if you want the code to run continuously, or to process events such\\nas mousePressed(). Sometimes, you might have an empty call to draw() in\\nyour program, as shown in the above example.\\n\\nIt is important to note that the drawing coordinate system will be reset\\nat the beginning of each draw() call. If any transformations are performed\\nwithin draw() (ex: scale, rotate, translate), their effects will be\\nundone at the beginning of draw(), so transformations will not accumulate\\nover time. On the other hand, styling applied (ex: fill, stroke, etc) will\\nremain in effect.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"draw\",\n \"example\": [\n \"\\n\\nlet yPos = 0;\\nfunction setup() {\\n // setup() runs once\\n frameRate(30);\\n}\\nfunction draw() {\\n // draw() loops forever, until stopped\\n background(204);\\n yPos = yPos - 1;\\n if (yPos < 0) {\\n yPos = height;\\n }\\n line(0, yPos, width, yPos);\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/main.js\",\n \"line\": 401,\n \"description\": \"Removes the entire p5 sketch. This will remove the canvas and any\\nelements created by p5.js. It will also stop the draw loop and unbind\\nany properties or methods from the window global scope. It will\\nleave a variable p5 in case you wanted to create a new p5 sketch.\\nIf you like, you can set p5 = null to erase it. While all functions and\\nvariables and objects created by the p5 library will be removed, any\\nother global variables created by your code will remain.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"remove\",\n \"example\": [\n \"\\n\\nfunction draw() {\\n ellipse(50, 50, 10, 10);\\n}\\n\\nfunction mousePressed() {\\n remove(); // remove whole sketch on mouse press\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/main.js\",\n \"line\": 586,\n \"description\": \"Allows for the friendly error system (FES) to be turned off when creating a sketch,\\nwhich can give a significant boost to performance when needed.\\nSee \\ndisabling the friendly error system.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"disableFriendlyErrors\",\n \"type\": \"Boolean\",\n \"example\": [\n \"\\n\\np5.disableFriendlyErrors = true;\\n\\nfunction setup() {\\n createCanvas(100, 50);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 26,\n \"description\": \"Underlying HTML element. All normal HTML methods can be called on this.\\n\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let c = createCanvas(50, 50);\\n c.elt.style.border = '5px solid red';\\n}\\n\\nfunction draw() {\\n background(220);\\n}\\n\\n\"\n ],\n \"itemtype\": \"property\",\n \"name\": \"elt\",\n \"readonly\": \"\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 52,\n \"description\": \"Attaches the element to the parent specified. A way of setting\\n the container for the element. Accepts either a string ID, DOM\\n node, or p5.Element. If no arguments given, parent node is returned.\\n For more ways to position the canvas, see the\\n \\n positioning the canvas wiki page.\\nAll above examples except for the first one require the inclusion of\\n the p5.dom library in your index.html. See the\\n using a library\\n section for information on how to include this library.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"parent\",\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n // in the html file:\\n // <div id=\\\"myContainer\\\"></div>\\n// in the js file:\\n let cnv = createCanvas(100, 100);\\n cnv.parent('myContainer');\\n \\n \\n let div0 = createDiv('this is the parent');\\n let div1 = createDiv('this is the child');\\n div1.parent(div0); // use p5.Element\\n \\n \\n let div0 = createDiv('this is the parent');\\n div0.id('apples');\\n let div1 = createDiv('this is the child');\\n div1.parent('apples'); // use id\\n \\n \\n let elt = document.getElementById('myParentDiv');\\n let div1 = createDiv('this is the child');\\n div1.parent(elt); // use element from page\\n \"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\",\n \"overloads\": [\n {\n \"line\": 52,\n \"params\": [\n {\n \"name\": \"parent\",\n \"description\": \"the ID, DOM node, or p5.Element\\n of desired parent element\\n\",\n \"type\": \"String|p5.Element|Object\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 100,\n \"params\": [],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Element\"\n }\n }\n ]\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 122,\n \"description\": \"Sets the ID of the element. If no ID argument is passed in, it instead\\n returns the current ID of the element.\\n Note that only one element can have a particular id in a page.\\n The .class() function can be used\\n to identify multiple elements with the same class name.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"id\",\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n function setup() {\\n let cnv = createCanvas(100, 100);\\n // Assigns a CSS selector ID to\\n // the canvas element.\\n cnv.id('mycanvas');\\n }\\n \"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\",\n \"overloads\": [\n {\n \"line\": 122,\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the element\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 147,\n \"params\": [],\n \"return\": {\n \"description\": \"the id of the element\",\n \"type\": \"String\"\n }\n }\n ]\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 162,\n \"description\": \"Adds given class to the element. If no class argument is passed in, it\\n instead returns a string containing the current class(es) of the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"class\",\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n function setup() {\\n let cnv = createCanvas(100, 100);\\n // Assigns a CSS selector class 'small'\\n // to the canvas element.\\n cnv.class('small');\\n }\\n \"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\",\n \"overloads\": [\n {\n \"line\": 162,\n \"params\": [\n {\n \"name\": \"class\",\n \"description\": \"class to add\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 184,\n \"params\": [],\n \"return\": {\n \"description\": \"the class of the element\",\n \"type\": \"String\"\n }\n }\n ]\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 197,\n \"description\": \"The .mousePressed() function is called once after every time a\\nmouse button is pressed over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mousePressed\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when mouse is\\n pressed over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mousePressed(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any click anywhere\\nfunction mousePressed() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 258,\n \"description\": \"The .doubleClicked() function is called once after every time a\\nmouse button is pressed twice over the element. This can be used to\\nattach element and action specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"doubleClicked\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when mouse is\\n double clicked over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.doubleClicked(changeGray); // attach listener for\\n // canvas double click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any double click anywhere\\nfunction doubleClicked() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is double clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 307,\n \"description\": \"The .mouseWheel() function is called once after every time a\\nmouse wheel is scrolled over the element. This can be used to\\nattach element specific event listeners.\\n\\nThe function accepts a callback function as argument which will be executed\\nwhen the wheel event is triggered on the element, the callback function is\\npassed one argument event. The event.deltaY property returns negative\\nvalues if the mouse wheel is rotated up or away from the user and positive\\nin the other direction. The event.deltaX does the same as event.deltaY\\nexcept it reads the horizontal wheel scroll of the mouse wheel.\\n\\nOn OS X with "natural" scrolling enabled, the event.deltaY values are\\nreversed.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseWheel\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when mouse is\\n scrolled over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseWheel(changeSize); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with mousewheel movement\\n// anywhere on screen\\nfunction mouseWheel() {\\n g = g + 10;\\n}\\n\\n// this function fires with mousewheel movement\\n// over canvas only\\nfunction changeSize(event) {\\n if (event.deltaY > 0) {\\n d = d + 10;\\n } else {\\n d = d - 10;\\n }\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 373,\n \"description\": \"The .mouseReleased() function is called once after every time a\\nmouse button is released over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseReleased\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when mouse is\\n released over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseReleased(changeGray); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires after the mouse has been\\n// released\\nfunction mouseReleased() {\\n d = d + 10;\\n}\\n\\n// this function fires after the mouse has been\\n// released while on canvas\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 427,\n \"description\": \"The .mouseClicked() function is called once after a mouse button is\\npressed and released over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseClicked\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when mouse is\\n clicked over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet cnv;\\nlet d;\\nlet g;\\n\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseClicked(changeGray); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires after the mouse has been\\n// clicked anywhere\\nfunction mouseClicked() {\\n d = d + 10;\\n}\\n\\n// this function fires after the mouse has been\\n// clicked on canvas\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 483,\n \"description\": \"The .mouseMoved() function is called once every time a\\nmouse moves over the element. This can be used to attach an\\nelement specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseMoved\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a mouse moves\\n over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d = 30;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseMoved(changeSize); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n fill(200);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires when mouse moves anywhere on\\n// page\\nfunction mouseMoved() {\\n g = g + 5;\\n if (g > 255) {\\n g = 0;\\n }\\n}\\n\\n// this function fires when mouse moves over canvas\\nfunction changeSize() {\\n d = d + 2;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 541,\n \"description\": \"The .mouseOver() function is called once after every time a\\nmouse moves onto the element. This can be used to attach an\\nelement specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseOver\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a mouse moves\\n onto the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseOver(changeGray);\\n d = 10;\\n}\\n\\nfunction draw() {\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\nfunction changeGray() {\\n d = d + 10;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 584,\n \"description\": \"The .mouseOut() function is called once after every time a\\nmouse moves off the element. This can be used to attach an\\nelement specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseOut\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a mouse\\n moves off of an element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseOut(changeGray);\\n d = 10;\\n}\\n\\nfunction draw() {\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\nfunction changeGray() {\\n d = d + 10;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 626,\n \"description\": \"The .touchStarted() function is called once after every time a touch is\\nregistered. This can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchStarted\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a touch\\n starts over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchStarted(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any touch anywhere\\nfunction touchStarted() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 674,\n \"description\": \"The .touchMoved() function is called once after every time a touch move is\\nregistered. This can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchMoved\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a touch moves over\\n the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchMoved(changeGray); // attach listener for\\n // canvas click only\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 714,\n \"description\": \"The .touchEnded() function is called once after every time a touch is\\nregistered. This can be used to attach element specific event listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchEnded\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a touch ends\\n over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchEnded(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any touch anywhere\\nfunction touchEnded() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 763,\n \"description\": \"The .dragOver() function is called once after every time a\\nfile is dragged over the element. This can be used to attach an\\nelement specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dragOver\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a file is\\n dragged over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n// To test this sketch, simply drag a\\n// file over the canvas\\nfunction setup() {\\n let c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('Drag file', width / 2, height / 2);\\n c.dragOver(dragOverCallback);\\n}\\n\\n// This function will be called whenever\\n// a file is dragged over the canvas\\nfunction dragOverCallback() {\\n background(240);\\n text('Dragged over', width / 2, height / 2);\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 801,\n \"description\": \"The .dragLeave() function is called once after every time a\\ndragged file leaves the element area. This can be used to attach an\\nelement specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dragLeave\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when a file is\\n dragged off the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n// To test this sketch, simply drag a file\\n// over and then out of the canvas area\\nfunction setup() {\\n let c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('Drag file', width / 2, height / 2);\\n c.dragLeave(dragLeaveCallback);\\n}\\n\\n// This function will be called whenever\\n// a file is dragged out of the canvas\\nfunction dragLeaveCallback() {\\n background(240);\\n text('Dragged off', width / 2, height / 2);\\n}\\n\"\n ],\n \"alt\": \"nothing displayed\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Element.js\",\n \"line\": 865,\n \"description\": \"Helper fxn for sharing pixel methods\\n\",\n \"class\": \"p5.Element\",\n \"module\": \"DOM\",\n \"submodule\": \"DOM\"\n },\n {\n \"file\": \"src/core/p5.Graphics.js\",\n \"line\": 65,\n \"description\": \"Resets certain values such as those modified by functions in the Transform category\\nand in the Lights category that are not automatically reset\\nwith graphics buffer objects. Calling this in draw() will copy the behavior\\nof the standard canvas.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"reset\",\n \"example\": [\n \"\\n\\n\\nlet pg;\\nfunction setup() {\\n createCanvas(100, 100);\\n background(0);\\n pg = createGraphics(50, 100);\\n pg.fill(0);\\n frameRate(5);\\n}\\nfunction draw() {\\n image(pg, width / 2, 0);\\n pg.background(255);\\n // p5.Graphics object behave a bit differently in some cases\\n // The normal canvas on the left resets the translate\\n // with every loop through draw()\\n // the graphics object on the right doesn't automatically reset\\n // so translate() is additive and it moves down the screen\\n rect(0, 0, width / 2, 5);\\n pg.rect(0, 0, width / 2, 5);\\n translate(0, 5, 0);\\n pg.translate(0, 5, 0);\\n}\\nfunction mouseClicked() {\\n // if you click you will see that\\n // reset() resets the translate back to the initial state\\n // of the Graphics object\\n pg.reset();\\n}\\n\"\n ],\n \"alt\": \"A white line on a black background stays still on the top-left half.\\nA black line animates from top to bottom on a white background on the right half.\\nWhen clicked, the black line starts back over at the top.\",\n \"class\": \"p5.Graphics\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Graphics.js\",\n \"line\": 117,\n \"description\": \"Removes a Graphics object from the page and frees any resources\\nassociated with it.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"remove\",\n \"example\": [\n \"\\n\\nlet bg;\\nfunction setup() {\\n bg = createCanvas(100, 100);\\n bg.background(0);\\n image(bg, 0, 0);\\n bg.remove();\\n}\\n\\n\\n\\nlet bg;\\nfunction setup() {\\n pixelDensity(1);\\n createCanvas(100, 100);\\n stroke(255);\\n fill(0);\\n\\n // create and draw the background image\\n bg = createGraphics(100, 100);\\n bg.background(200);\\n bg.ellipse(50, 50, 80, 80);\\n}\\nfunction draw() {\\n let t = millis() / 1000;\\n // draw the background\\n if (bg) {\\n image(bg, frameCount % 100, 0);\\n image(bg, frameCount % 100 - 100, 0);\\n }\\n // draw the foreground\\n let p = p5.Vector.fromAngle(t, 35).add(50, 50);\\n ellipse(p.x, p.y, 30);\\n}\\nfunction mouseClicked() {\\n // remove the background\\n if (bg) {\\n bg.remove();\\n bg = null;\\n }\\n}\\n\"\n ],\n \"alt\": \"no image\\na multi-colored circle moving back and forth over a scrolling background.\",\n \"class\": \"p5.Graphics\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Renderer.js\",\n \"line\": 97,\n \"description\": \"Resize our canvas element.\\n\",\n \"class\": \"p5.Renderer\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Renderer.js\",\n \"line\": 335,\n \"description\": \"Helper fxn to check font type (system or otf)\\n\",\n \"class\": \"p5.Renderer\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Renderer.js\",\n \"line\": 388,\n \"description\": \"Helper fxn to measure ascent and descent.\\nAdapted from http://stackoverflow.com/a/25355178\\n\",\n \"class\": \"p5.Renderer\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Renderer2D.js\",\n \"line\": 9,\n \"description\": \"p5.Renderer2D\\nThe 2D graphics canvas renderer class.\\nextends p5.Renderer\\n\",\n \"class\": \"p5\",\n \"module\": \"Rendering\"\n },\n {\n \"file\": \"src/core/p5.Renderer2D.js\",\n \"line\": 405,\n \"description\": \"Generate a cubic Bezier representing an arc on the unit circle of total\\nangle size radians, beginning start radians above the x-axis. Up to\\nfour of these curves are combined to make a full arc.\\nSee www.joecridge.me/bezier.pdf for an explanation of the method.\\n\",\n \"class\": \"p5\",\n \"module\": \"Rendering\"\n },\n {\n \"file\": \"src/core/rendering.js\",\n \"line\": 17,\n \"description\": \"Creates a canvas element in the document, and sets the dimensions of it\\nin pixels. This method should be called only once at the start of setup.\\nCalling createCanvas more than once in a sketch will result in very\\nunpredictable behavior. If you want more than one drawing canvas\\nyou could use createGraphics (hidden by default but it can be shown).\\n\\nThe system variables width and height are set by the parameters passed\\nto this function. If createCanvas() is not used, the window will be\\ngiven a default size of 100x100 pixels.\\n\\nFor more ways to position the canvas, see the\\n\\npositioning the canvas wiki page.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createCanvas\",\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width of the canvas\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the canvas\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"renderer\",\n \"description\": \"either P2D or WEBGL\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Renderer\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 50);\\n background(153);\\n line(0, 0, width, height);\\n}\\n\\n\"\n ],\n \"alt\": \"Black line extending from top-left of canvas to bottom right.\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/rendering.js\",\n \"line\": 119,\n \"description\": \"Resizes the canvas to given width and height. The canvas will be cleared\\nand draw will be called immediately, allowing the sketch to re-render itself\\nin the resized canvas.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"resizeCanvas\",\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width of the canvas\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the canvas\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"noRedraw\",\n \"description\": \"don't redraw the canvas immediately\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(windowWidth, windowHeight);\\n}\\n\\nfunction draw() {\\n background(0, 100, 200);\\n}\\n\\nfunction windowResized() {\\n resizeCanvas(windowWidth, windowHeight);\\n}\\n\"\n ],\n \"alt\": \"No image displayed.\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/rendering.js\",\n \"line\": 174,\n \"description\": \"Removes the default canvas for a p5 sketch that doesn't\\nrequire a canvas\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noCanvas\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n noCanvas();\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/rendering.js\",\n \"line\": 197,\n \"description\": \"Creates and returns a new p5.Renderer object. Use this class if you need\\nto draw into an off-screen graphics buffer. The two parameters define the\\nwidth and height in pixels.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createGraphics\",\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width of the offscreen graphics buffer\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the offscreen graphics buffer\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"renderer\",\n \"description\": \"either P2D or WEBGL\\nundefined defaults to p2d\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"offscreen graphics buffer\",\n \"type\": \"p5.Graphics\"\n },\n \"example\": [\n \"\\n\\n\\nlet pg;\\nfunction setup() {\\n createCanvas(100, 100);\\n pg = createGraphics(100, 100);\\n}\\nfunction draw() {\\n background(200);\\n pg.background(100);\\n pg.noStroke();\\n pg.ellipse(pg.width / 2, pg.height / 2, 50, 50);\\n image(pg, 50, 50);\\n image(pg, 0, 0, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"4 grey squares alternating light and dark grey. White quarter circle mid-left.\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/rendering.js\",\n \"line\": 236,\n \"description\": \"Blends the pixels in the display window according to the defined mode.\\nThere is a choice of the following modes to blend the source pixels (A)\\nwith the ones of pixels already in the display window (B):\\n\\nBLEND - linear interpolation of colours: C =\\nA*factor + B. This is the default blending mode.\\nADD - sum of A and B\\nDARKEST - only the darkest colour succeeds: C =\\nmin(A*factor, B).\\nLIGHTEST - only the lightest colour succeeds: C =\\nmax(A*factor, B).\\nDIFFERENCE - subtract colors from underlying image.\\nEXCLUSION - similar to DIFFERENCE, but less\\nextreme.\\nMULTIPLY - multiply the colors, result will always be\\ndarker.\\nSCREEN - opposite multiply, uses inverse values of the\\ncolors.\\nREPLACE - the pixels entirely replace the others and\\ndon't utilize alpha (transparency) values.\\nOVERLAY - mix of MULTIPLY and SCREEN\\n. Multiplies dark values, and screens light values. (2D)\\nHARD_LIGHT - SCREEN when greater than 50%\\ngray, MULTIPLY when lower. (2D)\\nSOFT_LIGHT - mix of DARKEST and\\nLIGHTEST. Works like OVERLAY, but not as harsh. (2D)\\n\\nDODGE - lightens light tones and increases contrast,\\nignores darks. (2D)\\nBURN - darker areas are applied, increasing contrast,\\nignores lights. (2D)\\nSUBTRACT - remainder of A and B (3D)\\n\\n\\n(2D) indicates that this blend mode only works in the 2D renderer.\\n(3D) indicates that this blend mode only works in the WEBGL renderer.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"blendMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"blend mode to set for canvas.\\n either BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\\n EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\\n SOFT_LIGHT, DODGE, BURN, ADD, or SUBTRACT\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nblendMode(LIGHTEST);\\nstrokeWeight(30);\\nstroke(80, 150, 255);\\nline(25, 25, 75, 75);\\nstroke(255, 50, 50);\\nline(75, 25, 25, 75);\\n\\n\\n\\n\\nblendMode(MULTIPLY);\\nstrokeWeight(30);\\nstroke(80, 150, 255);\\nline(25, 25, 75, 75);\\nstroke(255, 50, 50);\\nline(75, 25, 25, 75);\\n\\n\"\n ],\n \"alt\": \"translucent image thick red & blue diagonal rounded lines intersecting center\\nThick red & blue diagonal rounded lines intersecting center. dark at overlap\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\"\n },\n {\n \"file\": \"src/core/shim.js\",\n \"line\": 23,\n \"description\": \"shim for Uint8ClampedArray.slice\\n(allows arrayCopy to work with pixels[])\\nwith thanks to http://halfpapstudios.com/blog/tag/html5-canvas/\\nEnumerable set to false to protect for...in from\\nUint8ClampedArray.prototype pollution.\\n\",\n \"class\": \"p5\",\n \"module\": \"Rendering\"\n },\n {\n \"file\": \"src/core/shim.js\",\n \"line\": 45,\n \"description\": \"this is implementation of Object.assign() which is unavailable in\\nIE11 and (non-Chrome) Android browsers.\\nThe assign() method is used to copy the values of all enumerable\\nown properties from one or more source objects to a target object.\\nIt will return the target object.\\nModified from https://github.com/ljharb/object.assign\\n\",\n \"class\": \"p5\",\n \"module\": \"Rendering\"\n },\n {\n \"file\": \"src/core/structure.js\",\n \"line\": 12,\n \"description\": \"Stops p5.js from continuously executing the code within draw().\\nIf loop() is called, the code in draw() begins to run continuously again.\\nIf using noLoop() in setup(), it should be the last line inside the block.\\n\\nWhen noLoop() is used, it's not possible to manipulate or access the\\nscreen inside event handling functions such as mousePressed() or\\nkeyPressed(). Instead, use those functions to call redraw() or loop(),\\nwhich will run draw(), which can update the screen properly. This means\\nthat when noLoop() has been called, no drawing can happen, and functions\\nlike saveFrame() or loadPixels() may not be used.\\n\\nNote that if the sketch is resized, redraw() will be called to update\\nthe sketch, even after noLoop() has been specified. Otherwise, the sketch\\nwould enter an odd state until loop() was called.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noLoop\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n noLoop();\\n}\\n\\nfunction draw() {\\n line(10, 10, 90, 90);\\n}\\n\\n\\n\\nlet x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n}\\n\\nfunction draw() {\\n background(204);\\n x = x + 0.1;\\n if (x > width) {\\n x = 0;\\n }\\n line(x, 0, x, height);\\n}\\n\\nfunction mousePressed() {\\n noLoop();\\n}\\n\\nfunction mouseReleased() {\\n loop();\\n}\\n\"\n ],\n \"alt\": \"113 pixel long line extending from top-left to bottom right of canvas.\\nhorizontal line moves slowly from left. Loops but stops on mouse press.\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/structure.js\",\n \"line\": 74,\n \"description\": \"By default, p5.js loops through draw() continuously, executing the code\\nwithin it. However, the draw() loop may be stopped by calling noLoop().\\nIn that case, the draw() loop can be resumed with loop().\\nAvoid calling loop() from inside setup().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"example\": [\n \"\\n\\nlet x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n}\\n\\nfunction draw() {\\n background(204);\\n x = x + 0.1;\\n if (x > width) {\\n x = 0;\\n }\\n line(x, 0, x, height);\\n}\\n\\nfunction mousePressed() {\\n loop();\\n}\\n\\nfunction mouseReleased() {\\n noLoop();\\n}\\n\"\n ],\n \"alt\": \"horizontal line moves slowly from left. Loops but stops on mouse press.\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/structure.js\",\n \"line\": 122,\n \"description\": \"The push() function saves the current drawing style settings and\\ntransformations, while pop() restores these settings. Note that these\\nfunctions are always used together. They allow you to change the style\\nand transformation settings and later return to what you had. When a new\\nstate is started with push(), it builds on the current style and transform\\ninformation. The push() and pop() functions can be embedded to provide\\nmore control. (See the second example for a demonstration.)\\n\\npush() stores information related to the current transformation state\\nand style settings controlled by the following functions: fill(),\\nstroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),\\nimageMode(), rectMode(), ellipseMode(), colorMode(), textAlign(),\\ntextFont(), textSize(), textLeading().\\n\\nIn WEBGL mode additional style settings are stored. These are controlled by the following functions: setCamera(), ambientLight(), directionalLight(),\\npointLight(), texture(), specularMaterial(), shininess(), normalMaterial()\\nand shader().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"push\",\n \"example\": [\n \"\\n\\n\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\nstrokeWeight(10);\\nfill(204, 153, 0);\\ntranslate(50, 0);\\nellipse(0, 50, 33, 33); // Middle circle\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n\\n\\n\\n\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\nstrokeWeight(10);\\nfill(204, 153, 0);\\nellipse(33, 50, 33, 33); // Left-middle circle\\n\\npush(); // Start another new drawing state\\nstroke(0, 102, 153);\\nellipse(66, 50, 33, 33); // Right-middle circle\\npop(); // Restore previous state\\n\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n\\n\"\n ],\n \"alt\": \"Gold ellipse + thick black outline @center 2 white ellipses on left and right.\\n2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/structure.js\",\n \"line\": 191,\n \"description\": \"The push() function saves the current drawing style settings and\\ntransformations, while pop() restores these settings. Note that these\\nfunctions are always used together. They allow you to change the style\\nand transformation settings and later return to what you had. When a new\\nstate is started with push(), it builds on the current style and transform\\ninformation. The push() and pop() functions can be embedded to provide\\nmore control. (See the second example for a demonstration.)\\n\\npush() stores information related to the current transformation state\\nand style settings controlled by the following functions: fill(),\\nstroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),\\nimageMode(), rectMode(), ellipseMode(), colorMode(), textAlign(),\\ntextFont(), textSize(), textLeading().\\n\\nIn WEBGL mode additional style settings are stored. These are controlled by the following functions: setCamera(), ambientLight(), directionalLight(),\\npointLight(), texture(), specularMaterial(), shininess(), normalMaterial()\\nand shader().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pop\",\n \"example\": [\n \"\\n\\n\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\ntranslate(50, 0);\\nstrokeWeight(10);\\nfill(204, 153, 0);\\nellipse(0, 50, 33, 33); // Middle circle\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n\\n\\n\\n\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\nstrokeWeight(10);\\nfill(204, 153, 0);\\nellipse(33, 50, 33, 33); // Left-middle circle\\n\\npush(); // Start another new drawing state\\nstroke(0, 102, 153);\\nellipse(66, 50, 33, 33); // Right-middle circle\\npop(); // Restore previous state\\n\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n\\n\"\n ],\n \"alt\": \"Gold ellipse + thick black outline @center 2 white ellipses on left and right.\\n2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/structure.js\",\n \"line\": 261,\n \"description\": \"Executes the code within draw() one time. This functions allows the\\n program to update the display window only when necessary, for example\\n when an event registered by mousePressed() or keyPressed() occurs.\\n \\n In structuring a program, it only makes sense to call redraw() within\\n events such as mousePressed(). This is because redraw() does not run\\n draw() immediately (it only sets a flag that indicates an update is\\n needed).\\n \\n The redraw() function does not work properly when called inside draw().\\n To enable/disable animations, use loop() and noLoop().\\n \\n In addition you can set the number of redraws per method call. Just\\n add an integer as single parameter for the number of redraws.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"redraw\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"Redraw for n-times. The default value is 1.\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n let x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n }\\nfunction draw() {\\n background(204);\\n line(x, 0, x, height);\\n }\\nfunction mousePressed() {\\n x += 1;\\n redraw();\\n }\\n \\n\\n let x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n }\\nfunction draw() {\\n background(204);\\n x += 1;\\n line(x, 0, x, height);\\n }\\nfunction mousePressed() {\\n redraw(5);\\n }\\n \"\n ],\n \"alt\": \"black line on far left of canvas\\n black line on far left of canvas\",\n \"class\": \"p5\",\n \"module\": \"Structure\",\n \"submodule\": \"Structure\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 13,\n \"description\": \"Multiplies the current matrix by the one specified through the parameters.\\nThis is a powerful operation that can perform the equivalent of translate,\\nscale, shear and rotate all at once. You can learn more about transformation\\nmatrices on \\nWikipedia.\\nThe naming of the arguments here follows the naming of the \\nWHATWG specification and corresponds to a\\ntransformation matrix of the\\nform:\\n\\n\\n\\n\",\n \"itemtype\": \"method\",\n \"name\": \"applyMatrix\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"d\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"e\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"f\",\n \"description\": \"numbers which define the 2x3 matrix to be multiplied\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n background(200);\\n // Equivalent to translate(x, y);\\n applyMatrix(1, 0, 0, 1, 40 + step, 50);\\n rect(0, 0, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n background(200);\\n translate(50, 50);\\n // Equivalent to scale(x, y);\\n applyMatrix(1 / step, 0, 0, 1 / step, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n var angle = map(step, 0, 20, 0, TWO_PI);\\n var cos_a = cos(angle);\\n var sin_a = sin(angle);\\n background(200);\\n translate(50, 50);\\n // Equivalent to rotate(angle);\\n applyMatrix(cos_a, sin_a, -sin_a, cos_a, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n var angle = map(step, 0, 20, -PI / 4, PI / 4);\\n background(200);\\n translate(50, 50);\\n // equivalent to shearX(angle);\\n var shear_factor = 1 / tan(PI / 2 - angle);\\n applyMatrix(1, 0, shear_factor, 1, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateY(PI / 6);\\n stroke(153);\\n box(35);\\n var rad = millis() / 1000;\\n // Set rotation angles\\n var ct = cos(rad);\\n var st = sin(rad);\\n // Matrix for rotation around the Y axis\\n applyMatrix( ct, 0.0, st, 0.0,\\n 0.0, 1.0, 0.0, 0.0,\\n -st, 0.0, ct, 0.0,\\n 0.0, 0.0, 0.0, 1.0);\\n stroke(255);\\n box(50);\\n}\\n\\n\"\n ],\n \"alt\": \"A rectangle translating to the right\\nA rectangle shrinking to the center\\nA rectangle rotating clockwise about the center\\nA rectangle shearing\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 150,\n \"description\": \"Replaces the current matrix with the identity matrix.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"resetMatrix\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(50, 50);\\napplyMatrix(0.5, 0.5, -0.5, 0.5, 0, 0);\\nrect(0, 0, 20, 20);\\n// Note that the translate is also reset.\\nresetMatrix();\\nrect(0, 0, 20, 20);\\n\\n\"\n ],\n \"alt\": \"A rotated retangle in the center with another at the top left corner\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 176,\n \"description\": \"Rotates a shape the amount specified by the angle parameter. This\\nfunction accounts for angleMode, so angles can be entered in either\\nRADIANS or DEGREES.\\n\\nObjects are always rotated around their relative position to the\\norigin and positive numbers rotate objects in a clockwise direction.\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nrotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI).\\nAll tranformations are reset when draw() begins again.\\n\\nTechnically, rotate() multiplies the current transformation matrix\\nby a rotation matrix. This function can be further controlled by\\nthe push() and pop().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rotate\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle of rotation, specified in radians\\n or degrees, depending on current angleMode\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"axis\",\n \"description\": \"(in 3d) the axis to rotate around\\n\",\n \"type\": \"p5.Vector|Number[]\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(width / 2, height / 2);\\nrotate(PI / 3.0);\\nrect(-26, -26, 52, 52);\\n\\n\"\n ],\n \"alt\": \"white 52x52 rect with black outline at center rotated counter 45 degrees\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 216,\n \"description\": \"Rotates around X axis.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rotateX\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle of rotation, specified in radians\\n or degrees, depending on current angleMode\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateX(millis() / 1000);\\n box();\\n}\\n\\n\"\n ],\n \"alt\": \"3d box rotating around the x axis.\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 246,\n \"description\": \"Rotates around Y axis.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rotateY\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle of rotation, specified in radians\\n or degrees, depending on current angleMode\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateY(millis() / 1000);\\n box();\\n}\\n\\n\"\n ],\n \"alt\": \"3d box rotating around the y axis.\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 276,\n \"description\": \"Rotates around Z axis. Webgl mode only.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rotateZ\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle of rotation, specified in radians\\n or degrees, depending on current angleMode\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateZ(millis() / 1000);\\n box();\\n}\\n\\n\"\n ],\n \"alt\": \"3d box rotating around the z axis.\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 306,\n \"description\": \"Increases or decreases the size of a shape by expanding and contracting\\nvertices. Objects always scale from their relative origin to the\\ncoordinate system. Scale values are specified as decimal percentages.\\nFor example, the function call scale(2.0) increases the dimension of a\\nshape by 200%.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function multiply the effect. For example, calling scale(2.0)\\nand then scale(1.5) is the same as scale(3.0). If scale() is called\\nwithin draw(), the transformation is reset when the loop begins again.\\n\\nUsing this function with the z parameter is only available in WEBGL mode.\\nThis function can be further controlled with push() and pop().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"scale\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nrect(30, 20, 50, 50);\\nscale(0.5);\\nrect(30, 20, 50, 50);\\n\\n\\n\\n\\n\\nrect(30, 20, 50, 50);\\nscale(0.5, 1.3);\\nrect(30, 20, 50, 50);\\n\\n\"\n ],\n \"alt\": \"white 52x52 rect with black outline at center rotated counter 45 degrees\\n2 white rects with black outline- 1 50x50 at center. other 25x65 bottom left\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\",\n \"overloads\": [\n {\n \"line\": 306,\n \"params\": [\n {\n \"name\": \"s\",\n \"description\": \"percent to scale the object, or percentage to\\n scale the object in the x-axis if multiple arguments\\n are given\\n\",\n \"type\": \"Number|p5.Vector|Number[]\"\n },\n {\n \"name\": \"y\",\n \"description\": \"percent to scale the object in the y-axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"percent to scale the object in the z-axis (webgl only)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 351,\n \"params\": [\n {\n \"name\": \"scales\",\n \"description\": \"per-axis percents to scale the object\\n\",\n \"type\": \"p5.Vector|Number[]\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 381,\n \"description\": \"Shears a shape around the x-axis the amount specified by the angle\\nparameter. Angles should be specified in the current angleMode.\\nObjects are always sheared around their relative position to the origin\\nand positive numbers shear objects in a clockwise direction.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nshearX(PI/2) and then shearX(PI/2) is the same as shearX(PI).\\nIf shearX() is called within the draw(), the transformation is reset when\\nthe loop begins again.\\n\\nTechnically, shearX() multiplies the current transformation matrix by a\\nrotation matrix. This function can be further controlled by the\\npush() and pop() functions.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shearX\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"angle of shear specified in radians or degrees,\\n depending on current angleMode\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(width / 4, height / 4);\\nshearX(PI / 4.0);\\nrect(0, 0, 30, 30);\\n\\n\"\n ],\n \"alt\": \"white irregular quadrilateral with black outline at top middle.\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 421,\n \"description\": \"Shears a shape around the y-axis the amount specified by the angle\\nparameter. Angles should be specified in the current angleMode. Objects\\nare always sheared around their relative position to the origin and\\npositive numbers shear objects in a clockwise direction.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nshearY(PI/2) and then shearY(PI/2) is the same as shearY(PI). If\\nshearY() is called within the draw(), the transformation is reset when\\nthe loop begins again.\\n\\nTechnically, shearY() multiplies the current transformation matrix by a\\nrotation matrix. This function can be further controlled by the\\npush() and pop() functions.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shearY\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"angle of shear specified in radians or degrees,\\n depending on current angleMode\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(width / 4, height / 4);\\nshearY(PI / 4.0);\\nrect(0, 0, 30, 30);\\n\\n\"\n ],\n \"alt\": \"white irregular quadrilateral with black outline at middle bottom.\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\"\n },\n {\n \"file\": \"src/core/transform.js\",\n \"line\": 461,\n \"description\": \"Specifies an amount to displace objects within the display window.\\nThe x parameter specifies left/right translation, the y parameter\\nspecifies up/down translation.\\n\\nTransformations are cumulative and apply to everything that happens after\\nand subsequent calls to the function accumulates the effect. For example,\\ncalling translate(50, 0) and then translate(20, 0) is the same as\\ntranslate(70, 0). If translate() is called within draw(), the\\ntransformation is reset when the loop begins again. This function can be\\nfurther controlled by using push() and pop().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"translate\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntranslate(30, 20);\\nrect(0, 0, 55, 55);\\n\\n\\n\\n\\n\\nrect(0, 0, 55, 55); // Draw rect at original 0,0\\ntranslate(30, 20);\\nrect(0, 0, 55, 55); // Draw rect at new 0,0\\ntranslate(14, 14);\\nrect(0, 0, 55, 55); // Draw rect at new 0,0\\n\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(200);\\n rectMode(CENTER);\\n translate(width / 2, height / 2);\\n translate(p5.Vector.fromAngle(millis() / 1000, 40));\\n rect(0, 0, 20, 20);\\n}\\n\\n\"\n ],\n \"alt\": \"white 55x55 rect with black outline at center right.\\n3 white 55x55 rects with black outlines at top-l, center-r and bottom-r.\\na 20x20 white rect moving in a circle around the canvas\",\n \"class\": \"p5\",\n \"module\": \"Transform\",\n \"submodule\": \"Transform\",\n \"overloads\": [\n {\n \"line\": 461,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"left/right translation\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"up/down translation\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"forward/backward translation (webgl only)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 515,\n \"params\": [\n {\n \"name\": \"vector\",\n \"description\": \"the vector to translate by\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 16,\n \"description\": \"Creates a new instance of p5.StringDict using the key-value pair\\n or the object you provide.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createStringDict\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.StringDict\"\n },\n \"example\": [\n \"\\n \\n \\n function setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // logs true to console\\n let anotherDictionary = createStringDict({ happy: 'coding' });\\n print(anotherDictionary.hasKey('happy')); // logs true to console\\n }\\n \"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"overloads\": [\n {\n \"line\": 16,\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.StringDict\"\n }\n },\n {\n \"line\": 39,\n \"params\": [\n {\n \"name\": \"object\",\n \"description\": \"object\\n\",\n \"type\": \"Object\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.StringDict\"\n }\n }\n ]\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 50,\n \"description\": \"Creates a new instance of p5.NumberDict using the key-value pair\\n or object you provide.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createNumberDict\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.NumberDict\"\n },\n \"example\": [\n \"\\n \\n \\n function setup() {\\n let myDictionary = createNumberDict(100, 42);\\n print(myDictionary.hasKey(100)); // logs true to console\\n let anotherDictionary = createNumberDict({ 200: 84 });\\n print(anotherDictionary.hasKey(200)); // logs true to console\\n }\\n \"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"overloads\": [\n {\n \"line\": 50,\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.NumberDict\"\n }\n },\n {\n \"line\": 73,\n \"params\": [\n {\n \"name\": \"object\",\n \"description\": \"object\\n\",\n \"type\": \"Object\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.NumberDict\"\n }\n }\n ]\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 103,\n \"description\": \"Returns the number of key-value pairs currently stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"size\",\n \"return\": {\n \"description\": \"the number of key-value pairs in the Dictionary\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict(1, 10);\\n myDictionary.create(2, 20);\\n myDictionary.create(3, 30);\\n print(myDictionary.size()); // logs 3 to the console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 125,\n \"description\": \"Returns true if the given key exists in the Dictionary,\\notherwise returns false.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hasKey\",\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"that you want to look up\\n\",\n \"type\": \"Number|String\"\n }\n ],\n \"return\": {\n \"description\": \"whether that key exists in Dictionary\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // logs true to console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 148,\n \"description\": \"Returns the value stored at the given key.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"get\",\n \"params\": [\n {\n \"name\": \"the\",\n \"description\": \"key you want to access\\n\",\n \"type\": \"Number|String\"\n }\n ],\n \"return\": {\n \"description\": \"the value stored at that key\",\n \"type\": \"Number|String\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n let myValue = myDictionary.get('p5');\\n print(myValue === 'js'); // logs true to console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 175,\n \"description\": \"Updates the value associated with the given key in case it already exists\\nin the Dictionary. Otherwise a new key-value pair is added.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"\",\n \"type\": \"Number|String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"Number|String\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.set('p5', 'JS');\\n myDictionary.print(); // logs \\\"key: p5 - value: JS\\\" to console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 203,\n \"description\": \"private helper function to handle the user passing in objects\\nduring construction or calls to create()\\n\",\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 214,\n \"description\": \"Creates a new key-value pair in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"create\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.create('happy', 'coding');\\n myDictionary.print();\\n // above logs \\\"key: p5 - value: js, key: happy - value: coding\\\" to console\\n}\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\",\n \"overloads\": [\n {\n \"line\": 214,\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"\",\n \"type\": \"Number|String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"Number|String\"\n }\n ]\n },\n {\n \"line\": 232,\n \"params\": [\n {\n \"name\": \"obj\",\n \"description\": \"key/value pair\\n\",\n \"type\": \"Object\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 250,\n \"description\": \"Removes all previously stored key-value pairs from the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clear\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // prints 'true'\\n myDictionary.clear();\\n print(myDictionary.hasKey('p5')); // prints 'false'\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 271,\n \"description\": \"Removes the key-value pair stored at the given key from the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"remove\",\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"for the pair to remove\\n\",\n \"type\": \"Number|String\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.create('happy', 'coding');\\n myDictionary.print();\\n // above logs \\\"key: p5 - value: js, key: happy - value: coding\\\" to console\\n myDictionary.remove('p5');\\n myDictionary.print();\\n // above logs \\\"key: happy value: coding\\\" to console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 301,\n \"description\": \"Logs the set of items currently stored in the Dictionary to the console.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"print\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.create('happy', 'coding');\\n myDictionary.print();\\n // above logs \\\"key: p5 - value: js, key: happy - value: coding\\\" to console\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 325,\n \"description\": \"Converts the Dictionary into a CSV file for local download.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveTable\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n createStringDict({\\n john: 1940,\\n paul: 1942,\\n george: 1943,\\n ringo: 1940\\n }).saveTable('beatles');\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 363,\n \"description\": \"Converts the Dictionary into a JSON file for local download.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveJSON\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n createStringDict({\\n john: 1940,\\n paul: 1942,\\n george: 1943,\\n ringo: 1940\\n }).saveJSON('beatles');\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 394,\n \"description\": \"private helper function to ensure that the user passed in valid\\nvalues for the Dictionary type\\n\",\n \"class\": \"p5.TypedDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 437,\n \"description\": \"private helper function to ensure that the user passed in valid\\nvalues for the Dictionary type\\n\",\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 446,\n \"description\": \"Add the given number to the value currently stored at the given key.\\nThe sum then replaces the value previously stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"add\",\n \"params\": [\n {\n \"name\": \"Key\",\n \"description\": \"for the value you wish to add to\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"Number\",\n \"description\": \"to add to the value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 5);\\n myDictionary.add(2, 2);\\n print(myDictionary.get(2)); // logs 7 to console.\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 474,\n \"description\": \"Subtract the given number from the value currently stored at the given key.\\nThe difference then replaces the value previously stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sub\",\n \"params\": [\n {\n \"name\": \"Key\",\n \"description\": \"for the value you wish to subtract from\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"Number\",\n \"description\": \"to subtract from the value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 5);\\n myDictionary.sub(2, 2);\\n print(myDictionary.get(2)); // logs 3 to console.\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 498,\n \"description\": \"Multiply the given number with the value currently stored at the given key.\\nThe product then replaces the value previously stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mult\",\n \"params\": [\n {\n \"name\": \"Key\",\n \"description\": \"for value you wish to multiply\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"Amount\",\n \"description\": \"to multiply the value by\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 4);\\n myDictionary.mult(2, 2);\\n print(myDictionary.get(2)); // logs 8 to console.\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 526,\n \"description\": \"Divide the given number with the value currently stored at the given key.\\nThe quotient then replaces the value previously stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"div\",\n \"params\": [\n {\n \"name\": \"Key\",\n \"description\": \"for value you wish to divide\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"Amount\",\n \"description\": \"to divide the value by\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 8);\\n myDictionary.div(2, 2);\\n print(myDictionary.get(2)); // logs 4 to console.\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 554,\n \"description\": \"private helper function for finding lowest or highest value\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'\\n\",\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 579,\n \"description\": \"Return the lowest number currently stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"minValue\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\\n let lowestValue = myDictionary.minValue(); // value is -10\\n print(lowestValue);\\n}\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 600,\n \"description\": \"Return the highest number currently stored in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"maxValue\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\\n let highestValue = myDictionary.maxValue(); // value is 3\\n print(highestValue);\\n}\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 621,\n \"description\": \"private helper function for finding lowest or highest key\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'\\n\",\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 644,\n \"description\": \"Return the lowest key currently used in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"minKey\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\\n let lowestKey = myDictionary.minKey(); // value is 1.2\\n print(lowestKey);\\n}\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/data/p5.TypedDict.js\",\n \"line\": 665,\n \"description\": \"Return the highest key currently used in the Dictionary.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"maxKey\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\\n let highestKey = myDictionary.maxKey(); // value is 4\\n print(highestKey);\\n}\\n\\n\"\n ],\n \"class\": \"p5.NumberDict\",\n \"module\": \"Data\",\n \"submodule\": \"Dictionary\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 12,\n \"description\": \"The system variable deviceOrientation always contains the orientation of\\nthe device. The value of this variable will either be set 'landscape'\\nor 'portrait'. If no data is available it will be set to 'undefined'.\\neither LANDSCAPE or PORTRAIT.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"deviceOrientation\",\n \"type\": \"Constant\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 23,\n \"description\": \"The system variable accelerationX always contains the acceleration of the\\ndevice along the x axis. Value is represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"accelerationX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationX);\\n}\\n\\n\"\n ],\n \"alt\": \"Magnitude of device acceleration is displayed as ellipse size\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 46,\n \"description\": \"The system variable accelerationY always contains the acceleration of the\\ndevice along the y axis. Value is represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"accelerationY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationY);\\n}\\n\\n\"\n ],\n \"alt\": \"Magnitude of device acceleration is displayed as ellipse size\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 69,\n \"description\": \"The system variable accelerationZ always contains the acceleration of the\\ndevice along the z axis. Value is represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"accelerationZ\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationZ);\\n}\\n\\n\"\n ],\n \"alt\": \"Magnitude of device acceleration is displayed as ellipse size\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 94,\n \"description\": \"The system variable pAccelerationX always contains the acceleration of the\\ndevice along the x axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pAccelerationX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 104,\n \"description\": \"The system variable pAccelerationY always contains the acceleration of the\\ndevice along the y axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pAccelerationY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 114,\n \"description\": \"The system variable pAccelerationZ always contains the acceleration of the\\ndevice along the z axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pAccelerationZ\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 135,\n \"description\": \"The system variable rotationX always contains the rotation of the\\ndevice along the x axis. Value is represented as 0 to +/-180 degrees.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"rotationX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n //rotateZ(radians(rotationZ));\\n rotateX(radians(rotationX));\\n //rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n\\n\"\n ],\n \"alt\": \"red horizontal line right, green vertical line bottom. black background.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 166,\n \"description\": \"The system variable rotationY always contains the rotation of the\\ndevice along the y axis. Value is represented as 0 to +/-90 degrees.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"rotationY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n //rotateZ(radians(rotationZ));\\n //rotateX(radians(rotationX));\\n rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n\\n\"\n ],\n \"alt\": \"red horizontal line right, green vertical line bottom. black background.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 197,\n \"description\": \"The system variable rotationZ always contains the rotation of the\\ndevice along the z axis. Value is represented as 0 to 359 degrees.\\n\\nUnlike rotationX and rotationY, this variable is available for devices\\nwith a built-in compass only.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.\\n\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateZ(radians(rotationZ));\\n //rotateX(radians(rotationX));\\n //rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n\\n\"\n ],\n \"itemtype\": \"property\",\n \"name\": \"rotationZ\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"alt\": \"red horizontal line right, green vertical line bottom. black background.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 233,\n \"description\": \"The system variable pRotationX always contains the rotation of the\\ndevice along the x axis in the frame previous to the current frame. Value\\nis represented as 0 to +/-180 degrees.\\n\\npRotationX can also be used with rotationX to determine the rotate\\ndirection of the device along the X-axis.\\n\",\n \"example\": [\n \"\\n\\n\\n// A simple if statement looking at whether\\n// rotationX - pRotationX < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\n// Simple range conversion to make things simpler.\\n// This is not absolutely necessary but the logic\\n// will be different in that case.\\n\\nlet rX = rotationX + 180;\\nlet pRX = pRotationX + 180;\\n\\nif ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\\n rotateDirection = 'clockwise';\\n} else if (rX - pRX < 0 || rX - pRX > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\n\\nprint(rotateDirection);\\n\\n\"\n ],\n \"alt\": \"no image to display.\",\n \"itemtype\": \"property\",\n \"name\": \"pRotationX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 278,\n \"description\": \"The system variable pRotationY always contains the rotation of the\\ndevice along the y axis in the frame previous to the current frame. Value\\nis represented as 0 to +/-90 degrees.\\n\\npRotationY can also be used with rotationY to determine the rotate\\ndirection of the device along the Y-axis.\\n\",\n \"example\": [\n \"\\n\\n\\n// A simple if statement looking at whether\\n// rotationY - pRotationY < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\n// Simple range conversion to make things simpler.\\n// This is not absolutely necessary but the logic\\n// will be different in that case.\\n\\nlet rY = rotationY + 180;\\nlet pRY = pRotationY + 180;\\n\\nif ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\\n rotateDirection = 'clockwise';\\n} else if (rY - pRY < 0 || rY - pRY > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\nprint(rotateDirection);\\n\\n\"\n ],\n \"alt\": \"no image to display.\",\n \"itemtype\": \"property\",\n \"name\": \"pRotationY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 322,\n \"description\": \"The system variable pRotationZ always contains the rotation of the\\ndevice along the z axis in the frame previous to the current frame. Value\\nis represented as 0 to 359 degrees.\\n\\npRotationZ can also be used with rotationZ to determine the rotate\\ndirection of the device along the Z-axis.\\n\",\n \"example\": [\n \"\\n\\n\\n// A simple if statement looking at whether\\n// rotationZ - pRotationZ < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\nif (\\n (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\\n rotationZ - pRotationZ < -270\\n) {\\n rotateDirection = 'clockwise';\\n} else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\nprint(rotateDirection);\\n\\n\"\n ],\n \"alt\": \"no image to display.\",\n \"itemtype\": \"property\",\n \"name\": \"pRotationZ\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 380,\n \"description\": \"When a device is rotated, the axis that triggers the deviceTurned()\\nmethod is stored in the turnAxis variable. The turnAxis variable is only defined within\\nthe scope of deviceTurned().\\n\",\n \"itemtype\": \"property\",\n \"name\": \"turnAxis\",\n \"type\": \"String\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees in the\\n// X-axis to change the value.\\n\\nvar value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (turnAxis === 'X') {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device turns\\n50x50 black rect in center of canvas. turns white on mobile when x-axis turns\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 419,\n \"description\": \"The setMoveThreshold() function is used to set the movement threshold for\\nthe deviceMoved() function. The default threshold is set to 0.5.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setMoveThreshold\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"The threshold value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// You will need to move the device incrementally further\\n// the closer the square's color gets to white in order to change the value.\\n\\nlet value = 0;\\nlet threshold = 0.5;\\nfunction setup() {\\n setMoveThreshold(threshold);\\n}\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n threshold = threshold + 0.1;\\n if (value > 255) {\\n value = 0;\\n threshold = 30;\\n }\\n setMoveThreshold(threshold);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device moves\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 462,\n \"description\": \"The setShakeThreshold() function is used to set the movement threshold for\\nthe deviceShaken() function. The default threshold is set to 30.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setShakeThreshold\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"The threshold value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// You will need to shake the device more firmly\\n// the closer the box's fill gets to white in order to change the value.\\n\\nlet value = 0;\\nlet threshold = 30;\\nfunction setup() {\\n setShakeThreshold(threshold);\\n}\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n threshold = threshold + 5;\\n if (value > 255) {\\n value = 0;\\n threshold = 30;\\n }\\n setShakeThreshold(threshold);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device\\nis being shaked\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 506,\n \"description\": \"The deviceMoved() function is called when the device is moved by more than\\nthe threshold value along X, Y or Z axis. The default threshold is set to 0.5.\\nThe threshold value can be changed using setMoveThreshold().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"deviceMoved\",\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// Move the device around\\n// to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device moves\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 538,\n \"description\": \"The deviceTurned() function is called when the device rotates by\\nmore than 90 degrees continuously.\\n\\nThe axis that triggers the deviceTurned() method is stored in the turnAxis\\nvariable. The deviceTurned() method can be locked to trigger on any axis:\\nX, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"deviceTurned\",\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees\\n// to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees in the\\n// X-axis to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (turnAxis === 'X') {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device turns\\n50x50 black rect in center of canvas. turns white on mobile when x-axis turns\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/acceleration.js\",\n \"line\": 597,\n \"description\": \"The deviceShaken() function is called when the device total acceleration\\nchanges of accelerationX and accelerationY values is more than\\nthe threshold value. The default threshold is set to 30.\\nThe threshold value can be changed using setShakeThreshold().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"deviceShaken\",\n \"example\": [\n \"\\n\\n\\n// Run this example on a mobile device\\n// Shake the device to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceShaken() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect in center of canvas. turns white on mobile when device shakes\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Acceleration\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 12,\n \"description\": \"The boolean system variable keyIsPressed is true if any key is pressed\\nand false if no keys are pressed.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"keyIsPressed\",\n \"type\": \"Boolean\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n if (keyIsPressed === true) {\\n fill(0);\\n } else {\\n fill(255);\\n }\\n rect(25, 25, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 white rect that turns black on keypress.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 39,\n \"description\": \"The system variable key always contains the value of the most recent\\nkey on the keyboard that was typed. To get the proper capitalization, it\\nis best to use it within keyTyped(). For non-ASCII keys, use the keyCode\\nvariable.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"key\",\n \"type\": \"String\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n// Click any key to display it!\\n// (Not Guaranteed to be Case Sensitive)\\nfunction setup() {\\n fill(245, 123, 158);\\n textSize(50);\\n}\\n\\nfunction draw() {\\n background(200);\\n text(key, 33, 65); // Display last key pressed.\\n}\\n\"\n ],\n \"alt\": \"canvas displays any key value that is pressed in pink font.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 68,\n \"description\": \"The variable keyCode is used to detect special keys such as BACKSPACE,\\nDELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL, OPTION, ALT, UP_ARROW,\\nDOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\\nYou can also check for custom keys by looking up the keyCode of any key\\non a site like this: keycode.info.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"keyCode\",\n \"type\": \"Integer\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\nlet fillVal = 126;\\nfunction draw() {\\n fill(fillVal);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction keyPressed() {\\n if (keyCode === UP_ARROW) {\\n fillVal = 255;\\n } else if (keyCode === DOWN_ARROW) {\\n fillVal = 0;\\n }\\n return false; // prevent default\\n}\\n\\n\\nfunction draw() {}\\nfunction keyPressed() {\\n background('yellow');\\n text(`${key} ${keyCode}`, 10, 40);\\n print(key, ' ', keyCode);\\n return false; // prevent default\\n}\\n\"\n ],\n \"alt\": \"Grey rect center. turns white when up arrow pressed and black when down\\nDisplay key pressed and its keyCode in a yellow box\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 109,\n \"description\": \"The keyPressed() function is called once every time a key is pressed. The\\nkeyCode for the key that was pressed is stored in the keyCode variable.\\n\\nFor non-ASCII keys, use the keyCode variable. You can check if the keyCode\\nequals BACKSPACE, DELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL,\\nOPTION, ALT, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\\n\\nFor ASCII keys, the key that was pressed is stored in the key variable. However, it\\ndoes not distinguish between uppercase and lowercase. For this reason, it\\nis recommended to use keyTyped() to read the key variable, in which the\\ncase of the variable will be distinguished.\\n\\nBecause of how operating systems handle key repeats, holding down a key\\nmay cause multiple calls to keyTyped() (and keyReleased() as well). The\\nrate of repeat is set by the operating system and how each computer is\\nconfigured.\\nBrowsers may have different default\\nbehaviors attached to various key events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"keyPressed\",\n \"example\": [\n \"\\n\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyPressed() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyPressed() {\\n if (keyCode === LEFT_ARROW) {\\n value = 255;\\n } else if (keyCode === RIGHT_ARROW) {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\nfunction keyPressed() {\\n // Do something\\n return false; // prevent any default behaviour\\n}\\n\\n\"\n ],\n \"alt\": \"black rect center. turns white when key pressed and black when released\\nblack rect center. turns white when left arrow pressed and black when right.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 196,\n \"description\": \"The keyReleased() function is called once every time a key is released.\\nSee key and keyCode for more information.\\nBrowsers may have different default\\nbehaviors attached to various key events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"keyReleased\",\n \"example\": [\n \"\\n\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyReleased() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n return false; // prevent any default behavior\\n}\\n\\n\"\n ],\n \"alt\": \"black rect center. turns white when key pressed and black when pressed again\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 248,\n \"description\": \"The keyTyped() function is called once every time a key is pressed, but\\naction keys such as Ctrl, Shift, and Alt are ignored. The most recent\\nkey pressed will be stored in the key variable.\\n\\nBecause of how operating systems handle key repeats, holding down a key\\nwill cause multiple calls to keyTyped() (and keyReleased() as well). The\\nrate of repeat is set by the operating system and how each computer is\\nconfigured.\\nBrowsers may have different default behaviors attached to various key\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"keyTyped\",\n \"example\": [\n \"\\n\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyTyped() {\\n if (key === 'a') {\\n value = 255;\\n } else if (key === 'b') {\\n value = 0;\\n }\\n // uncomment to prevent any default behavior\\n // return false;\\n}\\n\\n\"\n ],\n \"alt\": \"black rect center. turns white when 'a' key typed and black when 'b' pressed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 302,\n \"description\": \"The onblur function is called when the user is no longer focused\\non the p5 element. Because the keyup events will not fire if the user is\\nnot focused on the element we must assume all keys currently down have\\nbeen released.\\n\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/keyboard.js\",\n \"line\": 312,\n \"description\": \"The keyIsDown() function checks if the key is currently down, i.e. pressed.\\nIt can be used if you have an object that moves, and you want several keys\\nto be able to affect its behaviour simultaneously, such as moving a\\nsprite diagonally. You can put in any number representing the keyCode of\\nthe key, or use any of the variable keyCode names listed\\nhere.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"keyIsDown\",\n \"params\": [\n {\n \"name\": \"code\",\n \"description\": \"The key to check for.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"whether key is down or not\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n\\nlet x = 100;\\nlet y = 100;\\n\\nfunction setup() {\\n createCanvas(512, 512);\\n fill(255, 0, 0);\\n}\\n\\nfunction draw() {\\n if (keyIsDown(LEFT_ARROW)) {\\n x -= 5;\\n }\\n\\n if (keyIsDown(RIGHT_ARROW)) {\\n x += 5;\\n }\\n\\n if (keyIsDown(UP_ARROW)) {\\n y -= 5;\\n }\\n\\n if (keyIsDown(DOWN_ARROW)) {\\n y += 5;\\n }\\n\\n clear();\\n ellipse(x, y, 50, 50);\\n}\\n\\n\\n\\nlet diameter = 50;\\n\\nfunction setup() {\\n createCanvas(512, 512);\\n}\\n\\nfunction draw() {\\n // 107 and 187 are keyCodes for \\\"+\\\"\\n if (keyIsDown(107) || keyIsDown(187)) {\\n diameter += 1;\\n }\\n\\n // 109 and 189 are keyCodes for \\\"-\\\"\\n if (keyIsDown(109) || keyIsDown(189)) {\\n diameter -= 1;\\n }\\n\\n clear();\\n fill(255, 0, 0);\\n ellipse(50, 50, diameter, diameter);\\n}\\n\"\n ],\n \"alt\": \"50x50 red ellipse moves left, right, up and down with arrow presses.\\n50x50 red ellipse gets bigger or smaller when + or - are pressed.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Keyboard\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 22,\n \"description\": \"The system variable mouseX always contains the current horizontal\\nposition of the mouse, relative to (0, 0) of the canvas. If touch is\\nused instead of mouse input, mouseX will hold the x value of the most\\nrecent touch point.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"mouseX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move the mouse across the canvas\\nfunction draw() {\\n background(244, 248, 252);\\n line(mouseX, 0, mouseX, 100);\\n}\\n\\n\"\n ],\n \"alt\": \"horizontal black line moves left and right with mouse x-position\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 48,\n \"description\": \"The system variable mouseY always contains the current vertical position\\nof the mouse, relative to (0, 0) of the canvas. If touch is\\nused instead of mouse input, mouseY will hold the y value of the most\\nrecent touch point.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"mouseY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move the mouse across the canvas\\nfunction draw() {\\n background(244, 248, 252);\\n line(0, mouseY, 100, mouseY);\\n}\\n\\n\"\n ],\n \"alt\": \"vertical black line moves up and down with mouse y-position\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 74,\n \"description\": \"The system variable pmouseX always contains the horizontal position of\\nthe mouse or finger in the frame previous to the current frame, relative to\\n(0, 0) of the canvas. Note: pmouseX will be reset to the current mouseX\\nvalue at the start of each touch event.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pmouseX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// Move the mouse across the canvas to leave a trail\\nfunction setup() {\\n //slow down the frameRate to make it more visible\\n frameRate(10);\\n}\\n\\nfunction draw() {\\n background(244, 248, 252);\\n line(mouseX, mouseY, pmouseX, pmouseY);\\n print(pmouseX + ' -> ' + mouseX);\\n}\\n\\n\"\n ],\n \"alt\": \"line trail is created from cursor movements. faster movement make longer line.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 106,\n \"description\": \"The system variable pmouseY always contains the vertical position of the\\nmouse or finger in the frame previous to the current frame, relative to\\n(0, 0) of the canvas. Note: pmouseY will be reset to the current mouseY\\nvalue at the start of each touch event.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pmouseY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n //draw a square only if the mouse is not moving\\n if (mouseY === pmouseY && mouseX === pmouseX) {\\n rect(20, 20, 60, 60);\\n }\\n\\n print(pmouseY + ' -> ' + mouseY);\\n}\\n\\n\"\n ],\n \"alt\": \"60x60 black rect center, fuchsia background. rect flickers on mouse movement\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 137,\n \"description\": \"The system variable winMouseX always contains the current horizontal\\nposition of the mouse, relative to (0, 0) of the window.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"winMouseX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n const body = document.getElementsByTagName('body')[0];\\n myCanvas.parent(body);\\n}\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n //move the canvas to the horizontal mouse position\\n //relative to the window\\n myCanvas.position(winMouseX + 1, windowHeight / 2);\\n\\n //the y of the square is relative to the canvas\\n rect(20, mouseY, 60, 60);\\n}\\n\\n\"\n ],\n \"alt\": \"60x60 black rect y moves with mouse y and fuchsia canvas moves with mouse x\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 176,\n \"description\": \"The system variable winMouseY always contains the current vertical\\nposition of the mouse, relative to (0, 0) of the window.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"winMouseY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n const body = document.getElementsByTagName('body')[0];\\n myCanvas.parent(body);\\n}\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n //move the canvas to the vertical mouse position\\n //relative to the window\\n myCanvas.position(windowWidth / 2, winMouseY + 1);\\n\\n //the x of the square is relative to the canvas\\n rect(mouseX, 20, 60, 60);\\n}\\n\\n\"\n ],\n \"alt\": \"60x60 black rect x moves with mouse x and fuchsia canvas y moves with mouse y\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 215,\n \"description\": \"The system variable pwinMouseX always contains the horizontal position\\nof the mouse in the frame previous to the current frame, relative to\\n(0, 0) of the window. Note: pwinMouseX will be reset to the current winMouseX\\nvalue at the start of each touch event.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pwinMouseX\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n noStroke();\\n fill(237, 34, 93);\\n}\\n\\nfunction draw() {\\n clear();\\n //the difference between previous and\\n //current x position is the horizontal mouse speed\\n let speed = abs(winMouseX - pwinMouseX);\\n //change the size of the circle\\n //according to the horizontal speed\\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\\n //move the canvas to the mouse position\\n myCanvas.position(winMouseX + 1, winMouseY + 1);\\n}\\n\\n\"\n ],\n \"alt\": \"fuchsia ellipse moves with mouse x and y. Grows and shrinks with mouse speed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 256,\n \"description\": \"The system variable pwinMouseY always contains the vertical position of\\nthe mouse in the frame previous to the current frame, relative to (0, 0)\\nof the window. Note: pwinMouseY will be reset to the current winMouseY\\nvalue at the start of each touch event.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pwinMouseY\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n noStroke();\\n fill(237, 34, 93);\\n}\\n\\nfunction draw() {\\n clear();\\n //the difference between previous and\\n //current y position is the vertical mouse speed\\n let speed = abs(winMouseY - pwinMouseY);\\n //change the size of the circle\\n //according to the vertical speed\\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\\n //move the canvas to the mouse position\\n myCanvas.position(winMouseX + 1, winMouseY + 1);\\n}\\n\\n\"\n ],\n \"alt\": \"fuchsia ellipse moves with mouse x and y. Grows and shrinks with mouse speed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 298,\n \"description\": \"Processing automatically tracks if the mouse button is pressed and which\\nbutton is pressed. The value of the system variable mouseButton is either\\nLEFT, RIGHT, or CENTER depending on which button was pressed last.\\nWarning: different browsers may track mouseButton differently.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"mouseButton\",\n \"type\": \"Constant\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n if (mouseIsPressed) {\\n if (mouseButton === LEFT) {\\n ellipse(50, 50, 50, 50);\\n }\\n if (mouseButton === RIGHT) {\\n rect(25, 25, 50, 50);\\n }\\n if (mouseButton === CENTER) {\\n triangle(23, 75, 50, 20, 78, 75);\\n }\\n }\\n\\n print(mouseButton);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black ellipse appears on center of fuchsia canvas on mouse click/press.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 337,\n \"description\": \"The boolean system variable mouseIsPressed is true if the mouse is pressed\\nand false if not.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"mouseIsPressed\",\n \"type\": \"Boolean\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n if (mouseIsPressed) {\\n ellipse(50, 50, 50, 50);\\n } else {\\n rect(25, 25, 50, 50);\\n }\\n\\n print(mouseIsPressed);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect becomes ellipse with mouse click/press. fuchsia background.\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 428,\n \"description\": \"The mouseMoved() function is called every time the mouse moves and a mouse\\nbutton is not pressed.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseMoved\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Move the mouse across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction mouseMoved() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseMoved(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect becomes lighter with mouse movements until white then resets\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 483,\n \"description\": \"The mouseDragged() function is called once every time the mouse moves and\\na mouse button is pressed. If no mouseDragged() function is defined, the\\ntouchMoved() function will be called instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseDragged\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Drag the mouse across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseDragged() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction mouseDragged() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseDragged(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect turns lighter with mouse click and drag until white, resets\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 564,\n \"description\": \"The mousePressed() function is called once after every time a mouse button\\nis pressed. The mouseButton variable (see the related reference entry)\\ncan be used to determine which button has been pressed. If no\\nmousePressed() function is defined, the touchStarted() function will be\\ncalled instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mousePressed\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Click within the image to change\\n// the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mousePressed() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction mousePressed() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mousePressed(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect turns white with mouse click/press.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 641,\n \"description\": \"The mouseReleased() function is called every time a mouse button is\\nreleased. If no mouseReleased() function is defined, the touchEnded()\\nfunction will be called instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseReleased\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseReleased() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction mouseReleased() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseReleased(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect turns white with mouse click/press.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 719,\n \"description\": \"The mouseClicked() function is called once after a mouse button has been\\npressed and then released.\\nBrowsers handle clicks differently, so this function is only guaranteed to be\\nrun when the left mouse button is clicked. To handle other mouse buttons\\nbeing pressed or released, see mousePressed() or mouseReleased().\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseClicked\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction mouseClicked() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction mouseClicked() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseClicked(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect turns white with mouse click/press.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 789,\n \"description\": \"The doubleClicked() function is executed every time a event\\nlistener has detected a dblclick event which is a part of the\\nDOM L3 specification. The doubleClicked event is fired when a\\npointing device button (usually a mouse's primary button)\\nis clicked twice on a single element. For more info on the\\ndblclick event refer to mozilla's documentation here:\\nhttps://developer.mozilla.org/en-US/docs/Web/Events/dblclick\\n\",\n \"itemtype\": \"method\",\n \"name\": \"doubleClicked\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional MouseEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been double clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction doubleClicked() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction doubleClicked() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction doubleClicked(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect turns white with mouse doubleClick/press.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/mouse.js\",\n \"line\": 874,\n \"description\": \"The function mouseWheel() is executed every time a vertical mouse wheel\\nevent is detected either triggered by an actual mouse wheel or by a\\ntouchpad.\\nThe event.delta property returns the amount the mouse wheel\\nhave scrolled. The values can be positive or negative depending on the\\nscroll direction (on OS X with "natural" scrolling enabled, the signs\\nare inverted).\\nBrowsers may have different default behaviors attached to various\\nmouse events. To prevent any default behavior for this event, add\\n"return false" to the end of the method.\\nDue to the current support of the "wheel" event on Safari, the function\\nmay only work as expected if "return false" is included while using Safari.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mouseWheel\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional WheelEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet pos = 25;\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n rect(25, pos, 50, 50);\\n}\\n\\nfunction mouseWheel(event) {\\n print(event.delta);\\n //move the square according to the vertical scroll amount\\n pos += event.delta;\\n //uncomment to block page scrolling\\n //return false;\\n}\\n\\n\"\n ],\n \"alt\": \"black 50x50 rect moves up and down with vertical scroll. fuchsia background\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Mouse\"\n },\n {\n \"file\": \"src/events/touch.js\",\n \"line\": 12,\n \"description\": \"The system variable touches[] contains an array of the positions of all\\ncurrent touch points, relative to (0, 0) of the canvas, and IDs identifying a\\nunique touch as it moves. Each element in the array is an object with x, y,\\nand id properties.\\nThe touches[] array is not supported on Safari and IE on touch-based\\ndesktops (laptops).\\n\",\n \"itemtype\": \"property\",\n \"name\": \"touches\",\n \"type\": \"Object[]\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\n\\n// On a touchscreen device, touch\\n// the canvas using one or more fingers\\n// at the same time\\nfunction draw() {\\n clear();\\n let display = touches.length + ' touches';\\n text(display, 5, 10);\\n}\\n\\n\"\n ],\n \"alt\": \"Number of touches currently registered are displayed on the canvas\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Touch\"\n },\n {\n \"file\": \"src/events/touch.js\",\n \"line\": 74,\n \"description\": \"The touchStarted() function is called once after every time a touch is\\nregistered. If no touchStarted() function is defined, the mousePressed()\\nfunction will be called instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchStarted\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional TouchEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Touch within the image to change\\n// the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchStarted() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction touchStarted() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchStarted(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect turns white with touch event.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Touch\"\n },\n {\n \"file\": \"src/events/touch.js\",\n \"line\": 149,\n \"description\": \"The touchMoved() function is called every time a touch move is registered.\\nIf no touchMoved() function is defined, the mouseDragged() function will\\nbe called instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchMoved\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional TouchEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Move your finger across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction touchMoved() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchMoved(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect turns lighter with touch until white. resets\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Touch\"\n },\n {\n \"file\": \"src/events/touch.js\",\n \"line\": 222,\n \"description\": \"The touchEnded() function is called every time a touch ends. If no\\ntouchEnded() function is defined, the mouseReleased() function will be\\ncalled instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"touchEnded\",\n \"params\": [\n {\n \"name\": \"event\",\n \"description\": \"optional TouchEvent callback argument.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Release touch within the image to\\n// change the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchEnded() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n\\n\\n\\n\\n\\nfunction touchEnded() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n\\n\\n\\n\\n\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchEnded(event) {\\n console.log(event);\\n}\\n\\n\"\n ],\n \"alt\": \"50x50 black rect turns white with touch.\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Events\",\n \"submodule\": \"Touch\"\n },\n {\n \"file\": \"src/image/filters.js\",\n \"line\": 3,\n \"description\": \"This module defines the filters for use with image buffers.\\nThis module is basically a collection of functions stored in an object\\nas opposed to modules. The functions are destructive, modifying\\nthe passed in canvas rather than creating a copy.\\nGenerally speaking users of this module will use the Filters.apply method\\non a canvas to create an effect.\\nA number of functions are borrowed/adapted from\\nhttp://www.html5rocks.com/en/tutorials/canvas/imagefilters/\\nor the java processing implementation.\\n\",\n \"class\": \"p5\",\n \"module\": \"Events\"\n },\n {\n \"file\": \"src/image/image.js\",\n \"line\": 8,\n \"description\": \"This module defines the p5 methods for the p5.Image class\\nfor drawing images to the main display canvas.\\n\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/image.js\",\n \"line\": 22,\n \"description\": \"Creates a new p5.Image (the datatype for storing images). This provides a\\nfresh buffer of pixels to play with. Set the size of the buffer with the\\nwidth and height parameters.\\n\\n.pixels gives access to an array containing the values for all the pixels\\nin the display window.\\nThese values are numbers. This array is the size (including an appropriate\\nfactor for the pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. See .pixels for\\nmore info. It may also be simpler to use set() or get().\\n\\nBefore accessing the pixels of an image, the data must loaded with the\\nloadPixels() function. After the array data has been modified, the\\nupdatePixels() function must be run to update the changes.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createImage\",\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"width in pixels\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"height\",\n \"description\": \"height in pixels\\n\",\n \"type\": \"Integer\"\n }\n ],\n \"return\": {\n \"description\": \"the p5.Image object\",\n \"type\": \"p5.Image\"\n },\n \"example\": [\n \"\\n\\n\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n\\n\\n\\n\\n\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\nimage(img, 34, 34);\\n\\n\\n\\n\\n\\nlet pink = color(255, 102, 204);\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nlet d = pixelDensity();\\nlet halfImage = 4 * (img.width * d) * (img.height / 2 * d);\\nfor (let i = 0; i < halfImage; i += 4) {\\n img.pixels[i] = red(pink);\\n img.pixels[i + 1] = green(pink);\\n img.pixels[i + 2] = blue(pink);\\n img.pixels[i + 3] = alpha(pink);\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n\\n\"\n ],\n \"alt\": \"66x66 dark turquoise rect in center of canvas.\\n2 gradated dark turquoise rects fade left. 1 center 1 bottom right of canvas\\nno image displayed\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/image.js\",\n \"line\": 102,\n \"description\": \"Save the current canvas as an image. The browser will either save the\\nfile immediately, or prompt the user with a dialogue window.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveCanvas\",\n \"example\": [\n \"\\n \\n function setup() {\\n let c = createCanvas(100, 100);\\n background(255, 0, 0);\\n saveCanvas(c, 'myCanvas', 'jpg');\\n }\\n \\n \\n // note that this example has the same result as above\\n // if no canvas is specified, defaults to main canvas\\n function setup() {\\n let c = createCanvas(100, 100);\\n background(255, 0, 0);\\n saveCanvas('myCanvas', 'jpg');\\n\\n // all of the following are valid\\n saveCanvas(c, 'myCanvas', 'jpg');\\n saveCanvas(c, 'myCanvas.jpg');\\n saveCanvas(c, 'myCanvas');\\n saveCanvas(c);\\n saveCanvas('myCanvas', 'png');\\n saveCanvas('myCanvas');\\n saveCanvas();\\n }\\n \"\n ],\n \"alt\": \"no image displayed\\n no image displayed\\n no image displayed\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"overloads\": [\n {\n \"line\": 102,\n \"params\": [\n {\n \"name\": \"selectedCanvas\",\n \"description\": \"a variable\\n representing a specific html5 canvas (optional)\\n\",\n \"type\": \"p5.Element|HTMLCanvasElement\"\n },\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"extension\",\n \"description\": \"'jpg' or 'png'\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 144,\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"extension\",\n \"description\": \"\",\n \"type\": \"String\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/image.js\",\n \"line\": 195,\n \"description\": \"Capture a sequence of frames that can be used to create a movie.\\nAccepts a callback. For example, you may wish to send the frames\\nto a server where they can be stored or converted into a movie.\\nIf no callback is provided, the browser will pop up save dialogues in an\\nattempt to download all of the images that have just been created. With the\\ncallback provided the image data isn't saved by default but instead passed\\nas an argument to the callback function as an array of objects, with the\\nsize of array equal to the total number of frames.\\nNote that saveFrames() will only save the first 15 frames of an animation.\\nTo export longer animations, you might look into a library like\\nccapture.js.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveFrames\",\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"extension\",\n \"description\": \"'jpg' or 'png'\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"duration\",\n \"description\": \"Duration in seconds to save the frames for.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"framerate\",\n \"description\": \"Framerate to save the frames in.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"A callback function that will be executed\\n to handle the image data. This function\\n should accept an array as argument. The\\n array will contain the specified number of\\n frames of objects. Each object has three\\n properties: imageData - an\\n image/octet-stream, filename and extension.\\n\",\n \"type\": \"Function(Array)\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n function draw() {\\n background(mouseX);\\n }\\n\\n function mousePressed() {\\n saveFrames('out', 'png', 1, 25, data => {\\n print(data);\\n });\\n }\\n\"\n ],\n \"alt\": \"canvas background goes from light to dark with mouse x.\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 17,\n \"description\": \"Loads an image from a path and creates a p5.Image from it.\\n\\nThe image may not be immediately available for rendering\\nIf you want to ensure that the image is ready before doing\\nanything with it, place the loadImage() call in preload().\\nYou may also supply a callback function to handle the image when it's ready.\\n\\nThe path to the image should be relative to the HTML file\\nthat links in your sketch. Loading an image from a URL or other\\nremote location may be blocked due to your browser's built-in\\nsecurity.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadImage\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"Path of the image to be loaded\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"Function to be called once\\n the image is loaded. Will be passed the\\n p5.Image.\\n\",\n \"type\": \"function(p5.Image)\",\n \"optional\": true\n },\n {\n \"name\": \"failureCallback\",\n \"description\": \"called with event error if\\n the image fails to load.\\n\",\n \"type\": \"Function(Event)\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the p5.Image object\",\n \"type\": \"p5.Image\"\n },\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n // here we use a callback to display the image after loading\\n loadImage('assets/laDefense.jpg', img => {\\n image(img, 0, 0);\\n });\\n}\\n\\n\"\n ],\n \"alt\": \"image of the underside of a white umbrella and grided ceililng above\\nimage of the underside of a white umbrella and grided ceililng above\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Loading & Displaying\"\n },\n {\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 127,\n \"description\": \"Draw an image to the p5.js canvas.\\nThis function can be used with different numbers of parameters. The\\nsimplest use requires only three parameters: img, x, and y—where (x, y) is\\nthe position of the image. Two more parameters can optionally be added to\\nspecify the width and height of the image.\\nThis function can also be used with all eight Number parameters. To\\ndifferentiate between all these parameters, p5.js uses the language of\\n"destination rectangle" (which corresponds to "dx", "dy", etc.) and "source\\nimage" (which corresponds to "sx", "sy", etc.) below. Specifying the\\n"source image" dimensions can be useful when you want to display a\\nsubsection of the source image instead of the whole thing. Here's a diagram\\nto explain further:\\n\\n\",\n \"itemtype\": \"method\",\n \"name\": \"image\",\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n // Top-left corner of the img is at (0, 0)\\n // Width and height are the img's original width and height\\n image(img, 0, 0);\\n}\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n background(50);\\n // Top-left corner of the img is at (10, 10)\\n // Width and height are 50 x 50\\n image(img, 10, 10, 50, 50);\\n}\\n\\n\\n\\n\\nfunction setup() {\\n // Here, we use a callback to display the image after loading\\n loadImage('assets/laDefense.jpg', img => {\\n image(img, 0, 0);\\n });\\n}\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/gradient.png');\\n}\\nfunction setup() {\\n // 1. Background image\\n // Top-left corner of the img is at (0, 0)\\n // Width and height are the img's original width and height, 100 x 100\\n image(img, 0, 0);\\n // 2. Top right image\\n // Top-left corner of destination rectangle is at (50, 0)\\n // Destination rectangle width and height are 40 x 20\\n // The next parameters are relative to the source image:\\n // - Starting at position (50, 50) on the source image, capture a 50 x 50\\n // subsection\\n // - Draw this subsection to fill the dimensions of the destination rectangle\\n image(img, 50, 0, 40, 20, 50, 50, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"image of the underside of a white umbrella and gridded ceiling above\\nimage of the underside of a white umbrella and gridded ceiling above\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Loading & Displaying\",\n \"overloads\": [\n {\n \"line\": 127,\n \"params\": [\n {\n \"name\": \"img\",\n \"description\": \"the image to display\\n\",\n \"type\": \"p5.Image|p5.Element\"\n },\n {\n \"name\": \"x\",\n \"description\": \"the x-coordinate of the top-left corner of the image\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"the y-coordinate of the top-left corner of the image\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"width\",\n \"description\": \"the width to draw the image\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"description\": \"the height to draw the image\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 215,\n \"params\": [\n {\n \"name\": \"img\",\n \"description\": \"\",\n \"type\": \"p5.Image|p5.Element\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"the x-coordinate of the destination\\n rectangle in which to draw the source image\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"the y-coordinate of the destination\\n rectangle in which to draw the source image\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"dWidth\",\n \"description\": \"the width of the destination rectangle\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"dHeight\",\n \"description\": \"the height of the destination rectangle\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"sx\",\n \"description\": \"the x-coordinate of the subsection of the source\\nimage to draw into the destination rectangle\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"the y-coordinate of the subsection of the source\\nimage to draw into the destination rectangle\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"sWidth\",\n \"description\": \"the width of the subsection of the\\n source image to draw into the destination\\n rectangle\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"sHeight\",\n \"description\": \"the height of the subsection of the\\n source image to draw into the destination rectangle\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 298,\n \"description\": \"Sets the fill value for displaying images. Images can be tinted to\\nspecified colors or made transparent by including an alpha value.\\n\\nTo apply transparency to an image without affecting its color, use\\nwhite as the tint color and specify an alpha value. For instance,\\ntint(255, 128) will make an image 50% transparent (assuming the default\\nalpha range of 0-255, which can be changed with colorMode()).\\n\\nThe value for the gray parameter must be less than or equal to the current\\nmaximum value as specified by colorMode(). The default maximum value is\\n255.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"tint\",\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(0, 153, 204); // Tint blue\\n image(img, 50, 0);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(0, 153, 204, 126); // Tint blue and set transparency\\n image(img, 50, 0);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(255, 126); // Apply transparency without changing color\\n image(img, 50, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"2 side by side images of umbrella and ceiling, one image with blue tint\\nImages of umbrella and ceiling, one half of image with blue tint\\n2 side by side images of umbrella and ceiling, one image translucent\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Loading & Displaying\",\n \"overloads\": [\n {\n \"line\": 298,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value relative to\\n the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 371,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"a color string\\n\",\n \"type\": \"String\"\n }\n ]\n },\n {\n \"line\": 376,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"a gray value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 382,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red,green,blue &\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ]\n },\n {\n \"line\": 388,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"the tint color\\n\",\n \"type\": \"p5.Color\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 398,\n \"description\": \"Removes the current fill value for displaying images and reverts to\\ndisplaying images with their original hues.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noTint\",\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n tint(0, 153, 204); // Tint blue\\n image(img, 0, 0);\\n noTint(); // Disable tint\\n image(img, 50, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"2 side by side images of bricks, left image with blue tint\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Loading & Displaying\"\n },\n {\n \"file\": \"src/image/loading_displaying.js\",\n \"line\": 464,\n \"description\": \"Set image mode. Modifies the location from which images are drawn by\\nchanging the way in which parameters given to image() are interpreted.\\nThe default mode is imageMode(CORNER), which interprets the second and\\nthird parameters of image() as the upper-left corner of the image. If\\ntwo additional parameters are specified, they are used to set the image's\\nwidth and height.\\n\\nimageMode(CORNERS) interprets the second and third parameters of image()\\nas the location of one corner, and the fourth and fifth parameters as the\\nopposite corner.\\n\\nimageMode(CENTER) interprets the second and third parameters of image()\\nas the image's center point. If two additional parameters are specified,\\nthey are used to set the image's width and height.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"imageMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either CORNER, CORNERS, or CENTER\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CORNER);\\n image(img, 10, 10, 50, 50);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CORNERS);\\n image(img, 10, 10, 90, 40);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CENTER);\\n image(img, 50, 50, 80, 80);\\n}\\n\\n\"\n ],\n \"alt\": \"small square image of bricks\\nhorizontal rectangle image of bricks\\nlarge square image of bricks\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Loading & Displaying\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 9,\n \"description\": \"This module defines the p5.Image class and P5 methods for\\ndrawing images to the main display canvas.\\n\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 90,\n \"description\": \"Image width.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"width\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n image(img, 0, 0);\\n for (let i = 0; i < img.width; i++) {\\n let c = img.get(i, img.height / 2);\\n stroke(c);\\n line(i, height / 2, i, height);\\n }\\n}\\n\"\n ],\n \"alt\": \"rocky mountains in top and horizontal lines in corresponding colors in bottom.\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 117,\n \"description\": \"Image height.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"height\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"example\": [\n \"\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n image(img, 0, 0);\\n for (let i = 0; i < img.height; i++) {\\n let c = img.get(img.width / 2, i);\\n stroke(c);\\n line(0, i, width / 2, i);\\n }\\n}\\n\"\n ],\n \"alt\": \"rocky mountains on right and vertical lines in corresponding colors on left.\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 153,\n \"description\": \"Array containing the values for all the pixels in the display window.\\nThese values are numbers. This array is the size (include an appropriate\\nfactor for pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. Retina and other\\nhigh denisty displays may have more pixels (by a factor of\\npixelDensity^2).\\nFor example, if the image is 100x100 pixels, there will be 40,000. With\\npixelDensity = 2, there will be 160,000. The first four values\\n(indices 0-3) in the array will be the R, G, B, A values of the pixel at\\n(0, 0). The second four values (indices 4-7) will contain the R, G, B, A\\nvalues of the pixel at (1, 0). More generally, to set values for a pixel\\nat (x, y):\\nlet d = pixelDensity();\\nfor (let i = 0; i < d; i++) {\\n for (let j = 0; j < d; j++) {\\n // loop over\\n index = 4 * ((y * d + j) * width * d + (x * d + i));\\n pixels[index] = r;\\n pixels[index+1] = g;\\n pixels[index+2] = b;\\n pixels[index+3] = a;\\n }\\n}\\n\\n\\nBefore accessing this array, the data must loaded with the loadPixels()\\nfunction. After the array data has been modified, the updatePixels()\\nfunction must be run to update the changes.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"pixels\",\n \"type\": \"Number[]\",\n \"example\": [\n \"\\n\\n\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n\\n\\n\\n\\nlet pink = color(255, 102, 204);\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < 4 * (width * height / 2); i += 4) {\\n img.pixels[i] = red(pink);\\n img.pixels[i + 1] = green(pink);\\n img.pixels[i + 2] = blue(pink);\\n img.pixels[i + 3] = alpha(pink);\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n\\n\"\n ],\n \"alt\": \"66x66 turquoise rect in center of canvas\\n66x66 pink rect in center of canvas\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 223,\n \"description\": \"Helper fxn for sharing pixel methods\\n\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 232,\n \"description\": \"Loads the pixels data for this image into the [pixels] attribute.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadPixels\",\n \"example\": [\n \"\\n\\nlet myImage;\\nlet halfImage;\\n\\nfunction preload() {\\n myImage = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n myImage.loadPixels();\\n halfImage = 4 * myImage.width * myImage.height / 2;\\n for (let i = 0; i < halfImage; i++) {\\n myImage.pixels[i + halfImage] = myImage.pixels[i];\\n }\\n myImage.updatePixels();\\n}\\n\\nfunction draw() {\\n image(myImage, 0, 0, width, height);\\n}\\n\"\n ],\n \"alt\": \"2 images of rocky mountains vertically stacked\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 268,\n \"description\": \"Updates the backing canvas for this image with the contents of\\nthe [pixels] array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"updatePixels\",\n \"example\": [\n \"\\n\\nlet myImage;\\nlet halfImage;\\n\\nfunction preload() {\\n myImage = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n myImage.loadPixels();\\n halfImage = 4 * myImage.width * myImage.height / 2;\\n for (let i = 0; i < halfImage; i++) {\\n myImage.pixels[i + halfImage] = myImage.pixels[i];\\n }\\n myImage.updatePixels();\\n}\\n\\nfunction draw() {\\n image(myImage, 0, 0, width, height);\\n}\\n\"\n ],\n \"alt\": \"2 images of rocky mountains vertically stacked\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"overloads\": [\n {\n \"line\": 268,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-offset of the target update area for the\\n underlying canvas\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-offset of the target update area for the\\n underlying canvas\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"w\",\n \"description\": \"height of the target update area for the\\n underlying canvas\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the target update area for the\\n underlying canvas\\n\",\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"line\": 308,\n \"params\": []\n }\n ]\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 316,\n \"description\": \"Get a region of pixels from an image.\\nIf no params are passed, the whole image is returned.\\nIf x and y are the only params passed a single pixel is extracted.\\nIf all params are passed a rectangle region is extracted and a p5.Image\\nis returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"get\",\n \"return\": {\n \"description\": \"the rectangle p5.Image\",\n \"type\": \"p5.Image\"\n },\n \"example\": [\n \"\\n\\nlet myImage;\\nlet c;\\n\\nfunction preload() {\\n myImage = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n background(myImage);\\n noStroke();\\n c = myImage.get(60, 90);\\n fill(c);\\n rect(25, 25, 50, 50);\\n}\\n\\n//get() returns color here\\n\"\n ],\n \"alt\": \"image of rocky mountains with 50x50 green rect in front\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"overloads\": [\n {\n \"line\": 316,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"width\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the rectangle p5.Image\",\n \"type\": \"p5.Image\"\n }\n },\n {\n \"line\": 354,\n \"params\": [],\n \"return\": {\n \"description\": \"the whole p5.Image\",\n \"type\": \"p5.Image\"\n }\n },\n {\n \"line\": 358,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"color of pixel at x,y in array format [R, G, B, A]\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 371,\n \"description\": \"Set the color of a single pixel or write an image into\\nthis p5.Image.\\nNote that for a large number of pixels this will\\nbe slower than directly manipulating the pixels array\\nand then calling updatePixels().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"a\",\n \"description\": \"grayscale value | pixel array |\\n a p5.Color | image to copy\\n\",\n \"type\": \"Number|Number[]|Object\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\nimage(img, 34, 34);\\n\\n\"\n ],\n \"alt\": \"2 gradated dark turquoise rects fade left. 1 center 1 bottom right of canvas\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 409,\n \"description\": \"Resize the image to a new width and height. To make the image scale\\nproportionally, use 0 as the value for the wide or high parameter.\\nFor instance, to make the width of an image 150 pixels, and change\\nthe height using the same proportion, use resize(150, 0).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"resize\",\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"the resized image width\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"height\",\n \"description\": \"the resized image height\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction draw() {\\n image(img, 0, 0);\\n}\\n\\nfunction mousePressed() {\\n img.resize(50, 100);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains. zoomed in\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 494,\n \"description\": \"Copies a region of pixels from one image to another. If no\\nsrcImage is specified this is used as the source. If the source\\nand destination regions aren't the same size, it will\\nautomatically resize source pixels to fit the specified\\ntarget region.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"copy\",\n \"example\": [\n \"\\n\\nlet photo;\\nlet bricks;\\nlet x;\\nlet y;\\n\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks.jpg');\\n}\\n\\nfunction setup() {\\n x = bricks.width / 2;\\n y = bricks.height / 2;\\n photo.copy(bricks, 0, 0, x, y, 0, 0, x, y);\\n image(photo, 0, 0);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains and smaller image on top of bricks at top left\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"overloads\": [\n {\n \"line\": 494,\n \"params\": [\n {\n \"name\": \"srcImage\",\n \"description\": \"source image\\n\",\n \"type\": \"p5.Image|p5.Element\"\n },\n {\n \"name\": \"sx\",\n \"description\": \"X coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"Y coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"source image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"source image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"X coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"Y coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"destination image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"destination image height\\n\",\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"line\": 535,\n \"params\": [\n {\n \"name\": \"sx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 575,\n \"description\": \"Masks part of an image from displaying by loading another\\nimage and using it's alpha channel as an alpha channel for\\nthis image.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mask\",\n \"params\": [\n {\n \"name\": \"srcImage\",\n \"description\": \"source image\\n\",\n \"type\": \"p5.Image\"\n }\n ],\n \"example\": [\n \"\\n\\nlet photo, maskImage;\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n maskImage = loadImage('assets/mask2.png');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n photo.mask(maskImage);\\n image(photo, 0, 0);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains with white at right\\n\\n\\nhttp://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 638,\n \"description\": \"Applies an image filter to a p5.Image\\n\",\n \"itemtype\": \"method\",\n \"name\": \"filter\",\n \"params\": [\n {\n \"name\": \"filterType\",\n \"description\": \"either THRESHOLD, GRAY, OPAQUE, INVERT,\\n POSTERIZE, BLUR, ERODE, DILATE or BLUR.\\n See Filters.js for docs on\\n each available filter\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"filterParam\",\n \"description\": \"an optional parameter unique\\n to each filter, see above\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nlet photo1;\\nlet photo2;\\n\\nfunction preload() {\\n photo1 = loadImage('assets/rockies.jpg');\\n photo2 = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n photo2.filter(GRAY);\\n image(photo1, 0, 0);\\n image(photo2, width / 2, 0);\\n}\\n\"\n ],\n \"alt\": \"2 images of rocky mountains left one in color, right in black and white\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 674,\n \"description\": \"Copies a region of pixels from one image to another, using a specified\\nblend mode to do the operation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"blend\",\n \"example\": [\n \"\\n\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n\\n\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n\\n\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains. Brick images on left and right. Right overexposed\\nimage of rockies. Brickwall images on left and right. Right mortar transparent\\nimage of rockies. Brickwall images on left and right. Right translucent\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\",\n \"overloads\": [\n {\n \"line\": 674,\n \"params\": [\n {\n \"name\": \"srcImage\",\n \"description\": \"source image\\n\",\n \"type\": \"p5.Image\"\n },\n {\n \"name\": \"sx\",\n \"description\": \"X coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"Y coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"source image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"source image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"X coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"Y coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"destination image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"destination image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"blendMode\",\n \"description\": \"the blend mode. either\\n BLEND, DARKEST, LIGHTEST, DIFFERENCE,\\n MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\\n SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.\\nAvailable blend modes are: normal | multiply | screen | overlay |\\n darken | lighten | color-dodge | color-burn | hard-light |\\n soft-light | difference | exclusion | hue | saturation |\\n color | luminosity\\nhttp://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\\n\",\n \"type\": \"Constant\"\n }\n ]\n },\n {\n \"line\": 753,\n \"params\": [\n {\n \"name\": \"sx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"blendMode\",\n \"description\": \"\",\n \"type\": \"Constant\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/p5.Image.js\",\n \"line\": 796,\n \"description\": \"Saves the image to a file and force the browser to download it.\\nAccepts two strings for filename and file extension\\nSupports png (default) and jpg.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"save\",\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"give your file a name\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"extension\",\n \"description\": \"'png' or 'jpg'\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n\\nlet photo;\\n\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction draw() {\\n image(photo, 0, 0);\\n}\\n\\nfunction keyTyped() {\\n if (key === 's') {\\n photo.save('photo', 'png');\\n }\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains.\",\n \"class\": \"p5.Image\",\n \"module\": \"Image\",\n \"submodule\": \"Image\"\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 14,\n \"description\": \"Uint8ClampedArray\\ncontaining the values for all the pixels in the display window.\\nThese values are numbers. This array is the size (include an appropriate\\nfactor for pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. Retina and other\\nhigh density displays will have more pixels[] (by a factor of\\npixelDensity^2).\\nFor example, if the image is 100x100 pixels, there will be 40,000. On a\\nretina display, there will be 160,000.\\n\\nThe first four values (indices 0-3) in the array will be the R, G, B, A\\nvalues of the pixel at (0, 0). The second four values (indices 4-7) will\\ncontain the R, G, B, A values of the pixel at (1, 0). More generally, to\\nset values for a pixel at (x, y):\\nlet d = pixelDensity();\\nfor (let i = 0; i < d; i++) {\\n for (let j = 0; j < d; j++) {\\n // loop over\\n index = 4 * ((y * d + j) * width * d + (x * d + i));\\n pixels[index] = r;\\n pixels[index+1] = g;\\n pixels[index+2] = b;\\n pixels[index+3] = a;\\n }\\n}\\n\\nWhile the above method is complex, it is flexible enough to work with\\nany pixelDensity. Note that set() will automatically take care of\\nsetting all the appropriate values in pixels[] for a given (x, y) at\\nany pixelDensity, but the performance may not be as fast when lots of\\nmodifications are made to the pixel array.\\n\\nBefore accessing this array, the data must loaded with the loadPixels()\\nfunction. After the array data has been modified, the updatePixels()\\nfunction must be run to update the changes.\\n\\nNote that this is not a standard javascript array. This means that\\nstandard javascript functions such as slice() or\\narrayCopy() do not\\nwork.\",\n \"itemtype\": \"property\",\n \"name\": \"pixels\",\n \"type\": \"Number[]\",\n \"example\": [\n \"\\n\\n\\nlet pink = color(255, 102, 204);\\nloadPixels();\\nlet d = pixelDensity();\\nlet halfImage = 4 * (width * d) * (height / 2 * d);\\nfor (let i = 0; i < halfImage; i += 4) {\\n pixels[i] = red(pink);\\n pixels[i + 1] = green(pink);\\n pixels[i + 2] = blue(pink);\\n pixels[i + 3] = alpha(pink);\\n}\\nupdatePixels();\\n\\n\"\n ],\n \"alt\": \"top half of canvas pink, bottom grey\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\"\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 83,\n \"description\": \"Copies a region of pixels from one image to another, using a specified\\nblend mode to do the operation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"blend\",\n \"example\": [\n \"\\n\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\\n}\\n\\n\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\\n}\\n\\n\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains. Brick images on left and right. Right overexposed\\nimage of rockies. Brickwall images on left and right. Right mortar transparent\\nimage of rockies. Brickwall images on left and right. Right translucent\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\",\n \"overloads\": [\n {\n \"line\": 83,\n \"params\": [\n {\n \"name\": \"srcImage\",\n \"description\": \"source image\\n\",\n \"type\": \"p5.Image\"\n },\n {\n \"name\": \"sx\",\n \"description\": \"X coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"Y coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"source image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"source image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"X coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"Y coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"destination image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"destination image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"blendMode\",\n \"description\": \"the blend mode. either\\n BLEND, DARKEST, LIGHTEST, DIFFERENCE,\\n MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\\n SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.\\n\",\n \"type\": \"Constant\"\n }\n ]\n },\n {\n \"line\": 156,\n \"params\": [\n {\n \"name\": \"sx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"blendMode\",\n \"description\": \"\",\n \"type\": \"Constant\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 177,\n \"description\": \"Copies a region of the canvas to another region of the canvas\\nand copies a region of pixels from an image used as the srcImg parameter\\ninto the canvas srcImage is specified this is used as the source. If\\nthe source and destination regions aren't the same size, it will\\nautomatically resize source pixels to fit the specified\\ntarget region.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"copy\",\n \"example\": [\n \"\\n\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n background(img);\\n copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\\n stroke(255);\\n noFill();\\n // Rectangle shows area being copied\\n rect(7, 22, 10, 10);\\n}\\n\"\n ],\n \"alt\": \"image of rocky mountains. Brick images on left and right. Right overexposed\\nimage of rockies. Brickwall images on left and right. Right mortar transparent\\nimage of rockies. Brickwall images on left and right. Right translucent\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\",\n \"overloads\": [\n {\n \"line\": 177,\n \"params\": [\n {\n \"name\": \"srcImage\",\n \"description\": \"source image\\n\",\n \"type\": \"p5.Image|p5.Element\"\n },\n {\n \"name\": \"sx\",\n \"description\": \"X coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"Y coordinate of the source's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"source image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"source image height\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"X coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"Y coordinate of the destination's upper left corner\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"destination image width\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"destination image height\\n\",\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"line\": 220,\n \"params\": [\n {\n \"name\": \"sx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"sh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dx\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dy\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dw\",\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dh\",\n \"description\": \"\",\n \"type\": \"Integer\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 236,\n \"description\": \"Applies a filter to the canvas.\\n\\nThe presets options are:\\n\\nTHRESHOLD\\nConverts the image to black and white pixels depending if they are above or\\nbelow the threshold defined by the level parameter. The parameter must be\\nbetween 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used.\\n\\nGRAY\\nConverts any colors in the image to grayscale equivalents. No parameter\\nis used.\\n\\nOPAQUE\\nSets the alpha channel to entirely opaque. No parameter is used.\\n\\nINVERT\\nSets each pixel to its inverse value. No parameter is used.\\n\\nPOSTERIZE\\nLimits each channel of the image to the number of colors specified as the\\nparameter. The parameter can be set to values between 2 and 255, but\\nresults are most noticeable in the lower ranges.\\n\\nBLUR\\nExecutes a Gaussian blur with the level parameter specifying the extent\\nof the blurring. If no parameter is used, the blur is equivalent to\\nGaussian blur of radius 1. Larger values increase the blur.\\n\\nERODE\\nReduces the light areas. No parameter is used.\\n\\nDILATE\\nIncreases the light areas. No parameter is used.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"filter\",\n \"params\": [\n {\n \"name\": \"filterType\",\n \"description\": \"either THRESHOLD, GRAY, OPAQUE, INVERT,\\n POSTERIZE, BLUR, ERODE, DILATE or BLUR.\\n See Filters.js for docs on\\n each available filter\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"filterParam\",\n \"description\": \"an optional parameter unique\\n to each filter, see above\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(THRESHOLD);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(GRAY);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(OPAQUE);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(INVERT);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(POSTERIZE, 3);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(DILATE);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(BLUR, 3);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(ERODE);\\n}\\n\\n\"\n ],\n \"alt\": \"black and white image of a brick wall.\\ngreyscale image of a brickwall\\nimage of a brickwall\\njade colored image of a brickwall\\nred and pink image of a brickwall\\nimage of a brickwall\\nblurry image of a brickwall\\nimage of a brickwall\\nimage of a brickwall with less detail\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\"\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 415,\n \"description\": \"Get a region of pixels, or a single pixel, from the canvas.\\nReturns an array of [R,G,B,A] values for any pixel or grabs a section of\\nan image. If no parameters are specified, the entire image is returned.\\nUse the x and y parameters to get the value of one pixel. Get a section of\\nthe display window by specifying additional w and h parameters. When\\ngetting an image, the x and y parameters define the coordinates for the\\nupper-left corner of the image, regardless of the current imageMode().\\n\\nTo get the color components scaled according to the current color ranges\\nand taking into account colorMode, use getColor instead of get.\\n\\nGetting the color of a single pixel with get(x, y) is easy, but not as fast\\nas grabbing the data directly from pixels[]. The equivalent statement to\\nget(x, y) using pixels[] with pixel density d is\\nlet x, y, d; // set these to the coordinates\\nlet off = (y * width + x) * d * 4;\\nlet components = [\\n pixels[off],\\n pixels[off + 1],\\n pixels[off + 2],\\n pixels[off + 3]\\n];\\nprint(components);\\n\\n\\nSee the reference for pixels[] for more information.\\nIf you want to extract an array of colors or a subimage from an p5.Image object,\\ntake a look at p5.Image.get()\\n\",\n \"itemtype\": \"method\",\n \"name\": \"get\",\n \"return\": {\n \"description\": \"the rectangle p5.Image\",\n \"type\": \"p5.Image\"\n },\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n let c = get();\\n image(c, width / 2, 0);\\n}\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n let c = get(50, 90);\\n fill(c);\\n noStroke();\\n rect(25, 25, 50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"2 images of the rocky mountains, side-by-side\\nImage of the rocky mountains with 50x50 green rect in center of canvas\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\",\n \"overloads\": [\n {\n \"line\": 415,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"w\",\n \"description\": \"width\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the rectangle p5.Image\",\n \"type\": \"p5.Image\"\n }\n },\n {\n \"line\": 491,\n \"params\": [],\n \"return\": {\n \"description\": \"the whole p5.Image\",\n \"type\": \"p5.Image\"\n }\n },\n {\n \"line\": 495,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"color of pixel at x,y in array format [R, G, B, A]\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 506,\n \"description\": \"Loads the pixel data for the display window into the pixels[] array. This\\nfunction must always be called before reading from or writing to pixels[].\\nNote that only changes made with set() or direct manipulation of pixels[]\\nwill occur.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadPixels\",\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n image(img, 0, 0, width, height);\\n let d = pixelDensity();\\n let halfImage = 4 * (width * d) * (height * d / 2);\\n loadPixels();\\n for (let i = 0; i < halfImage; i++) {\\n pixels[i + halfImage] = pixels[i];\\n }\\n updatePixels();\\n}\\n\\n\"\n ],\n \"alt\": \"two images of the rocky mountains. one on top, one on bottom of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\"\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 543,\n \"description\": \"Changes the color of any pixel, or writes an image directly to the\\ndisplay window.\\nThe x and y parameters specify the pixel to change and the c parameter\\nspecifies the color value. This can be a p5.Color object, or [R, G, B, A]\\npixel array. It can also be a single grayscale value.\\nWhen setting an image, the x and y parameters define the coordinates for\\nthe upper-left corner of the image, regardless of the current imageMode().\\n\\n\\nAfter using set(), you must call updatePixels() for your changes to appear.\\nThis should be called once all pixels have been set, and must be called before\\ncalling .get() or drawing the image.\\n\\nSetting the color of a single pixel with set(x, y) is easy, but not as\\nfast as putting the data directly into pixels[]. Setting the pixels[]\\nvalues directly may be complicated when working with a retina display,\\nbut will perform better when lots of pixels need to be set directly on\\nevery loop.\\nSee the reference for pixels[] for more information.\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the pixel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"c\",\n \"description\": \"insert a grayscale value | a pixel array |\\n a p5.Color object | a p5.Image to copy\\n\",\n \"type\": \"Number|Number[]|Object\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet black = color(0);\\nset(30, 20, black);\\nset(85, 20, black);\\nset(85, 75, black);\\nset(30, 75, black);\\nupdatePixels();\\n\\n\\n\\n\\n\\nfor (let i = 30; i < width - 15; i++) {\\n for (let j = 20; j < height - 25; j++) {\\n let c = color(204 - j, 153 - i, 0);\\n set(i, j, c);\\n }\\n}\\nupdatePixels();\\n\\n\\n\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n set(0, 0, img);\\n updatePixels();\\n line(0, 0, width, height);\\n line(0, height, width, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"4 black points in the shape of a square middle-right of canvas.\\nsquare with orangey-brown gradient lightening at bottom right.\\nimage of the rocky mountains. with lines like an 'x' through the center.\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\"\n },\n {\n \"file\": \"src/image/pixels.js\",\n \"line\": 617,\n \"description\": \"Updates the display window with the data in the pixels[] array.\\nUse in conjunction with loadPixels(). If you're only reading pixels from\\nthe array, there's no need to call updatePixels() — updating is only\\nnecessary to apply changes. updatePixels() should be called anytime the\\npixels array is manipulated or set() is called, and only changes made with\\nset() or direct changes to pixels[] will occur.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"updatePixels\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the upper-left corner of region\\n to update\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the upper-left corner of region\\n to update\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"w\",\n \"description\": \"width of region to update\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"h\",\n \"description\": \"height of region to update\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n image(img, 0, 0, width, height);\\n let d = pixelDensity();\\n let halfImage = 4 * (width * d) * (height * d / 2);\\n loadPixels();\\n for (let i = 0; i < halfImage; i++) {\\n pixels[i + halfImage] = pixels[i];\\n }\\n updatePixels();\\n}\\n\\n\"\n ],\n \"alt\": \"two images of the rocky mountains. one on top, one on bottom of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Image\",\n \"submodule\": \"Pixels\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 19,\n \"description\": \"Loads a JSON file from a file or a URL, and returns an Object.\\nNote that even if the JSON file contains an Array, an Object will be\\nreturned with index numbers as keys.\\nThis method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. JSONP is supported via a polyfill and you\\ncan pass in as the second argument an object with definitions of the json\\ncallback following the syntax specified here.\\nThis method is suitable for fetching files up to size of 64MB.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadJSON\",\n \"return\": {\n \"description\": \"JSON data\",\n \"type\": \"Object|Array\"\n },\n \"example\": [\n \"\\n\\nCalling loadJSON() inside preload() guarantees to complete the\\noperation before setup() and draw() are called.\\n\\n\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\nlet earthquakes;\\nfunction preload() {\\n // Get the most recent earthquake in the database\\n let url =\\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\\n 'summary/all_day.geojson';\\n earthquakes = loadJSON(url);\\n}\\n\\nfunction setup() {\\n noLoop();\\n}\\n\\nfunction draw() {\\n background(200);\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n}\\n\\n\\n\\nOutside of preload(), you may supply a callback function to handle the\\nobject:\\n\\nfunction setup() {\\n noLoop();\\n let url =\\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\\n 'summary/all_day.geojson';\\n loadJSON(url, drawEarthquake);\\n}\\n\\nfunction draw() {\\n background(200);\\n}\\n\\nfunction drawEarthquake(earthquakes) {\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n}\\n\"\n ],\n \"alt\": \"50x50 ellipse that changes from black to white depending on the current humidity\\n50x50 ellipse that changes from black to white depending on the current humidity\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\",\n \"overloads\": [\n {\n \"line\": 19,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"jsonpOptions\",\n \"description\": \"options object for jsonp related settings\\n\",\n \"type\": \"Object\",\n \"optional\": true\n },\n {\n \"name\": \"datatype\",\n \"description\": \""json" or "jsonp"\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n loadJSON() completes, data is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"JSON data\",\n \"type\": \"Object|Array\"\n }\n },\n {\n \"line\": 105,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"datatype\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object|Array\"\n }\n },\n {\n \"line\": 113,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object|Array\"\n }\n }\n ]\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 180,\n \"description\": \"Reads the contents of a file and creates a String array of its individual\\nlines. If the name of the file is used as the parameter, as in the above\\nexample, the file must be located in the sketch directory/folder.\\n\\nAlternatively, the file maybe be loaded from anywhere on the local\\ncomputer using an absolute path (something that starts with / on Unix and\\nLinux, or a drive letter on Windows), or the filename parameter can be a\\nURL for a file found on a network.\\n\\nThis method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed.\\nThis method is suitable for fetching files up to size of 64MB.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadStrings\",\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after loadStrings()\\n completes, Array is passed in as first\\n argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of Strings\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\nCalling loadStrings() inside preload() guarantees to complete the\\noperation before setup() and draw() are called.\\n\\n\\nlet result;\\nfunction preload() {\\n result = loadStrings('assets/test.txt');\\n}\\n\\nfunction setup() {\\n background(200);\\n let ind = floor(random(result.length));\\n text(result[ind], 10, 10, 80, 80);\\n}\\n\\n\\nOutside of preload(), you may supply a callback function to handle the\\nobject:\\n\\n\\nfunction setup() {\\n loadStrings('assets/test.txt', pickString);\\n}\\n\\nfunction pickString(result) {\\n background(200);\\n let ind = floor(random(result.length));\\n text(result[ind], 10, 10, 80, 80);\\n}\\n\"\n ],\n \"alt\": \"randomly generated text from a file, for example \\\"i smell like butter\\\"\\nrandomly generated text from a file, for example \\\"i have three feet\\\"\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 293,\n \"description\": \"Reads the contents of a file or URL and creates a p5.Table object with\\nits values. If a file is specified, it must be located in the sketch's\\n"data" folder. The filename parameter can also be a URL to a file found\\nonline. By default, the file is assumed to be comma-separated (in CSV\\nformat). Table only looks for a header row if the 'header' option is\\nincluded.\\n\\nPossible options include:\\n\\ncsv - parse the table as comma-separated values\\ntsv - parse the table as tab-separated values\\nheader - this table has a header (title) row\\n\\n\\n\\nWhen passing in multiple options, pass them in as separate parameters,\\nseperated by commas. For example:\\n\\n\\nloadTable('my_csv_file.csv', 'csv', 'header');\\n\\n\\n\\n All files loaded and saved use UTF-8 encoding.\\n\\nThis method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. Calling loadTable() inside preload()\\nguarantees to complete the operation before setup() and draw() are called.\\nOutside of preload(), you may supply a callback function to handle the\\nobject:\\n\\n\\nThis method is suitable for fetching files up to size of 64MB.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadTable\",\n \"return\": {\n \"description\": \"Table object containing data\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the following CSV file called \\\"mammals.csv\\\"\\n// located in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n //the file can be remote\\n //table = loadTable(\\\"http://p5js.org/reference/assets/mammals.csv\\\",\\n // \\\"csv\\\", \\\"header\\\");\\n}\\n\\nfunction setup() {\\n //count the columns\\n print(table.getRowCount() + ' total rows in table');\\n print(table.getColumnCount() + ' total columns in table');\\n\\n print(table.getColumn('name'));\\n //[\\\"Goat\\\", \\\"Leopard\\\", \\\"Zebra\\\"]\\n\\n //cycle through the table\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++) {\\n print(table.getString(r, c));\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"randomly generated text from a file, for example \\\"i smell like butter\\\"\\nrandomly generated text from a file, for example \\\"i have three feet\\\"\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\",\n \"overloads\": [\n {\n \"line\": 293,\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"name of the file or URL to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"options\",\n \"description\": \""header" "csv" "tsv"\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n loadTable() completes. On success, the\\n Table object is passed in as the\\n first argument.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Table object containing data\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 383,\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object\"\n }\n }\n ]\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 603,\n \"description\": \"Reads the contents of a file and creates an XML object with its values.\\nIf the name of the file is used as the parameter, as in the above example,\\nthe file must be located in the sketch directory/folder.\\nAlternatively, the file maybe be loaded from anywhere on the local\\ncomputer using an absolute path (something that starts with / on Unix and\\nLinux, or a drive letter on Windows), or the filename parameter can be a\\nURL for a file found on a network.\\nThis method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. Calling loadXML() inside preload()\\nguarantees to complete the operation before setup() and draw() are called.\\nOutside of preload(), you may supply a callback function to handle the\\nobject.\\nThis method is suitable for fetching files up to size of 64MB.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadXML\",\n \"params\": [\n {\n \"name\": \"filename\",\n \"description\": \"name of the file or URL to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after loadXML()\\n completes, XML object is passed in as\\n first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"XML object containing data\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let children = xml.getChildren('animal');\\n\\n for (let i = 0; i < children.length; i++) {\\n let id = children[i].getNum('id');\\n let coloring = children[i].getString('species');\\n let name = children[i].getContent();\\n print(id + ', ' + coloring + ', ' + name);\\n }\\n}\\n\\n// Sketch prints:\\n// 0, Capra hircus, Goat\\n// 1, Panthera pardus, Leopard\\n// 2, Equus zebra, Zebra\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 714,\n \"description\": \"This method is suitable for fetching files up to size of 64MB.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadBytes\",\n \"params\": [\n {\n \"name\": \"file\",\n \"description\": \"name of the file or URL to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after loadBytes()\\n completes\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if there\\n is an error\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"an object whose 'bytes' property will be the loaded buffer\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\nlet data;\\n\\nfunction preload() {\\n data = loadBytes('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n for (let i = 0; i < 5; i++) {\\n console.log(data.bytes[i].toString(16));\\n }\\n}\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 774,\n \"description\": \"Method for executing an HTTP GET request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\\ncalling httpDo(path, 'GET'). The 'binary' datatype will return\\na Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\\nwhich can be used to initialize typed arrays (such as Uint8Array).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"httpGet\",\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n },\n \"example\": [\n \"\\n\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\nlet earthquakes;\\nfunction preload() {\\n // Get the most recent earthquake in the database\\n let url =\\n 'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\\n 'format=geojson&limit=1&orderby=time';\\n httpGet(url, 'jsonp', false, function(response) {\\n // when the HTTP request completes, populate the variable that holds the\\n // earthquake data used in the visualization.\\n earthquakes = response;\\n });\\n}\\n\\nfunction draw() {\\n if (!earthquakes) {\\n // Wait until the earthquake data has loaded before drawing.\\n return;\\n }\\n background(200);\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n noLoop();\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\",\n \"overloads\": [\n {\n \"line\": 774,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"datatype\",\n \"description\": \""json", "jsonp", "binary", "arrayBuffer",\\n "xml", or "text"\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"data\",\n \"description\": \"param data passed sent with request\\n\",\n \"type\": \"Object|Boolean\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n httpGet() completes, data is passed in\\n as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n }\n },\n {\n \"line\": 828,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"data\",\n \"description\": \"\",\n \"type\": \"Object|Boolean\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Promise\"\n }\n },\n {\n \"line\": 836,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Promise\"\n }\n }\n ]\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 851,\n \"description\": \"Method for executing an HTTP POST request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\\ncalling httpDo(path, 'POST').\\n\",\n \"itemtype\": \"method\",\n \"name\": \"httpPost\",\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n },\n \"example\": [\n \"\\n\\n\\n// Examples use jsonplaceholder.typicode.com for a Mock Data API\\n\\nlet url = 'https://jsonplaceholder.typicode.com/posts';\\nlet postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is way cool.' };\\n\\nfunction setup() {\\n createCanvas(800, 800);\\n}\\n\\nfunction mousePressed() {\\n // Pick new random color values\\n let r = random(255);\\n let g = random(255);\\n let b = random(255);\\n\\n httpPost(url, 'json', postData, function(result) {\\n strokeWeight(2);\\n stroke(r, g, b);\\n fill(r, g, b, 127);\\n ellipse(mouseX, mouseY, 200, 200);\\n text(result.body, mouseX, mouseY);\\n });\\n}\\n\\n\\n\\n\\n\\nlet url = 'https://invalidURL'; // A bad URL that will cause errors\\nlet postData = { title: 'p5 Clicked!', body: 'p5.js is way cool.' };\\n\\nfunction setup() {\\n createCanvas(800, 800);\\n}\\n\\nfunction mousePressed() {\\n // Pick new random color values\\n let r = random(255);\\n let g = random(255);\\n let b = random(255);\\n\\n httpPost(\\n url,\\n 'json',\\n postData,\\n function(result) {\\n // ... won't be called\\n },\\n function(error) {\\n strokeWeight(2);\\n stroke(r, g, b);\\n fill(r, g, b, 127);\\n text(error.toString(), mouseX, mouseY);\\n }\\n );\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\",\n \"overloads\": [\n {\n \"line\": 851,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"datatype\",\n \"description\": \""json", "jsonp", "xml", or "text".\\n If omitted, httpPost() will guess.\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"data\",\n \"description\": \"param data passed sent with request\\n\",\n \"type\": \"Object|Boolean\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n httpPost() completes, data is passed in\\n as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n }\n },\n {\n \"line\": 933,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"data\",\n \"description\": \"\",\n \"type\": \"Object|Boolean\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Promise\"\n }\n },\n {\n \"line\": 941,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Promise\"\n }\n }\n ]\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 956,\n \"description\": \"Method for executing an HTTP request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text.\\nFor more advanced use, you may also pass in the path as the first argument\\nand a object as the second argument, the signature follows the one specified\\nin the Fetch API specification.\\nThis method is suitable for fetching files up to size of 64MB when "GET" is used.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"httpDo\",\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n },\n \"example\": [\n \"\\n\\n\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\n\\n// displays an animation of all USGS earthquakes\\nlet earthquakes;\\nlet eqFeatureIndex = 0;\\n\\nfunction preload() {\\n let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\\n httpDo(\\n url,\\n {\\n method: 'GET',\\n // Other Request options, like special headers for apis\\n headers: { authorization: 'Bearer secretKey' }\\n },\\n function(res) {\\n earthquakes = res;\\n }\\n );\\n}\\n\\nfunction draw() {\\n // wait until the data is loaded\\n if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\\n return;\\n }\\n clear();\\n\\n let feature = earthquakes.features[eqFeatureIndex];\\n let mag = feature.properties.mag;\\n let rad = mag / 11 * ((width + height) / 2);\\n fill(255, 0, 0, 100);\\n ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\\n\\n if (eqFeatureIndex >= earthquakes.features.length) {\\n eqFeatureIndex = 0;\\n } else {\\n eqFeatureIndex += 1;\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Input\",\n \"overloads\": [\n {\n \"line\": 956,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"method\",\n \"description\": \"either "GET", "POST", or "PUT",\\n defaults to "GET"\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"datatype\",\n \"description\": \""json", "jsonp", "xml", or "text"\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"data\",\n \"description\": \"param data passed sent with request\\n\",\n \"type\": \"Object\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n httpGet() completes, data is passed in\\n as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to be executed if\\n there is an error, response is passed\\n in as first argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"A promise that resolves with the data when the operation\\n completes successfully or rejects with the error after\\n one occurs.\",\n \"type\": \"Promise\"\n }\n },\n {\n \"line\": 1027,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"options\",\n \"description\": \"Request object options as documented in the\\n "fetch" API\\nreference\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Promise\"\n }\n }\n ]\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1186,\n \"itemtype\": \"method\",\n \"name\": \"createWriter\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"name of the file to be created\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"extension\",\n \"description\": \"\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.PrintWriter\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n var writer = createWriter('squares.txt');\\n for (let i = 0; i < 10; i++) {\\n writer.print(i * i);\\n }\\n writer.close();\\n writer.clear();\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1241,\n \"description\": \"Writes data to the PrintWriter stream\\n\",\n \"itemtype\": \"method\",\n \"name\": \"write\",\n \"params\": [\n {\n \"name\": \"data\",\n \"description\": \"all data to be written by the PrintWriter\\n\",\n \"type\": \"Array\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// creates a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// write 'Hello world!'' to the file\\nwriter.write(['Hello world!']);\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\\n\\n\\n// creates a file called 'newFile2.txt'\\nlet writer = createWriter('newFile2.txt');\\n// write 'apples,bananas,123' to the file\\nwriter.write(['apples', 'bananas', 123]);\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\\n\\n\\n// creates a file called 'newFile3.txt'\\nlet writer = createWriter('newFile3.txt');\\n// write 'My name is: Teddy' to the file\\nwriter.write('My name is:');\\nwriter.write(' Teddy');\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\"\n ],\n \"class\": \"p5.PrintWriter\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1281,\n \"description\": \"Writes data to the PrintWriter stream, and adds a new line at the end\\n\",\n \"itemtype\": \"method\",\n \"name\": \"print\",\n \"params\": [\n {\n \"name\": \"data\",\n \"description\": \"all data to be printed by the PrintWriter\\n\",\n \"type\": \"Array\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// creates a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// creates a file containing\\n// My name is:\\n// Teddy\\nwriter.print('My name is:');\\nwriter.print('Teddy');\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\\n\\n\\nlet writer;\\n\\nfunction setup() {\\n createCanvas(400, 400);\\n // create a PrintWriter\\n writer = createWriter('newFile.txt');\\n}\\n\\nfunction draw() {\\n // print all mouseX and mouseY coordinates to the stream\\n writer.print([mouseX, mouseY]);\\n}\\n\\nfunction mouseClicked() {\\n // close the PrintWriter and save the file\\n writer.close();\\n}\\n\\n\"\n ],\n \"class\": \"p5.PrintWriter\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1324,\n \"description\": \"Clears the data already written to the PrintWriter object\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clear\",\n \"example\": [\n \"\\n\\n// create writer object\\nlet writer = createWriter('newFile.txt');\\nwriter.write(['clear me']);\\n// clear writer object here\\nwriter.clear();\\n// close writer\\nwriter.close();\\n\\n\"\n ],\n \"class\": \"p5.PrintWriter\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1342,\n \"description\": \"Closes the PrintWriter\\n\",\n \"itemtype\": \"method\",\n \"name\": \"close\",\n \"example\": [\n \"\\n\\n\\n// create a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\\n\\n\\n// create a file called 'newFile2.txt'\\nlet writer = createWriter('newFile2.txt');\\n// write some data to the file\\nwriter.write([100, 101, 102]);\\n// close the PrintWriter and save the file\\nwriter.close();\\n\\n\"\n ],\n \"class\": \"p5.PrintWriter\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1391,\n \"description\": \"Save an image, text, json, csv, wav, or html. Prompts download to\\nthe client's computer. Note that it is not recommended to call save()\\nwithin draw if it's looping, as the save() function will open a new save\\ndialog every frame.\\nThe default behavior is to save the canvas as an image. You can\\noptionally specify a filename.\\nFor example:\\n \\n save();\\n save('myCanvas.jpg'); // save a specific canvas with a filename\\n \\n\\nAlternately, the first parameter can be a pointer to a canvas\\np5.Element, an Array of Strings,\\nan Array of JSON, a JSON object, a p5.Table, a p5.Image, or a\\np5.SoundFile (requires p5.sound). The second parameter is a filename\\n(including extension). The third parameter is for options specific\\nto this type of object. This method will save a file that fits the\\ngiven parameters. For example:\\n\\n \\n // Saves canvas as an image\\n save('myCanvas.jpg');\\n\\n // Saves pImage as a png image\\n let img = createImage(10, 10);\\n save(img, 'my.png');\\n\\n // Saves canvas as an image\\n let cnv = createCanvas(100, 100);\\n save(cnv, 'myCanvas.jpg');\\n\\n // Saves p5.Renderer object as an image\\n let gb = createGraphics(100, 100);\\n save(gb, 'myGraphics.jpg');\\n\\n let myTable = new p5.Table();\\n\\n // Saves table as html file\\n save(myTable, 'myTable.html');\\n\\n // Comma Separated Values\\n save(myTable, 'myTable.csv');\\n\\n // Tab Separated Values\\n save(myTable, 'myTable.tsv');\\n\\n let myJSON = { a: 1, b: true };\\n\\n // Saves pretty JSON\\n save(myJSON, 'my.json');\\n\\n // Optimizes JSON filesize\\n save(myJSON, 'my.json', true);\\n\\n // Saves array of strings to a text file with line breaks after each item\\n let arrayOfStrings = ['a', 'b'];\\n save(arrayOfStrings, 'my.txt');\\n \",\n \"itemtype\": \"method\",\n \"name\": \"save\",\n \"params\": [\n {\n \"name\": \"objectOrFilename\",\n \"description\": \"If filename is provided, will\\n save canvas as an image with\\n either png or jpg extension\\n depending on the filename.\\n If object is provided, will\\n save depending on the object\\n and filename (see examples\\n above).\\n\",\n \"type\": \"Object|String\",\n \"optional\": true\n },\n {\n \"name\": \"filename\",\n \"description\": \"If an object is provided as the first\\n parameter, then the second parameter\\n indicates the filename,\\n and should include an appropriate\\n file extension (see examples above).\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"options\",\n \"description\": \"Additional options depend on\\n filetype. For example, when saving JSON,\\n true indicates that the\\n output will be optimized for filesize,\\n rather than readability.\\n\",\n \"type\": \"Boolean|String\",\n \"optional\": true\n }\n ],\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1519,\n \"description\": \"Writes the contents of an Array or a JSON object to a .json file.\\nThe file saving process and location of the saved file will\\nvary between web browsers.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveJSON\",\n \"params\": [\n {\n \"name\": \"json\",\n \"description\": \"\",\n \"type\": \"Array|Object\"\n },\n {\n \"name\": \"filename\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"optimize\",\n \"description\": \"If true, removes line breaks\\n and spaces from the output\\n file to optimize filesize\\n (but not readability).\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n let json = {}; // new JSON Object\\n\\n json.id = 0;\\n json.species = 'Panthera leo';\\n json.name = 'Lion';\\n\\n function setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n }\\n\\n function mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n saveJSON(json, 'lion.json');\\n }\\n }\\n\\n // saves the following to a file called \\\"lion.json\\\":\\n // {\\n // \\\"id\\\": 0,\\n // \\\"species\\\": \\\"Panthera leo\\\",\\n // \\\"name\\\": \\\"Lion\\\"\\n // }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1577,\n \"description\": \"Writes an array of Strings to a text file, one line per String.\\nThe file saving process and location of the saved file will\\nvary between web browsers.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveStrings\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"string array to be written\\n\",\n \"type\": \"String[]\"\n },\n {\n \"name\": \"filename\",\n \"description\": \"filename for output\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"extension\",\n \"description\": \"the filename's extension\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n let words = 'apple bear cat dog';\\n\\n // .split() outputs an Array\\n let list = split(words, ' ');\\n\\n function setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n }\\n\\n function mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n saveStrings(list, 'nouns.txt');\\n }\\n }\\n\\n // Saves the following to a file called 'nouns.txt':\\n //\\n // apple\\n // bear\\n // cat\\n // dog\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/files.js\",\n \"line\": 1645,\n \"description\": \"Writes the contents of a Table object to a file. Defaults to a\\ntext file with comma-separated-values ('csv') but can also\\nuse tab separation ('tsv'), or generate an HTML table ('html').\\nThe file saving process and location of the saved file will\\nvary between web browsers.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveTable\",\n \"params\": [\n {\n \"name\": \"Table\",\n \"description\": \"the Table object to save to a file\\n\",\n \"type\": \"p5.Table\"\n },\n {\n \"name\": \"filename\",\n \"description\": \"the filename to which the Table should be saved\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"options\",\n \"description\": \"can be one of "tsv", "csv", or "html"\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n let table;\\n\\n function setup() {\\n table = new p5.Table();\\n\\n table.addColumn('id');\\n table.addColumn('species');\\n table.addColumn('name');\\n\\n let newRow = table.addRow();\\n newRow.setNum('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Panthera leo');\\n newRow.setString('name', 'Lion');\\n\\n // To save, un-comment next line then click 'run'\\n // saveTable(table, 'new.csv');\\n }\\n\\n // Saves the following to a file called 'new.csv':\\n // id,species,name\\n // 0,Panthera leo,Lion\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Output\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 11,\n \"description\": \"Table Options\\nGeneric class for handling tabular data, typically from a\\nCSV, TSV, or other sort of spreadsheet file.\\nCSV files are\\n\\ncomma separated values, often with the data in quotes. TSV\\nfiles use tabs as separators, and usually don't bother with the\\nquotes.\\nFile names should end with .csv if they're comma separated.\\nA rough "spec" for CSV can be found\\nhere.\\nTo load files, use the loadTable method.\\nTo save tables to your computer, use the save method\\n or the saveTable method.\\n\\nPossible options include:\\n\\ncsv - parse the table as comma-separated values\\ntsv - parse the table as tab-separated values\\nheader - this table has a header (title) row\\n\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 45,\n \"itemtype\": \"property\",\n \"name\": \"columns\",\n \"type\": \"String[]\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 50,\n \"itemtype\": \"property\",\n \"name\": \"rows\",\n \"type\": \"p5.TableRow[]\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 56,\n \"description\": \"Use addRow() to add a new row of data to a p5.Table object. By default,\\nan empty row is created. Typically, you would store a reference to\\nthe new row in a TableRow object (see newRow in the example above),\\nand then set individual values using set().\\nIf a p5.TableRow object is included as a parameter, then that row is\\nduplicated and added to the table.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addRow\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row to be added to the table\\n\",\n \"type\": \"p5.TableRow\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the row that was added\",\n \"type\": \"p5.TableRow\"\n },\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //add a row\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Canis Lupus');\\n newRow.setString('name', 'Wolf');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 120,\n \"description\": \"Removes a row from the table object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeRow\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID number of the row to remove\\n\",\n \"type\": \"Integer\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //remove the first row\\n table.removeRow(0);\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 168,\n \"description\": \"Returns a reference to the specified p5.TableRow. The reference\\ncan then be used to get and set values of the selected row.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getRow\",\n \"params\": [\n {\n \"name\": \"rowID\",\n \"description\": \"ID number of the row to get\\n\",\n \"type\": \"Integer\"\n }\n ],\n \"return\": {\n \"description\": \"p5.TableRow object\",\n \"type\": \"p5.TableRow\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let row = table.getRow(1);\\n //print it column by column\\n //note: a row is an object, not an array\\n for (let c = 0; c < table.getColumnCount(); c++) {\\n print(row.getString(c));\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 214,\n \"description\": \"Gets all rows from the table. Returns an array of p5.TableRows.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getRows\",\n \"return\": {\n \"description\": \"Array of p5.TableRows\",\n \"type\": \"p5.TableRow[]\"\n },\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n\\n //warning: rows is an array of objects\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].set('name', 'Unicorn');\\n }\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 263,\n \"description\": \"Finds the first row in the Table that contains the value\\nprovided, and returns a reference to that row. Even if\\nmultiple rows are possible matches, only the first matching\\nrow is returned. The column to search may be specified by\\neither its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"findRow\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"The value to match\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"column\",\n \"description\": \"ID number or title of the\\n column to search\\n\",\n \"type\": \"Integer|String\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.TableRow\"\n },\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //find the animal named zebra\\n let row = table.findRow('Zebra', 'name');\\n //find the corresponding species\\n print(row.getString('species'));\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 328,\n \"description\": \"Finds the rows in the Table that contain the value\\nprovided, and returns references to those rows. Returns an\\nArray, so for must be used to iterate through all the rows,\\nas shown in the example above. The column to search may be\\nspecified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"findRows\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"The value to match\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"column\",\n \"description\": \"ID number or title of the\\n column to search\\n\",\n \"type\": \"Integer|String\"\n }\n ],\n \"return\": {\n \"description\": \"An Array of TableRow objects\",\n \"type\": \"p5.TableRow[]\"\n },\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //add another goat\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Scape Goat');\\n newRow.setString('name', 'Goat');\\n\\n //find the rows containing animals named Goat\\n let rows = table.findRows('Goat', 'name');\\n print(rows.length + ' Goats found');\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 397,\n \"description\": \"Finds the first row in the Table that matches the regular\\nexpression provided, and returns a reference to that row.\\nEven if multiple rows are possible matches, only the first\\nmatching row is returned. The column to search may be\\nspecified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"matchRow\",\n \"params\": [\n {\n \"name\": \"regexp\",\n \"description\": \"The regular expression to match\\n\",\n \"type\": \"String|RegExp\"\n },\n {\n \"name\": \"column\",\n \"description\": \"The column ID (number) or\\n title (string)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"TableRow object\",\n \"type\": \"p5.TableRow\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //Search using specified regex on a given column, return TableRow object\\n let mammal = table.matchRow(new RegExp('ant'), 1);\\n print(mammal.getString(1));\\n //Output \\\"Panthera pardus\\\"\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 456,\n \"description\": \"Finds the rows in the Table that match the regular expression provided,\\nand returns references to those rows. Returns an array, so for must be\\nused to iterate through all the rows, as shown in the example. The\\ncolumn to search may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"matchRows\",\n \"params\": [\n {\n \"name\": \"regexp\",\n \"description\": \"The regular expression to match\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"column\",\n \"description\": \"The column ID (number) or\\n title (string)\\n\",\n \"type\": \"String|Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"An Array of TableRow objects\",\n \"type\": \"p5.TableRow[]\"\n },\n \"example\": [\n \"\\n\\n\\nlet table;\\n\\nfunction setup() {\\n table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', 'Lion');\\n newRow.setString('type', 'Mammal');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Snake');\\n newRow.setString('type', 'Reptile');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Mosquito');\\n newRow.setString('type', 'Insect');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Lizard');\\n newRow.setString('type', 'Reptile');\\n\\n let rows = table.matchRows('R.*', 'type');\\n for (let i = 0; i < rows.length; i++) {\\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\\n }\\n}\\n// Sketch prints:\\n// Snake: Reptile\\n// Lizard: Reptile\\n\\n\"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 523,\n \"description\": \"Retrieves all values in the specified column, and returns them\\nas an array. The column may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getColumn\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"String or Number of the column to return\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"return\": {\n \"description\": \"Array of column values\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //getColumn returns an array that can be printed directly\\n print(table.getColumn('species'));\\n //outputs [\\\"Capra hircus\\\", \\\"Panthera pardus\\\", \\\"Equus zebra\\\"]\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 576,\n \"description\": \"Removes all rows from a Table. While all rows are removed,\\ncolumns and column titles are maintained.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clearRows\",\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.clearRows();\\n print(table.getRowCount() + ' total rows in table');\\n print(table.getColumnCount() + ' total columns in table');\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 618,\n \"description\": \"Use addColumn() to add a new column to a Table object.\\nTypically, you will want to specify a title, so the column\\nmay be easily referenced later by name. (If no title is\\nspecified, the new column's title will be null.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addColumn\",\n \"params\": [\n {\n \"name\": \"title\",\n \"description\": \"title of the given column\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.addColumn('carnivore');\\n table.set(0, 'carnivore', 'no');\\n table.set(1, 'carnivore', 'yes');\\n table.set(2, 'carnivore', 'no');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 669,\n \"description\": \"Returns the total number of columns in a Table.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getColumnCount\",\n \"return\": {\n \"description\": \"Number of columns in this table\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n \\n \\n // given the cvs file \\\"blobs.csv\\\" in /assets directory\\n // ID, Name, Flavor, Shape, Color\\n // Blob1, Blobby, Sweet, Blob, Pink\\n // Blob2, Saddy, Savory, Blob, Blue\\n\\n let table;\\n\\n function preload() {\\n table = loadTable('assets/blobs.csv');\\n }\\n\\n function setup() {\\n createCanvas(200, 100);\\n textAlign(CENTER);\\n background(255);\\n }\\n\\n function draw() {\\n let numOfColumn = table.getColumnCount();\\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\\n }\\n \\n \"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 705,\n \"description\": \"Returns the total number of rows in a Table.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getRowCount\",\n \"return\": {\n \"description\": \"Number of rows in this table\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n \\n \\n // given the cvs file \\\"blobs.csv\\\" in /assets directory\\n //\\n // ID, Name, Flavor, Shape, Color\\n // Blob1, Blobby, Sweet, Blob, Pink\\n // Blob2, Saddy, Savory, Blob, Blue\\n\\n let table;\\n\\n function preload() {\\n table = loadTable('assets/blobs.csv');\\n }\\n\\n function setup() {\\n createCanvas(200, 100);\\n textAlign(CENTER);\\n background(255);\\n }\\n\\n function draw() {\\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\\n }\\n \\n \"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 741,\n \"description\": \"Removes any of the specified characters (or "tokens").\\n\\nIf no column is specified, then the values in all columns and\\nrows are processed. A specific column may be referenced by\\neither its ID or title.\",\n \"itemtype\": \"method\",\n \"name\": \"removeTokens\",\n \"params\": [\n {\n \"name\": \"chars\",\n \"description\": \"String listing characters to be removed\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"column\",\n \"description\": \"Column ID (number)\\n or name (string)\\n\",\n \"type\": \"String|Integer\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n function setup() {\\n let table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', ' $Lion ,');\\n newRow.setString('type', ',,,Mammal');\\n\\n newRow = table.addRow();\\n newRow.setString('name', '$Snake ');\\n newRow.setString('type', ',,,Reptile');\\n\\n table.removeTokens(',$ ');\\n print(table.getArray());\\n }\\n\\n // prints:\\n // 0 \\\"Lion\\\" \\\"Mamal\\\"\\n // 1 \\\"Snake\\\" \\\"Reptile\\\"\\n \"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 815,\n \"description\": \"Trims leading and trailing whitespace, such as spaces and tabs,\\nfrom String table values. If no column is specified, then the\\nvalues in all columns and rows are trimmed. A specific column\\nmay be referenced by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"trim\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"Column ID (number)\\n or name (string)\\n\",\n \"type\": \"String|Integer\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n function setup() {\\n let table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', ' Lion ,');\\n newRow.setString('type', ' Mammal ');\\n\\n newRow = table.addRow();\\n newRow.setString('name', ' Snake ');\\n newRow.setString('type', ' Reptile ');\\n\\n table.trim();\\n print(table.getArray());\\n }\\n\\n // prints:\\n // 0 \\\"Lion\\\" \\\"Mamal\\\"\\n // 1 \\\"Snake\\\" \\\"Reptile\\\"\\n \"\n ],\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 879,\n \"description\": \"Use removeColumn() to remove an existing column from a Table\\nobject. The column to be removed may be identified by either\\nits title (a String) or its index value (an int).\\nremoveColumn(0) would remove the first column, removeColumn(1)\\nwould remove the second column, and so on.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeColumn\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"example\": [\n \"\\n \\n \\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.removeColumn('id');\\n print(table.getColumnCount());\\n }\\n \\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 944,\n \"description\": \"Stores a value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"column ID (Number)\\n or title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n table.set(0, 'species', 'Canis Lupus');\\n table.set(0, 'name', 'Wolf');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 994,\n \"description\": \"Stores a Float value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setNum\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"column ID (Number)\\n or title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n table.setNum(1, 'id', 1);\\n\\n print(table.getColumn(0));\\n //[\\\"0\\\", 1, \\\"2\\\"]\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1040,\n \"description\": \"Stores a String value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setString\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"column ID (Number)\\n or title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n\\n// Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //add a row\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Canis Lupus');\\n newRow.setString('name', 'Wolf');\\n\\n print(table.getArray());\\n}\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1085,\n \"description\": \"Retrieves a value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"get\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String|Number\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.get(0, 1));\\n //Capra hircus\\n print(table.get(0, 'species'));\\n //Capra hircus\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1132,\n \"description\": \"Retrieves a Float value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getNum\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.getNum(1, 0) + 100);\\n //id 1 + 100 = 101\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1177,\n \"description\": \"Retrieves a String value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getString\",\n \"params\": [\n {\n \"name\": \"row\",\n \"description\": \"row ID\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n // table is comma separated value \\\"CSV\\\"\\n // and has specifiying header for column labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.getString(0, 0)); // 0\\n print(table.getString(0, 1)); // Capra hircus\\n print(table.getString(0, 2)); // Goat\\n print(table.getString(1, 0)); // 1\\n print(table.getString(1, 1)); // Panthera pardus\\n print(table.getString(1, 2)); // Leopard\\n print(table.getString(2, 0)); // 2\\n print(table.getString(2, 1)); // Equus zebra\\n print(table.getString(2, 2)); // Zebra\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1230,\n \"description\": \"Retrieves all table data and returns as an object. If a column name is\\npassed in, each row object will be stored with that attribute as its\\ntitle.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getObject\",\n \"params\": [\n {\n \"name\": \"headerColumn\",\n \"description\": \"Name of the column which should be used to\\n title each row object (optional)\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let tableObject = table.getObject();\\n\\n print(tableObject);\\n //outputs an object\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.Table.js\",\n \"line\": 1296,\n \"description\": \"Retrieves all table data and returns it as a multidimensional array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getArray\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\n\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leoperd\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n // table is comma separated value \\\"CSV\\\"\\n // and has specifiying header for column labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let tableArray = table.getArray();\\n for (let i = 0; i < tableArray.length; i++) {\\n print(tableArray[i]);\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.Table\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 42,\n \"description\": \"Stores a value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"Column ID (Number)\\n or Title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"The value to be stored\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].set('name', 'Unicorn');\\n }\\n\\n //print the results\\n print(table.getArray());\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 106,\n \"description\": \"Stores a Float value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setNum\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"Column ID (Number)\\n or Title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"The value to be stored\\n as a Float\\n\",\n \"type\": \"Number|String\"\n }\n ],\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].setNum('id', r + 10);\\n }\\n\\n print(table.getArray());\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 150,\n \"description\": \"Stores a String value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setString\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"Column ID (Number)\\n or Title (String)\\n\",\n \"type\": \"String|Integer\"\n },\n {\n \"name\": \"value\",\n \"description\": \"The value to be stored\\n as a String\\n\",\n \"type\": \"String|Number|Boolean|Object\"\n }\n ],\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n let name = rows[r].getString('name');\\n rows[r].setString('name', 'A ' + name + ' named George');\\n }\\n\\n print(table.getArray());\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 195,\n \"description\": \"Retrieves a value from the TableRow's specified column.\\nThe column may be specified by either its ID or title.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"get\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String|Number\"\n },\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let names = [];\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n names.push(rows[r].get('name'));\\n }\\n\\n print(names);\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 243,\n \"description\": \"Retrieves a Float value from the TableRow's specified\\ncolumn. The column may be specified by either its ID or\\ntitle.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getNum\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"Float Floating point number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n let minId = Infinity;\\n let maxId = -Infinity;\\n for (let r = 0; r < rows.length; r++) {\\n let id = rows[r].getNum('id');\\n minId = min(minId, id);\\n maxId = min(maxId, id);\\n }\\n print('minimum id = ' + minId + ', maximum id = ' + maxId);\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.TableRow.js\",\n \"line\": 299,\n \"description\": \"Retrieves an String value from the TableRow's specified\\ncolumn. The column may be specified by either its ID or\\ntitle.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getString\",\n \"params\": [\n {\n \"name\": \"column\",\n \"description\": \"columnName (string) or\\n ID (number)\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n \\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n let longest = '';\\n for (let r = 0; r < rows.length; r++) {\\n let species = rows[r].getString('species');\\n if (longest.length < species.length) {\\n longest = species;\\n }\\n }\\n\\n print('longest: ' + longest);\\n }\\n \"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5.TableRow\",\n \"module\": \"IO\",\n \"submodule\": \"Table\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 65,\n \"description\": \"Gets a copy of the element's parent. Returns the parent as another\\np5.XML object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getParent\",\n \"return\": {\n \"description\": \"element parent\",\n \"type\": \"p5.XML\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let children = xml.getChildren('animal');\\n let parent = children[1].getParent();\\n print(parent.getName());\\n}\\n\\n// Sketch prints:\\n// mammals\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 103,\n \"description\": \"Gets the element's full name, which is returned as a String.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getName\",\n \"return\": {\n \"description\": \"the name of the node\",\n \"type\": \"String\"\n },\n \"example\": [\n \"<animal\\n \\n // The following short XML file called \\\"mammals.xml\\\" is parsed\\n // in the code below.\\n //\\n // \\n // <mammals>\\n // <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n // <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n // <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n // </mammals>\\n\\n let xml;\\n\\n function preload() {\\n xml = loadXML('assets/mammals.xml');\\n }\\n\\n function setup() {\\n print(xml.getName());\\n }\\n\\n // Sketch prints:\\n // mammals\\n \"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 138,\n \"description\": \"Sets the element's name, which is specified as a String.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setName\",\n \"params\": [\n {\n \"name\": \"the\",\n \"description\": \"new name of the node\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"<animal\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.getName());\\n xml.setName('fish');\\n print(xml.getName());\\n}\\n\\n// Sketch prints:\\n// mammals\\n// fish\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 184,\n \"description\": \"Checks whether or not the element has any children, and returns the result\\nas a boolean.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hasChildren\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"<animal\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.hasChildren());\\n}\\n\\n// Sketch prints:\\n// true\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 220,\n \"description\": \"Get the names of all of the element's children, and returns the names as an\\narray of Strings. This is the same as looping through and calling getName()\\non each child element individually.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"listChildren\",\n \"return\": {\n \"description\": \"names of the children of the element\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"<animal\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.listChildren());\\n}\\n\\n// Sketch prints:\\n// [\\\"animal\\\", \\\"animal\\\", \\\"animal\\\"]\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 261,\n \"description\": \"Returns all of the element's children as an array of p5.XML objects. When\\nthe name parameter is specified, then it will return all children that match\\nthat name.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getChildren\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"element name\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"children of the element\",\n \"type\": \"p5.XML[]\"\n },\n \"example\": [\n \"<animal\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let animals = xml.getChildren('animal');\\n\\n for (let i = 0; i < animals.length; i++) {\\n print(animals[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 317,\n \"description\": \"Returns the first of the element's children that matches the name parameter\\nor the child of the given index.It returns undefined if no matching\\nchild is found.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getChild\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"element name or index\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.XML\"\n },\n \"example\": [\n \"<animal\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let secondChild = xml.getChild(1);\\n print(secondChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Leopard\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 378,\n \"description\": \"Appends a new child to the element. The child can be specified with\\neither a String, which will be used as the new tag's name, or as a\\nreference to an existing p5.XML object.\\nA reference to the newly created child is returned as an p5.XML object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addChild\",\n \"params\": [\n {\n \"name\": \"node\",\n \"description\": \"a p5.XML Object which will be the child to be added\\n\",\n \"type\": \"p5.XML\"\n }\n ],\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let child = new p5.XML();\\n child.setName('animal');\\n child.setAttribute('id', '3');\\n child.setAttribute('species', 'Ornithorhynchus anatinus');\\n child.setContent('Platypus');\\n xml.addChild(child);\\n\\n let animals = xml.getChildren('animal');\\n print(animals[animals.length - 1].getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 430,\n \"description\": \"Removes the element specified by name or index.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeChild\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"element name or index\\n\",\n \"type\": \"String|Integer\"\n }\n ],\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n xml.removeChild('animal');\\n let children = xml.getChildren();\\n for (let i = 0; i < children.length; i++) {\\n print(children[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n xml.removeChild(1);\\n let children = xml.getChildren();\\n for (let i = 0; i < children.length; i++) {\\n print(children[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Zebra\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 502,\n \"description\": \"Counts the specified element's number of attributes, returned as an Number.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getAttributeCount\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getAttributeCount());\\n}\\n\\n// Sketch prints:\\n// 2\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 538,\n \"description\": \"Gets all of the specified element's attributes, and returns them as an\\narray of Strings.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"listAttributes\",\n \"return\": {\n \"description\": \"an array of strings containing the names of attributes\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.listAttributes());\\n}\\n\\n// Sketch prints:\\n// [\\\"id\\\", \\\"species\\\"]\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 580,\n \"description\": \"Checks whether or not an element has the specified attribute.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hasAttribute\",\n \"params\": [\n {\n \"name\": \"the\",\n \"description\": \"attribute to be checked\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"true if attribute found else false\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n \\n // The following short XML file called \\\"mammals.xml\\\" is parsed\\n // in the code below.\\n //\\n // \\n // <mammals>\\n // <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n // <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n // <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n // </mammals>\\n\\n let xml;\\n\\n function preload() {\\n xml = loadXML('assets/mammals.xml');\\n }\\n\\n function setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.hasAttribute('species'));\\n print(firstChild.hasAttribute('color'));\\n }\\n\\n // Sketch prints:\\n // true\\n // false\\n \"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 624,\n \"description\": \"Returns an attribute value of the element as an Number. If the defaultValue\\nparameter is specified and the attribute doesn't exist, then defaultValue\\nis returned. If no defaultValue is specified and the attribute doesn't\\nexist, the value 0 is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getNum\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"the non-null full name of the attribute\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"defaultValue\",\n \"description\": \"the default value of the attribute\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getNum('id'));\\n}\\n\\n// Sketch prints:\\n// 0\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 670,\n \"description\": \"Returns an attribute value of the element as an String. If the defaultValue\\nparameter is specified and the attribute doesn't exist, then defaultValue\\nis returned. If no defaultValue is specified and the attribute doesn't\\nexist, null is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getString\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"the non-null full name of the attribute\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"defaultValue\",\n \"description\": \"the default value of the attribute\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getString('species'));\\n}\\n\\n// Sketch prints:\\n// \\\"Capra hircus\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 716,\n \"description\": \"Sets the content of an element's attribute. The first parameter specifies\\nthe attribute name, while the second specifies the new content.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setAttribute\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"the full name of the attribute\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"the value of the attribute\\n\",\n \"type\": \"Number|String|Boolean\"\n }\n ],\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getString('species'));\\n firstChild.setAttribute('species', 'Jamides zebra');\\n print(firstChild.getString('species'));\\n}\\n\\n// Sketch prints:\\n// \\\"Capra hircus\\\"\\n// \\\"Jamides zebra\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 757,\n \"description\": \"Returns the content of an element. If there is no such content,\\ndefaultValue is returned if specified, otherwise null is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getContent\",\n \"params\": [\n {\n \"name\": \"defaultValue\",\n \"description\": \"value returned if no content is found\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 798,\n \"description\": \"Sets the element's content.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setContent\",\n \"params\": [\n {\n \"name\": \"text\",\n \"description\": \"the new content\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getContent());\\n firstChild.setContent('Mountain Goat');\\n print(firstChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Mountain Goat\\\"\\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/io/p5.XML.js\",\n \"line\": 839,\n \"description\": \"Serializes the element into a string. This function is useful for preparing\\nthe content to be sent over a http request or saved to file.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"serialize\",\n \"return\": {\n \"description\": \"Serialized string of the element\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.serialize());\\n}\\n\\n// Sketch prints:\\n// \\n// Goat\\n// Leopard\\n// Zebra\\n// \\n\"\n ],\n \"class\": \"p5.XML\",\n \"module\": \"IO\",\n \"submodule\": \"XML\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 12,\n \"description\": \"Calculates the absolute value (magnitude) of a number. Maps to Math.abs().\\nThe absolute value of a number is always positive.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"abs\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to compute\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"absolute value of given number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n let x = -3;\\n let y = abs(x);\\n\\n print(x); // -3\\n print(y); // 3\\n}\\n\"\n ],\n \"alt\": \"no image displayed\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 36,\n \"description\": \"Calculates the closest int value that is greater than or equal to the\\nvalue of the parameter. Maps to Math.ceil(). For example, ceil(9.03)\\nreturns the value 10.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ceil\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to round up\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"rounded up number\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n // map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n //Get the ceiling of the mapped number.\\n let bx = ceil(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n\"\n ],\n \"alt\": \"2 horizontal lines & number sets. increase with mouse x. bottom to 2 decimals\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 76,\n \"description\": \"Constrains a value between a minimum and maximum value.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"constrain\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to constrain\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"low\",\n \"description\": \"minimum limit\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"high\",\n \"description\": \"maximum limit\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"constrained number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n\\n let leftWall = 25;\\n let rightWall = 75;\\n\\n // xm is just the mouseX, while\\n // xc is the mouseX, but constrained\\n // between the leftWall and rightWall!\\n let xm = mouseX;\\n let xc = constrain(mouseX, leftWall, rightWall);\\n\\n // Draw the walls.\\n stroke(150);\\n line(leftWall, 0, leftWall, height);\\n line(rightWall, 0, rightWall, height);\\n\\n // Draw xm and xc as circles.\\n noStroke();\\n fill(150);\\n ellipse(xm, 33, 9, 9); // Not Constrained\\n fill(0);\\n ellipse(xc, 66, 9, 9); // Constrained\\n}\\n\"\n ],\n \"alt\": \"2 vertical lines. 2 ellipses move with mouse X 1 does not move passed lines\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 121,\n \"description\": \"Calculates the distance between two points.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dist\",\n \"return\": {\n \"description\": \"distance between the two points\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n// Move your mouse inside the canvas to see the\\n// change in distance between two points!\\nfunction draw() {\\n background(200);\\n fill(0);\\n\\n let x1 = 10;\\n let y1 = 90;\\n let x2 = mouseX;\\n let y2 = mouseY;\\n\\n line(x1, y1, x2, y2);\\n ellipse(x1, y1, 7, 7);\\n ellipse(x2, y2, 7, 7);\\n\\n // d is the length of the line\\n // the distance from point 1 to point 2.\\n let d = int(dist(x1, y1, x2, y2));\\n\\n // Let's write d along the line we are drawing!\\n push();\\n translate((x1 + x2) / 2, (y1 + y2) / 2);\\n rotate(atan2(y2 - y1, x2 - x1));\\n text(nfc(d, 1), 0, -5);\\n pop();\\n // Fancy!\\n}\\n\"\n ],\n \"alt\": \"2 ellipses joined by line. 1 ellipse moves with mouse X&Y. Distance displayed.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\",\n \"overloads\": [\n {\n \"line\": 121,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"x-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"y-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"x-coordinate of the second point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"y-coordinate of the second point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"distance between the two points\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 165,\n \"params\": [\n {\n \"name\": \"x1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z1\",\n \"description\": \"z-coordinate of the first point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z2\",\n \"description\": \"z-coordinate of the second point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"distance between the two points\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 190,\n \"description\": \"Returns Euler's number e (2.71828...) raised to the power of the n\\nparameter. Maps to Math.exp().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"exp\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"exponent to raise\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"e^n\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n\\n // Compute the exp() function with a value between 0 and 2\\n let xValue = map(mouseX, 0, width, 0, 2);\\n let yValue = exp(xValue);\\n\\n let y = map(yValue, 0, 8, height, 0);\\n\\n let legend = 'exp (' + nfc(xValue, 3) + ')\\\\n= ' + nf(yValue, 1, 4);\\n stroke(150);\\n line(mouseX, y, mouseX, height);\\n fill(0);\\n text(legend, 5, 15);\\n noStroke();\\n ellipse(mouseX, y, 7, 7);\\n\\n // Draw the exp(x) curve,\\n // over the domain of x from 0 to 2\\n noFill();\\n stroke(0);\\n beginShape();\\n for (let x = 0; x < width; x++) {\\n xValue = map(x, 0, width, 0, 2);\\n yValue = exp(xValue);\\n y = map(yValue, 0, 8, height, 0);\\n vertex(x, y);\\n }\\n\\n endShape();\\n line(0, 0, 0, height);\\n line(0, height - 1, width, height - 1);\\n}\\n\"\n ],\n \"alt\": \"ellipse moves along a curve with mouse x. e^n displayed.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 240,\n \"description\": \"Calculates the closest int value that is less than or equal to the\\nvalue of the parameter. Maps to Math.floor().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"floor\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to round down\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"rounded down number\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n //map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n //Get the floor of the mapped number.\\n let bx = floor(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n\"\n ],\n \"alt\": \"2 horizontal lines & number sets. increase with mouse x. bottom to 2 decimals\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 279,\n \"description\": \"Calculates a number between two numbers at a specific increment. The amt\\nparameter is the amount to interpolate between the two values where 0.0\\nequal to the first point, 0.1 is very near the first point, 0.5 is\\nhalf-way in between, and 1.0 is equal to the second point. If the\\nvalue of amt is more than 1.0 or less than 0.0, the number will be\\ncalculated accordingly in the ratio of the two given numbers. The lerp\\nfunction is convenient for creating motion along a straight\\npath and for drawing dotted lines.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lerp\",\n \"params\": [\n {\n \"name\": \"start\",\n \"description\": \"first value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"stop\",\n \"description\": \"second value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"number\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"lerped value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n background(200);\\n let a = 20;\\n let b = 80;\\n let c = lerp(a, b, 0.2);\\n let d = lerp(a, b, 0.5);\\n let e = lerp(a, b, 0.8);\\n\\n let y = 50;\\n\\n strokeWeight(5);\\n stroke(0); // Draw the original points in black\\n point(a, y);\\n point(b, y);\\n\\n stroke(100); // Draw the lerp points in gray\\n point(c, y);\\n point(d, y);\\n point(e, y);\\n}\\n\"\n ],\n \"alt\": \"5 points horizontally staggered mid-canvas. mid 3 are grey, outer black\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 327,\n \"description\": \"Calculates the natural logarithm (the base-e logarithm) of a number. This\\nfunction expects the n parameter to be a value greater than 0.0. Maps to\\nMath.log().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"log\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number greater than 0\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"natural logarithm of n\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n let maxX = 2.8;\\n let maxY = 1.5;\\n\\n // Compute the natural log of a value between 0 and maxX\\n let xValue = map(mouseX, 0, width, 0, maxX);\\n let yValue, y;\\n if (xValue > 0) {\\n // Cannot take the log of a negative number.\\n yValue = log(xValue);\\n y = map(yValue, -maxY, maxY, height, 0);\\n\\n // Display the calculation occurring.\\n let legend = 'log(' + nf(xValue, 1, 2) + ')\\\\n= ' + nf(yValue, 1, 3);\\n stroke(150);\\n line(mouseX, y, mouseX, height);\\n fill(0);\\n text(legend, 5, 15);\\n noStroke();\\n ellipse(mouseX, y, 7, 7);\\n }\\n\\n // Draw the log(x) curve,\\n // over the domain of x from 0 to maxX\\n noFill();\\n stroke(0);\\n beginShape();\\n for (let x = 0; x < width; x++) {\\n xValue = map(x, 0, width, 0, maxX);\\n yValue = log(xValue);\\n y = map(yValue, -maxY, maxY, height, 0);\\n vertex(x, y);\\n }\\n endShape();\\n line(0, 0, 0, height);\\n line(0, height / 2, width, height / 2);\\n}\\n\"\n ],\n \"alt\": \"ellipse moves along a curve with mouse x. natural logarithm of n displayed.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 383,\n \"description\": \"Calculates the magnitude (or length) of a vector. A vector is a direction\\nin space commonly used in computer graphics and linear algebra. Because it\\nhas no "start" position, the magnitude of a vector can be thought of as\\nthe distance from the coordinate 0,0 to its x,y value. Therefore, mag() is\\na shortcut for writing dist(0, 0, x, y).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mag\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"first value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"b\",\n \"description\": \"second value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"magnitude of vector from (0,0) to (a,b)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n let x1 = 20;\\n let x2 = 80;\\n let y1 = 30;\\n let y2 = 70;\\n\\n line(0, 0, x1, y1);\\n print(mag(x1, y1)); // Prints \\\"36.05551275463989\\\"\\n line(0, 0, x2, y1);\\n print(mag(x2, y1)); // Prints \\\"85.44003745317531\\\"\\n line(0, 0, x1, y2);\\n print(mag(x1, y2)); // Prints \\\"72.80109889280519\\\"\\n line(0, 0, x2, y2);\\n print(mag(x2, y2)); // Prints \\\"106.3014581273465\\\"\\n}\\n\"\n ],\n \"alt\": \"4 lines of different length radiate from top left of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 422,\n \"description\": \"Re-maps a number from one range to another.\\n\\nIn the first example above, the number 25 is converted from a value in the\\nrange of 0 to 100 into a value that ranges from the left edge of the\\nwindow (0) to the right edge (width).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"map\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the incoming value to be converted\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"start1\",\n \"description\": \"lower bound of the value's current range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"stop1\",\n \"description\": \"upper bound of the value's current range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"start2\",\n \"description\": \"lower bound of the value's target range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"stop2\",\n \"description\": \"upper bound of the value's target range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"withinBounds\",\n \"description\": \"constrain the value to the newly mapped range\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"remapped number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n \\nlet value = 25;\\nlet m = map(value, 0, 100, 0, width);\\nellipse(m, 50, 10, 10);\\n\\n\\n \\nfunction setup() {\\n noStroke();\\n}\\n\\nfunction draw() {\\n background(204);\\n let x1 = map(mouseX, 0, width, 25, 75);\\n ellipse(x1, 25, 25, 25);\\n //This ellipse is constrained to the 0-100 range\\n //after setting withinBounds to true\\n let x2 = map(mouseX, 0, width, 0, 100, true);\\n ellipse(x2, 75, 25, 25);\\n}\\n\"\n ],\n \"alt\": \"10 by 10 white ellipse with in mid left canvas\\n2 25 by 25 white ellipses move with mouse x. Bottom has more range from X\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 478,\n \"description\": \"Determines the largest value in a sequence of numbers, and then returns\\nthat value. max() accepts any number of Number parameters, or an Array\\nof any length.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"max\",\n \"return\": {\n \"description\": \"maximum Number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n // Change the elements in the array and run the sketch\\n // to show how max() works!\\n let numArray = [2, 1, 5, 4, 8, 9];\\n fill(0);\\n noStroke();\\n text('Array Elements', 0, 10);\\n // Draw all numbers in the array\\n let spacing = 15;\\n let elemsY = 25;\\n for (let i = 0; i < numArray.length; i++) {\\n text(numArray[i], i * spacing, elemsY);\\n }\\n let maxX = 33;\\n let maxY = 80;\\n // Draw the Maximum value in the array.\\n textSize(32);\\n text(max(numArray), maxX, maxY);\\n}\\n\"\n ],\n \"alt\": \"Small text at top reads: Array Elements 2 1 5 4 8 9. Large text at center: 9\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\",\n \"overloads\": [\n {\n \"line\": 478,\n \"params\": [\n {\n \"name\": \"n0\",\n \"description\": \"Number to compare\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"n1\",\n \"description\": \"Number to compare\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"maximum Number\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 514,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"Numbers to compare\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 528,\n \"description\": \"Determines the smallest value in a sequence of numbers, and then returns\\nthat value. min() accepts any number of Number parameters, or an Array\\nof any length.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"min\",\n \"return\": {\n \"description\": \"minimum Number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n // Change the elements in the array and run the sketch\\n // to show how min() works!\\n let numArray = [2, 1, 5, 4, 8, 9];\\n fill(0);\\n noStroke();\\n text('Array Elements', 0, 10);\\n // Draw all numbers in the array\\n let spacing = 15;\\n let elemsY = 25;\\n for (let i = 0; i < numArray.length; i++) {\\n text(numArray[i], i * spacing, elemsY);\\n }\\n let maxX = 33;\\n let maxY = 80;\\n // Draw the Minimum value in the array.\\n textSize(32);\\n text(min(numArray), maxX, maxY);\\n}\\n\"\n ],\n \"alt\": \"Small text at top reads: Array Elements 2 1 5 4 8 9. Large text at center: 1\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\",\n \"overloads\": [\n {\n \"line\": 528,\n \"params\": [\n {\n \"name\": \"n0\",\n \"description\": \"Number to compare\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"n1\",\n \"description\": \"Number to compare\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"minimum Number\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 564,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"Numbers to compare\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 578,\n \"description\": \"Normalizes a number from another range into a value between 0 and 1.\\nIdentical to map(value, low, high, 0, 1).\\nNumbers outside of the range are not clamped to 0 and 1, because\\nout-of-range values are often intentional and useful. (See the example above.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"norm\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"incoming value to be normalized\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"start\",\n \"description\": \"lower bound of the value's current range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"stop\",\n \"description\": \"upper bound of the value's current range\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"normalized number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n let currentNum = mouseX;\\n let lowerBound = 0;\\n let upperBound = width; //100;\\n let normalized = norm(currentNum, lowerBound, upperBound);\\n let lineY = 70;\\n stroke(3);\\n line(0, lineY, width, lineY);\\n //Draw an ellipse mapped to the non-normalized value.\\n noStroke();\\n fill(50);\\n let s = 7; // ellipse size\\n ellipse(currentNum, lineY, s, s);\\n\\n // Draw the guide\\n let guideY = lineY + 15;\\n text('0', 0, guideY);\\n textAlign(RIGHT);\\n text('100', width, guideY);\\n\\n // Draw the normalized value\\n textAlign(LEFT);\\n fill(0);\\n textSize(32);\\n let normalY = 40;\\n let normalX = 20;\\n text(normalized, normalX, normalY);\\n}\\n\"\n ],\n \"alt\": \"ellipse moves with mouse. 0 shown left & 100 right and updating values center\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 631,\n \"description\": \"Facilitates exponential expressions. The pow() function is an efficient\\nway of multiplying numbers by themselves (or their reciprocals) in large\\nquantities. For example, pow(3, 5) is equivalent to the expression\\n33333 and pow(3, -5) is equivalent to 1 / 33333. Maps to\\nMath.pow().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pow\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"base of the exponential expression\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"e\",\n \"description\": \"power by which to raise the base\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"n^e\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n //Exponentially increase the size of an ellipse.\\n let eSize = 3; // Original Size\\n let eLoc = 10; // Original Location\\n\\n ellipse(eLoc, eLoc, eSize, eSize);\\n\\n ellipse(eLoc * 2, eLoc * 2, pow(eSize, 2), pow(eSize, 2));\\n\\n ellipse(eLoc * 4, eLoc * 4, pow(eSize, 3), pow(eSize, 3));\\n\\n ellipse(eLoc * 8, eLoc * 8, pow(eSize, 4), pow(eSize, 4));\\n}\\n\"\n ],\n \"alt\": \"small to large ellipses radiating from top left of canvas\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 665,\n \"description\": \"Calculates the integer closest to the n parameter. For example,\\nround(133.8) returns the value 134. Maps to Math.round().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"round\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to round\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"rounded number\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n //map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n // Round the mapped number.\\n let bx = round(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n\"\n ],\n \"alt\": \"horizontal center line squared values displayed on top and regular on bottom.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 704,\n \"description\": \"Squares a number (multiplies a number by itself). The result is always a\\npositive number, as multiplying two negative numbers always yields a\\npositive result. For example, -1 * -1 = 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sq\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"number to square\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"squared number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n let eSize = 7;\\n let x1 = map(mouseX, 0, width, 0, 10);\\n let y1 = 80;\\n let x2 = sq(x1);\\n let y2 = 20;\\n\\n // Draw the non-squared.\\n line(0, y1, width, y1);\\n ellipse(x1, y1, eSize, eSize);\\n\\n // Draw the squared.\\n line(0, y2, width, y2);\\n ellipse(x2, y2, eSize, eSize);\\n\\n // Draw dividing line.\\n stroke(100);\\n line(0, height / 2, width, height / 2);\\n\\n // Draw text.\\n let spacing = 15;\\n noStroke();\\n fill(0);\\n text('x = ' + x1, 0, y1 + spacing);\\n text('sq(x) = ' + x2, 0, y2 + spacing);\\n}\\n\"\n ],\n \"alt\": \"horizontal center line squared values displayed on top and regular on bottom.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/calculation.js\",\n \"line\": 751,\n \"description\": \"Calculates the square root of a number. The square root of a number is\\nalways positive, even though there may be a valid negative root. The\\nsquare root s of number a is such that s*s = a. It is the opposite of\\nsquaring. Maps to Math.sqrt().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sqrt\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"non-negative number to square root\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"square root of number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction draw() {\\n background(200);\\n let eSize = 7;\\n let x1 = mouseX;\\n let y1 = 80;\\n let x2 = sqrt(x1);\\n let y2 = 20;\\n\\n // Draw the non-squared.\\n line(0, y1, width, y1);\\n ellipse(x1, y1, eSize, eSize);\\n\\n // Draw the squared.\\n line(0, y2, width, y2);\\n ellipse(x2, y2, eSize, eSize);\\n\\n // Draw dividing line.\\n stroke(100);\\n line(0, height / 2, width, height / 2);\\n\\n // Draw text.\\n noStroke();\\n fill(0);\\n let spacing = 15;\\n text('x = ' + x1, 0, y1 + spacing);\\n text('sqrt(x) = ' + x2, 0, y2 + spacing);\\n}\\n\"\n ],\n \"alt\": \"horizontal center line squareroot values displayed on top and regular on bottom.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Calculation\"\n },\n {\n \"file\": \"src/math/math.js\",\n \"line\": 12,\n \"description\": \"Creates a new p5.Vector (the datatype for storing vectors). This provides a\\ntwo or three dimensional vector, specifically a Euclidean (also known as\\ngeometric) vector. A vector is an entity that has both magnitude and\\ndirection.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createVector\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"y component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"z component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noStroke();\\n fill(255, 102, 204);\\n}\\n\\nfunction draw() {\\n background(255);\\n pointLight(color(255), createVector(sin(millis() / 1000) * 20, -40, -10));\\n scale(0.75);\\n sphere();\\n}\\n\"\n ],\n \"alt\": \"a purple sphere lit by a point light oscillating horizontally\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/noise.js\",\n \"line\": 40,\n \"description\": \"Returns the Perlin noise value at specified coordinates. Perlin noise is\\na random sequence generator producing a more natural ordered, harmonic\\nsuccession of numbers compared to the standard random() function.\\nIt was invented by Ken Perlin in the 1980s and been used since in\\ngraphical applications to produce procedural textures, natural motion,\\nshapes, terrains etc. The main difference to the\\nrandom() function is that Perlin noise is defined in an infinite\\nn-dimensional space where each pair of coordinates corresponds to a\\nfixed semi-random value (fixed only for the lifespan of the program; see\\nthe noiseSeed() function). p5.js can compute 1D, 2D and 3D noise,\\ndepending on the number of coordinates given. The resulting value will\\nalways be between 0.0 and 1.0. The noise value can be animated by moving\\nthrough the noise space as demonstrated in the example above. The 2nd\\nand 3rd dimension can also be interpreted as time.The actual\\nnoise is structured similar to an audio signal, in respect to the\\nfunction's use of frequencies. Similar to the concept of harmonics in\\nphysics, perlin noise is computed over several octaves which are added\\ntogether for the final result. Another way to adjust the\\ncharacter of the resulting sequence is the scale of the input\\ncoordinates. As the function works within an infinite space the value of\\nthe coordinates doesn't matter as such, only the distance between\\nsuccessive coordinates does (eg. when using noise() within a\\nloop). As a general rule the smaller the difference between coordinates,\\nthe smoother the resulting noise sequence will be. Steps of 0.005-0.03\\nwork best for most applications, but this will differ depending on use.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noise\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate in noise space\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate in noise space\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"z-coordinate in noise space\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Perlin noise value (between 0 and 1) at specified\\n coordinates\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet xoff = 0.0;\\n\\nfunction draw() {\\n background(204);\\n xoff = xoff + 0.01;\\n let n = noise(xoff) * width;\\n line(n, 0, n, height);\\n}\\n\\n\\n\\nlet noiseScale=0.02;\\n\\nfunction draw() {\\n background(0);\\n for (let x=0; x < width; x++) {\\n let noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale);\\n stroke(noiseVal*255);\\n line(x, mouseY+noiseVal*80, x, height);\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"vertical line moves left to right with updating noise values.\\nhorizontal wave pattern effected by mouse x-position & updating noise values.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Noise\"\n },\n {\n \"file\": \"src/math/noise.js\",\n \"line\": 187,\n \"description\": \"Adjusts the character and level of detail produced by the Perlin noise\\n function. Similar to harmonics in physics, noise is computed over\\n several octaves. Lower octaves contribute more to the output signal and\\n as such define the overall intensity of the noise, whereas higher octaves\\n create finer grained details in the noise sequence.\\n \\n By default, noise is computed over 4 octaves with each octave contributing\\n exactly half than its predecessor, starting at 50% strength for the 1st\\n octave. This falloff amount can be changed by adding an additional function\\n parameter. Eg. a falloff factor of 0.75 means each octave will now have\\n 75% impact (25% less) of the previous lower octave. Any value between\\n 0.0 and 1.0 is valid, however note that values greater than 0.5 might\\n result in greater than 1.0 values returned by noise().\\n \\n By changing these parameters, the signal created by the noise()\\n function can be adapted to fit very specific needs and characteristics.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noiseDetail\",\n \"params\": [\n {\n \"name\": \"lod\",\n \"description\": \"number of octaves to be used by the noise\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"falloff\",\n \"description\": \"falloff factor for each octave\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n \\n \\n let noiseVal;\\n let noiseScale = 0.02;\\nfunction setup() {\\n createCanvas(100, 100);\\n }\\nfunction draw() {\\n background(0);\\n for (let y = 0; y < height; y++) {\\n for (let x = 0; x < width / 2; x++) {\\n noiseDetail(2, 0.2);\\n noiseVal = noise((mouseX + x) * noiseScale, (mouseY + y) * noiseScale);\\n stroke(noiseVal * 255);\\n point(x, y);\\n noiseDetail(8, 0.65);\\n noiseVal = noise(\\n (mouseX + x + width / 2) * noiseScale,\\n (mouseY + y) * noiseScale\\n );\\n stroke(noiseVal * 255);\\n point(x + width / 2, y);\\n }\\n }\\n }\\n \\n \"\n ],\n \"alt\": \"2 vertical grey smokey patterns affected my mouse x-position and noise.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Noise\"\n },\n {\n \"file\": \"src/math/noise.js\",\n \"line\": 253,\n \"description\": \"Sets the seed value for noise(). By default, noise()\\nproduces different results each time the program is run. Set the\\nvalue parameter to a constant to return the same pseudo-random\\nnumbers each time the software is run.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noiseSeed\",\n \"params\": [\n {\n \"name\": \"seed\",\n \"description\": \"the seed value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nlet xoff = 0.0;\\n\\nfunction setup() {\\n noiseSeed(99);\\n stroke(0, 10);\\n}\\n\\nfunction draw() {\\n xoff = xoff + .01;\\n let n = noise(xoff) * width;\\n line(n, 0, n, height);\\n}\\n\\n\"\n ],\n \"alt\": \"vertical grey lines drawing in pattern affected by noise.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Noise\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 67,\n \"description\": \"The x component of the vector\\n\",\n \"itemtype\": \"property\",\n \"name\": \"x\",\n \"type\": \"Number\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 72,\n \"description\": \"The y component of the vector\\n\",\n \"itemtype\": \"property\",\n \"name\": \"y\",\n \"type\": \"Number\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 77,\n \"description\": \"The z component of the vector\\n\",\n \"itemtype\": \"property\",\n \"name\": \"z\",\n \"type\": \"Number\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 84,\n \"description\": \"Returns a string representation of a vector v by calling String(v)\\nor v.toString(). This method is useful for logging vectors in the\\nconsole.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toString\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let v = createVector(20, 30);\\n print(String(v)); // prints \\\"p5.Vector Object : [20, 30, 0]\\\"\\n}\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text(v1.toString(), 10, 25, 90, 75);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 134,\n \"description\": \"Sets the x, y, and z component of the vector using two or three separate\\nvariables, the data from a p5.Vector, or the values from a float array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let v = createVector(1, 2, 3);\\n v.set(4, 5, 6); // Sets vector to [4, 5, 6]\\n\\n let v1 = createVector(0, 0, 0);\\n let arr = [1, 2, 3];\\n v1.set(arr); // Sets vector to [1, 2, 3]\\n}\\n\\n\\n\\n\\n\\nlet v0, v1;\\nfunction setup() {\\n createCanvas(100, 100);\\n\\n v0 = createVector(0, 0);\\n v1 = createVector(50, 50);\\n}\\n\\nfunction draw() {\\n background(240);\\n\\n drawArrow(v0, v1, 'black');\\n v1.set(v1.x + random(-1, 1), v1.y + random(-1, 1));\\n\\n noStroke();\\n text('x: ' + round(v1.x) + ' y: ' + round(v1.y), 20, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 134,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"the y component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"the z component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 193,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the vector to set\\n\",\n \"type\": \"p5.Vector|Number[]\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 217,\n \"description\": \"Gets a copy of the vector, returns a p5.Vector object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"copy\",\n \"return\": {\n \"description\": \"the copy of the p5.Vector object\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = v1.copy();\\nprint(v1.x === v2.x && v1.y === v2.y && v1.z === v2.z);\\n// Prints \\\"true\\\"\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 240,\n \"description\": \"Adds x, y, and z components to a vector, adds one vector to another, or\\nadds two independent vectors together. The version of the method that adds\\ntwo vectors together is a static method and returns a p5.Vector, the others\\nacts directly on the vector. See the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"add\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(1, 2, 3);\\nv.add(4, 5, 6);\\n// v's components are set to [5, 7, 9]\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(2, 3, 4);\\n\\nlet v3 = p5.Vector.add(v1, v2);\\n// v3 has components [3, 5, 7]\\nprint(v3);\\n\\n\\n\\n\\n\\n// red vector + blue vector = purple vector\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(-30, 20);\\n drawArrow(v1, v2, 'blue');\\n\\n let v3 = p5.Vector.add(v1, v2);\\n drawArrow(v0, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 240,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x component of the vector to be added\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"the y component of the vector to be added\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"the z component of the vector to be added\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 306,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the vector to add\\n\",\n \"type\": \"p5.Vector|Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1556,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"a p5.Vector to add\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"a p5.Vector to add\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"target\",\n \"description\": \"the vector to receive the result\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1\n },\n {\n \"line\": 1563,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the resulting p5.Vector\",\n \"type\": \"p5.Vector\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 330,\n \"description\": \"Subtracts x, y, and z components from a vector, subtracts one vector from\\nanother, or subtracts two independent vectors. The version of the method\\nthat subtracts two vectors is a static method and returns a p5.Vector, the\\nother acts directly on the vector. See the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sub\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(4, 5, 6);\\nv.sub(1, 1, 1);\\n// v's components are set to [3, 4, 5]\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(2, 3, 4);\\nlet v2 = createVector(1, 2, 3);\\n\\nlet v3 = p5.Vector.sub(v1, v2);\\n// v3 has components [1, 1, 1]\\nprint(v3);\\n\\n\\n\\n\\n\\n// red vector - blue vector = purple vector\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(70, 50);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX, mouseY);\\n drawArrow(v0, v2, 'blue');\\n\\n let v3 = p5.Vector.sub(v1, v2);\\n drawArrow(v2, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 330,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x component of the vector to subtract\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"the y component of the vector to subtract\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"the z component of the vector to subtract\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 396,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the vector to subtract\\n\",\n \"type\": \"p5.Vector|Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1586,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"a p5.Vector to subtract from\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"a p5.Vector to subtract\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"target\",\n \"description\": \"if undefined a new vector will be created\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1\n },\n {\n \"line\": 1593,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the resulting p5.Vector\",\n \"type\": \"p5.Vector\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 420,\n \"description\": \"Multiply the vector by a scalar. The static version of this method\\ncreates a new p5.Vector while the non static version acts on the vector\\ndirectly. See the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mult\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(1, 2, 3);\\nv.mult(2);\\n// v's components are set to [2, 4, 6]\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = p5.Vector.mult(v1, 2);\\n// v2 has components [2, 4, 6]\\nprint(v2);\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(25, -25);\\n drawArrow(v0, v1, 'red');\\n\\n let num = map(mouseX, 0, width, -2, 2, true);\\n let v2 = p5.Vector.mult(v1, num);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('multiplied by ' + num.toFixed(2), 5, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 420,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"the number to multiply with the vector\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1614,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"the vector to multiply\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"n\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"target\",\n \"description\": \"if undefined a new vector will be created\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1\n },\n {\n \"line\": 1621,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"n\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the resulting new p5.Vector\",\n \"type\": \"p5.Vector\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 495,\n \"description\": \"Divide the vector by a scalar. The static version of this method creates a\\nnew p5.Vector while the non static version acts on the vector directly.\\nSee the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"div\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(6, 4, 2);\\nv.div(2); //v's components are set to [3, 2, 1]\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(6, 4, 2);\\nlet v2 = p5.Vector.div(v1, 2);\\n// v2 has components [3, 2, 1]\\nprint(v2);\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 100);\\n let v1 = createVector(50, -50);\\n drawArrow(v0, v1, 'red');\\n\\n let num = map(mouseX, 0, width, 10, 0.5, true);\\n let v2 = p5.Vector.div(v1, num);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('divided by ' + num.toFixed(2), 10, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 495,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"the number to divide the vector by\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1641,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"the vector to divide\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"n\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"target\",\n \"description\": \"if undefined a new vector will be created\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1\n },\n {\n \"line\": 1648,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"n\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the resulting new p5.Vector\",\n \"type\": \"p5.Vector\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 573,\n \"description\": \"Calculates the magnitude (length) of the vector and returns the result as\\na float (this is simply the equation sqrt(xx + yy + z*z).)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mag\",\n \"return\": {\n \"description\": \"magnitude of the vector\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text('vector length: ' + v1.mag().toFixed(2), 10, 70, 90, 30);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\\n\\n\\nlet v = createVector(20.0, 30.0, 40.0);\\nlet m = v.mag();\\nprint(m); // Prints \\\"53.85164807134504\\\"\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 573,\n \"params\": [],\n \"return\": {\n \"description\": \"magnitude of the vector\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 1738,\n \"params\": [\n {\n \"name\": \"vecT\",\n \"description\": \"the vector to return the magnitude of\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the magnitude of vecT\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 621,\n \"description\": \"Calculates the squared magnitude of the vector and returns the result\\nas a float (this is simply the equation (xx + yy + z*z).)\\nFaster if the real length is not required in the\\ncase of comparing vectors, etc.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"magSq\",\n \"return\": {\n \"description\": \"squared magnitude of the vector\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\n// Static method\\nlet v1 = createVector(6, 4, 2);\\nprint(v1.magSq()); // Prints \\\"56\\\"\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text('vector length squared: ' + v1.magSq().toFixed(2), 10, 45, 90, 55);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 675,\n \"description\": \"Calculates the dot product of two vectors. The version of the method\\nthat computes the dot product of two independent vectors is a static\\nmethod. See the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dot\",\n \"return\": {\n \"description\": \"the dot product\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(2, 3, 4);\\n\\nprint(v1.dot(v2)); // Prints \\\"20\\\"\\n\\n\\n\\n\\n\\n//Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(3, 2, 1);\\nprint(p5.Vector.dot(v1, v2)); // Prints \\\"10\\\"\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 675,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x component of the vector\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"z component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the dot product\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 706,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"value component of the vector or a p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 1668,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"the first p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"the second p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the dot product\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 718,\n \"description\": \"Calculates and returns a vector composed of the cross product between\\ntwo vectors. Both the static and non static methods return a new p5.Vector.\\nSee the examples for more context.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"cross\",\n \"return\": {\n \"description\": \"p5.Vector composed of cross product\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(1, 2, 3);\\n\\nv1.cross(v2); // v's components are [0, 0, 0]\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet crossProduct = p5.Vector.cross(v1, v2);\\n// crossProduct has components [0, 0, 1]\\nprint(crossProduct);\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 718,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"p5.Vector to be crossed\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"return\": {\n \"description\": \"p5.Vector composed of cross product\",\n \"type\": \"p5.Vector\"\n }\n },\n {\n \"line\": 1682,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"the first p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"the second p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the cross product\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 759,\n \"description\": \"Calculates the Euclidean distance between two points (considering a\\npoint as a vector object).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dist\",\n \"return\": {\n \"description\": \"the distance\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet distance = v1.dist(v2); // distance is 1.4142...\\nprint(distance);\\n\\n\\n\\n\\n\\n// Static method\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet distance = p5.Vector.dist(v1, v2);\\n// distance is 1.4142...\\nprint(distance);\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n\\n let v1 = createVector(70, 50);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX, mouseY);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('distance between vectors: ' + v2.dist(v1).toFixed(2), 5, 50, 95, 50);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 759,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"the x, y, and z coordinates of a p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"return\": {\n \"description\": \"the distance\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 1697,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"the first p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"the second p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the distance\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 830,\n \"description\": \"Normalize the vector to length 1 (make it a unit vector).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"normalize\",\n \"return\": {\n \"description\": \"normalized p5.Vector\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.normalize();\\n// v's components are set to\\n// [0.4454354, 0.8908708, 0.089087084]\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'red');\\n v1.normalize();\\n drawArrow(v0, v1.mult(35), 'blue');\\n\\n noFill();\\n ellipse(50, 50, 35 * 2);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 886,\n \"description\": \"Limit the magnitude of this vector to the value used for the max\\nparameter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"limit\",\n \"params\": [\n {\n \"name\": \"max\",\n \"description\": \"the maximum magnitude for the vector\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.limit(5);\\n// v's components are set to\\n// [2.2271771, 4.4543543, 0.4454354]\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'red');\\n drawArrow(v0, v1.limit(35), 'blue');\\n\\n noFill();\\n ellipse(50, 50, 35 * 2);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 944,\n \"description\": \"Set the magnitude of this vector to the value used for the len\\nparameter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setMag\",\n \"params\": [\n {\n \"name\": \"len\",\n \"description\": \"the new length for this vector\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.setMag(10);\\n// v's components are set to [6.0, 8.0, 0.0]\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(50, 50);\\n\\n drawArrow(v0, v1, 'red');\\n\\n let length = map(mouseX, 0, width, 0, 141, true);\\n v1.setMag(length);\\n drawArrow(v0, v1, 'blue');\\n\\n noStroke();\\n text('magnitude set to: ' + length.toFixed(2), 10, 70, 90, 30);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1000,\n \"description\": \"Calculate the angle of rotation for this vector (only 2D vectors)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"heading\",\n \"return\": {\n \"description\": \"the angle of rotation\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let v1 = createVector(30, 50);\\n print(v1.heading()); // 1.0303768265243125\\n\\n v1 = createVector(40, 50);\\n print(v1.heading()); // 0.8960553845713439\\n\\n v1 = createVector(30, 70);\\n print(v1.heading()); // 1.1659045405098132\\n}\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'black');\\n\\n let myHeading = v1.heading();\\n noStroke();\\n text(\\n 'vector heading: ' +\\n myHeading.toFixed(2) +\\n ' radians or ' +\\n degrees(myHeading).toFixed(2) +\\n ' degrees',\\n 10,\\n 50,\\n 90,\\n 50\\n );\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1069,\n \"description\": \"Rotate the vector by an angle (only 2D vectors), magnitude remains the\\nsame\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rotate\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle of rotation\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(10.0, 20.0);\\n// v has components [10.0, 20.0, 0.0]\\nv.rotate(HALF_PI);\\n// v's components are set to [-20.0, 9.999999, 0.0]\\n\\n\\n\\n\\n\\nlet angle = 0;\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(50, 0);\\n\\n drawArrow(v0, v1.rotate(angle), 'black');\\n angle += 0.01;\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1125,\n \"description\": \"Calculates and returns the angle (in radians) between two vectors.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"angleBetween\",\n \"params\": [\n {\n \"name\": \"the\",\n \"description\": \"x, y, and z components of a p5.Vector\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"return\": {\n \"description\": \"the angle between (in radians)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet angle = v1.angleBetween(v2);\\n// angle is PI/2\\nprint(angle);\\n\\n\\n\\n\\n\\nfunction draw() {\\n background(240);\\n let v0 = createVector(50, 50);\\n\\n let v1 = createVector(50, 0);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX - 50, mouseY - 50);\\n drawArrow(v0, v2, 'blue');\\n\\n let angleBetween = v1.angleBetween(v2);\\n noStroke();\\n text(\\n 'angle between: ' +\\n angleBetween.toFixed(2) +\\n ' radians or ' +\\n degrees(angleBetween).toFixed(2) +\\n ' degrees',\\n 10,\\n 50,\\n 90,\\n 50\\n );\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1198,\n \"description\": \"Linear interpolate the vector to another vector\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lerp\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet v = createVector(1, 1, 0);\\n\\nv.lerp(3, 3, 0, 0.5); // v now has components [2,2,0]\\n\\n\\n\\n\\n\\nlet v1 = createVector(0, 0, 0);\\nlet v2 = createVector(100, 100, 0);\\n\\nlet v3 = p5.Vector.lerp(v1, v2, 0.5);\\n// v3 has components [50,50,0]\\nprint(v3);\\n\\n\\n\\n\\n\\nlet step = 0.01;\\nlet amount = 0;\\n\\nfunction draw() {\\n background(240);\\n let v0 = createVector(0, 0);\\n\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(90, 90);\\n drawArrow(v0, v2, 'blue');\\n\\n if (amount > 1 || amount < 0) {\\n step *= -1;\\n }\\n amount += step;\\n let v3 = p5.Vector.lerp(v1, v2, amount);\\n\\n drawArrow(v0, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 1198,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x component\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"the y component\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"the z component\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"the amount of interpolation; some value between 0.0\\n (old vector) and 1.0 (new vector). 0.9 is very near\\n the new vector. 0.5 is halfway in between.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1271,\n \"params\": [\n {\n \"name\": \"v\",\n \"description\": \"the p5.Vector to lerp to\\n\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 1712,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"target\",\n \"description\": \"if undefined a new vector will be created\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"static\": 1\n },\n {\n \"line\": 1720,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n },\n {\n \"name\": \"amt\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"static\": 1,\n \"return\": {\n \"description\": \"the lerped value\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1287,\n \"description\": \"Return a representation of this vector as a float array. This is only\\nfor temporary use. If used in any other fashion, the contents should be\\ncopied by using the p5.Vector.copy() method to copy into your own\\narray.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"array\",\n \"return\": {\n \"description\": \"an Array with the 3 values\",\n \"type\": \"Number[]\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n let v = createVector(20, 30);\\n print(v.array()); // Prints : Array [20, 30, 0]\\n}\\n\\n\\n\\n\\n\\nlet v = createVector(10.0, 20.0, 30.0);\\nlet f = v.array();\\nprint(f[0]); // Prints \\\"10.0\\\"\\nprint(f[1]); // Prints \\\"20.0\\\"\\nprint(f[2]); // Prints \\\"30.0\\\"\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1319,\n \"description\": \"Equality check against a p5.Vector\\n\",\n \"itemtype\": \"method\",\n \"name\": \"equals\",\n \"return\": {\n \"description\": \"whether the vectors are equals\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n\\n\\nlet v1 = createVector(5, 10, 20);\\nlet v2 = createVector(5, 10, 20);\\nlet v3 = createVector(13, 10, 19);\\n\\nprint(v1.equals(v2.x, v2.y, v2.z)); // true\\nprint(v1.equals(v3.x, v3.y, v3.z)); // false\\n\\n\\n\\n\\n\\nlet v1 = createVector(10.0, 20.0, 30.0);\\nlet v2 = createVector(10.0, 20.0, 30.0);\\nlet v3 = createVector(0.0, 0.0, 0.0);\\nprint(v1.equals(v2)); // true\\nprint(v1.equals(v3)); // false\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\",\n \"overloads\": [\n {\n \"line\": 1319,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"the x component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"the y component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"the z component of the vector\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"whether the vectors are equals\",\n \"type\": \"Boolean\"\n }\n },\n {\n \"line\": 1349,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the vector to compare\\n\",\n \"type\": \"p5.Vector|Array\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1374,\n \"description\": \"Make a new 2D vector from an angle\\n\",\n \"itemtype\": \"method\",\n \"name\": \"fromAngle\",\n \"static\": 1,\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the desired angle, in radians\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"length\",\n \"description\": \"the length of the new vector (defaults to 1)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the new p5.Vector object\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(200);\\n\\n // Create a variable, proportional to the mouseX,\\n // varying from 0-360, to represent an angle in degrees.\\n angleMode(DEGREES);\\n let myDegrees = map(mouseX, 0, width, 0, 360);\\n\\n // Display that variable in an onscreen text.\\n // (Note the nfc() function to truncate additional decimal places,\\n // and the \\\"\\\\xB0\\\" character for the degree symbol.)\\n let readout = 'angle = ' + nfc(myDegrees, 1) + '\\\\xB0';\\n noStroke();\\n fill(0);\\n text(readout, 5, 15);\\n\\n // Create a p5.Vector using the fromAngle function,\\n // and extract its x and y components.\\n let v = p5.Vector.fromAngle(radians(myDegrees), 30);\\n let vx = v.x;\\n let vy = v.y;\\n\\n push();\\n translate(width / 2, height / 2);\\n noFill();\\n stroke(150);\\n line(0, 0, 30, 0);\\n stroke(0);\\n line(0, 0, vx, vy);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1426,\n \"description\": \"Make a new 3D vector from a pair of ISO spherical angles\\n\",\n \"itemtype\": \"method\",\n \"name\": \"fromAngles\",\n \"static\": 1,\n \"params\": [\n {\n \"name\": \"theta\",\n \"description\": \"the polar angle, in radians (zero is up)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"phi\",\n \"description\": \"the azimuthal angle, in radians\\n (zero is out of the screen)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"length\",\n \"description\": \"the length of the new vector (defaults to 1)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the new p5.Vector object\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n fill(255);\\n noStroke();\\n}\\nfunction draw() {\\n background(255);\\n\\n let t = millis() / 1000;\\n\\n // add three point lights\\n pointLight(color('#f00'), p5.Vector.fromAngles(t * 1.0, t * 1.3, 100));\\n pointLight(color('#0f0'), p5.Vector.fromAngles(t * 1.1, t * 1.2, 100));\\n pointLight(color('#00f'), p5.Vector.fromAngles(t * 1.2, t * 1.1, 100));\\n\\n sphere(35);\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1475,\n \"description\": \"Make a new 2D unit vector from a random angle\\n\",\n \"itemtype\": \"method\",\n \"name\": \"random2D\",\n \"static\": 1,\n \"return\": {\n \"description\": \"the new p5.Vector object\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nlet v = p5.Vector.random2D();\\n// May make v's attributes something like:\\n// [0.61554617, -0.51195765, 0.0] or\\n// [-0.4695841, -0.14366731, 0.0] or\\n// [0.6091097, -0.22805278, 0.0]\\nprint(v);\\n\\n\\n\\n\\n\\nfunction setup() {\\n frameRate(1);\\n}\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = p5.Vector.random2D();\\n drawArrow(v0, v1.mult(50), 'black');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1528,\n \"description\": \"Make a new random 3D unit vector.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"random3D\",\n \"static\": 1,\n \"return\": {\n \"description\": \"the new p5.Vector object\",\n \"type\": \"p5.Vector\"\n },\n \"example\": [\n \"\\n\\n\\nlet v = p5.Vector.random3D();\\n// May make v's attributes something like:\\n// [0.61554617, -0.51195765, 0.599168] or\\n// [-0.4695841, -0.14366731, -0.8711202] or\\n// [0.6091097, -0.22805278, -0.7595902]\\nprint(v);\\n\\n\"\n ],\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1611,\n \"description\": \"Multiplies a vector by a scalar and returns a new vector.\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1638,\n \"description\": \"Divides a vector by a scalar and returns a new vector.\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1665,\n \"description\": \"Calculates the dot product of two vectors.\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1679,\n \"description\": \"Calculates the cross product of two vectors.\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1693,\n \"description\": \"Calculates the Euclidean distance between two points (considering a\\npoint as a vector object).\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/p5.Vector.js\",\n \"line\": 1708,\n \"description\": \"Linear interpolate a vector to another vector and return the result as a\\nnew vector.\\n\",\n \"class\": \"p5.Vector\",\n \"module\": \"Math\",\n \"submodule\": \"Math\"\n },\n {\n \"file\": \"src/math/random.js\",\n \"line\": 48,\n \"description\": \"Sets the seed value for random().\\nBy default, random() produces different results each time the program\\nis run. Set the seed parameter to a constant to return the same\\npseudo-random numbers each time the software is run.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"randomSeed\",\n \"params\": [\n {\n \"name\": \"seed\",\n \"description\": \"the seed value\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nrandomSeed(99);\\nfor (let i = 0; i < 100; i++) {\\n let r = random(0, 255);\\n stroke(r);\\n line(i, 0, i, 100);\\n}\\n\\n\"\n ],\n \"alt\": \"many vertical lines drawn in white, black or grey.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Random\"\n },\n {\n \"file\": \"src/math/random.js\",\n \"line\": 79,\n \"description\": \"Return a random floating-point number.\\nTakes either 0, 1 or 2 arguments.\\nIf no argument is given, returns a random number from 0\\nup to (but not including) 1.\\nIf one argument is given and it is a number, returns a random number from 0\\nup to (but not including) the number.\\nIf one argument is given and it is an array, returns a random element from\\nthat array.\\nIf two arguments are given, returns a random number from the\\nfirst argument up to (but not including) the second argument.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"random\",\n \"return\": {\n \"description\": \"the random number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfor (let i = 0; i < 100; i++) {\\n let r = random(50);\\n stroke(r * 5);\\n line(50, i, 50 + r, i);\\n}\\n\\n\\n\\n\\nfor (let i = 0; i < 100; i++) {\\n let r = random(-50, 50);\\n line(50, i, 50 + r, i);\\n}\\n\\n\\n\\n\\n// Get a random element from an array using the random(Array) syntax\\nlet words = ['apple', 'bear', 'cat', 'dog'];\\nlet word = random(words); // select random word\\ntext(word, 10, 50); // draw the word\\n\\n\"\n ],\n \"alt\": \"100 horizontal lines from center canvas to right. size+fill change each time\\n100 horizontal lines from center of canvas. height & side change each render\\nword displayed at random. Either apple, bear, cat, or dog\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Random\",\n \"overloads\": [\n {\n \"line\": 79,\n \"params\": [\n {\n \"name\": \"min\",\n \"description\": \"the lower bound (inclusive)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"max\",\n \"description\": \"the upper bound (exclusive)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the random number\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 133,\n \"params\": [\n {\n \"name\": \"choices\",\n \"description\": \"the array to choose from\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"the random element from the array\",\n \"type\": \"*\"\n }\n }\n ]\n },\n {\n \"file\": \"src/math/random.js\",\n \"line\": 166,\n \"description\": \"Returns a random number fitting a Gaussian, or\\n normal, distribution. There is theoretically no minimum or maximum\\n value that randomGaussian() might return. Rather, there is\\n just a very low probability that values far from the mean will be\\n returned; and a higher probability that numbers near the mean will\\n be returned.\\n \\n Takes either 0, 1 or 2 arguments.\\n If no args, returns a mean of 0 and standard deviation of 1.\\n If one arg, that arg is the mean (standard deviation is 1).\\n If two args, first is mean, second is standard deviation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"randomGaussian\",\n \"params\": [\n {\n \"name\": \"mean\",\n \"description\": \"the mean\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"sd\",\n \"description\": \"the standard deviation\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the random number\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n \\n \\n for (let y = 0; y < 100; y++) {\\n let x = randomGaussian(50, 15);\\n line(50, y, x, y);\\n }\\n \\n \\n \\n \\n let distribution = new Array(360);\\nfunction setup() {\\n createCanvas(100, 100);\\n for (let i = 0; i < distribution.length; i++) {\\n distribution[i] = floor(randomGaussian(0, 15));\\n }\\n }\\nfunction draw() {\\n background(204);\\n translate(width / 2, width / 2);\\n for (let i = 0; i < distribution.length; i++) {\\n rotate(TWO_PI / distribution.length);\\n stroke(0);\\n let dist = abs(distribution[i]);\\n line(0, 0, dist, 0);\\n }\\n }\\n \\n \"\n ],\n \"alt\": \"100 horizontal lines from center of canvas. height & side change each render\\n black lines radiate from center of canvas. size determined each render\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Random\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 20,\n \"description\": \"The inverse of cos(), returns the arc cosine of a value. This function\\nexpects the values in the range of -1 to 1 and values are returned in\\nthe range 0 to PI (3.1415927).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"acos\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the value whose arc cosine is to be returned\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the arc cosine of the given value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = PI;\\nlet c = cos(a);\\nlet ac = acos(c);\\n// Prints: \\\"3.1415927 : -1.0 : 3.1415927\\\"\\nprint(a + ' : ' + c + ' : ' + ac);\\n\\n\\n\\n\\n\\nlet a = PI + PI / 4.0;\\nlet c = cos(a);\\nlet ac = acos(c);\\n// Prints: \\\"3.926991 : -0.70710665 : 2.3561943\\\"\\nprint(a + ' : ' + c + ' : ' + ac);\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 54,\n \"description\": \"The inverse of sin(), returns the arc sine of a value. This function\\nexpects the values in the range of -1 to 1 and values are returned\\nin the range -PI/2 to PI/2.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"asin\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the value whose arc sine is to be returned\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the arc sine of the given value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = PI + PI / 3;\\nlet s = sin(a);\\nlet as = asin(s);\\n// Prints: \\\"1.0471976 : 0.86602545 : 1.0471976\\\"\\nprint(a + ' : ' + s + ' : ' + as);\\n\\n\\n\\n\\n\\nlet a = PI + PI / 3.0;\\nlet s = sin(a);\\nlet as = asin(s);\\n// Prints: \\\"4.1887903 : -0.86602545 : -1.0471976\\\"\\nprint(a + ' : ' + s + ' : ' + as);\\n\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 89,\n \"description\": \"The inverse of tan(), returns the arc tangent of a value. This function\\nexpects the values in the range of -Infinity to Infinity (exclusive) and\\nvalues are returned in the range -PI/2 to PI/2.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"atan\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the value whose arc tangent is to be returned\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the arc tangent of the given value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = PI + PI / 3;\\nlet t = tan(a);\\nlet at = atan(t);\\n// Prints: \\\"1.0471976 : 1.7320509 : 1.0471976\\\"\\nprint(a + ' : ' + t + ' : ' + at);\\n\\n\\n\\n\\n\\nlet a = PI + PI / 3.0;\\nlet t = tan(a);\\nlet at = atan(t);\\n// Prints: \\\"4.1887903 : 1.7320513 : 1.0471977\\\"\\nprint(a + ' : ' + t + ' : ' + at);\\n\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 124,\n \"description\": \"Calculates the angle (in radians) from a specified point to the coordinate\\norigin as measured from the positive x-axis. Values are returned as a\\nfloat in the range from PI to -PI. The atan2() function is most often used\\nfor orienting geometry to the position of the cursor.\\n\\nNote: The y-coordinate of the point is the first parameter, and the\\nx-coordinate is the second parameter, due the the structure of calculating\\nthe tangent.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"atan2\",\n \"params\": [\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of the point\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of the point\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the arc tangent of the given point\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(204);\\n translate(width / 2, height / 2);\\n let a = atan2(mouseY - height / 2, mouseX - width / 2);\\n rotate(a);\\n rect(-30, -5, 60, 10);\\n}\\n\\n\"\n ],\n \"alt\": \"60 by 10 rect at center of canvas rotates with mouse movements\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 160,\n \"description\": \"Calculates the cosine of an angle. This function takes into account the\\ncurrent angleMode. Values are returned in the range -1 to 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"cos\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the cosine of the angle\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = 0.0;\\nlet inc = TWO_PI / 25.0;\\nfor (let i = 0; i < 25; i++) {\\n line(i * 4, 50, i * 4, 50 + cos(a) * 40.0);\\n a = a + inc;\\n}\\n\\n\"\n ],\n \"alt\": \"vertical black lines form wave patterns, extend-down on left and right side\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 188,\n \"description\": \"Calculates the sine of an angle. This function takes into account the\\ncurrent angleMode. Values are returned in the range -1 to 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sin\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the sine of the angle\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = 0.0;\\nlet inc = TWO_PI / 25.0;\\nfor (let i = 0; i < 25; i++) {\\n line(i * 4, 50, i * 4, 50 + sin(a) * 40.0);\\n a = a + inc;\\n}\\n\\n\"\n ],\n \"alt\": \"vertical black lines extend down and up from center to form wave pattern\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 216,\n \"description\": \"Calculates the tangent of an angle. This function takes into account\\nthe current angleMode. Values are returned in the range -1 to 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"tan\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"the angle\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the tangent of the angle\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet a = 0.0;\\nlet inc = TWO_PI / 50.0;\\nfor (let i = 0; i < 100; i = i + 2) {\\n line(i, 50, i, 50 + tan(a) * 2.0);\\n a = a + inc;\\n}\\n\"\n ],\n \"alt\": \"vertical black lines end down and up from center to form spike pattern\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 244,\n \"description\": \"Converts a radian measurement to its corresponding value in degrees.\\nRadians and degrees are two ways of measuring the same thing. There are\\n360 degrees in a circle and 2*PI radians in a circle. For example,\\n90° = PI/2 = 1.5707964. This function does not take into account the\\ncurrent angleMode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"degrees\",\n \"params\": [\n {\n \"name\": \"radians\",\n \"description\": \"the radians value to convert to degrees\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the converted angle\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet rad = PI / 4;\\nlet deg = degrees(rad);\\nprint(rad + ' radians is ' + deg + ' degrees');\\n// Prints: 0.7853981633974483 radians is 45 degrees\\n\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 271,\n \"description\": \"Converts a degree measurement to its corresponding value in radians.\\nRadians and degrees are two ways of measuring the same thing. There are\\n360 degrees in a circle and 2*PI radians in a circle. For example,\\n90° = PI/2 = 1.5707964. This function does not take into account the\\ncurrent angleMode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"radians\",\n \"params\": [\n {\n \"name\": \"degrees\",\n \"description\": \"the degree value to convert to radians\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"the converted angle\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet deg = 45.0;\\nlet rad = radians(deg);\\nprint(deg + ' degrees is ' + rad + ' radians');\\n// Prints: 45 degrees is 0.7853981633974483 radians\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/math/trigonometry.js\",\n \"line\": 296,\n \"description\": \"Sets the current mode of p5 to given mode. Default mode is RADIANS.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"angleMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either RADIANS or DEGREES\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nfunction draw() {\\n background(204);\\n angleMode(DEGREES); // Change the mode to DEGREES\\n let a = atan2(mouseY - height / 2, mouseX - width / 2);\\n translate(width / 2, height / 2);\\n push();\\n rotate(a);\\n rect(-20, -5, 40, 10); // Larger rectangle is rotating in degrees\\n pop();\\n angleMode(RADIANS); // Change the mode to RADIANS\\n rotate(a); // variable a stays the same\\n rect(-40, -5, 20, 10); // Smaller rectangle is rotating in radians\\n}\\n\\n\"\n ],\n \"alt\": \"40 by 10 rect in center rotates with mouse moves. 20 by 10 rect moves faster.\",\n \"class\": \"p5\",\n \"module\": \"Math\",\n \"submodule\": \"Trigonometry\"\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 13,\n \"description\": \"Sets the current alignment for drawing text. Accepts two\\narguments: horizAlign (LEFT, CENTER, or RIGHT) and\\nvertAlign (TOP, BOTTOM, CENTER, or BASELINE).\\nThe horizAlign parameter is in reference to the x value\\nof the text() function, while the vertAlign parameter is\\nin reference to the y value.\\nSo if you write textAlign(LEFT), you are aligning the left\\nedge of your text to the x value you give in text(). If you\\nwrite textAlign(RIGHT, TOP), you are aligning the right edge\\nof your text to the x value and the top of edge of the text\\nto the y value.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textAlign\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntextSize(16);\\ntextAlign(RIGHT);\\ntext('ABCD', 50, 30);\\ntextAlign(CENTER);\\ntext('EFGH', 50, 50);\\ntextAlign(LEFT);\\ntext('IJKL', 50, 70);\\n\\n\\n\\n\\n\\ntextSize(16);\\nstrokeWeight(0.5);\\n\\nline(0, 12, width, 12);\\ntextAlign(CENTER, TOP);\\ntext('TOP', 0, 12, width);\\n\\nline(0, 37, width, 37);\\ntextAlign(CENTER, CENTER);\\ntext('CENTER', 0, 37, width);\\n\\nline(0, 62, width, 62);\\ntextAlign(CENTER, BASELINE);\\ntext('BASELINE', 0, 62, width);\\n\\nline(0, 87, width, 87);\\ntextAlign(CENTER, BOTTOM);\\ntext('BOTTOM', 0, 87, width);\\n\\n\"\n ],\n \"alt\": \"Letters ABCD displayed at top right, EFGH at center and IJKL at bottom left.\\nThe names of the four vertical alignments rendered each showing that alignment's placement relative to a horizontal line.\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\",\n \"overloads\": [\n {\n \"line\": 13,\n \"params\": [\n {\n \"name\": \"horizAlign\",\n \"description\": \"horizontal alignment, either LEFT,\\n CENTER, or RIGHT\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"vertAlign\",\n \"description\": \"vertical alignment, either TOP,\\n BOTTOM, CENTER, or BASELINE\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 75,\n \"params\": [],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object\"\n }\n }\n ]\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 84,\n \"description\": \"Sets/gets the spacing, in pixels, between lines of text. This\\nsetting will be used in all subsequent calls to the text() function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textLeading\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// Text to display. The \\\"\\\\n\\\" is a \\\"new line\\\" character\\nlet lines = 'L1\\\\nL2\\\\nL3';\\ntextSize(12);\\n\\ntextLeading(10); // Set leading to 10\\ntext(lines, 10, 25);\\n\\ntextLeading(20); // Set leading to 20\\ntext(lines, 40, 25);\\n\\ntextLeading(30); // Set leading to 30\\ntext(lines, 70, 25);\\n\\n\"\n ],\n \"alt\": \"set L1 L2 & L3 displayed vertically 3 times. spacing increases for each set\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\",\n \"overloads\": [\n {\n \"line\": 84,\n \"params\": [\n {\n \"name\": \"leading\",\n \"description\": \"the size in pixels for spacing between lines\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 113,\n \"params\": [],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 122,\n \"description\": \"Sets/gets the current font size. This size will be used in all subsequent\\ncalls to the text() function. Font size is measured in pixels.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textSize\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntextSize(12);\\ntext('Font Size 12', 10, 30);\\ntextSize(14);\\ntext('Font Size 14', 10, 60);\\ntextSize(16);\\ntext('Font Size 16', 10, 90);\\n\\n\"\n ],\n \"alt\": \"Font Size 12 displayed small, Font Size 14 medium & Font Size 16 large\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\",\n \"overloads\": [\n {\n \"line\": 122,\n \"params\": [\n {\n \"name\": \"theSize\",\n \"description\": \"the size of the letters in units of pixels\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 145,\n \"params\": [],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n }\n }\n ]\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 154,\n \"description\": \"Sets/gets the style of the text for system fonts to NORMAL, ITALIC, BOLD or BOLDITALIC.\\nNote: this may be is overridden by CSS styling. For non-system fonts\\n(opentype, truetype, etc.) please load styled fonts instead.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textStyle\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nstrokeWeight(0);\\ntextSize(12);\\ntextStyle(NORMAL);\\ntext('Font Style Normal', 10, 15);\\ntextStyle(ITALIC);\\ntext('Font Style Italic', 10, 40);\\ntextStyle(BOLD);\\ntext('Font Style Bold', 10, 65);\\ntextStyle(BOLDITALIC);\\ntext('Font Style Bold Italic', 10, 90);\\n\\n\"\n ],\n \"alt\": \"words Font Style Normal displayed normally, Italic in italic, bold in bold and bold italic in bold italics.\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\",\n \"overloads\": [\n {\n \"line\": 154,\n \"params\": [\n {\n \"name\": \"theStyle\",\n \"description\": \"styling for text, either NORMAL,\\n ITALIC, BOLD or BOLDITALIC\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 182,\n \"params\": [],\n \"return\": {\n \"description\": \"\",\n \"type\": \"String\"\n }\n }\n ]\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 191,\n \"description\": \"Calculates and returns the width of any character or text string.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textWidth\",\n \"params\": [\n {\n \"name\": \"theText\",\n \"description\": \"the String of characters to measure\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\ntextSize(28);\\n\\nlet aChar = 'P';\\nlet cWidth = textWidth(aChar);\\ntext(aChar, 0, 40);\\nline(cWidth, 0, cWidth, 50);\\n\\nlet aString = 'p5.js';\\nlet sWidth = textWidth(aString);\\ntext(aString, 0, 85);\\nline(sWidth, 50, sWidth, 100);\\n\\n\"\n ],\n \"alt\": \"Letter P and p5.js are displayed with vertical lines at end. P is wide\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 226,\n \"description\": \"Returns the ascent of the current font at its current size. The ascent\\nrepresents the distance, in pixels, of the tallest character above\\nthe baseline.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textAscent\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet base = height * 0.75;\\nlet scalar = 0.8; // Different for each font\\n\\ntextSize(32); // Set initial text size\\nlet asc = textAscent() * scalar; // Calc ascent\\nline(0, base - asc, width, base - asc);\\ntext('dp', 0, base); // Draw text on baseline\\n\\ntextSize(64); // Increase text size\\nasc = textAscent() * scalar; // Recalc ascent\\nline(40, base - asc, width, base - asc);\\ntext('dp', 40, base); // Draw text on baseline\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 255,\n \"description\": \"Returns the descent of the current font at its current size. The descent\\nrepresents the distance, in pixels, of the character with the longest\\ndescender below the baseline.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textDescent\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nlet base = height * 0.75;\\nlet scalar = 0.8; // Different for each font\\n\\ntextSize(32); // Set initial text size\\nlet desc = textDescent() * scalar; // Calc ascent\\nline(0, base + desc, width, base + desc);\\ntext('dp', 0, base); // Draw text on baseline\\n\\ntextSize(64); // Increase text size\\ndesc = textDescent() * scalar; // Recalc ascent\\nline(40, base + desc, width, base + desc);\\ntext('dp', 40, base); // Draw text on baseline\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/typography/attributes.js\",\n \"line\": 284,\n \"description\": \"Helper function to measure ascent and descent.\\n\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Attributes\"\n },\n {\n \"file\": \"src/typography/loading_displaying.js\",\n \"line\": 16,\n \"description\": \"Loads an opentype font file (.otf, .ttf) from a file or a URL,\\nand returns a PFont Object. This method is asynchronous,\\nmeaning it may not finish before the next line in your sketch\\nis executed.\\n\\nThe path to the font should be relative to the HTML file\\nthat links in your sketch. Loading fonts from a URL or other\\nremote location may be blocked due to your browser's built-in\\nsecurity.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadFont\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"name of the file or url to load\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be executed after\\n loadFont() completes\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"onError\",\n \"description\": \"function to be executed if\\n an error occurs\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"p5.Font object\",\n \"type\": \"p5.Font\"\n },\n \"example\": [\n \"\\n\\nCalling loadFont() inside preload() guarantees that the load\\noperation will have completed before setup() and draw() are called.\\n\\n\\nlet myFont;\\nfunction preload() {\\n myFont = loadFont('assets/inconsolata.otf');\\n}\\n\\nfunction setup() {\\n fill('#ED225D');\\n textFont(myFont);\\n textSize(36);\\n text('p5*js', 10, 50);\\n}\\n\\n\\nOutside of preload(), you may supply a callback function to handle the\\nobject:\\n\\n\\nfunction setup() {\\n loadFont('assets/inconsolata.otf', drawText);\\n}\\n\\nfunction drawText(font) {\\n fill('#ED225D');\\n textFont(font, 36);\\n text('p5*js', 10, 50);\\n}\\n\\n\\nYou can also use the font filename string (without the file extension) to style other HTML\\nelements.\\n\\n\\nfunction preload() {\\n loadFont('assets/inconsolata.otf');\\n}\\n\\nfunction setup() {\\n let myDiv = createDiv('hello there');\\n myDiv.style('font-family', 'Inconsolata');\\n}\\n\"\n ],\n \"alt\": \"p5*js in p5's theme dark pink\\np5*js in p5's theme dark pink\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Loading & Displaying\"\n },\n {\n \"file\": \"src/typography/loading_displaying.js\",\n \"line\": 143,\n \"description\": \"Draws text to the screen. Displays the information specified in the first\\nparameter on the screen in the position specified by the additional\\nparameters. A default font will be used unless a font is set with the\\ntextFont() function and a default size will be used unless a font is set\\nwith textSize(). Change the color of the text with the fill() function.\\nChange the outline of the text with the stroke() and strokeWeight()\\nfunctions.\\n\\nThe text displays in relation to the textAlign() function, which gives the\\noption to draw to the left, right, and center of the coordinates.\\n\\nThe x2 and y2 parameters define a rectangular area to display within and\\nmay only be used with string data. When these parameters are specified,\\nthey are interpreted based on the current rectMode() setting. Text that\\ndoes not fit completely within the rectangle specified will not be drawn\\nto the screen. If x2 and y2 are not specified, the baseline alignment is the\\ndefault, which means that the text will be drawn upwards from x and y.\\n\\nWEBGL: Only opentype/truetype fonts are supported. You must load a font using the\\nloadFont() method (see the example above).\\nstroke() currently has no effect in webgl mode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"text\",\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"the alphanumeric\\n symbols to be displayed\\n\",\n \"type\": \"String|Object|Array|Number|Boolean\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x-coordinate of text\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-coordinate of text\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x2\",\n \"description\": \"by default, the width of the text box,\\n see rectMode() for more info\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y2\",\n \"description\": \"by default, the height of the text box,\\n see rectMode() for more info\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\ntextSize(32);\\ntext('word', 10, 30);\\nfill(0, 102, 153);\\ntext('word', 10, 60);\\nfill(0, 102, 153, 51);\\ntext('word', 10, 90);\\n\\n\\n\\n\\nlet s = 'The quick brown fox jumped over the lazy dog.';\\nfill(50);\\ntext(s, 10, 10, 70, 80); // Text wraps within text box\\n\\n\\n\\n\\n\\nlet inconsolata;\\nfunction preload() {\\n inconsolata = loadFont('assets/inconsolata.otf');\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n textFont(inconsolata);\\n textSize(width / 3);\\n textAlign(CENTER, CENTER);\\n}\\nfunction draw() {\\n background(0);\\n let time = millis();\\n rotateX(time / 1000);\\n rotateZ(time / 1234);\\n text('p5.js', 0, 0);\\n}\\n\\n\"\n ],\n \"alt\": \"'word' displayed 3 times going from black, blue to translucent blue\\nThe quick brown fox jumped over the lazy dog.\\nthe text 'p5.js' spinning in 3d\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Loading & Displaying\"\n },\n {\n \"file\": \"src/typography/loading_displaying.js\",\n \"line\": 230,\n \"description\": \"Sets the current font that will be drawn with the text() function.\\n\\nWEBGL: Only fonts loaded via loadFont() are supported.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textFont\",\n \"return\": {\n \"description\": \"the current font\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n\\nfill(0);\\ntextSize(12);\\ntextFont('Georgia');\\ntext('Georgia', 12, 30);\\ntextFont('Helvetica');\\ntext('Helvetica', 12, 60);\\n\\n\\n\\n\\nlet fontRegular, fontItalic, fontBold;\\nfunction preload() {\\n fontRegular = loadFont('assets/Regular.otf');\\n fontItalic = loadFont('assets/Italic.ttf');\\n fontBold = loadFont('assets/Bold.ttf');\\n}\\nfunction setup() {\\n background(210);\\n fill(0)\\n .strokeWeight(0)\\n .textSize(10);\\n textFont(fontRegular);\\n text('Font Style Normal', 10, 30);\\n textFont(fontItalic);\\n text('Font Style Italic', 10, 50);\\n textFont(fontBold);\\n text('Font Style Bold', 10, 70);\\n}\\n\\n\"\n ],\n \"alt\": \"words Font Style Normal displayed normally, Italic in italic and bold in bold\",\n \"class\": \"p5\",\n \"module\": \"Typography\",\n \"submodule\": \"Loading & Displaying\",\n \"overloads\": [\n {\n \"line\": 230,\n \"params\": [],\n \"return\": {\n \"description\": \"the current font\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 275,\n \"params\": [\n {\n \"name\": \"font\",\n \"description\": \"a font loaded via loadFont(), or a String\\nrepresenting a web safe font (a font\\nthat is generally available across all systems)\\n\",\n \"type\": \"Object|String\"\n },\n {\n \"name\": \"size\",\n \"description\": \"the font size to use\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 25,\n \"description\": \"Underlying opentype font implementation\\n\",\n \"itemtype\": \"property\",\n \"name\": \"font\",\n \"class\": \"p5.Font\",\n \"module\": \"Typography\",\n \"submodule\": \"Font\"\n },\n {\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 32,\n \"description\": \"Returns a tight bounding box for the given text string using this\\nfont (currently only supports single lines)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textBounds\",\n \"params\": [\n {\n \"name\": \"line\",\n \"description\": \"a line of text\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x-position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"fontSize\",\n \"description\": \"font size to use (optional) Default is 12.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"options\",\n \"description\": \"opentype options (optional)\\n opentype fonts contains alignment and baseline options.\\n Default is 'LEFT' and 'alphabetic'\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"a rectangle object with properties: x, y, w, h\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n\\nlet font;\\nlet textString = 'Lorem ipsum dolor sit amet.';\\nfunction preload() {\\n font = loadFont('./assets/Regular.otf');\\n}\\nfunction setup() {\\n background(210);\\n\\n let bbox = font.textBounds(textString, 10, 30, 12);\\n fill(255);\\n stroke(0);\\n rect(bbox.x, bbox.y, bbox.w, bbox.h);\\n fill(0);\\n noStroke();\\n\\n textFont(font);\\n textSize(12);\\n text(textString, 10, 30);\\n}\\n\\n\"\n ],\n \"alt\": \"words Lorem ipsum dol go off canvas and contained by white bounding box\",\n \"class\": \"p5.Font\",\n \"module\": \"Typography\",\n \"submodule\": \"Font\"\n },\n {\n \"file\": \"src/typography/p5.Font.js\",\n \"line\": 156,\n \"description\": \"Computes an array of points following the path for specified text\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textToPoints\",\n \"params\": [\n {\n \"name\": \"txt\",\n \"description\": \"a line of text\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x-position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y-position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"fontSize\",\n \"description\": \"font size to use (optional)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"options\",\n \"description\": \"an (optional) object that can contain:\\nsampleFactor - the ratio of path-length to number of samples\\n(default=.1); higher values yield more points and are therefore\\nmore precise\\nsimplifyThreshold - if set to a non-zero value, collinear points will be\\nbe removed from the polygon; the value represents the threshold angle to use\\nwhen determining whether two edges are collinear\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"an array of points, each with x, y, alpha (the path angle)\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\n\\nlet font;\\nfunction preload() {\\n font = loadFont('assets/inconsolata.otf');\\n}\\n\\nlet points;\\nlet bounds;\\nfunction setup() {\\n createCanvas(100, 100);\\n stroke(0);\\n fill(255, 104, 204);\\n\\n points = font.textToPoints('p5', 0, 0, 10, {\\n sampleFactor: 5,\\n simplifyThreshold: 0\\n });\\n bounds = font.textBounds(' p5 ', 0, 0, 10);\\n}\\n\\nfunction draw() {\\n background(255);\\n beginShape();\\n translate(-bounds.x * width / bounds.w, -bounds.y * height / bounds.h);\\n for (let i = 0; i < points.length; i++) {\\n let p = points[i];\\n vertex(\\n p.x * width / bounds.w +\\n sin(20 * p.y / bounds.h + millis() / 1000) * width / 30,\\n p.y * height / bounds.h\\n );\\n }\\n endShape(CLOSE);\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.Font\",\n \"module\": \"Typography\",\n \"submodule\": \"Font\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 12,\n \"description\": \"Adds a value to the end of an array. Extends the length of\\nthe array by one. Maps to Array.push().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"append\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.push(value) instead.\",\n \"params\": [\n {\n \"name\": \"array\",\n \"description\": \"Array to append\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"value\",\n \"description\": \"to be added to the Array\\n\",\n \"type\": \"Any\"\n }\n ],\n \"return\": {\n \"description\": \"the array that was appended to\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myArray = ['Mango', 'Apple', 'Papaya'];\\n print(myArray); // ['Mango', 'Apple', 'Papaya']\\n\\n append(myArray, 'Peach');\\n print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 37,\n \"description\": \"Copies an array (or part of an array) to another array. The src array is\\ncopied to the dst array, beginning at the position specified by\\nsrcPosition and into the position specified by dstPosition. The number of\\nelements to copy is determined by length. Note that copying values\\noverwrites existing values in the destination array. To append values\\ninstead of overwriting them, use concat().\\n\\nThe simplified version with only two arguments, arrayCopy(src, dst),\\ncopies an entire array to another of the same size. It is equivalent to\\narrayCopy(src, 0, dst, 0, src.length).\\n\\nUsing this function is far more efficient for copying array data than\\niterating through a for() loop and copying each element individually.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"arrayCopy\",\n \"deprecated\": true,\n \"example\": [\n \"\\n\\nvar src = ['A', 'B', 'C'];\\nvar dst = [1, 2, 3];\\nvar srcPosition = 1;\\nvar dstPosition = 0;\\nvar length = 2;\\n\\nprint(src); // ['A', 'B', 'C']\\nprint(dst); // [ 1 , 2 , 3 ]\\n\\narrayCopy(src, srcPosition, dst, dstPosition, length);\\nprint(dst); // ['B', 'C', 3]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\",\n \"overloads\": [\n {\n \"line\": 37,\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"the source Array\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"srcPosition\",\n \"description\": \"starting position in the source Array\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"dst\",\n \"description\": \"the destination Array\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dstPosition\",\n \"description\": \"starting position in the destination Array\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"length\",\n \"description\": \"number of Array elements to be copied\\n\",\n \"type\": \"Integer\"\n }\n ]\n },\n {\n \"line\": 75,\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dst\",\n \"description\": \"\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"length\",\n \"description\": \"\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 114,\n \"description\": \"Concatenates two arrays, maps to Array.concat(). Does not modify the\\ninput arrays.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"concat\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use arr1.concat(arr2) instead.\",\n \"params\": [\n {\n \"name\": \"a\",\n \"description\": \"first Array to concatenate\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"b\",\n \"description\": \"second Array to concatenate\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"concatenated array\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var arr1 = ['A', 'B', 'C'];\\n var arr2 = [1, 2, 3];\\n\\n print(arr1); // ['A','B','C']\\n print(arr2); // [1,2,3]\\n\\n var arr3 = concat(arr1, arr2);\\n\\n print(arr1); // ['A','B','C']\\n print(arr2); // [1, 2, 3]\\n print(arr3); // ['A','B','C', 1, 2, 3]\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 145,\n \"description\": \"Reverses the order of an array, maps to Array.reverse()\\n\",\n \"itemtype\": \"method\",\n \"name\": \"reverse\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.reverse() instead.\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"Array to reverse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"the reversed list\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myArray = ['A', 'B', 'C'];\\n print(myArray); // ['A','B','C']\\n\\n reverse(myArray);\\n print(myArray); // ['C','B','A']\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 167,\n \"description\": \"Decreases an array by one element and returns the shortened array,\\nmaps to Array.pop().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shorten\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.pop() instead.\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"Array to shorten\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"shortened Array\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myArray = ['A', 'B', 'C'];\\n print(myArray); // ['A', 'B', 'C']\\n var newArray = shorten(myArray);\\n print(myArray); // ['A','B','C']\\n print(newArray); // ['A','B']\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 191,\n \"description\": \"Randomizes the order of the elements of an array. Implements\\n\\nFisher-Yates Shuffle Algorithm.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shuffle\",\n \"params\": [\n {\n \"name\": \"array\",\n \"description\": \"Array to shuffle\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"bool\",\n \"description\": \"modify passed array\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"shuffled Array\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var regularArr = ['ABC', 'def', createVector(), TAU, Math.E];\\n print(regularArr);\\n shuffle(regularArr, true); // force modifications to passed array\\n print(regularArr);\\n\\n // By default shuffle() returns a shuffled cloned array:\\n var newArr = shuffle(regularArr);\\n print(regularArr);\\n print(newArr);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 233,\n \"description\": \"Sorts an array of numbers from smallest to largest, or puts an array of\\nwords in alphabetical order. The original array is not modified; a\\nre-ordered array is returned. The count parameter states the number of\\nelements to sort. For example, if there are 12 elements in an array and\\ncount is set to 5, only the first 5 elements in the array will be sorted.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sort\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.sort() instead.\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"Array to sort\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"count\",\n \"description\": \"number of elements to sort, starting from 0\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the sorted list\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var words = ['banana', 'apple', 'pear', 'lime'];\\n print(words); // ['banana', 'apple', 'pear', 'lime']\\n var count = 4; // length of array\\n\\n words = sort(words, count);\\n print(words); // ['apple', 'banana', 'lime', 'pear']\\n}\\n\\n\\nfunction setup() {\\n var numbers = [2, 6, 1, 5, 14, 9, 8, 12];\\n print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]\\n var count = 5; // Less than the length of the array\\n\\n numbers = sort(numbers, count);\\n print(numbers); // [1,2,5,6,14,9,8,12]\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 281,\n \"description\": \"Inserts a value or an array of values into an existing array. The first\\nparameter specifies the initial array to be modified, and the second\\nparameter defines the data to be inserted. The third parameter is an index\\nvalue which specifies the array position from which to insert data.\\n(Remember that array index numbering starts at zero, so the first position\\nis 0, the second position is 1, and so on.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"splice\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.splice() instead.\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"Array to splice into\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to be spliced in\\n\",\n \"type\": \"Any\"\n },\n {\n \"name\": \"position\",\n \"description\": \"in the array from which to insert data\\n\",\n \"type\": \"Integer\"\n }\n ],\n \"return\": {\n \"description\": \"the list\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myArray = [0, 1, 2, 3, 4];\\n var insArray = ['A', 'B', 'C'];\\n print(myArray); // [0, 1, 2, 3, 4]\\n print(insArray); // ['A','B','C']\\n\\n splice(myArray, insArray, 3);\\n print(myArray); // [0,1,2,'A','B','C',3,4]\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/array_functions.js\",\n \"line\": 316,\n \"description\": \"Extracts an array of elements from an existing array. The list parameter\\ndefines the array from which the elements will be copied, and the start\\nand count parameters specify which elements to extract. If no count is\\ngiven, elements will be extracted from the start to the end of the array.\\nWhen specifying the start, remember that the first array element is 0.\\nThis function does not change the source array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"subset\",\n \"deprecated\": true,\n \"deprecationMessage\": \"Use array.slice() instead.\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"Array to extract from\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"start\",\n \"description\": \"position to begin\\n\",\n \"type\": \"Integer\"\n },\n {\n \"name\": \"count\",\n \"description\": \"number of values to extract\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of extracted elements\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myArray = [1, 2, 3, 4, 5];\\n print(myArray); // [1, 2, 3, 4, 5]\\n\\n var sub1 = subset(myArray, 0, 3);\\n var sub2 = subset(myArray, 2, 2);\\n print(sub1); // [1,2,3]\\n print(sub2); // [3,4]\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Array Functions\"\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 12,\n \"description\": \"Converts a string to its floating point representation. The contents of a\\nstring must resemble a number, or NaN (not a number) will be returned.\\nFor example, float("1234.56") evaluates to 1234.56, but float("giraffe")\\nwill return NaN.\\nWhen an array of values is passed in, then an array of floats of the same\\nlength is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"float\",\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"float string to parse\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"floating point representation of string\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar str = '20';\\nvar diameter = float(str);\\nellipse(width / 2, height / 2, diameter, diameter);\\n\\n\\nprint(float('10.31')); // 10.31\\nprint(float('Infinity')); // Infinity\\nprint(float('-Infinity')); // -Infinity\\n\"\n ],\n \"alt\": \"20 by 20 white ellipse in the center of the canvas\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\"\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 47,\n \"description\": \"Converts a boolean, string, or float to its integer representation.\\nWhen an array of values is passed in, then an int array of the same length\\nis returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"int\",\n \"return\": {\n \"description\": \"integer representation of value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nprint(int('10')); // 10\\nprint(int(10.31)); // 10\\nprint(int(-10)); // -10\\nprint(int(true)); // 1\\nprint(int(false)); // 0\\nprint(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]\\nprint(int(Infinity)); // Infinity\\nprint(int('-Infinity')); // -Infinity\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 47,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String|Boolean|Number\"\n },\n {\n \"name\": \"radix\",\n \"description\": \"the radix to convert to (default: 10)\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"integer representation of value\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 69,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"values to parse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"integer representation of values\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 93,\n \"description\": \"Converts a boolean, string or number to its string representation.\\nWhen an array of values is passed in, then an array of strings of the same\\nlength is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"str\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String|Boolean|Number|Array\"\n }\n ],\n \"return\": {\n \"description\": \"string representation of value\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nprint(str('10')); // \\\"10\\\"\\nprint(str(10.31)); // \\\"10.31\\\"\\nprint(str(-10)); // \\\"-10\\\"\\nprint(str(true)); // \\\"true\\\"\\nprint(str(false)); // \\\"false\\\"\\nprint(str([true, '10.3', 9.8])); // [ \\\"true\\\", \\\"10.3\\\", \\\"9.8\\\" ]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\"\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 119,\n \"description\": \"Converts a number or string to its boolean representation.\\nFor a number, any non-zero value (positive or negative) evaluates to true,\\nwhile zero evaluates to false. For a string, the value "true" evaluates to\\ntrue, while any other value evaluates to false. When an array of number or\\nstring values is passed in, then a array of booleans of the same length is\\nreturned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"boolean\",\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String|Boolean|Number|Array\"\n }\n ],\n \"return\": {\n \"description\": \"boolean representation of value\",\n \"type\": \"Boolean\"\n },\n \"example\": [\n \"\\n\\nprint(boolean(0)); // false\\nprint(boolean(1)); // true\\nprint(boolean('true')); // true\\nprint(boolean('abcd')); // false\\nprint(boolean([0, 12, 'true'])); // [false, true, true]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\"\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 151,\n \"description\": \"Converts a number, string representation of a number, or boolean to its byte\\nrepresentation. A byte can be only a whole number between -128 and 127, so\\nwhen a value outside of this range is converted, it wraps around to the\\ncorresponding byte representation. When an array of number, string or boolean\\nvalues is passed in, then an array of bytes the same length is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"byte\",\n \"return\": {\n \"description\": \"byte representation of value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nprint(byte(127)); // 127\\nprint(byte(128)); // -128\\nprint(byte(23.4)); // 23\\nprint(byte('23.4')); // 23\\nprint(byte('hello')); // NaN\\nprint(byte(true)); // 1\\nprint(byte([0, 255, '100'])); // [0, -1, 100]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 151,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String|Boolean|Number\"\n }\n ],\n \"return\": {\n \"description\": \"byte representation of value\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 173,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"values to parse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"array of byte representation of values\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 187,\n \"description\": \"Converts a number or string to its corresponding single-character\\nstring representation. If a string parameter is provided, it is first\\nparsed as an integer and then translated into a single-character string.\\nWhen an array of number or string values is passed in, then an array of\\nsingle-character strings of the same length is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"char\",\n \"return\": {\n \"description\": \"string representation of value\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nprint(char(65)); // \\\"A\\\"\\nprint(char('65')); // \\\"A\\\"\\nprint(char([65, 66, 67])); // [ \\\"A\\\", \\\"B\\\", \\\"C\\\" ]\\nprint(join(char([65, 66, 67]), '')); // \\\"ABC\\\"\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 187,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"return\": {\n \"description\": \"string representation of value\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 206,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"values to parse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"array of string representation of values\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 221,\n \"description\": \"Converts a single-character string to its corresponding integer\\nrepresentation. When an array of single-character string values is passed\\nin, then an array of integers of the same length is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"unchar\",\n \"return\": {\n \"description\": \"integer representation of value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nprint(unchar('A')); // 65\\nprint(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]\\nprint(unchar(split('ABC', ''))); // [ 65, 66, 67 ]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 221,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"integer representation of value\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 237,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"values to parse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"integer representation of values\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 250,\n \"description\": \"Converts a number to a string in its equivalent hexadecimal notation. If a\\nsecond parameter is passed, it is used to set the number of characters to\\ngenerate in the hexadecimal notation. When an array is passed in, an\\narray of strings in hexadecimal notation of the same length is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hex\",\n \"return\": {\n \"description\": \"hexadecimal string representation of value\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nprint(hex(255)); // \\\"000000FF\\\"\\nprint(hex(255, 6)); // \\\"0000FF\\\"\\nprint(hex([0, 127, 255], 6)); // [ \\\"000000\\\", \\\"00007F\\\", \\\"0000FF\\\" ]\\nprint(Infinity); // \\\"FFFFFFFF\\\"\\nprint(-Infinity); // \\\"00000000\\\"\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 250,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"digits\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"hexadecimal string representation of value\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 270,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"array of values to parse\\n\",\n \"type\": \"Number[]\"\n },\n {\n \"name\": \"digits\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"hexadecimal string representation of values\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/conversion.js\",\n \"line\": 302,\n \"description\": \"Converts a string representation of a hexadecimal number to its equivalent\\ninteger value. When an array of strings in hexadecimal notation is passed\\nin, an array of integers of the same length is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"unhex\",\n \"return\": {\n \"description\": \"integer representation of hexadecimal value\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nprint(unhex('A')); // 10\\nprint(unhex('FF')); // 255\\nprint(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"Conversion\",\n \"overloads\": [\n {\n \"line\": 302,\n \"params\": [\n {\n \"name\": \"n\",\n \"description\": \"value to parse\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"integer representation of hexadecimal value\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 318,\n \"params\": [\n {\n \"name\": \"ns\",\n \"description\": \"values to parse\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"integer representations of hexadecimal value\",\n \"type\": \"Number[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 15,\n \"description\": \"Combines an array of Strings into one String, each separated by the\\ncharacter(s) used for the separator parameter. To join arrays of ints or\\nfloats, it's necessary to first convert them to Strings using nf() or\\nnfs().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"join\",\n \"params\": [\n {\n \"name\": \"list\",\n \"description\": \"array of Strings to be joined\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"separator\",\n \"description\": \"String to be placed between each item\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"joined String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nvar array = ['Hello', 'world!'];\\nvar separator = ' ';\\nvar message = join(array, separator);\\ntext(message, 5, 50);\\n\\n\"\n ],\n \"alt\": \"\\\"hello world!\\\" displayed middle left of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\"\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 44,\n \"description\": \"This function is used to apply a regular expression to a piece of text,\\nand return matching groups (elements found inside parentheses) as a\\nString array. If there are no matches, a null value will be returned.\\nIf no groups are specified in the regular expression, but the sequence\\nmatches, an array of length 1 (with the matched text as the first element\\nof the array) will be returned.\\n\\nTo use the function, first check to see if the result is null. If the\\nresult is null, then the sequence did not match at all. If the sequence\\ndid match, an array is returned.\\n\\nIf there are groups (specified by sets of parentheses) in the regular\\nexpression, then the contents of each will be returned in the array.\\nElement [0] of a regular expression match returns the entire matching\\nstring, and the match groups start at element [1] (the first group is [1],\\nthe second [2], and so on).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"match\",\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"the String to be searched\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"regexp\",\n \"description\": \"the regexp to be used for matching\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"Array of Strings found\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\n\\nvar string = 'Hello p5js*!';\\nvar regexp = 'p5js\\\\\\\\*';\\nvar m = match(string, regexp);\\ntext(m, 5, 50);\\n\\n\"\n ],\n \"alt\": \"\\\"p5js*\\\" displayed middle left of canvas.\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\"\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 85,\n \"description\": \"This function is used to apply a regular expression to a piece of text,\\nand return a list of matching groups (elements found inside parentheses)\\nas a two-dimensional String array. If there are no matches, a null value\\nwill be returned. If no groups are specified in the regular expression,\\nbut the sequence matches, a two dimensional array is still returned, but\\nthe second dimension is only of length one.\\n\\nTo use the function, first check to see if the result is null. If the\\nresult is null, then the sequence did not match at all. If the sequence\\ndid match, a 2D array is returned.\\n\\nIf there are groups (specified by sets of parentheses) in the regular\\nexpression, then the contents of each will be returned in the array.\\nAssuming a loop with counter variable i, element [i][0] of a regular\\nexpression match returns the entire matching string, and the match groups\\nstart at element [i][1] (the first group is [i][1], the second [i][2],\\nand so on).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"matchAll\",\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"the String to be searched\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"regexp\",\n \"description\": \"the regexp to be used for matching\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"2d Array of Strings found\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\n\\nvar string = 'Hello p5js*! Hello world!';\\nvar regexp = 'Hello';\\nmatchAll(string, regexp);\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\"\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 132,\n \"description\": \"Utility function for formatting numbers into strings. There are two\\nversions: one for formatting floats, and one for formatting ints.\\nThe values for the digits, left, and right parameters should always\\nbe positive integers.\\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\\nif greater than the current length of the number.\\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\\nthe result will be 123.200.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"nf\",\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nvar myFont;\\nfunction preload() {\\n myFont = loadFont('assets/fonts/inconsolata.ttf');\\n}\\nfunction setup() {\\n background(200);\\n var num1 = 321;\\n var num2 = -1321;\\n\\n noStroke();\\n fill(0);\\n textFont(myFont);\\n textSize(22);\\n\\n text(nf(num1, 4, 2), 10, 30);\\n text(nf(num2, 4, 2), 10, 80);\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"\\\"0321.00\\\" middle top, -1321.00\\\" middle bottom canvas\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\",\n \"overloads\": [\n {\n \"line\": 132,\n \"params\": [\n {\n \"name\": \"num\",\n \"description\": \"the Number to format\\n\",\n \"type\": \"Number|String\"\n },\n {\n \"name\": \"left\",\n \"description\": \"number of digits to the left of the\\n decimal point\\n\",\n \"type\": \"Integer|String\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"number of digits to the right of the\\n decimal point\\n\",\n \"type\": \"Integer|String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 180,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"the Numbers to format\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"left\",\n \"description\": \"\",\n \"type\": \"Integer|String\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"\",\n \"type\": \"Integer|String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted Strings\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 243,\n \"description\": \"Utility function for formatting numbers into strings and placing\\nappropriate commas to mark units of 1000. There are two versions: one\\nfor formatting ints, and one for formatting an array of ints. The value\\nfor the right parameter should always be a positive integer.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"nfc\",\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n background(200);\\n var num = 11253106.115;\\n var numArr = [1, 1, 2];\\n\\n noStroke();\\n fill(0);\\n textSize(12);\\n\\n // Draw formatted numbers\\n text(nfc(num, 4), 10, 30);\\n text(nfc(numArr, 2), 10, 80);\\n\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"\\\"11,253,106.115\\\" top middle and \\\"1.00,1.00,2.00\\\" displayed bottom mid\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\",\n \"overloads\": [\n {\n \"line\": 243,\n \"params\": [\n {\n \"name\": \"num\",\n \"description\": \"the Number to format\\n\",\n \"type\": \"Number|String\"\n },\n {\n \"name\": \"right\",\n \"description\": \"number of digits to the right of the\\n decimal point\\n\",\n \"type\": \"Integer|String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 281,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"the Numbers to format\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"right\",\n \"description\": \"\",\n \"type\": \"Integer|String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted Strings\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 319,\n \"description\": \"Utility function for formatting numbers into strings. Similar to nf() but\\nputs a "+" in front of positive numbers and a "-" in front of negative\\nnumbers. There are two versions: one for formatting floats, and one for\\nformatting ints. The values for left, and right parameters\\nshould always be positive integers.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"nfp\",\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n background(200);\\n var num1 = 11253106.115;\\n var num2 = -11253106.115;\\n\\n noStroke();\\n fill(0);\\n textSize(12);\\n\\n // Draw formatted numbers\\n text(nfp(num1, 4, 2), 10, 30);\\n text(nfp(num2, 4, 2), 10, 80);\\n\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"\\\"+11253106.11\\\" top middle and \\\"-11253106.11\\\" displayed bottom middle\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\",\n \"overloads\": [\n {\n \"line\": 319,\n \"params\": [\n {\n \"name\": \"num\",\n \"description\": \"the Number to format\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"left\",\n \"description\": \"number of digits to the left of the decimal\\n point\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"number of digits to the right of the\\n decimal point\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 360,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"the Numbers to format\\n\",\n \"type\": \"Number[]\"\n },\n {\n \"name\": \"left\",\n \"description\": \"\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted Strings\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 381,\n \"description\": \"Utility function for formatting numbers into strings. Similar to nf() but\\nputs an additional "_" (space) in front of positive numbers just in case to align it with negative\\nnumbers which includes "-" (minus) sign.\\nThe main usecase of nfs() can be seen when one wants to align the digits (place values) of a positive\\nnumber with some negative number (See the example to get a clear picture).\\nThere are two versions: one for formatting float, and one for formatting int.\\nThe values for the digits, left, and right parameters should always be positive integers.\\n(IMP): The result on the canvas basically the expected alignment can vary based on the typeface you are using.\\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\\nif greater than the current length of the number.\\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\\nthe result will be 123.200.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"nfs\",\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nvar myFont;\\nfunction preload() {\\n myFont = loadFont('assets/fonts/inconsolata.ttf');\\n}\\nfunction setup() {\\n background(200);\\n var num1 = 321;\\n var num2 = -1321;\\n\\n noStroke();\\n fill(0);\\n textFont(myFont);\\n textSize(22);\\n\\n // nfs() aligns num1 (positive number) with num2 (negative number) by\\n // adding a blank space in front of the num1 (positive number)\\n // [left = 4] in num1 add one 0 in front, to align the digits with num2\\n // [right = 2] in num1 and num2 adds two 0's after both numbers\\n // To see the differences check the example of nf() too.\\n text(nfs(num1, 4, 2), 10, 30);\\n text(nfs(num2, 4, 2), 10, 80);\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"\\\"0321.00\\\" top middle and \\\"-1321.00\\\" displayed bottom middle\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\",\n \"overloads\": [\n {\n \"line\": 381,\n \"params\": [\n {\n \"name\": \"num\",\n \"description\": \"the Number to format\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"left\",\n \"description\": \"number of digits to the left of the decimal\\n point\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"number of digits to the right of the\\n decimal point\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted String\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 438,\n \"params\": [\n {\n \"name\": \"nums\",\n \"description\": \"the Numbers to format\\n\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"left\",\n \"description\": \"\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"formatted Strings\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 459,\n \"description\": \"The split() function maps to String.split(), it breaks a String into\\npieces using a character or string as the delimiter. The delim parameter\\nspecifies the character or characters that mark the boundaries between\\neach piece. A String[] array is returned that contains each of the pieces.\\nThe splitTokens() function works in a similar fashion, except that it\\nsplits using a range of characters instead of a specific character or\\nsequence.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"split\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the String to be split\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"delim\",\n \"description\": \"the String used to separate the data\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"Array of Strings\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\n\\nvar names = 'Pat,Xio,Alex';\\nvar splitString = split(names, ',');\\ntext(splitString[0], 5, 30);\\ntext(splitString[1], 5, 50);\\ntext(splitString[2], 5, 70);\\n\\n\"\n ],\n \"alt\": \"\\\"pat\\\" top left, \\\"Xio\\\" mid left and \\\"Alex\\\" displayed bottom left\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\"\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 493,\n \"description\": \"The splitTokens() function splits a String at one or many character\\ndelimiters or "tokens." The delim parameter specifies the character or\\ncharacters to be used as a boundary.\\n\\nIf no delim characters are specified, any whitespace character is used to\\nsplit. Whitespace characters include tab (\\\\t), line feed (\\\\n), carriage\\nreturn (\\\\r), form feed (\\\\f), and space.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"splitTokens\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"the String to be split\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"delim\",\n \"description\": \"list of individual Strings that will be used as\\n separators\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of Strings\",\n \"type\": \"String[]\"\n },\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n var myStr = 'Mango, Banana, Lime';\\n var myStrArr = splitTokens(myStr, ',');\\n\\n print(myStrArr); // prints : [\\\"Mango\\\",\\\" Banana\\\",\\\" Lime\\\"]\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\"\n },\n {\n \"file\": \"src/utilities/string_functions.js\",\n \"line\": 548,\n \"description\": \"Removes whitespace characters from the beginning and end of a String. In\\naddition to standard whitespace characters such as space, carriage return,\\nand tab, this function also removes the Unicode "nbsp" character.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"trim\",\n \"return\": {\n \"description\": \"a trimmed String\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\n\\nvar string = trim(' No new lines\\\\n ');\\ntext(string + ' here', 2, 50);\\n\\n\"\n ],\n \"alt\": \"\\\"No new lines here\\\" displayed center canvas\",\n \"class\": \"p5\",\n \"module\": \"Data\",\n \"submodule\": \"String Functions\",\n \"overloads\": [\n {\n \"line\": 548,\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"a String to be trimmed\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"a trimmed String\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 568,\n \"params\": [\n {\n \"name\": \"strs\",\n \"description\": \"an Array of Strings to be trimmed\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"an Array of trimmed Strings\",\n \"type\": \"String[]\"\n }\n }\n ]\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 12,\n \"description\": \"p5.js communicates with the clock on your computer. The day() function\\nreturns the current day as a value from 1 - 31.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"day\",\n \"return\": {\n \"description\": \"the current day\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar d = day();\\ntext('Current day: \\\\n' + d, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current day is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 34,\n \"description\": \"p5.js communicates with the clock on your computer. The hour() function\\nreturns the current hour as a value from 0 - 23.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hour\",\n \"return\": {\n \"description\": \"the current hour\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar h = hour();\\ntext('Current hour:\\\\n' + h, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current hour is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 56,\n \"description\": \"p5.js communicates with the clock on your computer. The minute() function\\nreturns the current minute as a value from 0 - 59.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"minute\",\n \"return\": {\n \"description\": \"the current minute\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar m = minute();\\ntext('Current minute: \\\\n' + m, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current minute is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 78,\n \"description\": \"Returns the number of milliseconds (thousandths of a second) since\\nstarting the program. This information is often used for timing events and\\nanimation sequences.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"millis\",\n \"return\": {\n \"description\": \"the number of milliseconds since starting the program\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\nvar millisecond = millis();\\ntext('Milliseconds \\\\nrunning: \\\\n' + millisecond, 5, 40);\\n\\n\"\n ],\n \"alt\": \"number of milliseconds since program has started displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 101,\n \"description\": \"p5.js communicates with the clock on your computer. The month() function\\nreturns the current month as a value from 1 - 12.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"month\",\n \"return\": {\n \"description\": \"the current month\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar m = month();\\ntext('Current month: \\\\n' + m, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current month is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 123,\n \"description\": \"p5.js communicates with the clock on your computer. The second() function\\nreturns the current second as a value from 0 - 59.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"second\",\n \"return\": {\n \"description\": \"the current second\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar s = second();\\ntext('Current second: \\\\n' + s, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current second is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/utilities/time_date.js\",\n \"line\": 145,\n \"description\": \"p5.js communicates with the clock on your computer. The year() function\\nreturns the current year as an integer (2014, 2015, 2016, etc).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"year\",\n \"return\": {\n \"description\": \"the current year\",\n \"type\": \"Integer\"\n },\n \"example\": [\n \"\\n\\n\\nvar y = year();\\ntext('Current year: \\\\n' + y, 5, 50);\\n\\n\"\n ],\n \"alt\": \"Current year is displayed\",\n \"class\": \"p5\",\n \"module\": \"IO\",\n \"submodule\": \"Time & Date\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 14,\n \"description\": \"Draw a plane with given a width and height\\n\",\n \"itemtype\": \"method\",\n \"name\": \"plane\",\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"width of the plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"description\": \"height of the plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"Optional number of triangle\\n subdivisions in x-dimension\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"Optional number of triangle\\n subdivisions in y-dimension\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a plane\\n// with width 50 and height 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n plane(50, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"Nothing displayed on canvas\\nRotating interior view of a box with sides that change color.\\n3d red and green gradient.\\nRotating interior view of a cylinder with sides that change color.\\nRotating view of a cylinder with sides that change color.\\n3d red and green gradient.\\nrotating view of a multi-colored cylinder with concave sides.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 98,\n \"description\": \"Draw a box with given width, height and depth\\n\",\n \"itemtype\": \"method\",\n \"name\": \"box\",\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"width of the box\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"Height\",\n \"description\": \"height of the box\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"depth\",\n \"description\": \"depth of the box\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"Optional number of triangle\\n subdivisions in x-dimension\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"Optional number of triangle\\n subdivisions in y-dimension\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a spinning box\\n// with width, height and depth of 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(50);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 216,\n \"description\": \"Draw a sphere with given radius\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sphere\",\n \"params\": [\n {\n \"name\": \"radius\",\n \"description\": \"radius of circle\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 24\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 16\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a sphere with radius 40\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n sphere(40);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 378,\n \"description\": \"Draw a cylinder with given radius and height\\n\",\n \"itemtype\": \"method\",\n \"name\": \"cylinder\",\n \"params\": [\n {\n \"name\": \"radius\",\n \"description\": \"radius of the surface\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"description\": \"height of the cylinder\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 24\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments in y-dimension,\\n the more segments the smoother geometry\\n default is 1\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"bottomCap\",\n \"description\": \"whether to draw the bottom of the cylinder\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n },\n {\n \"name\": \"topCap\",\n \"description\": \"whether to draw the top of the cylinder\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a spinning cylinder\\n// with radius 20 and height 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateZ(frameCount * 0.01);\\n cylinder(20, 50);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 470,\n \"description\": \"Draw a cone with given radius and height\\n\",\n \"itemtype\": \"method\",\n \"name\": \"cone\",\n \"params\": [\n {\n \"name\": \"radius\",\n \"description\": \"radius of the bottom surface\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"height\",\n \"description\": \"height of the cone\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 24\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 1\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"cap\",\n \"description\": \"whether to draw the base of the cone\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a spinning cone\\n// with radius 40 and height 70\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateZ(frameCount * 0.01);\\n cone(40, 70);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 540,\n \"description\": \"Draw an ellipsoid with given radius\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ellipsoid\",\n \"params\": [\n {\n \"name\": \"radiusx\",\n \"description\": \"x-radius of ellipsoid\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"radiusy\",\n \"description\": \"y-radius of ellipsoid\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"radiusz\",\n \"description\": \"z-radius of ellipsoid\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 24. Avoid detail number above\\n 150, it may crash the browser.\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments,\\n the more segments the smoother geometry\\n default is 16. Avoid detail number above\\n 150, it may crash the browser.\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw an ellipsoid\\n// with radius 30, 40 and 40.\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipsoid(30, 40, 40);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/3d_primitives.js\",\n \"line\": 631,\n \"description\": \"Draw a torus with given radius and tube radius\\n\",\n \"itemtype\": \"method\",\n \"name\": \"torus\",\n \"params\": [\n {\n \"name\": \"radius\",\n \"description\": \"radius of the whole ring\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"tubeRadius\",\n \"description\": \"radius of the tube\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"detailX\",\n \"description\": \"number of segments in x-dimension,\\n the more segments the smoother geometry\\n default is 24\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n },\n {\n \"name\": \"detailY\",\n \"description\": \"number of segments in y-dimension,\\n the more segments the smoother geometry\\n default is 16\\n\",\n \"type\": \"Integer\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n// draw a spinning torus\\n// with ring radius 30 and tube radius 15\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n torus(30, 15);\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Primitives\"\n },\n {\n \"file\": \"src/webgl/interaction.js\",\n \"line\": 13,\n \"description\": \"Allows movement around a 3D sketch using a mouse or trackpad. Left-clicking\\nand dragging will rotate the camera position about the center of the sketch,\\nright-clicking and dragging will pan the camera position without rotation,\\nand using the mouse wheel (scrolling) will move the camera closer or further\\nfrom the center of the sketch. This function can be called with parameters\\ndictating sensitivity to mouse movement along the X and Y axes. Calling\\nthis function without parameters is equivalent to calling orbitControl(1,1).\\nTo reverse direction of movement in either axis, enter a negative number\\nfor sensitivity.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"orbitControl\",\n \"params\": [\n {\n \"name\": \"sensitivityX\",\n \"description\": \"sensitivity to mouse movement along X axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"sensitivityY\",\n \"description\": \"sensitivity to mouse movement along Y axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n rotateY(0.5);\\n box(30, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"Camera orbits around a box when mouse is hold-clicked & then moved.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Interaction\"\n },\n {\n \"file\": \"src/webgl/interaction.js\",\n \"line\": 146,\n \"description\": \"debugMode() helps visualize 3D space by adding a grid to indicate where the\\n‘ground’ is in a sketch and an axes icon which indicates the +X, +Y, and +Z\\ndirections. This function can be called without parameters to create a\\ndefault grid and axes icon, or it can be called according to the examples\\nabove to customize the size and position of the grid and/or axes icon. The\\ngrid is drawn using the most recently set stroke color and weight. To\\nspecify these parameters, add a call to stroke() and strokeWeight()\\njust before the end of the draw() loop.\\nBy default, the grid will run through the origin (0,0,0) of the sketch\\nalong the XZ plane\\nand the axes icon will be offset from the origin. Both the grid and axes\\nicon will be sized according to the current canvas size. Note that because the\\ngrid runs parallel to the default camera view, it is often helpful to use\\ndebugMode along with orbitControl to allow full view of the grid.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"debugMode\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode();\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n // Press the spacebar to turn debugMode off!\\n if (keyIsDown(32)) {\\n noDebugMode();\\n }\\n}\\n\\n\",\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(GRID);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n\\n\",\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(AXES);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n\\n\",\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(GRID, 100, 10, 0, 0, 0);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n\\n\",\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);\\n}\\n\\nfunction draw() {\\n noStroke();\\n background(200);\\n orbitControl();\\n box(15, 30);\\n // set the stroke color and weight for the grid!\\n stroke(255, 0, 150);\\n strokeWeight(0.8);\\n}\\n\\n\"\n ],\n \"alt\": \"a 3D box is centered on a grid in a 3D sketch. an icon\\nindicates the direction of each axis: a red line points +X,\\na green line +Y, and a blue line +Z.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Interaction\",\n \"overloads\": [\n {\n \"line\": 146,\n \"params\": []\n },\n {\n \"line\": 279,\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either GRID or AXES\\n\",\n \"type\": \"Constant\"\n }\n ]\n },\n {\n \"line\": 284,\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"gridSize\",\n \"description\": \"size of one side of the grid\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"gridDivisions\",\n \"description\": \"number of divisions in the grid\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"xOff\",\n \"description\": \"X axis offset from origin (0,0,0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"yOff\",\n \"description\": \"Y axis offset from origin (0,0,0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"zOff\",\n \"description\": \"Z axis offset from origin (0,0,0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 294,\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"axesSize\",\n \"description\": \"size of axes icon\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"xOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"yOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"zOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n },\n {\n \"line\": 303,\n \"params\": [\n {\n \"name\": \"gridSize\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"gridDivisions\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"gridXOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"gridYOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"gridZOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"axesSize\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"axesXOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"axesYOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"axesZOff\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/webgl/interaction.js\",\n \"line\": 380,\n \"description\": \"Turns off debugMode() in a 3D sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noDebugMode\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode();\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n // Press the spacebar to turn debugMode off!\\n if (keyIsDown(32)) {\\n noDebugMode();\\n }\\n}\\n\\n\"\n ],\n \"alt\": \"a 3D box is centered on a grid in a 3D sketch. an icon\\nindicates the direction of each axis: a red line points +X,\\na green line +Y, and a blue line +Z. the grid and icon disappear when the\\nspacebar is pressed.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Interaction\"\n },\n {\n \"file\": \"src/webgl/light.js\",\n \"line\": 12,\n \"description\": \"Creates an ambient light with a color\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ambientLight\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n ambientLight(150);\\n ambientMaterial(250);\\n noStroke();\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"evenly distributed light across a sphere\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Lights\",\n \"overloads\": [\n {\n \"line\": 12,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value relative to\\n the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n relative to the current color range\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"the alpha value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 46,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"a color string\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 52,\n \"params\": [\n {\n \"name\": \"gray\",\n \"description\": \"a gray value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"alpha\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 59,\n \"params\": [\n {\n \"name\": \"values\",\n \"description\": \"an array containing the red,green,blue &\\n and alpha components of the color\\n\",\n \"type\": \"Number[]\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 66,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"the ambient light color\\n\",\n \"type\": \"p5.Color\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/webgl/light.js\",\n \"line\": 87,\n \"description\": \"Creates a directional light with a color and a direction\\n\",\n \"itemtype\": \"method\",\n \"name\": \"directionalLight\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n //move your mouse to change light direction\\n let dirX = (mouseX / width - 0.5) * 2;\\n let dirY = (mouseY / height - 0.5) * 2;\\n directionalLight(250, 250, 250, -dirX, -dirY, -1);\\n noStroke();\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"light source on canvas changeable with mouse position\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Lights\",\n \"overloads\": [\n {\n \"line\": 87,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value (depending on the current\\ncolor mode),\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"position\",\n \"description\": \"the direction of the light\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 119,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"color Array, CSS color string,\\n or p5.Color value\\n\",\n \"type\": \"Number[]|String|p5.Color\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x axis direction\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y axis direction\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z axis direction\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 129,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"\",\n \"type\": \"Number[]|String|p5.Color\"\n },\n {\n \"name\": \"position\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 136,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/webgl/light.js\",\n \"line\": 185,\n \"description\": \"Creates a point light with a color and a light position\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pointLight\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n //move your mouse to change light position\\n let locX = mouseX - width / 2;\\n let locY = mouseY - height / 2;\\n // to set the light position,\\n // think of the world's coordinate as:\\n // -width/2,-height/2 -------- width/2,-height/2\\n // | |\\n // | 0,0 |\\n // | |\\n // -width/2,height/2--------width/2,height/2\\n pointLight(250, 250, 250, locX, locY, 50);\\n noStroke();\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"spot light on canvas changes position with mouse\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Lights\",\n \"overloads\": [\n {\n \"line\": 185,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"red or hue value (depending on the current\\ncolor mode),\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"x\",\n \"description\": \"x axis position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y axis position\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z axis position\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 226,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v3\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"position\",\n \"description\": \"the position of the light\\n\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 235,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"color Array, CSS color string,\\nor p5.Color value\\n\",\n \"type\": \"Number[]|String|p5.Color\"\n },\n {\n \"name\": \"x\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 245,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"\",\n \"type\": \"Number[]|String|p5.Color\"\n },\n {\n \"name\": \"position\",\n \"description\": \"\",\n \"type\": \"p5.Vector\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/webgl/light.js\",\n \"line\": 287,\n \"description\": \"Sets the default ambient and directional light. The defaults are ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1). Lights need to be included in the draw() to remain persistent in a looping program. Placing them in the setup() of a looping program will cause them to only have an effect the first time through the loop.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lights\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n lights();\\n rotateX(millis() / 1000);\\n rotateY(millis() / 1000);\\n rotateZ(millis() / 1000);\\n box();\\n}\\n\\n\"\n ],\n \"alt\": \"the light is partially ambient and partially directional\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Lights\"\n },\n {\n \"file\": \"src/webgl/loading.js\",\n \"line\": 14,\n \"description\": \"Load a 3d model from an OBJ file.\\n\\nOne of the limitations of the OBJ format is that it doesn't have a built-in\\nsense of scale. This means that models exported from different programs might\\nbe very different sizes. If your model isn't displaying, try calling\\nloadModel() with the normalized parameter set to true. This will resize the\\nmodel to a scale appropriate for p5. You can also make additional changes to\\nthe final size of your model with the scale() function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadModel\",\n \"return\": {\n \"description\": \"the p5.Geometry object\",\n \"type\": \"p5.Geometry\"\n },\n \"example\": [\n \"\\n\\n\\n//draw a spinning octahedron\\nlet octahedron;\\n\\nfunction preload() {\\n octahedron = loadModel('assets/octahedron.obj');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n model(octahedron);\\n}\\n\\n\",\n \"\\n\\n\\n//draw a spinning teapot\\nlet teapot;\\n\\nfunction preload() {\\n // Load model with normalise parameter set to true\\n teapot = loadModel('assets/teapot.obj', true);\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n scale(0.4); // Scaled to make model fit into canvas\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n normalMaterial(); // For effect\\n model(teapot);\\n}\\n\\n\"\n ],\n \"alt\": \"Vertically rotating 3-d teapot with red, green and blue gradient.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Models\",\n \"overloads\": [\n {\n \"line\": 14,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"Path of the model to be loaded\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"normalize\",\n \"description\": \"If true, scale the model to a\\n standardized size when loading\\n\",\n \"type\": \"Boolean\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"Function to be called\\n once the model is loaded. Will be passed\\n the 3D model object.\\n\",\n \"type\": \"function(p5.Geometry)\",\n \"optional\": true\n },\n {\n \"name\": \"failureCallback\",\n \"description\": \"called with event error if\\n the image fails to load.\\n\",\n \"type\": \"Function(Event)\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the p5.Geometry object\",\n \"type\": \"p5.Geometry\"\n }\n },\n {\n \"line\": 90,\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"\",\n \"type\": \"function(p5.Geometry)\",\n \"optional\": true\n },\n {\n \"name\": \"failureCallback\",\n \"description\": \"\",\n \"type\": \"Function(Event)\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"the p5.Geometry object\",\n \"type\": \"p5.Geometry\"\n }\n }\n ]\n },\n {\n \"file\": \"src/webgl/loading.js\",\n \"line\": 135,\n \"description\": \"Parse OBJ lines into model. For reference, this is what a simple model of a\\nsquare might look like:\\nv -0.5 -0.5 0.5\\nv -0.5 -0.5 -0.5\\nv -0.5 0.5 -0.5\\nv -0.5 0.5 0.5\\nf 4 3 2 1\\n\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Models\"\n },\n {\n \"file\": \"src/webgl/loading.js\",\n \"line\": 244,\n \"description\": \"Render a 3d model to the screen.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"model\",\n \"params\": [\n {\n \"name\": \"model\",\n \"description\": \"Loaded 3d model to be rendered\\n\",\n \"type\": \"p5.Geometry\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n//draw a spinning octahedron\\nlet octahedron;\\n\\nfunction preload() {\\n octahedron = loadModel('assets/octahedron.obj');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n model(octahedron);\\n}\\n\\n\"\n ],\n \"alt\": \"Vertically rotating 3-d octahedron.\",\n \"class\": \"p5\",\n \"module\": \"Shape\",\n \"submodule\": \"3D Models\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 14,\n \"description\": \"Loads a custom shader from the provided vertex and fragment\\nshader paths. The shader files are loaded asynchronously in the\\nbackground, so this method should be used in preload().\\nFor now, there are three main types of shaders. p5 will automatically\\nsupply appropriate vertices, normals, colors, and lighting attributes\\nif the parameters defined in the shader match the names.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadShader\",\n \"params\": [\n {\n \"name\": \"vertFilename\",\n \"description\": \"path to file containing vertex shader\\nsource code\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"fragFilename\",\n \"description\": \"path to file containing fragment shader\\nsource code\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"callback to be executed after loadShader\\ncompletes. On success, the Shader object is passed as the first argument.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"callback to be executed when an error\\noccurs inside loadShader. On error, the error is passed as the first\\nargument.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"a shader object created from the provided\\nvertex and fragment shader files.\",\n \"type\": \"p5.Shader\"\n },\n \"example\": [\n \"\\n\\n\\nlet mandel;\\nfunction preload() {\\n // load the shader definitions from files\\n mandel = loadShader('assets/shader.vert', 'assets/shader.frag');\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n // use the shader\\n shader(mandel);\\n noStroke();\\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\\n}\\n\\nfunction draw() {\\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\\n}\\n\\n\"\n ],\n \"alt\": \"zooming Mandelbrot set. a colorful, infinitely detailed fractal.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 113,\n \"itemtype\": \"method\",\n \"name\": \"createShader\",\n \"params\": [\n {\n \"name\": \"vertSrc\",\n \"description\": \"source code for the vertex shader\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"fragSrc\",\n \"description\": \"source code for the fragment shader\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"a shader object created from the provided\\nvertex and fragment shaders.\",\n \"type\": \"p5.Shader\"\n },\n \"example\": [\n \"\\n\\n\\n// the 'varying's are shared between both vertex & fragment shaders\\nlet varying = 'precision highp float; varying vec2 vPos;';\\n\\n// the vertex shader is called for each vertex\\nlet vs =\\n varying +\\n 'attribute vec3 aPosition;' +\\n 'void main() { vPos = (gl_Position = vec4(aPosition,1.0)).xy; }';\\n\\n// the fragment shader is called for each pixel\\nlet fs =\\n varying +\\n 'uniform vec2 p;' +\\n 'uniform float r;' +\\n 'const int I = 500;' +\\n 'void main() {' +\\n ' vec2 c = p + vPos * r, z = c;' +\\n ' float n = 0.0;' +\\n ' for (int i = I; i > 0; i --) {' +\\n ' if(z.x*z.x+z.y*z.y > 4.0) {' +\\n ' n = float(i)/float(I);' +\\n ' break;' +\\n ' }' +\\n ' z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;' +\\n ' }' +\\n ' gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);' +\\n '}';\\n\\nlet mandel;\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n\\n // create and initialize the shader\\n mandel = createShader(vs, fs);\\n shader(mandel);\\n noStroke();\\n\\n // 'p' is the center point of the Mandelbrot image\\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\\n}\\n\\nfunction draw() {\\n // 'r' is the size of the image in Mandelbrot-space\\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\\n}\\n\\n\"\n ],\n \"alt\": \"zooming Mandelbrot set. a colorful, infinitely detailed fractal.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 181,\n \"description\": \"The shader() function lets the user provide a custom shader\\nto fill in shapes in WEBGL mode. Users can create their\\nown shaders by loading vertex and fragment shaders with\\nloadShader().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shader\",\n \"chainable\": 1,\n \"params\": [\n {\n \"name\": \"s\",\n \"description\": \"the desired p5.Shader to use for rendering\\nshapes.\\n\",\n \"type\": \"p5.Shader\",\n \"optional\": true\n }\n ],\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 212,\n \"description\": \"This function restores the default shaders in WEBGL mode. Code that runs\\nafter resetShader() will not be affected by previously defined\\nshaders. Should be run after shader().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"resetShader\",\n \"chainable\": 1,\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 225,\n \"description\": \"Normal material for geometry. You can view all\\npossible materials in this\\nexample.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"normalMaterial\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n normalMaterial();\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"Red, green and blue gradient.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 262,\n \"description\": \"Texture for geometry. You can view other possible materials in this\\nexample.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"texture\",\n \"params\": [\n {\n \"name\": \"tex\",\n \"description\": \"2-dimensional graphics\\n to render as texture\\n\",\n \"type\": \"p5.Image|p5.MediaElement|p5.Graphics\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n rotateZ(frameCount * 0.01);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n //pass image as texture\\n texture(img);\\n box(200, 200, 200);\\n}\\n\\n\\n\\n\\n\\nlet pg;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n pg = createGraphics(200, 200);\\n pg.textSize(75);\\n}\\n\\nfunction draw() {\\n background(0);\\n pg.background(255);\\n pg.text('hello!', 0, 100);\\n //pass image as texture\\n texture(pg);\\n rotateX(0.5);\\n noStroke();\\n plane(50);\\n}\\n\\n\\n\\n\\n\\nlet vid;\\nfunction preload() {\\n vid = createVideo('assets/fingers.mov');\\n vid.hide();\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n //pass video frame as texture\\n texture(vid);\\n rect(-40, -40, 80, 80);\\n}\\n\\nfunction mousePressed() {\\n vid.loop();\\n}\\n\\n\"\n ],\n \"alt\": \"Rotating view of many images umbrella and grid roof on a 3d plane\\nblack canvas\\nblack canvas\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 359,\n \"description\": \"Sets the coordinate space for texture mapping. The default mode is IMAGE\\nwhich refers to the actual coordinates of the image.\\nNORMAL refers to a normalized space of values ranging from 0 to 1.\\nThis function only works in WEBGL mode.\\nWith IMAGE, if an image is 100 x 200 pixels, mapping the image onto the entire\\nsize of a quad would require the points (0,0) (100, 0) (100,200) (0,200).\\nThe same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textureMode\",\n \"params\": [\n {\n \"name\": \"mode\",\n \"description\": \"either IMAGE or NORMAL\\n\",\n \"type\": \"Constant\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n texture(img);\\n textureMode(NORMAL);\\n beginShape();\\n vertex(-50, -50, 0, 0);\\n vertex(50, -50, 1, 0);\\n vertex(50, 50, 1, 1);\\n vertex(-50, 50, 0, 1);\\n endShape();\\n}\\n\\n\"\n ],\n \"alt\": \"the underside of a white umbrella and gridded ceiling above\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 438,\n \"description\": \"Sets the global texture wrapping mode. This controls how textures behave\\nwhen their uv's go outside of the 0 - 1 range. There are three options:\\nCLAMP, REPEAT, and MIRROR.\\nCLAMP causes the pixels at the edge of the texture to extend to the bounds\\nREPEAT causes the texture to tile repeatedly until reaching the bounds\\nMIRROR works similarly to REPEAT but it flips the texture with every new tile\\nREPEAT & MIRROR are only available if the texture\\nis a power of two size (128, 256, 512, 1024, etc.).\\nThis method will affect all textures in your sketch until a subsequent\\ntextureWrap call is made.\\nIf only one argument is provided, it will be applied to both the\\nhorizontal and vertical axes.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"textureWrap\",\n \"params\": [\n {\n \"name\": \"wrapX\",\n \"description\": \"either CLAMP, REPEAT, or MIRROR\\n\",\n \"type\": \"Constant\"\n },\n {\n \"name\": \"wrapY\",\n \"description\": \"either CLAMP, REPEAT, or MIRROR\\n\",\n \"type\": \"Constant\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies128.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n textureWrap(MIRROR);\\n}\\n\\nfunction draw() {\\n background(0);\\n\\n let dX = mouseX;\\n let dY = mouseY;\\n\\n let u = lerp(1.0, 2.0, dX);\\n let v = lerp(1.0, 2.0, dY);\\n\\n scale(width / 2);\\n\\n texture(img);\\n\\n beginShape(TRIANGLES);\\n vertex(-1, -1, 0, 0, 0);\\n vertex(1, -1, 0, u, 0);\\n vertex(1, 1, 0, u, v);\\n\\n vertex(1, 1, 0, u, v);\\n vertex(-1, 1, 0, 0, v);\\n vertex(-1, -1, 0, 0, 0);\\n endShape();\\n}\\n\\n\"\n ],\n \"alt\": \"an image of the rocky mountains repeated in mirrored tiles\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 513,\n \"description\": \"Ambient material for geometry with a given color. You can view all\\npossible materials in this\\nexample.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ambientMaterial\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n ambientLight(200);\\n ambientMaterial(70, 130, 230);\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"radiating light source from top right of canvas\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\",\n \"overloads\": [\n {\n \"line\": 513,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"gray value, red or hue value\\n (depending on the current color mode),\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"a\",\n \"description\": \"opacity\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 544,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"color, color Array, or CSS color string\\n\",\n \"type\": \"Number[]|String|p5.Color\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 563,\n \"description\": \"Specular material for geometry with a given color. You can view all\\npossible materials in this\\nexample.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"specularMaterial\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n ambientLight(50);\\n pointLight(250, 250, 250, 100, 100, 30);\\n specularMaterial(250);\\n sphere(40);\\n}\\n\\n\"\n ],\n \"alt\": \"diffused radiating light source from top right of canvas\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\",\n \"overloads\": [\n {\n \"line\": 563,\n \"params\": [\n {\n \"name\": \"v1\",\n \"description\": \"gray value, red or hue value\\n (depending on the current color mode),\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"green or saturation value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"v3\",\n \"description\": \"blue or brightness value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"a\",\n \"description\": \"opacity\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n },\n {\n \"line\": 595,\n \"params\": [\n {\n \"name\": \"color\",\n \"description\": \"color Array, or CSS color string\\n\",\n \"type\": \"Number[]|String|p5.Color\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"src/webgl/material.js\",\n \"line\": 614,\n \"description\": \"Sets the amount of gloss in the surface of shapes.\\nUsed in combination with specularMaterial() in setting\\nthe material properties of shapes. The default and minimum value is 1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"shininess\",\n \"params\": [\n {\n \"name\": \"shine\",\n \"description\": \"Degree of Shininess.\\n Defaults to 1.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n let locX = mouseX - width / 2;\\n let locY = mouseY - height / 2;\\n ambientLight(60, 60, 60);\\n pointLight(255, 255, 255, locX, locY, 50);\\n specularMaterial(250);\\n translate(-25, 0, 0);\\n shininess(1);\\n sphere(20);\\n translate(50, 0, 0);\\n shininess(20);\\n sphere(20);\\n}\\n\\n\"\n ],\n \"alt\": \"Shininess on Camera changes position with mouse\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Material\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 15,\n \"description\": \"Sets the camera position for a 3D sketch. Parameters for this function define\\nthe position for the camera, the center of the sketch (where the camera is\\npointing), and an up direction (the orientation of the camera).\\nWhen called with no arguments, this function creates a default camera\\nequivalent to\\ncamera(0, 0, (height/2.0) / tan(PI*30.0 / 180.0), 0, 0, 0, 0, 1, 0);\\n\",\n \"itemtype\": \"method\",\n \"name\": \"camera\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"camera position value on x axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"camera position value on y axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"z\",\n \"description\": \"camera position value on z axis\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"centerX\",\n \"description\": \"x coordinate representing center of the sketch\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"centerY\",\n \"description\": \"y coordinate representing center of the sketch\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"centerZ\",\n \"description\": \"z coordinate representing center of the sketch\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"upX\",\n \"description\": \"x component of direction 'up' from camera\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"upY\",\n \"description\": \"y component of direction 'up' from camera\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"upZ\",\n \"description\": \"z component of direction 'up' from camera\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(204);\\n //move the camera away from the plane by a sin wave\\n camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\\n plane(10, 10);\\n}\\n\\n\"\n ],\n \"alt\": \"White square repeatedly grows to fill canvas and then shrinks.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 61,\n \"description\": \"Sets a perspective projection for the camera in a 3D sketch. This projection\\nrepresents depth through foreshortening: objects that are close to the camera\\nappear their actual size while those that are further away from the camera\\nappear smaller. The parameters to this function define the viewing frustum\\n(the truncated pyramid within which objects are seen by the camera) through\\nvertical field of view, aspect ratio (usually width/height), and near and far\\nclipping planes.\\nWhen called with no arguments, the defaults\\nprovided are equivalent to\\nperspective(PI/3.0, width/height, eyeZ/10.0, eyeZ10.0), where eyeZ\\nis equal to ((height/2.0) / tan(PI60.0/360.0));\\n\",\n \"itemtype\": \"method\",\n \"name\": \"perspective\",\n \"params\": [\n {\n \"name\": \"fovy\",\n \"description\": \"camera frustum vertical field of view,\\n from bottom to top of view, in angleMode units\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"aspect\",\n \"description\": \"camera frustum aspect ratio\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"near\",\n \"description\": \"frustum near plane length\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"far\",\n \"description\": \"frustum far plane length\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n//drag the mouse to look around!\\n//you will see there's a vanishing point\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n perspective(PI / 3.0, width / height, 0.1, 500);\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n normalMaterial();\\n\\n rotateX(-0.3);\\n rotateY(-0.2);\\n translate(0, 0, -50);\\n\\n push();\\n translate(-15, 0, sin(frameCount / 30) * 95);\\n box(30);\\n pop();\\n push();\\n translate(15, 0, sin(frameCount / 30 + PI) * 95);\\n box(30);\\n pop();\\n}\\n\\n\"\n ],\n \"alt\": \"two colored 3D boxes move back and forth, rotating as mouse is dragged.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 126,\n \"description\": \"Sets an orthographic projection for the camera in a 3D sketch and defines a\\nbox-shaped viewing frustum within which objects are seen. In this projection,\\nall objects with the same dimension appear the same size, regardless of\\nwhether they are near or far from the camera. The parameters to this\\nfunction specify the viewing frustum where left and right are the minimum and\\nmaximum x values, top and bottom are the minimum and maximum y values, and near\\nand far are the minimum and maximum z values. If no parameters are given, the\\ndefault is used: ortho(-width/2, width/2, -height/2, height/2).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ortho\",\n \"params\": [\n {\n \"name\": \"left\",\n \"description\": \"camera frustum left plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"right\",\n \"description\": \"camera frustum right plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"bottom\",\n \"description\": \"camera frustum bottom plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"top\",\n \"description\": \"camera frustum top plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"near\",\n \"description\": \"camera frustum near plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"far\",\n \"description\": \"camera frustum far plane\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n\\n//drag the mouse to look around!\\n//there's no vanishing point\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n normalMaterial();\\n\\n rotateX(0.2);\\n rotateY(-0.2);\\n push();\\n translate(-15, 0, sin(frameCount / 30) * 65);\\n box(30);\\n pop();\\n push();\\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\\n box(30);\\n pop();\\n}\\n\\n\"\n ],\n \"alt\": \"two 3D boxes move back and forth along same plane, rotating as mouse is dragged.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 187,\n \"description\": \"Creates a new p5.Camera object and tells the\\nrenderer to use that camera.\\nReturns the p5.Camera object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createCamera\",\n \"return\": {\n \"description\": \"The newly created camera object.\",\n \"type\": \"p5.Camera\"\n },\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 298,\n \"description\": \"Sets a perspective projection for a p5.Camera object and sets parameters\\nfor that projection according to perspective()\\nsyntax.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"perspective\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 379,\n \"description\": \"Sets an orthographic projection for a p5.Camera object and sets parameters\\nfor that projection according to ortho() syntax.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ortho\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 486,\n \"description\": \"Panning rotates the camera view to the left and right.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pan\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"amount to rotate camera in current\\nangleMode units.\\nGreater than 0 values rotate counterclockwise (to the left).\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet cam;\\nlet delta = 0.01;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n // set initial pan angle\\n cam.pan(-0.8);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // pan camera according to angle 'delta'\\n cam.pan(delta);\\n\\n // every 160 frames, switch direction\\n if (frameCount % 160 === 0) {\\n delta *= -1;\\n }\\n\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"camera view pans left and right across a series of rotating 3D boxes.\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 545,\n \"description\": \"Tilting rotates the camera view up and down.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"tilt\",\n \"params\": [\n {\n \"name\": \"angle\",\n \"description\": \"amount to rotate camera in current\\nangleMode units.\\nGreater than 0 values rotate counterclockwise (to the left).\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet cam;\\nlet delta = 0.01;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n // set initial tilt\\n cam.tilt(-0.8);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // pan camera according to angle 'delta'\\n cam.tilt(delta);\\n\\n // every 160 frames, switch direction\\n if (frameCount % 160 === 0) {\\n delta *= -1;\\n }\\n\\n rotateY(frameCount * 0.01);\\n translate(0, -100, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"camera view tilts up and down across a series of rotating 3D boxes.\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 603,\n \"description\": \"Reorients the camera to look at a position in world space.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"lookAt\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x position of a point in world space\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y position of a point in world space\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z position of a point in world space\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet cam;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // look at a new random point every 60 frames\\n if (frameCount % 60 === 0) {\\n cam.lookAt(random(-100, 100), random(-50, 50), 0);\\n }\\n\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"camera view of rotating 3D cubes changes to look at a new random\\npoint every second .\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 670,\n \"description\": \"Sets a camera's position and orientation. This is equivalent to calling\\ncamera() on a p5.Camera object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"camera\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 751,\n \"description\": \"Move camera along its local axes while maintaining current camera orientation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"move\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"amount to move along camera's left-right axis\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"amount to move along camera's up-down axis\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"amount to move along camera's forward-backward axis\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// see the camera move along its own axes while maintaining its orientation\\nlet cam;\\nlet delta = 0.5;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // move the camera along its local axes\\n cam.move(delta, delta, 0);\\n\\n // every 100 frames, switch direction\\n if (frameCount % 150 === 0) {\\n delta *= -1;\\n }\\n\\n translate(-10, -10, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n}\\n\\n\"\n ],\n \"alt\": \"camera view moves along a series of 3D boxes, maintaining the same\\norientation throughout the move\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 823,\n \"description\": \"Set camera position in world-space while maintaining current camera\\norientation.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setPosition\",\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x position of a point in world space\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"y\",\n \"description\": \"y position of a point in world space\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"z\",\n \"description\": \"z position of a point in world space\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\n// press '1' '2' or '3' keys to set camera position\\n\\nlet cam;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // '1' key\\n if (keyIsDown(49)) {\\n cam.setPosition(30, 0, 80);\\n }\\n // '2' key\\n if (keyIsDown(50)) {\\n cam.setPosition(0, 0, 80);\\n }\\n // '3' key\\n if (keyIsDown(51)) {\\n cam.setPosition(-30, 0, 80);\\n }\\n\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"camera position changes as the user presses keys, altering view of a 3D box\",\n \"class\": \"p5.Camera\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Camera.js\",\n \"line\": 1088,\n \"description\": \"Sets rendererGL's current camera to a p5.Camera object. Allows switching\\nbetween multiple cameras.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setCamera\",\n \"params\": [\n {\n \"name\": \"cam\",\n \"description\": \"p5.Camera object\\n\",\n \"type\": \"p5.Camera\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nlet cam1, cam2;\\nlet currentCamera;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n\\n cam1 = createCamera();\\n cam2 = createCamera();\\n cam2.setPosition(30, 0, 50);\\n cam2.lookAt(0, 0, 0);\\n cam2.ortho();\\n\\n // set variable for previously active camera:\\n currentCamera = 1;\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // camera 1:\\n cam1.lookAt(0, 0, 0);\\n cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);\\n\\n // every 100 frames, switch between the two cameras\\n if (frameCount % 100 === 0) {\\n if (currentCamera === 1) {\\n setCamera(cam1);\\n currentCamera = 0;\\n } else {\\n setCamera(cam2);\\n currentCamera = 1;\\n }\\n }\\n\\n drawBoxes();\\n}\\n\\nfunction drawBoxes() {\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n\\n\"\n ],\n \"alt\": \"Canvas switches between two camera views, each showing a series of spinning\\n3D boxes.\",\n \"class\": \"p5\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 50,\n \"itemtype\": \"method\",\n \"name\": \"computeFaces\",\n \"chainable\": 1,\n \"class\": \"p5.Geometry\",\n \"module\": \"Lights, Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 92,\n \"description\": \"computes smooth normals per vertex as an average of each\\nface.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"computeNormals\",\n \"chainable\": 1,\n \"class\": \"p5.Geometry\",\n \"module\": \"Lights, Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 131,\n \"description\": \"Averages the vertex normals. Used in curved\\nsurfaces\\n\",\n \"itemtype\": \"method\",\n \"name\": \"averageNormals\",\n \"chainable\": 1,\n \"class\": \"p5.Geometry\",\n \"module\": \"Lights, Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 152,\n \"description\": \"Averages pole normals. Used in spherical primitives\\n\",\n \"itemtype\": \"method\",\n \"name\": \"averagePoleNormals\",\n \"chainable\": 1,\n \"class\": \"p5.Geometry\",\n \"module\": \"Lights, Camera\"\n },\n {\n \"file\": \"src/webgl/p5.Geometry.js\",\n \"line\": 245,\n \"description\": \"Modifies all vertices to be centered within the range -100 to 100.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"normalize\",\n \"chainable\": 1,\n \"class\": \"p5.Geometry\",\n \"module\": \"Lights, Camera\"\n },\n {\n \"file\": \"src/webgl/p5.RendererGL.js\",\n \"line\": 228,\n \"description\": \"Set attributes for the WebGL Drawing context.\\nThis is a way of adjusting how the WebGL\\nrenderer works to fine-tune the display and performance.\\n\\nNote that this will reinitialize the drawing context\\nif called after the WebGL canvas is made.\\n\\nIf an object is passed as the parameter, all attributes\\nnot declared in the object will be set to defaults.\\n\\nThe available attributes are:\\n\\nalpha - indicates if the canvas contains an alpha buffer\\ndefault is false\\n\\ndepth - indicates whether the drawing buffer has a depth buffer\\nof at least 16 bits - default is true\\n\\nstencil - indicates whether the drawing buffer has a stencil buffer\\nof at least 8 bits\\n\\nantialias - indicates whether or not to perform anti-aliasing\\ndefault is false\\n\\npremultipliedAlpha - indicates that the page compositor will assume\\nthe drawing buffer contains colors with pre-multiplied alpha\\ndefault is false\\n\\npreserveDrawingBuffer - if true the buffers will not be cleared and\\nand will preserve their values until cleared or overwritten by author\\n(note that p5 clears automatically on draw loop)\\ndefault is true\\n\\nperPixelLighting - if true, per-pixel lighting will be used in the\\nlighting shader.\\ndefault is false\\n\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setAttributes\",\n \"example\": [\n \"\\n\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(255);\\n push();\\n rotateZ(frameCount * 0.02);\\n rotateX(frameCount * 0.02);\\n rotateY(frameCount * 0.02);\\n fill(0, 0, 0);\\n box(50);\\n pop();\\n}\\n\\n\\n\\nNow with the antialias attribute set to true.\\n\\n\\n\\nfunction setup() {\\n setAttributes('antialias', true);\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(255);\\n push();\\n rotateZ(frameCount * 0.02);\\n rotateX(frameCount * 0.02);\\n rotateY(frameCount * 0.02);\\n fill(0, 0, 0);\\n box(50);\\n pop();\\n}\\n\\n\\n\\n\\n\\n// press the mouse button to enable perPixelLighting\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noStroke();\\n fill(255);\\n}\\n\\nvar lights = [\\n { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\\n { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\\n { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\\n { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\\n { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\\n { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\\n];\\n\\nfunction draw() {\\n var t = millis() / 1000 + 1000;\\n background(0);\\n directionalLight(color('#222'), 1, 1, 1);\\n\\n for (var i = 0; i < lights.length; i++) {\\n var light = lights[i];\\n pointLight(\\n color(light.c),\\n p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\\n );\\n }\\n\\n specularMaterial(255);\\n sphere(width * 0.1);\\n\\n rotateX(t * 0.77);\\n rotateY(t * 0.83);\\n rotateZ(t * 0.91);\\n torus(width * 0.3, width * 0.07, 24, 10);\\n}\\n\\nfunction mousePressed() {\\n setAttributes('perPixelLighting', true);\\n noStroke();\\n fill(255);\\n}\\nfunction mouseReleased() {\\n setAttributes('perPixelLighting', false);\\n noStroke();\\n fill(255);\\n}\\n\\n\"\n ],\n \"alt\": \"a rotating cube with smoother edges\",\n \"class\": \"p5\",\n \"module\": \"Rendering\",\n \"submodule\": \"Rendering\",\n \"overloads\": [\n {\n \"line\": 228,\n \"params\": [\n {\n \"name\": \"key\",\n \"description\": \"Name of attribute\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"New value of named attribute\\n\",\n \"type\": \"Boolean\"\n }\n ]\n },\n {\n \"line\": 367,\n \"params\": [\n {\n \"name\": \"obj\",\n \"description\": \"object with key-value pairs\\n\",\n \"type\": \"Object\"\n }\n ]\n }\n ]\n },\n {\n \"file\": \"src/webgl/p5.Shader.js\",\n \"line\": 268,\n \"description\": \"Wrapper around gl.uniform functions.\\nAs we store uniform info in the shader we can use that\\nto do type checking on the supplied data and call\\nthe appropriate function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setUniform\",\n \"chainable\": 1,\n \"params\": [\n {\n \"name\": \"uniformName\",\n \"description\": \"the name of the uniform in the\\nshader program\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"data\",\n \"description\": \"the data to be associated\\nwith that uniform; type varies (could be a single numerical value, array,\\nmatrix, or texture / sampler reference)\\n\",\n \"type\": \"Object|Number|Boolean|Number[]\"\n }\n ],\n \"class\": \"p5.Shader\",\n \"module\": \"Lights, Camera\",\n \"submodule\": \"Shaders\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 40,\n \"description\": \"Searches the page for an element with the given ID, class, or tag name (using the '#' or '.'\\nprefixes to specify an ID or class respectively, and none for a tag) and returns it as\\na p5.Element. If a class or tag name is given with more than 1 element,\\nonly the first element will be returned.\\nThe DOM node itself can be accessed with .elt.\\nReturns null if none found. You can also specify a container to search within.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"select\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"id, class, or tag name of element to search for\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"container\",\n \"description\": \"id, p5.Element, or\\n HTML element to search within\\n\",\n \"type\": \"String|p5.Element|HTMLElement\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"p5.Element containing node found\",\n \"type\": \"p5.Element|null\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n //translates canvas 50px down\\n select('canvas').position(100, 100);\\n}\\n\\n\\n// these are all valid calls to select()\\nvar a = select('#moo');\\nvar b = select('#blah', '#myContainer');\\nvar c, e;\\nif (b) {\\n c = select('#foo', b);\\n}\\nvar d = document.getElementById('beep');\\nif (d) {\\n e = select('p', d);\\n}\\n[a, b, c, d, e]; // unused\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 107,\n \"description\": \"Searches the page for elements with the given class or tag name (using the '.' prefix\\nto specify a class and no prefix for a tag) and returns them as p5.Elements\\nin an array.\\nThe DOM node itself can be accessed with .elt.\\nReturns an empty array if none found.\\nYou can also specify a container to search within.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"selectAll\",\n \"params\": [\n {\n \"name\": \"name\",\n \"description\": \"class or tag name of elements to search for\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"container\",\n \"description\": \"id, p5.Element, or HTML element to search within\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of p5.Elements containing nodes found\",\n \"type\": \"p5.Element[]\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n createButton('btn');\\n createButton('2nd btn');\\n createButton('3rd btn');\\n var buttons = selectAll('button');\\n\\n for (var i = 0; i < buttons.length; i++) {\\n buttons[i].size(100, 100);\\n }\\n}\\n\\n\\n// these are all valid calls to selectAll()\\nvar a = selectAll('.moo');\\na = selectAll('div');\\na = selectAll('button', '#myContainer');\\n\\nvar d = select('#container');\\na = selectAll('p', d);\\n\\nvar f = document.getElementById('beep');\\na = select('.blah', f);\\n\\na; // unused\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 168,\n \"description\": \"Helper function for select and selectAll\\n\",\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 184,\n \"description\": \"Helper function for getElement and getElements.\\n\",\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 218,\n \"description\": \"Removes all elements created by p5, except any canvas / graphics\\nelements created by createCanvas or createGraphics.\\nEvent handlers are removed, and element is removed from the DOM.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeElements\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n createDiv('this is some text');\\n createP('this is a paragraph');\\n}\\nfunction mousePressed() {\\n removeElements(); // this will remove the div and p, not canvas\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 245,\n \"description\": \"The .changed() function is called when the value of an\\nelement changes.\\nThis can be used to attach an element specific event listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"changed\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when the value of\\n an element changes.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nvar sel;\\n\\nfunction setup() {\\n textAlign(CENTER);\\n background(200);\\n sel = createSelect();\\n sel.position(10, 10);\\n sel.option('pear');\\n sel.option('kiwi');\\n sel.option('grape');\\n sel.changed(mySelectEvent);\\n}\\n\\nfunction mySelectEvent() {\\n var item = sel.value();\\n background(200);\\n text(\\\"it's a \\\" + item + '!', 50, 50);\\n}\\n\\n\\n\\nvar checkbox;\\nvar cnv;\\n\\nfunction setup() {\\n checkbox = createCheckbox(' fill');\\n checkbox.changed(changeFill);\\n cnv = createCanvas(100, 100);\\n cnv.position(0, 30);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipse(50, 50, 50, 50);\\n}\\n\\nfunction changeFill() {\\n if (checkbox.checked()) {\\n fill(0);\\n } else {\\n noFill();\\n }\\n}\\n\"\n ],\n \"alt\": \"dropdown: pear, kiwi, grape. When selected text \\\"its a\\\" + selection shown.\",\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 313,\n \"description\": \"The .input() function is called when any user input is\\ndetected with an element. The input event is often used\\nto detect keystrokes in a input element, or changes on a\\nslider element. This can be used to attach an element specific\\nevent listener.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"input\",\n \"params\": [\n {\n \"name\": \"fxn\",\n \"description\": \"function to be fired when any user input is\\n detected within the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.\\n\",\n \"type\": \"Function|Boolean\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n// Open your console to see the output\\nfunction setup() {\\n var inp = createInput('');\\n inp.input(myInputEvent);\\n}\\n\\nfunction myInputEvent() {\\n console.log('you are typing: ', this.value());\\n}\\n\"\n ],\n \"alt\": \"no display.\",\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 348,\n \"description\": \"Helpers for create methods.\\n\",\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 361,\n \"description\": \"Creates a <div></div> element in the DOM with given inner HTML.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createDiv\",\n \"params\": [\n {\n \"name\": \"html\",\n \"description\": \"inner HTML for element created\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateDiv('this is some text');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 375,\n \"description\": \"Creates a <p></p> element in the DOM with given inner HTML. Used\\nfor paragraph length text.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createP\",\n \"params\": [\n {\n \"name\": \"html\",\n \"description\": \"inner HTML for element created\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateP('this is some text');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 390,\n \"description\": \"Creates a <span></span> element in the DOM with given inner HTML.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createSpan\",\n \"params\": [\n {\n \"name\": \"html\",\n \"description\": \"inner HTML for element created\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateSpan('this is some text');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 413,\n \"description\": \"Creates an <img> element in the DOM with given src and\\nalternate text.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createImg\",\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateImg('http://p5js.org/img/asterisk-01.png');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 413,\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"src path or url for image\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"alt\",\n \"description\": \"alternate text to be used if image does not load\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"callback to be called once image data is loaded\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n }\n },\n {\n \"line\": 429,\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"\",\n \"type\": \"Function\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"Object|p5.Element\"\n }\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 463,\n \"description\": \"Creates an <a></a> element in the DOM for including a hyperlink.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createA\",\n \"params\": [\n {\n \"name\": \"href\",\n \"description\": \"url of page to link to\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"html\",\n \"description\": \"inner html of link element to display\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"target\",\n \"description\": \"target where new link should open,\\n could be _blank, _self, _parent, _top.\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateA('http://p5js.org/', 'this is a link');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 488,\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 490,\n \"description\": \"Creates a slider <input></input> element in the DOM.\\nUse .size() to set the display length of the slider.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createSlider\",\n \"params\": [\n {\n \"name\": \"min\",\n \"description\": \"minimum value of the slider\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"max\",\n \"description\": \"maximum value of the slider\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"value\",\n \"description\": \"default value of the slider\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"step\",\n \"description\": \"step size for each tick of the slider (if step is set to 0, the slider will move continuously from the minimum to the maximum value)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar slider;\\nfunction setup() {\\n slider = createSlider(0, 255, 100);\\n slider.position(10, 10);\\n slider.style('width', '80px');\\n}\\n\\nfunction draw() {\\n var val = slider.value();\\n background(val);\\n}\\n\\n\\n\\nvar slider;\\nfunction setup() {\\n colorMode(HSB);\\n slider = createSlider(0, 360, 60, 40);\\n slider.position(10, 10);\\n slider.style('width', '80px');\\n}\\n\\nfunction draw() {\\n var val = slider.value();\\n background(val, 100, 100, 1);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 547,\n \"description\": \"Creates a <button></button> element in the DOM.\\nUse .size() to set the display size of the button.\\nUse .mousePressed() to specify behavior on press.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createButton\",\n \"params\": [\n {\n \"name\": \"label\",\n \"description\": \"label displayed on the button\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value of the button\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar button;\\nfunction setup() {\\n createCanvas(100, 100);\\n background(0);\\n button = createButton('click me');\\n button.position(19, 19);\\n button.mousePressed(changeBG);\\n}\\n\\nfunction changeBG() {\\n var val = random(255);\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 583,\n \"description\": \"Creates a checkbox <input></input> element in the DOM.\\nCalling .checked() on a checkbox returns if it is checked or not\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createCheckbox\",\n \"params\": [\n {\n \"name\": \"label\",\n \"description\": \"label displayed after checkbox\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"value\",\n \"description\": \"value of the checkbox; checked is true, unchecked is false\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar checkbox;\\n\\nfunction setup() {\\n checkbox = createCheckbox('label', false);\\n checkbox.changed(myCheckedEvent);\\n}\\n\\nfunction myCheckedEvent() {\\n if (this.checked()) {\\n console.log('Checking!');\\n } else {\\n console.log('Unchecking!');\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 651,\n \"description\": \"Creates a dropdown menu <select></select> element in the DOM.\\nIt also helps to assign select-box methods to p5.Element when selecting existing select box\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createSelect\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar sel;\\n\\nfunction setup() {\\n textAlign(CENTER);\\n background(200);\\n sel = createSelect();\\n sel.position(10, 10);\\n sel.option('pear');\\n sel.option('kiwi');\\n sel.option('grape');\\n sel.changed(mySelectEvent);\\n}\\n\\nfunction mySelectEvent() {\\n var item = sel.value();\\n background(200);\\n text('It is a ' + item + '!', 50, 50);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 651,\n \"params\": [\n {\n \"name\": \"multiple\",\n \"description\": \"true if dropdown should support multiple selections\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Element\"\n }\n },\n {\n \"line\": 679,\n \"params\": [\n {\n \"name\": \"existing\",\n \"description\": \"DOM select element\\n\",\n \"type\": \"Object\"\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Element\"\n }\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 755,\n \"description\": \"Creates a radio button <input></input> element in the DOM.\\nThe .option() method can be used to set options for the radio after it is\\ncreated. The .value() method will return the currently selected option.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createRadio\",\n \"params\": [\n {\n \"name\": \"divId\",\n \"description\": \"the id and name of the created div and input field respectively\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar radio;\\n\\nfunction setup() {\\n radio = createRadio();\\n radio.option('black');\\n radio.option('white');\\n radio.option('gray');\\n radio.style('width', '60px');\\n textAlign(CENTER);\\n fill(255, 0, 0);\\n}\\n\\nfunction draw() {\\n var val = radio.value();\\n background(val);\\n text(val, width / 2, height / 2);\\n}\\n\\n\\nvar radio;\\n\\nfunction setup() {\\n radio = createRadio();\\n radio.option('apple', 1);\\n radio.option('bread', 2);\\n radio.option('juice', 3);\\n radio.style('width', '60px');\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(200);\\n var val = radio.value();\\n if (val) {\\n text('item cost is $' + val, width / 2, height / 2);\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 893,\n \"description\": \"Creates a colorPicker element in the DOM for color input.\\nThe .value() method will return a hex string (#rrggbb) of the color.\\nThe .color() method will return a p5.Color object with the current chosen color.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createColorPicker\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"default color of element\\n\",\n \"type\": \"String|p5.Color\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\n\\nvar inp1, inp2;\\nfunction setup() {\\n createCanvas(100, 100);\\n background('grey');\\n inp1 = createColorPicker('#ff0000');\\n inp2 = createColorPicker(color('yellow'));\\n inp1.input(setShade1);\\n inp2.input(setShade2);\\n setMidShade();\\n}\\n\\nfunction setMidShade() {\\n // Finding a shade between the two\\n var commonShade = lerpColor(inp1.color(), inp2.color(), 0.5);\\n fill(commonShade);\\n rect(20, 20, 60, 60);\\n}\\n\\nfunction setShade1() {\\n setMidShade();\\n console.log('You are choosing shade 1 to be : ', this.value());\\n}\\nfunction setShade2() {\\n setMidShade();\\n console.log('You are choosing shade 2 to be : ', this.value());\\n}\\n\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 967,\n \"description\": \"Creates an <input></input> element in the DOM for text input.\\nUse .size() to set the display length of the box.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createInput\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"default value of the input box\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"type\",\n \"description\": \"type of text, ie text, password etc. Defaults to text\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nfunction setup() {\\n var inp = createInput('');\\n inp.input(myInputEvent);\\n}\\n\\nfunction myInputEvent() {\\n console.log('you are typing: ', this.value());\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 997,\n \"description\": \"Creates an <input></input> element in the DOM of type 'file'.\\nThis allows users to select local files for use in a sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createFileInput\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"callback function for when a file loaded\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"multiple\",\n \"description\": \"optional to allow multiple files selected\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created DOM element\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nlet input;\\nlet img;\\n\\nfunction setup() {\\n input = createFileInput(handleFile);\\n input.position(0, 0);\\n}\\n\\nfunction draw() {\\n background(255);\\n if (img) {\\n image(img, 0, 0, width, height);\\n }\\n}\\n\\nfunction handleFile(file) {\\n print(file);\\n if (file.type === 'image') {\\n img = createImg(file.data);\\n img.hide();\\n } else {\\n img = null;\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1070,\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1112,\n \"description\": \"Creates an HTML5 <video> element in the DOM for simple playback\\nof audio/video. Shown by default, can be hidden with .hide()\\nand drawn into canvas using video(). Appends to the container\\nnode if one is specified, otherwise appends to body. The first parameter\\ncan be either a single string path to a video file, or an array of string\\npaths to different formats of the same video. This is useful for ensuring\\nthat your video can play across different browsers, as each supports\\ndifferent formats. See this\\npage for further information about supported formats.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createVideo\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"path to a video file, or array of paths for\\n supporting different browsers\\n\",\n \"type\": \"String|String[]\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"callback function to be called upon\\n 'canplaythrough' event fire, that is, when the\\n browser can play the media, and estimates that\\n enough data has been loaded to play the media\\n up to its end without having to stop for\\n further buffering of content\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to video p5.Element\",\n \"type\": \"p5.MediaElement\"\n },\n \"example\": [\n \"\\n\\nvar vid;\\nfunction setup() {\\n noCanvas();\\n\\n vid = createVideo(\\n ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],\\n vidLoad\\n );\\n\\n vid.size(100, 100);\\n}\\n\\n// This function is called when the video loads\\nfunction vidLoad() {\\n vid.loop();\\n vid.volume(0);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1159,\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1161,\n \"description\": \"Creates a hidden HTML5 <audio> element in the DOM for simple audio\\nplayback. Appends to the container node if one is specified,\\notherwise appends to body. The first parameter\\ncan be either a single string path to a audio file, or an array of string\\npaths to different formats of the same audio. This is useful for ensuring\\nthat your audio can play across different browsers, as each supports\\ndifferent formats. See this\\npage for further information about supported formats.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createAudio\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"path to an audio file, or array of paths\\n for supporting different browsers\\n\",\n \"type\": \"String|String[]\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"callback function to be called upon\\n 'canplaythrough' event fire, that is, when the\\n browser can play the media, and estimates that\\n enough data has been loaded to play the media\\n up to its end without having to stop for\\n further buffering of content\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to audio p5.Element\",\n \"type\": \"p5.MediaElement\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n ele = createAudio('assets/beat.mp3');\\n\\n // here we set the element to autoplay\\n // The element will play as soon\\n // as it is able to do so.\\n ele.autoplay(true);\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1199,\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1201,\n \"itemtype\": \"property\",\n \"name\": \"VIDEO\",\n \"type\": \"String\",\n \"final\": 1,\n \"category\": [\n \"Constants\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1207,\n \"itemtype\": \"property\",\n \"name\": \"AUDIO\",\n \"type\": \"String\",\n \"final\": 1,\n \"category\": [\n \"Constants\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1244,\n \"description\": \"Creates a new HTML5 <video> element that contains the audio/video\\nfeed from a webcam. The element is separate from the canvas and is\\ndisplayed by default. The element can be hidden using .hide(). The feed\\ncan be drawn onto the canvas using image(). The loadedmetadata property can\\nbe used to detect when the element has fully loaded (see second example).\\nMore specific properties of the feed can be passing in a Constraints object.\\nSee the\\n W3C\\nspec for possible properties. Note that not all of these are supported\\nby all browsers.\\nSecurity note: A new browser security specification requires that getUserMedia,\\nwhich is behind createCapture(), only works when you're running the code locally,\\nor on HTTPS. Learn more here\\nand here.\",\n \"itemtype\": \"method\",\n \"name\": \"createCapture\",\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"type of capture, either VIDEO or\\n AUDIO if none specified, default both,\\n or a Constraints object\\n\",\n \"type\": \"String|Constant|Object\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to be called once\\n stream has loaded\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"capture video p5.Element\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\nvar capture;\\n\\nfunction setup() {\\n createCanvas(480, 480);\\n capture = createCapture(VIDEO);\\n capture.hide();\\n}\\n\\nfunction draw() {\\n image(capture, 0, 0, width, width * capture.height / capture.width);\\n filter(INVERT);\\n}\\n\\n\\nfunction setup() {\\n createCanvas(480, 120);\\n var constraints = {\\n video: {\\n mandatory: {\\n minWidth: 1280,\\n minHeight: 720\\n },\\n optional: [{ maxFrameRate: 10 }]\\n },\\n audio: true\\n };\\n createCapture(constraints, function(stream) {\\n console.log(stream);\\n });\\n}\\n\\n\\nvar capture;\\n\\nfunction setup() {\\n createCanvas(640, 480);\\n capture = createCapture(VIDEO);\\n}\\nfunction draw() {\\n background(0);\\n if (capture.loadedmetadata) {\\n var c = capture.get(0, 0, 100, 100);\\n image(c, 0, 0);\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1381,\n \"description\": \"Creates element with given tag in the DOM with given content.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createElement\",\n \"params\": [\n {\n \"name\": \"tag\",\n \"description\": \"tag for the new element\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"content\",\n \"description\": \"html content to be inserted into the element\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateElement('h2', 'im an h2 p5.element!');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1407,\n \"description\": \"Adds specified class to the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addClass\",\n \"params\": [\n {\n \"name\": \"class\",\n \"description\": \"name of class to add\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div = createDiv('div');\\n div.addClass('myClass');\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1432,\n \"description\": \"Removes specified class from the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeClass\",\n \"params\": [\n {\n \"name\": \"class\",\n \"description\": \"name of class to remove\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n // In this example, a class is set when the div is created\\n // and removed when mouse is pressed. This could link up\\n // with a CSS style rule to toggle style properties.\\nvar div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('myClass');\\n }\\nfunction mousePressed() {\\n div.removeClass('myClass');\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1463,\n \"description\": \"Checks if specified class already set to element\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hasClass\",\n \"return\": {\n \"description\": \"a boolean value if element has specified class\",\n \"type\": \"Boolean\"\n },\n \"params\": [\n {\n \"name\": \"c\",\n \"description\": \"class name of class to check\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n \\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n if (div.hasClass('show')) {\\n div.addClass('show');\\n } else {\\n div.removeClass('show');\\n }\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1492,\n \"description\": \"Toggles element class\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toggleClass\",\n \"params\": [\n {\n \"name\": \"c\",\n \"description\": \"class name to toggle\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n div.toggleClass('show');\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1525,\n \"description\": \"Attaches the element as a child to the parent specified.\\n Accepts either a string ID, DOM node, or p5.Element.\\n If no argument is specified, an array of children DOM nodes is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"child\",\n \"return\": {\n \"description\": \"an array of child nodes\",\n \"type\": \"Node[]\"\n },\n \"example\": [\n \"\\n \\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div0.child(div1); // use p5.Element\\n \\n \\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div1.id('apples');\\n div0.child('apples'); // use id\\n \\n \\n // this example assumes there is a div already on the page\\n // with id \\\"myChildDiv\\\"\\n var div0 = createDiv('this is the parent');\\n var elt = document.getElementById('myChildDiv');\\n div0.child(elt); // use element from page\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1525,\n \"params\": [],\n \"return\": {\n \"description\": \"an array of child nodes\",\n \"type\": \"Node[]\"\n }\n },\n {\n \"line\": 1553,\n \"params\": [\n {\n \"name\": \"child\",\n \"description\": \"the ID, DOM node, or p5.Element\\n to add to the current element\\n\",\n \"type\": \"String|p5.Element\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1575,\n \"description\": \"Centers a p5 Element either vertically, horizontally,\\nor both, relative to its parent or according to\\nthe body if the Element has no parent. If no argument is passed\\nthe Element is aligned both vertically and horizontally.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"center\",\n \"params\": [\n {\n \"name\": \"align\",\n \"description\": \"passing 'vertical', 'horizontal' aligns element accordingly\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var div = createDiv('').size(10, 10);\\n div.style('background-color', 'orange');\\n div.center();\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1629,\n \"description\": \"If an argument is given, sets the inner HTML of the element,\\n replacing any existing html. If true is included as a second\\n argument, html is appended instead of replacing existing html.\\n If no arguments are given, returns\\n the inner HTML of the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"html\",\n \"return\": {\n \"description\": \"the inner HTML of the element\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n \\n var div = createDiv('').size(100, 100);\\n div.html('hi');\\n \\n \\n var div = createDiv('Hello ').size(100, 100);\\n div.html('World', true);\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1629,\n \"params\": [],\n \"return\": {\n \"description\": \"the inner HTML of the element\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1650,\n \"params\": [\n {\n \"name\": \"html\",\n \"description\": \"the HTML to be placed inside the element\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"append\",\n \"description\": \"whether to append HTML to existing\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1668,\n \"description\": \"Sets the position of the element relative to (0, 0) of the\\n window. Essentially, sets position:absolute and left and top\\n properties of style. If no arguments given returns the x and y position\\n of the element in an object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"position\",\n \"return\": {\n \"description\": \"the x and y position of the element in an object\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n \\n function setup() {\\n var cnv = createCanvas(100, 100);\\n // positions canvas 50px to the right and 100px\\n // below upper left corner of the window\\n cnv.position(50, 100);\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1668,\n \"params\": [],\n \"return\": {\n \"description\": \"the x and y position of the element in an object\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 1687,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-position relative to upper left of window\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"y-position relative to upper left of window\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1762,\n \"description\": \"Sets the given style (css) property (1st arg) of the element with the\\ngiven value (2nd arg). If a single argument is given, .style()\\nreturns the value of the given property; however, if the single argument\\nis given in css syntax ('text-align:center'), .style() sets the css\\nappropriately.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"style\",\n \"return\": {\n \"description\": \"value of property\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nvar myDiv = createDiv('I like pandas.');\\nmyDiv.style('font-size', '18px');\\nmyDiv.style('color', '#ff0000');\\n\\n\\nvar col = color(25, 23, 200, 50);\\nvar button = createButton('button');\\nbutton.style('background-color', col);\\nbutton.position(10, 10);\\n\\n\\nvar myDiv;\\nfunction setup() {\\n background(200);\\n myDiv = createDiv('I like gray.');\\n myDiv.position(20, 20);\\n}\\n\\nfunction draw() {\\n myDiv.style('font-size', mouseX + 'px');\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1762,\n \"params\": [\n {\n \"name\": \"property\",\n \"description\": \"property to be set\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"value of property\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1797,\n \"params\": [\n {\n \"name\": \"property\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign to property\\n\",\n \"type\": \"String|Number|p5.Color\"\n }\n ],\n \"chainable\": 1,\n \"return\": {\n \"description\": \"current value of property, if no value is given as second argument\",\n \"type\": \"String\"\n }\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1851,\n \"description\": \"Adds a new attribute or changes the value of an existing attribute\\n on the specified element. If no value is specified, returns the\\n value of the given attribute, or null if attribute is not set.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"attribute\",\n \"return\": {\n \"description\": \"value of attribute\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n \\n var myDiv = createDiv('I like pandas.');\\n myDiv.attribute('align', 'center');\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1851,\n \"params\": [],\n \"return\": {\n \"description\": \"value of attribute\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1866,\n \"params\": [\n {\n \"name\": \"attr\",\n \"description\": \"attribute to set\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign to attribute\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1895,\n \"description\": \"Removes an attribute on the specified element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeAttribute\",\n \"params\": [\n {\n \"name\": \"attr\",\n \"description\": \"attribute to remove\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var button;\\n var checkbox;\\nfunction setup() {\\n checkbox = createCheckbox('enable', true);\\n checkbox.changed(enableButton);\\n button = createButton('button');\\n button.position(10, 10);\\n }\\nfunction enableButton() {\\n if (this.checked()) {\\n // Re-enable the button\\n button.removeAttribute('disabled');\\n } else {\\n // Disable the button\\n button.attribute('disabled', '');\\n }\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1940,\n \"description\": \"Either returns the value of the element if no arguments\\ngiven, or sets the value of the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"value\",\n \"return\": {\n \"description\": \"value of the element\",\n \"type\": \"String|Number\"\n },\n \"example\": [\n \"\\n\\n// gets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('');\\n}\\n\\nfunction mousePressed() {\\n print(inp.value());\\n}\\n\\n\\n// sets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('myValue');\\n}\\n\\nfunction mousePressed() {\\n inp.value('myValue');\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1940,\n \"params\": [],\n \"return\": {\n \"description\": \"value of the element\",\n \"type\": \"String|Number\"\n }\n },\n {\n \"line\": 1970,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"String|Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1986,\n \"description\": \"Shows the current element. Essentially, setting display:block for the style.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"show\",\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div = createDiv('div');\\n div.style('display', 'none');\\n div.show(); // turns display to block\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2004,\n \"description\": \"Hides the current element. Essentially, setting display:none for the style.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hide\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nvar div = createDiv('this is a div');\\ndiv.hide();\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2020,\n \"description\": \"Sets the width and height of the element. AUTO can be used to\\n only adjust one dimension at a time. If no arguments are given, it\\n returns the width and height of the element in an object. In case of\\n elements which need to be loaded, such as images, it is recommended\\n to call the function after the element has finished loading.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"size\",\n \"return\": {\n \"description\": \"the width and height of the element in an object\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n \\n let div = createDiv('this is a div');\\n div.size(100, 100);\\n let img = createImg('assets/laDefense.jpg', () => {\\n img.size(10, AUTO);\\n });\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2020,\n \"params\": [],\n \"return\": {\n \"description\": \"the width and height of the element in an object\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 2039,\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width of the element, either AUTO, or a number\\n\",\n \"type\": \"Number|Constant\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the element, either AUTO, or a number\\n\",\n \"type\": \"Number|Constant\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2099,\n \"description\": \"Removes the element and deregisters all listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"remove\",\n \"example\": [\n \"\\n\\nvar myDiv = createDiv('this is some text');\\nmyDiv.remove();\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2119,\n \"description\": \"Registers a callback that gets called every time a file that is\\ndropped on the element has been loaded.\\np5 will load every dropped file into memory and pass it as a p5.File object to the callback.\\nMultiple files dropped at the same time will result in multiple calls to the callback.\\nYou can optionally pass a second callback which will be registered to the raw\\ndrop event.\\nThe callback will thus be provided the original\\nDragEvent.\\nDropping multiple files at the same time will trigger the second callback once per drop,\\nwhereas the first callback will trigger for each loaded file.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"drop\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"callback to receive loaded file, called for each file dropped.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"fxn\",\n \"description\": \"callback triggered once when files are dropped with the drop event.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop file', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction gotFile(file) {\\n background(200);\\n text('received file:', width / 2, height / 2);\\n text(file.name, width / 2, height / 2 + 50);\\n}\\n\\n\\n\\nvar img;\\n\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop image', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction draw() {\\n if (img) {\\n image(img, 0, 0, width, height);\\n }\\n}\\n\\nfunction gotFile(file) {\\n img = createImg(file.data).hide();\\n}\\n\"\n ],\n \"alt\": \"Canvas turns into whatever image is dragged/dropped onto it.\",\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2253,\n \"description\": \"Path to the media element source.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"src\",\n \"return\": {\n \"description\": \"src\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\n\\nfunction setup() {\\n background(250);\\n\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n //We'll set up our example so that\\n //when you click on the text,\\n //an alert box displays the MediaElement's\\n //src field.\\n textAlign(CENTER);\\n text('Click Me!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Show our p5.MediaElement's src field\\n alert(ele.src);\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2319,\n \"description\": \"Play an HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nvar ele;\\n\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Here we call the play() function on\\n //the p5.MediaElement we created above.\\n //This will start the audio sample.\\n ele.play();\\n\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2380,\n \"description\": \"Stops an HTML5 media element (sets current time to zero).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and stops a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //if the sample is currently playing\\n //calling the stop() function on\\n //our p5.MediaElement will stop\\n //it and reset its current\\n //time to 0 (i.e. it will start\\n //at the beginning the next time\\n //you play it)\\n ele.stop();\\n\\n sampleIsPlaying = false;\\n text('Click to play!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to stop!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2444,\n \"description\": \"Pauses an HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and pauses a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //Calling pause() on our\\n //p5.MediaElement will stop it\\n //playing, but when we call the\\n //loop() or play() functions\\n //the sample will start from\\n //where we paused it.\\n ele.pause();\\n\\n sampleIsPlaying = false;\\n text('Click to resume!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.pause() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to pause!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2506,\n \"description\": \"Set 'loop' to true for an HTML5 media element, and starts playing.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsLooping = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to loop!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (!sampleIsLooping) {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsLooping = true;\\n text('Click to stop!', width / 2, height / 2);\\n } else {\\n ele.stop();\\n\\n sampleIsLooping = false;\\n text('Click to loop!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2562,\n \"description\": \"Set 'loop' to false for an HTML5 media element. Element will stop\\nwhen it reaches the end.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noLoop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and stops loop of sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n ele.noLoop();\\n text('No more Loops!', width / 2, height / 2);\\n } else {\\n ele.loop();\\n sampleIsPlaying = true;\\n text('Click to stop looping!', width / 2, height / 2);\\n }\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2614,\n \"description\": \"Set HTML5 media element to autoplay or not.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"autoplay\",\n \"params\": [\n {\n \"name\": \"autoplay\",\n \"description\": \"whether the element should autoplay\\n\",\n \"type\": \"Boolean\"\n }\n ],\n \"chainable\": 1,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2626,\n \"description\": \"Sets volume for this HTML5 media element. If no argument is given,\\nreturns the current volume.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"volume\",\n \"return\": {\n \"description\": \"current volume\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n // p5.MediaElement objects are usually created\\n // by calling the createAudio(), createVideo(),\\n // and createCapture() functions.\\n // In this example we create\\n // a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\nfunction mouseClicked() {\\n // Here we call the volume() function\\n // on the sound element to set its volume\\n // Volume must be between 0.0 and 1.0\\n ele.volume(0.2);\\n ele.play();\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n}\\n\\n\\nvar audio;\\nvar counter = 0;\\n\\nfunction loaded() {\\n audio.play();\\n}\\n\\nfunction setup() {\\n audio = createAudio('assets/lucky_dragons.mp3', loaded);\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n if (counter === 0) {\\n background(0, 255, 0);\\n text('volume(0.9)', width / 2, height / 2);\\n } else if (counter === 1) {\\n background(255, 255, 0);\\n text('volume(0.5)', width / 2, height / 2);\\n } else if (counter === 2) {\\n background(255, 0, 0);\\n text('volume(0.1)', width / 2, height / 2);\\n }\\n}\\n\\nfunction mousePressed() {\\n counter++;\\n if (counter === 0) {\\n audio.volume(0.9);\\n } else if (counter === 1) {\\n audio.volume(0.5);\\n } else if (counter === 2) {\\n audio.volume(0.1);\\n } else {\\n counter = 0;\\n audio.volume(0.9);\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2626,\n \"params\": [],\n \"return\": {\n \"description\": \"current volume\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2699,\n \"params\": [\n {\n \"name\": \"val\",\n \"description\": \"volume between 0.0 and 1.0\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2712,\n \"description\": \"If no arguments are given, returns the current playback speed of the\\nelement. The speed parameter sets the speed where 2.0 will play the\\nelement twice as fast, 0.5 will play at half the speed, and -1 will play\\nthe element in normal speed in reverse.(Note that not all browsers support\\nbackward playback and even if they do, playback might not be smooth.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"speed\",\n \"return\": {\n \"description\": \"current playback speed of the element\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\nvar button;\\n\\nfunction setup() {\\n createCanvas(710, 400);\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n ele.loop();\\n background(200);\\n\\n button = createButton('2x speed');\\n button.position(100, 68);\\n button.mousePressed(twice_speed);\\n\\n button = createButton('half speed');\\n button.position(200, 68);\\n button.mousePressed(half_speed);\\n\\n button = createButton('reverse play');\\n button.position(300, 68);\\n button.mousePressed(reverse_speed);\\n\\n button = createButton('STOP');\\n button.position(400, 68);\\n button.mousePressed(stop_song);\\n\\n button = createButton('PLAY!');\\n button.position(500, 68);\\n button.mousePressed(play_speed);\\n}\\n\\nfunction twice_speed() {\\n ele.speed(2);\\n}\\n\\nfunction half_speed() {\\n ele.speed(0.5);\\n}\\n\\nfunction reverse_speed() {\\n ele.speed(-1);\\n}\\n\\nfunction stop_song() {\\n ele.stop();\\n}\\n\\nfunction play_speed() {\\n ele.play();\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2712,\n \"params\": [],\n \"return\": {\n \"description\": \"current playback speed of the element\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2783,\n \"params\": [\n {\n \"name\": \"speed\",\n \"description\": \"speed multiplier for element playback\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2800,\n \"description\": \"If no arguments are given, returns the current time of the element.\\nIf an argument is given the current time of the element is set to it.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"time\",\n \"return\": {\n \"description\": \"current time (in seconds)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nvar beginning = true;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('start at beginning', width / 2, height / 2);\\n}\\n\\n// this function fires with click anywhere\\nfunction mousePressed() {\\n if (beginning === true) {\\n // here we start the sound at the beginning\\n // time(0) is not necessary here\\n // as this produces the same result as\\n // play()\\n ele.play().time(0);\\n background(200);\\n text('jump 2 sec in', width / 2, height / 2);\\n beginning = false;\\n } else {\\n // here we jump 2 seconds into the sound\\n ele.play().time(2);\\n background(250);\\n text('start at beginning', width / 2, height / 2);\\n beginning = true;\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2800,\n \"params\": [],\n \"return\": {\n \"description\": \"current time (in seconds)\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2845,\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"time to jump to (in seconds)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2859,\n \"description\": \"Returns the duration of the HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"duration\",\n \"return\": {\n \"description\": \"duration\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/doorbell.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to know the duration!', 10, 25, 70, 80);\\n}\\nfunction mouseClicked() {\\n ele.play();\\n background(200);\\n //ele.duration dislpays the duration\\n text(ele.duration() + ' seconds', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2998,\n \"description\": \"Schedule an event to be called when the audio or video\\nelement reaches the end. If the element is looping,\\nthis will not be called. The element is passed in\\nas the argument to the onended callback.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"onended\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"function to call when the\\n soundfile has ended. The\\n media element will be passed\\n in as the argument to the\\n callback.\\n\",\n \"type\": \"Function\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n audioEl.onended(sayDone);\\n}\\n\\nfunction sayDone(elt) {\\n alert('done playing ' + elt.src);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3029,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3031,\n \"description\": \"Send the audio output of this element to a specified audioNode or\\np5.sound object. If no element is provided, connects to p5's master\\noutput. That connection is established when this method is first called.\\nAll connections are removed by the .disconnect() method.\\nThis method is meant to be used with the p5.sound.js addon library.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"audioNode\",\n \"description\": \"AudioNode from the Web Audio API,\\nor an object from the p5.sound library\\n\",\n \"type\": \"AudioNode|Object\"\n }\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3080,\n \"description\": \"Disconnect all Web Audio routing, including to master output.\\nThis is useful if you want to re-route the output through\\naudio effects, for example.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3095,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3097,\n \"description\": \"Show the default MediaElement controls, as determined by the web browser.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"showControls\",\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to Show Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.showControls();\\n background(200);\\n text('Controls Shown', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3128,\n \"description\": \"Hide the default mediaElement controls.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hideControls\",\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n ele.showControls();\\n background(200);\\n textAlign(CENTER);\\n text('Click to hide Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.hideControls();\\n background(200);\\n text('Controls hidden', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3157,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3168,\n \"description\": \"Schedule events to trigger every time a MediaElement\\n(audio/video) reaches a playback cue point.\\nAccepts a callback function, a time (in seconds) at which to trigger\\nthe callback, and an optional parameter for the callback.\\nTime will be passed as the first parameter to the callback function,\\nand param will be the second parameter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addCue\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"Time in seconds, relative to this media\\n element's playback. For example, to trigger\\n an event every time playback reaches two\\n seconds, pass in the number 2. This will be\\n passed as the first parameter to\\n the callback function.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"Name of a function that will be\\n called at the given time. The callback will\\n receive time and (optionally) param as its\\n two parameters.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"value\",\n \"description\": \"An object to be passed as the\\n second parameter to the\\n callback function.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"id ID of this cue,\\n useful for removeCue(id)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n//\\n//\\nfunction setup() {\\n noCanvas();\\n\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n\\n // schedule three calls to changeBackground\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n audioEl.addCue(5.0, changeBackground, color(255, 255, 0));\\n}\\n\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3232,\n \"description\": \"Remove a callback based on its ID. The ID is returned by the\\naddCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeCue\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the cue, as returned by addCue\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar audioEl, id1, id2;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n // schedule five calls to changeBackground\\n id1 = audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n id2 = audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n text('Click to remove first and last Cue!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n audioEl.removeCue(id1);\\n audioEl.removeCue(id2);\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3274,\n \"description\": \"Remove all of the callbacks that had originally been scheduled\\nvia the addCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clearCues\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the cue, as returned by addCue\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar audioEl;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n //Show the default MediaElement controls, as determined by the web browser\\n audioEl.showControls();\\n // schedule calls to changeBackground\\n background(200);\\n text('Click to change Cue!', 10, 25, 70, 80);\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n}\\nfunction mousePressed() {\\n // here we clear the scheduled callbacks\\n audioEl.clearCues();\\n // then we add some more callbacks\\n audioEl.addCue(1, changeBackground, color(2, 2, 2));\\n audioEl.addCue(3, changeBackground, color(255, 255, 0));\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3340,\n \"description\": \"Underlying File object. All normal File methods can be called on this.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"file\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3352,\n \"description\": \"File type (image, text, etc.)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"type\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3358,\n \"description\": \"File subtype (usually the file extension jpg, png, xml, etc.)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"subtype\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3364,\n \"description\": \"File name\\n\",\n \"itemtype\": \"property\",\n \"name\": \"name\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3370,\n \"description\": \"File size\\n\",\n \"itemtype\": \"property\",\n \"name\": \"size\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3377,\n \"description\": \"URL string containing image data.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"data\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 46,\n \"description\": \"p5.sound \\nhttps://p5js.org/reference/#/libraries/p5.sound\\nFrom the Processing Foundation and contributors\\nhttps://github.com/processing/p5.js-sound/graphs/contributors\\nMIT License (MIT)\\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE\\nSome of the many audio libraries & resources that inspire p5.sound:\\n\\nTONE.js (c) Yotam Mann. Licensed under The MIT License (MIT). https://github.com/TONEnoTONE/Tone.js\\nbuzz.js (c) Jay Salvat. Licensed under The MIT License (MIT). http://buzz.jaysalvat.com/\\nBoris Smus Web Audio API book, 2013. Licensed under the Apache License http://www.apache.org/licenses/LICENSE-2.0\\nwavesurfer.js https://github.com/katspaugh/wavesurfer.js\\nWeb Audio Components by Jordan Santell https://github.com/web-audio-components\\nWilm Thoben's Sound library for Processing https://github.com/processing/processing/tree/master/java/libraries/sound\\nWeb Audio API: http://w3.org/TR/webaudio/\\n\\n\\n\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 214,\n \"description\": \"Determine which filetypes are supported (inspired by buzz.js)\\nThe audio element (el) will only be used to test browser support for various audio formats\\n\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 363,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 740,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 810,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1005,\n \"description\": \"Returns the Audio Context for this sketch. Useful for users\\nwho would like to dig deeper into the Web Audio API\\n.\\n\\nSome browsers require users to startAudioContext\\nwith a user gesture, such as touchStarted in the example below.\",\n \"itemtype\": \"method\",\n \"name\": \"getAudioContext\",\n \"return\": {\n \"description\": \"AudioContext for this sketch\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n function draw() {\\n background(255);\\n textAlign(CENTER);\\n\\n if (getAudioContext().state !== 'running') {\\n text('click to start audio', width/2, height/2);\\n } else {\\n text('audio is enabled', width/2, height/2);\\n }\\n }\\n\\n function touchStarted() {\\n if (getAudioContext().state !== 'running') {\\n getAudioContext().resume();\\n }\\n var synth = new p5.MonoSynth();\\n synth.play('A4', 0.5, 0, 0.2);\\n }\\n\\n\"\n ],\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1042,\n \"description\": \"It is a good practice to give users control over starting audio playback.\\nThis practice is enforced by Google Chrome's autoplay policy as of r70\\n(info), iOS Safari, and other browsers.\\n\\n\\n\\nuserStartAudio() starts the Audio Context on a user gesture. It utilizes\\nthe StartAudioContext library by\\nYotam Mann (MIT Licence, 2016). Read more at https://github.com/tambien/StartAudioContext.\\n\\n\\nStarting the audio context on a user gesture can be as simple as userStartAudio().\\nOptional parameters let you decide on a specific element that will start the audio context,\\nand/or call a function once the audio context is started.\",\n \"params\": [\n {\n \"name\": \"element(s)\",\n \"description\": \"This argument can be an Element,\\n Selector String, NodeList, p5.Element,\\n jQuery Element, or an Array of any of those.\\n\",\n \"type\": \"Element|Array\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"Callback to invoke when the AudioContext has started\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Returns a Promise which is resolved when\\n the AudioContext state is 'running'\",\n \"type\": \"Promise\"\n },\n \"itemtype\": \"method\",\n \"name\": \"userStartAudio\",\n \"example\": [\n \"\\n\\nfunction setup() {\\n var myDiv = createDiv('click to start audio');\\n myDiv.position(0, 0);\\n\\n var mySynth = new p5.MonoSynth();\\n\\n // This won't play until the context has started\\n mySynth.play('A6');\\n\\n // Start the audio context on a click/touch event\\n userStartAudio().then(function() {\\n myDiv.remove();\\n });\\n}\\n\"\n ],\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1099,\n \"description\": \"Master contains AudioContext and the master sound output.\\n\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1132,\n \"description\": \"Returns a number representing the master amplitude (volume) for sound\\nin this sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getMasterVolume\",\n \"return\": {\n \"description\": \"Master amplitude (volume) for sound in this sketch.\\n Should be between 0.0 (silence) and 1.0.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1143,\n \"description\": \"Scale the output of all sound in this sketch\\nScaled between 0.0 (silence) and 1.0 (full volume).\\n1.0 is the maximum amplitude of a digital sound, so multiplying\\nby greater than 1.0 may cause digital distortion. To\\nfade, provide a rampTime parameter. For more\\ncomplex fades, see the Envelope class.\\n\\nAlternately, you can pass in a signal source such as an\\noscillator to modulate the amplitude with an audio signal.\\n\\nHow This Works: When you load the p5.sound module, it\\ncreates a single instance of p5sound. All sound objects in this\\nmodule output to p5sound before reaching your computer's output.\\nSo if you change the amplitude of p5sound, it impacts all of the\\nsound in this module.\\n\\nIf no value is provided, returns a Web Audio API Gain Node\",\n \"itemtype\": \"method\",\n \"name\": \"masterVolume\",\n \"params\": [\n {\n \"name\": \"volume\",\n \"description\": \"Volume (amplitude) between 0.0\\n and 1.0 or modulating signal/oscillator\\n\",\n \"type\": \"Number|Object\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Fade for t seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"Schedule this event to happen at\\n t seconds in the future\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1185,\n \"description\": \"p5.soundOut is the p5.sound master output. It sends output to\\nthe destination of this window's web audio context. It contains\\nWeb Audio API nodes including a dyanmicsCompressor (.limiter),\\nand Gain Nodes for .input and .output.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"soundOut\",\n \"type\": \"Object\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1210,\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1213,\n \"description\": \"Returns a number representing the sample rate, in samples per second,\\nof all sound objects in this audio context. It is determined by the\\nsampling rate of your operating system's sound card, and it is not\\ncurrently possile to change.\\nIt is often 44100, or twice the range of human hearing.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sampleRate\",\n \"return\": {\n \"description\": \"samplerate samples per second\",\n \"type\": \"Number\"\n },\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1226,\n \"description\": \"Returns the closest MIDI note value for\\na given frequency.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"freqToMidi\",\n \"params\": [\n {\n \"name\": \"frequency\",\n \"description\": \"A freqeuncy, for example, the "A"\\n above Middle C is 440Hz\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"MIDI note value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1240,\n \"description\": \"Returns the frequency value of a MIDI note value.\\nGeneral MIDI treats notes as integers where middle C\\nis 60, C# is 61, D is 62 etc. Useful for generating\\nmusical frequencies with oscillators.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"midiToFreq\",\n \"params\": [\n {\n \"name\": \"midiNote\",\n \"description\": \"The number of a MIDI note\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Frequency value of the given MIDI note\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar notes = [60, 64, 67, 72];\\nvar i = 0;\\n\\nfunction setup() {\\n osc = new p5.Oscillator('Triangle');\\n osc.start();\\n frameRate(1);\\n}\\n\\nfunction draw() {\\n var freq = midiToFreq(notes[i]);\\n osc.freq(freq);\\n i++;\\n if (i >= notes.length){\\n i = 0;\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1302,\n \"description\": \"List the SoundFile formats that you will include. LoadSound\\nwill search your directory for these extensions, and will pick\\na format that is compatable with the client's web browser.\\nHere is a free online file\\nconverter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"soundFormats\",\n \"params\": [\n {\n \"name\": \"formats\",\n \"description\": \"i.e. 'mp3', 'wav', 'ogg'\\n\",\n \"type\": \"String\",\n \"optional\": true,\n \"multiple\": true\n }\n ],\n \"example\": [\n \"\\n\\nfunction preload() {\\n // set the global sound formats\\n soundFormats('mp3', 'ogg');\\n\\n // load either beatbox.mp3, or .ogg, depending on browser\\n mySound = loadSound('assets/beatbox.mp3');\\n}\\n\\nfunction setup() {\\n mySound.play();\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1415,\n \"description\": \"Used by Osc and Envelope to chain signal math\\n\",\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1763,\n \"description\": \"loadSound() returns a new p5.SoundFile from a specified\\npath. If called during preload(), the p5.SoundFile will be ready\\nto play in time for setup() and draw(). If called outside of\\npreload, the p5.SoundFile will not be ready immediately, so\\nloadSound accepts a callback as the second parameter. Using a\\n\\nlocal server is recommended when loading external files.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loadSound\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"Path to the sound file, or an array with\\n paths to soundfiles in multiple formats\\n i.e. ['sound.ogg', 'sound.mp3'].\\n Alternately, accepts an object: either\\n from the HTML5 File API, or a p5.File.\\n\",\n \"type\": \"String|Array\"\n },\n {\n \"name\": \"successCallback\",\n \"description\": \"Name of a function to call once file loads\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"Name of a function to call if there is\\n an error loading the file.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"whileLoading\",\n \"description\": \"Name of a function to call while file is loading.\\n This function will receive the percentage loaded\\n so far, from 0.0 to 1.0.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Returns a p5.SoundFile\",\n \"type\": \"SoundFile\"\n },\n \"example\": [\n \"\\n\\nfunction preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n}\\n\\nfunction setup() {\\n mySound.setVolume(0.1);\\n mySound.play();\\n}\\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1919,\n \"description\": \"Returns true if the sound file finished loading successfully.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"isLoaded\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1932,\n \"description\": \"Play the p5.SoundFile\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"params\": [\n {\n \"name\": \"startTime\",\n \"description\": \"(optional) schedule playback to start (in seconds from now).\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"rate\",\n \"description\": \"(optional) playback rate\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"amp\",\n \"description\": \"(optional) amplitude (volume)\\n of playback\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"cueStart\",\n \"description\": \"(optional) cue start time in seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"duration\",\n \"description\": \"(optional) duration of playback in seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2022,\n \"description\": \"p5.SoundFile has two play modes: restart and\\nsustain. Play Mode determines what happens to a\\np5.SoundFile if it is triggered while in the middle of playback.\\nIn sustain mode, playback will continue simultaneous to the\\nnew playback. In restart mode, play() will stop playback\\nand start over. With untilDone, a sound will play only if it's\\nnot already playing. Sustain is the default mode.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"playMode\",\n \"params\": [\n {\n \"name\": \"str\",\n \"description\": \"'restart' or 'sustain' or 'untilDone'\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n\\nvar mySound;\\nfunction preload(){\\n mySound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\nfunction mouseClicked() {\\n mySound.playMode('sustain');\\n mySound.play();\\n}\\nfunction keyPressed() {\\n mySound.playMode('restart');\\n mySound.play();\\n}\\n\\n \"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2066,\n \"description\": \"Pauses a file that is currently playing. If the file is not\\nplaying, then nothing will happen.\\nAfter pausing, .play() will resume from the paused\\nposition.\\nIf p5.SoundFile had been set to loop before it was paused,\\nit will continue to loop after it is unpaused with .play().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"params\": [\n {\n \"name\": \"startTime\",\n \"description\": \"(optional) schedule event to occur\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar soundFile;\\n\\nfunction preload() {\\n soundFormats('ogg', 'mp3');\\n soundFile = loadSound('assets/Damscray_-_Dancing_Tiger_02.mp3');\\n}\\nfunction setup() {\\n background(0, 255, 0);\\n soundFile.setVolume(0.1);\\n soundFile.loop();\\n}\\nfunction keyTyped() {\\n if (key == 'p') {\\n soundFile.pause();\\n background(255, 0, 0);\\n }\\n}\\n\\nfunction keyReleased() {\\n if (key == 'p') {\\n soundFile.play();\\n background(0, 255, 0);\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2122,\n \"description\": \"Loop the p5.SoundFile. Accepts optional parameters to set the\\nplayback rate, playback volume, loopStart, loopEnd.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"params\": [\n {\n \"name\": \"startTime\",\n \"description\": \"(optional) schedule event to occur\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"rate\",\n \"description\": \"(optional) playback rate\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"amp\",\n \"description\": \"(optional) playback volume\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"cueLoopStart\",\n \"description\": \"(optional) startTime in seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"duration\",\n \"description\": \"(optional) loop duration in seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2138,\n \"description\": \"Set a p5.SoundFile's looping flag to true or false. If the sound\\nis currently playing, this change will take effect when it\\nreaches the end of the current playback.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setLoop\",\n \"params\": [\n {\n \"name\": \"Boolean\",\n \"description\": \"set looping to true or false\\n\",\n \"type\": \"Boolean\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2159,\n \"description\": \"Returns 'true' if a p5.SoundFile is currently looping and playing, 'false' if not.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"isLooping\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2174,\n \"description\": \"Returns true if a p5.SoundFile is playing, false if not (i.e.\\npaused or stopped).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"isPlaying\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2184,\n \"description\": \"Returns true if a p5.SoundFile is paused, false if not (i.e.\\nplaying or stopped).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"isPaused\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Boolean\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2194,\n \"description\": \"Stop soundfile playback.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"params\": [\n {\n \"name\": \"startTime\",\n \"description\": \"(optional) schedule event to occur\\n in seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2239,\n \"description\": \"Multiply the output volume (amplitude) of a sound file\\nbetween 0.0 (silence) and 1.0 (full volume).\\n1.0 is the maximum amplitude of a digital sound, so multiplying\\nby greater than 1.0 may cause digital distortion. To\\nfade, provide a rampTime parameter. For more\\ncomplex fades, see the Envelope class.\\nAlternately, you can pass in a signal source such as an\\noscillator to modulate the amplitude with an audio signal.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setVolume\",\n \"params\": [\n {\n \"name\": \"volume\",\n \"description\": \"Volume (amplitude) between 0.0\\n and 1.0 or modulating signal/oscillator\\n\",\n \"type\": \"Number|Object\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Fade for t seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"Schedule this event to happen at\\n t seconds in the future\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2280,\n \"description\": \"Set the stereo panning of a p5.sound object to\\na floating point number between -1.0 (left) and 1.0 (right).\\nDefault is 0.0 (center).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pan\",\n \"params\": [\n {\n \"name\": \"panValue\",\n \"description\": \"Set the stereo panner\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\n\\n var ball = {};\\n var soundFile;\\n\\n function preload() {\\n soundFormats('ogg', 'mp3');\\n soundFile = loadSound('assets/beatbox.mp3');\\n }\\n\\n function draw() {\\n background(0);\\n ball.x = constrain(mouseX, 0, width);\\n ellipse(ball.x, height/2, 20, 20)\\n }\\n\\n function mousePressed(){\\n // map the ball's x location to a panning degree\\n // between -1.0 (left) and 1.0 (right)\\n var panning = map(ball.x, 0., width,-1.0, 1.0);\\n soundFile.pan(panning);\\n soundFile.play();\\n }\\n \"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2319,\n \"description\": \"Returns the current stereo pan position (-1.0 to 1.0)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getPan\",\n \"return\": {\n \"description\": \"Returns the stereo pan setting of the Oscillator\\n as a number between -1.0 (left) and 1.0 (right).\\n 0.0 is center and default.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2330,\n \"description\": \"Set the playback rate of a sound file. Will change the speed and the pitch.\\nValues less than zero will reverse the audio buffer.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rate\",\n \"params\": [\n {\n \"name\": \"playbackRate\",\n \"description\": \"Set the playback rate. 1.0 is normal,\\n .5 is half-speed, 2.0 is twice as fast.\\n Values less than zero play backwards.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar song;\\n\\nfunction preload() {\\n song = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n song.loop();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // Set the rate to a range between 0.1 and 4\\n // Changing the rate also alters the pitch\\n var speed = map(mouseY, 0.1, height, 0, 2);\\n speed = constrain(speed, 0.01, 4);\\n song.rate(speed);\\n\\n // Draw a circle to show what is going on\\n stroke(0);\\n fill(51, 100);\\n ellipse(mouseX, 100, 48, 48);\\n}\\n\\n \\n \\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2403,\n \"description\": \"Returns the duration of a sound file in seconds.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"duration\",\n \"return\": {\n \"description\": \"The duration of the soundFile in seconds.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2417,\n \"description\": \"Return the current position of the p5.SoundFile playhead, in seconds.\\nTime is relative to the normal buffer direction, so if reverseBuffer\\nhas been called, currentTime will count backwards.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"currentTime\",\n \"return\": {\n \"description\": \"currentTime of the soundFile in seconds.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2428,\n \"description\": \"Move the playhead of the song to a position, in seconds. Start timing\\nand playback duration. If none are given, will reset the file to play\\nentire duration from start to finish.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"jump\",\n \"params\": [\n {\n \"name\": \"cueTime\",\n \"description\": \"cueTime of the soundFile in seconds.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"duration\",\n \"description\": \"duration in seconds.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2451,\n \"description\": \"Return the number of channels in a sound file.\\nFor example, Mono = 1, Stereo = 2.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"channels\",\n \"return\": {\n \"description\": \"[channels]\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2461,\n \"description\": \"Return the sample rate of the sound file.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"sampleRate\",\n \"return\": {\n \"description\": \"[sampleRate]\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2470,\n \"description\": \"Return the number of samples in a sound file.\\nEqual to sampleRate * duration.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"frames\",\n \"return\": {\n \"description\": \"[sampleCount]\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2480,\n \"description\": \"Returns an array of amplitude peaks in a p5.SoundFile that can be\\nused to draw a static waveform. Scans through the p5.SoundFile's\\naudio buffer to find the greatest amplitudes. Accepts one\\nparameter, 'length', which determines size of the array.\\nLarger arrays result in more precise waveform visualizations.\\nInspired by Wavesurfer.js.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getPeaks\",\n \"params\": [\n {\n \"name\": \"length\",\n \"description\": \"length is the size of the returned array.\\n Larger length results in more precision.\\n Defaults to 5*width of the browser window.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of peaks.\",\n \"type\": \"Float32Array\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2532,\n \"description\": \"Reverses the p5.SoundFile's buffer source.\\nPlayback must be handled separately (see example).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"reverseBuffer\",\n \"example\": [\n \"\\n\\nvar drum;\\n\\nfunction preload() {\\n drum = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n drum.reverseBuffer();\\n drum.play();\\n}\\n\\n \\n \"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2572,\n \"description\": \"Schedule an event to be called when the soundfile\\nreaches the end of a buffer. If the soundfile is\\nplaying through once, this will be called when it\\nends. If it is looping, it will be called when\\nstop is called.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"onended\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"function to call when the\\n soundfile has ended.\\n\",\n \"type\": \"Function\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2625,\n \"description\": \"Connects the output of a p5sound object to input of another\\np5.sound object. For example, you may connect a p5.SoundFile to an\\nFFT or an Effect. If no parameter is given, it will connect to\\nthe master output. Most p5sound objects connect to the master\\noutput when they are created.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"object\",\n \"description\": \"Audio object that accepts an input\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2646,\n \"description\": \"Disconnects the output of this p5sound object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2656,\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2661,\n \"description\": \"Reset the source for this SoundFile to a\\nnew path (URL).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setPath\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to audio file\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"Callback\\n\",\n \"type\": \"Function\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2674,\n \"description\": \"Replace the current Audio Buffer with a new Buffer.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setBuffer\",\n \"params\": [\n {\n \"name\": \"buf\",\n \"description\": \"Array of Float32 Array(s). 2 Float32 Arrays\\n will create a stereo source. 1 will create\\n a mono source.\\n\",\n \"type\": \"Array\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2741,\n \"description\": \"processPeaks returns an array of timestamps where it thinks there is a beat.\\nThis is an asynchronous function that processes the soundfile in an offline audio context,\\nand sends the results to your callback function.\\nThe process involves running the soundfile through a lowpass filter, and finding all of the\\npeaks above the initial threshold. If the total number of peaks are below the minimum number of peaks,\\nit decreases the threshold and re-runs the analysis until either minPeaks or minThreshold are reached.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"processPeaks\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"a function to call once this data is returned\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"initThreshold\",\n \"description\": \"initial threshold defaults to 0.9\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"minThreshold\",\n \"description\": \"minimum threshold defaults to 0.22\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"minPeaks\",\n \"description\": \"minimum number of peaks defaults to 200\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array of timestamped peaks\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2934,\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 2943,\n \"description\": \"Schedule events to trigger every time a MediaElement\\n(audio/video) reaches a playback cue point.\\nAccepts a callback function, a time (in seconds) at which to trigger\\nthe callback, and an optional parameter for the callback.\\nTime will be passed as the first parameter to the callback function,\\nand param will be the second parameter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addCue\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"Time in seconds, relative to this media\\n element's playback. For example, to trigger\\n an event every time playback reaches two\\n seconds, pass in the number 2. This will be\\n passed as the first parameter to\\n the callback function.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"Name of a function that will be\\n called at the given time. The callback will\\n receive time and (optionally) param as its\\n two parameters.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"value\",\n \"description\": \"An object to be passed as the\\n second parameter to the\\n callback function.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"id ID of this cue,\\n useful for removeCue(id)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar mySound;\\nfunction preload() {\\n mySound = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n // schedule calls to changeText\\n mySound.addCue(0.50, changeText, \\\"hello\\\" );\\n mySound.addCue(1.00, changeText, \\\"p5\\\" );\\n mySound.addCue(1.50, changeText, \\\"what\\\" );\\n mySound.addCue(2.00, changeText, \\\"do\\\" );\\n mySound.addCue(2.50, changeText, \\\"you\\\" );\\n mySound.addCue(3.00, changeText, \\\"want\\\" );\\n mySound.addCue(4.00, changeText, \\\"to\\\" );\\n mySound.addCue(5.00, changeText, \\\"make\\\" );\\n mySound.addCue(6.00, changeText, \\\"?\\\" );\\n}\\n\\nfunction changeText(val) {\\n background(0);\\n text(val, width/2, height/2);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n if (mySound.isPlaying() ) {\\n mySound.stop();\\n } else {\\n mySound.play();\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3021,\n \"description\": \"Remove a callback based on its ID. The ID is returned by the\\naddCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeCue\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the cue, as returned by addCue\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3040,\n \"description\": \"Remove all of the callbacks that had originally been scheduled\\nvia the addCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clearCues\",\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3065,\n \"description\": \"Save a p5.SoundFile as a .wav file. The browser will prompt the user\\nto download the file to their device. To upload a file to a server, see\\ngetBlob\\n\",\n \"itemtype\": \"method\",\n \"name\": \"save\",\n \"params\": [\n {\n \"name\": \"fileName\",\n \"description\": \"name of the resulting .wav file.\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n \\n var inp, button, mySound;\\n var fileName = 'cool';\\n function preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n }\\n function setup() {\\n btn = createButton('click to save file');\\n btn.position(0, 0);\\n btn.mouseClicked(handleMouseClick);\\n }\\n\\n function handleMouseClick() {\\n mySound.save(fileName);\\n }\\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3094,\n \"description\": \"This method is useful for sending a SoundFile to a server. It returns the\\n.wav-encoded audio data as a "Blob".\\nA Blob is a file-like data object that can be uploaded to a server\\nwith an http request. We'll\\nuse the httpDo options object to send a POST request with some\\nspecific options: we encode the request as multipart/form-data,\\nand attach the blob as one of the form values using FormData.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getBlob\",\n \"return\": {\n \"description\": \"A file-like data object\",\n \"type\": \"Blob\"\n },\n \"example\": [\n \"\\n \\n\\n function preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n }\\n\\n function setup() {\\n noCanvas();\\n var soundBlob = mySound.getBlob();\\n\\n // Now we can send the blob to a server...\\n var serverUrl = 'https://jsonplaceholder.typicode.com/posts';\\n var httpRequestOptions = {\\n method: 'POST',\\n body: new FormData().append('soundBlob', soundBlob),\\n headers: new Headers({\\n 'Content-Type': 'multipart/form-data'\\n })\\n };\\n httpDo(serverUrl, httpRequestOptions);\\n\\n // We can also create an `ObjectURL` pointing to the Blob\\n var blobUrl = URL.createObjectURL(soundBlob);\\n\\n // The `` Element accepts Object URL's\\n var htmlAudioElt = createAudio(blobUrl).showControls();\\n\\n createDiv();\\n\\n // The ObjectURL exists as long as this tab is open\\n var input = createInput(blobUrl);\\n input.attribute('readonly', true);\\n input.mouseClicked(function() { input.elt.select() });\\n }\\n\\n\"\n ],\n \"class\": \"p5.SoundFile\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3257,\n \"description\": \"Connects to the p5sound instance (master output) by default.\\nOptionally, you can pass in a specific source (i.e. a soundfile).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"snd\",\n \"description\": \"set the sound source\\n (optional, defaults to\\n master output)\\n\",\n \"type\": \"SoundObject|undefined\",\n \"optional\": true\n },\n {\n \"name\": \"smoothing\",\n \"description\": \"a range between 0.0 and 1.0\\n to smooth amplitude readings\\n\",\n \"type\": \"Number|undefined\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nfunction preload(){\\n sound1 = loadSound('assets/beat.mp3');\\n sound2 = loadSound('assets/drum.mp3');\\n}\\nfunction setup(){\\n amplitude = new p5.Amplitude();\\n sound1.play();\\n sound2.play();\\n amplitude.setInput(sound2);\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\nfunction mouseClicked(){\\n sound1.stop();\\n sound2.stop();\\n}\\n\"\n ],\n \"class\": \"p5.Amplitude\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3364,\n \"description\": \"Returns a single Amplitude reading at the moment it is called.\\nFor continuous readings, run in the draw loop.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getLevel\",\n \"params\": [\n {\n \"name\": \"channel\",\n \"description\": \"Optionally return only channel 0 (left) or 1 (right)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Amplitude as a number between 0.0 and 1.0\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nfunction preload(){\\n sound = loadSound('assets/beat.mp3');\\n}\\nfunction setup() {\\n amplitude = new p5.Amplitude();\\n sound.play();\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\nfunction mouseClicked(){\\n sound.stop();\\n}\\n\"\n ],\n \"class\": \"p5.Amplitude\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3405,\n \"description\": \"Determines whether the results of Amplitude.process() will be\\nNormalized. To normalize, Amplitude finds the difference the\\nloudest reading it has processed and the maximum amplitude of\\n1.0. Amplitude adds this difference to all values to produce\\nresults that will reliably map between 0.0 and 1.0. However,\\nif a louder moment occurs, the amount that Normalize adds to\\nall the values will change. Accepts an optional boolean parameter\\n(true or false). Normalizing is off by default.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toggleNormalize\",\n \"params\": [\n {\n \"name\": \"boolean\",\n \"description\": \"set normalize to true (1) or false (0)\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Amplitude\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3425,\n \"description\": \"Smooth Amplitude analysis by averaging with the last analysis\\nframe. Off by default.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"smooth\",\n \"params\": [\n {\n \"name\": \"set\",\n \"description\": \"smoothing from 0.0 <= 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Amplitude\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3599,\n \"description\": \"Set the input source for the FFT analysis. If no source is\\nprovided, FFT will analyze all sound in the sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"source\",\n \"description\": \"p5.sound object (or web audio API source node)\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3618,\n \"description\": \"Returns an array of amplitude values (between -1.0 and +1.0) that represent\\na snapshot of amplitude readings in a single buffer. Length will be\\nequal to bins (defaults to 1024). Can be used to draw the waveform\\nof a sound.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"waveform\",\n \"params\": [\n {\n \"name\": \"bins\",\n \"description\": \"Must be a power of two between\\n 16 and 1024. Defaults to 1024.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"precision\",\n \"description\": \"If any value is provided, will return results\\n in a Float32 Array which is more precise\\n than a regular array.\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Array Array of amplitude values (-1 to 1)\\n over time. Array length = bins.\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3661,\n \"description\": \"Returns an array of amplitude values (between 0 and 255)\\nacross the frequency spectrum. Length is equal to FFT bins\\n(1024 by default). The array indices correspond to frequencies\\n(i.e. pitches), from the lowest to the highest that humans can\\nhear. Each value represents amplitude at that slice of the\\nfrequency spectrum. Must be called prior to using\\ngetEnergy().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"analyze\",\n \"params\": [\n {\n \"name\": \"bins\",\n \"description\": \"Must be a power of two between\\n 16 and 1024. Defaults to 1024.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"scale\",\n \"description\": \"If "dB," returns decibel\\n float measurements between\\n -140 and 0 (max).\\n Otherwise returns integers from 0-255.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"spectrum Array of energy (amplitude/volume)\\n values across the frequency spectrum.\\n Lowest energy (silence) = 0, highest\\n possible is 255.\",\n \"type\": \"Array\"\n },\n \"example\": [\n \"\\n\\nvar osc;\\nvar fft;\\n\\nfunction setup(){\\n createCanvas(100,100);\\n osc = new p5.Oscillator();\\n osc.amp(0);\\n osc.start();\\n fft = new p5.FFT();\\n}\\n\\nfunction draw(){\\n background(0);\\n\\n var freq = map(mouseX, 0, 800, 20, 15000);\\n freq = constrain(freq, 1, 20000);\\n osc.freq(freq);\\n\\n var spectrum = fft.analyze();\\n noStroke();\\n fill(0,255,0); // spectrum is green\\n for (var i = 0; i< spectrum.length; i++){\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width / spectrum.length, h );\\n }\\n\\n stroke(255);\\n text('Freq: ' + round(freq)+'Hz', 10, 10);\\n\\n isMouseOverCanvas();\\n}\\n\\n// only play sound when mouse is over canvas\\nfunction isMouseOverCanvas() {\\n var mX = mouseX, mY = mouseY;\\n if (mX > 0 && mX < width && mY < height && mY > 0) {\\n osc.amp(0.5, 0.2);\\n } else {\\n osc.amp(0, 0.2);\\n }\\n}\\n\\n\\n\"\n ],\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3753,\n \"description\": \"Returns the amount of energy (volume) at a specific\\n\\nfrequency, or the average amount of energy between two\\nfrequencies. Accepts Number(s) corresponding\\nto frequency (in Hz), or a String corresponding to predefined\\nfrequency ranges ("bass", "lowMid", "mid", "highMid", "treble").\\nReturns a range between 0 (no energy/volume at that frequency) and\\n255 (maximum energy).\\nNOTE: analyze() must be called prior to getEnergy(). Analyze()\\ntells the FFT to analyze frequency data, and getEnergy() uses\\nthe results determine the value at a specific frequency or\\nrange of frequencies.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getEnergy\",\n \"params\": [\n {\n \"name\": \"frequency1\",\n \"description\": \"Will return a value representing\\n energy at this frequency. Alternately,\\n the strings "bass", "lowMid" "mid",\\n "highMid", and "treble" will return\\n predefined frequency ranges.\\n\",\n \"type\": \"Number|String\"\n },\n {\n \"name\": \"frequency2\",\n \"description\": \"If a second frequency is given,\\n will return average amount of\\n energy that exists between the\\n two frequencies.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Energy Energy (volume/amplitude) from\\n 0 and 255.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3835,\n \"description\": \"Returns the\\n\\nspectral centroid of the input signal.\\nNOTE: analyze() must be called prior to getCentroid(). Analyze()\\ntells the FFT to analyze frequency data, and getCentroid() uses\\nthe results determine the spectral centroid.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getCentroid\",\n \"return\": {\n \"description\": \"Spectral Centroid Frequency Frequency of the spectral centroid in Hz.\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n\\n\\nfunction setup(){\\ncnv = createCanvas(100,100);\\nsound = new p5.AudioIn();\\nsound.start();\\nfft = new p5.FFT();\\nsound.connect(fft);\\n}\\n\\n\\nfunction draw(){\\n\\nvar centroidplot = 0.0;\\nvar spectralCentroid = 0;\\n\\n\\nbackground(0);\\nstroke(0,255,0);\\nvar spectrum = fft.analyze();\\nfill(0,255,0); // spectrum is green\\n\\n//draw the spectrum\\nfor (var i = 0; i< spectrum.length; i++){\\n var x = map(log(i), 0, log(spectrum.length), 0, width);\\n var h = map(spectrum[i], 0, 255, 0, height);\\n var rectangle_width = (log(i+1)-log(i))*(width/log(spectrum.length));\\n rect(x, height, rectangle_width, -h )\\n}\\n\\nvar nyquist = 22050;\\n\\n// get the centroid\\nspectralCentroid = fft.getCentroid();\\n\\n// the mean_freq_index calculation is for the display.\\nvar mean_freq_index = spectralCentroid/(nyquist/spectrum.length);\\n\\ncentroidplot = map(log(mean_freq_index), 0, log(spectrum.length), 0, width);\\n\\n\\nstroke(255,0,0); // the line showing where the centroid is will be red\\n\\nrect(centroidplot, 0, width / spectrum.length, height)\\nnoStroke();\\nfill(255,255,255); // text is white\\ntext(\\\"centroid: \\\", 10, 20);\\ntext(round(spectralCentroid)+\\\" Hz\\\", 10, 40);\\n}\\n \"\n ],\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3915,\n \"description\": \"Smooth FFT analysis by averaging with the last analysis frame.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"smooth\",\n \"params\": [\n {\n \"name\": \"smoothing\",\n \"description\": \"0.0 < smoothing < 1.0.\\n Defaults to 0.8.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3937,\n \"description\": \"Returns an array of average amplitude values for a given number\\nof frequency bands split equally. N defaults to 16.\\nNOTE: analyze() must be called prior to linAverages(). Analyze()\\ntells the FFT to analyze frequency data, and linAverages() uses\\nthe results to group them into a smaller set of averages.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"linAverages\",\n \"params\": [\n {\n \"name\": \"N\",\n \"description\": \"Number of returned frequency groups\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"linearAverages Array of average amplitude values for each group\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3967,\n \"description\": \"Returns an array of average amplitude values of the spectrum, for a given\\nset of \\nOctave Bands\\nNOTE: analyze() must be called prior to logAverages(). Analyze()\\ntells the FFT to analyze frequency data, and logAverages() uses\\nthe results to group them into a smaller set of averages.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"logAverages\",\n \"params\": [\n {\n \"name\": \"octaveBands\",\n \"description\": \"Array of Octave Bands objects for grouping\\n\",\n \"type\": \"Array\"\n }\n ],\n \"return\": {\n \"description\": \"logAverages Array of average amplitude values for each group\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 3997,\n \"description\": \"Calculates and Returns the 1/N\\nOctave Bands\\nN defaults to 3 and minimum central frequency to 15.625Hz.\\n(1/3 Octave Bands ~= 31 Frequency Bands)\\nSetting fCtr0 to a central value of a higher octave will ignore the lower bands\\nand produce less frequency groups.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getOctaveBands\",\n \"params\": [\n {\n \"name\": \"N\",\n \"description\": \"Specifies the 1/N type of generated octave bands\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"fCtr0\",\n \"description\": \"Minimum central frequency for the lowest band\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"octaveBands Array of octave band objects with their bounds\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4055,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4076,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4135,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4453,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4625,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4783,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4824,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 4881,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5049,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5097,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5128,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5149,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5169,\n \"class\": \"p5.FFT\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5268,\n \"description\": \"Fade to value, for smooth transitions\\n\",\n \"itemtype\": \"method\",\n \"name\": \"fade\",\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"Value to set this signal\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"Length of fade, in seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Signal\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5279,\n \"description\": \"Connect a p5.sound object or Web Audio node to this\\np5.Signal so that its amplitude values can be scaled.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"input\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Signal\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5293,\n \"description\": \"Add a constant value to this audio signal,\\nand return the resulting audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalAdd.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"add\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"object\",\n \"type\": \"p5.Signal\"\n },\n \"class\": \"p5.Signal\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5312,\n \"description\": \"Multiply this signal by a constant value,\\nand return the resulting audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalMult.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mult\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"to multiply\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"object\",\n \"type\": \"p5.Signal\"\n },\n \"class\": \"p5.Signal\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5331,\n \"description\": \"Scale this signal value to a given range,\\nand return the result as an audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalScale.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"scale\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"to multiply\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"inMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"inMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"object\",\n \"type\": \"p5.Signal\"\n },\n \"class\": \"p5.Signal\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5465,\n \"description\": \"Start an oscillator. Accepts an optional parameter to\\ndetermine how long (in seconds from now) until the\\noscillator starts.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"start\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"startTime in seconds from now.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"frequency\",\n \"description\": \"frequency in Hz.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5505,\n \"description\": \"Stop an oscillator. Accepts an optional parameter\\nto determine how long (in seconds from now) until the\\noscillator stops.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"params\": [\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"Time, in seconds from now.\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5521,\n \"description\": \"Set the amplitude between 0 and 1.0. Or, pass in an object\\nsuch as an oscillator to modulate amplitude with an audio signal.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"vol\",\n \"description\": \"between 0 and 1.0\\n or a modulating signal/oscillator\\n\",\n \"type\": \"Number|Object\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"create a fade that lasts rampTime\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"gain If no value is provided,\\n returns the Web Audio API\\n AudioParam that controls\\n this oscillator's\\n gain/amplitude/volume)\",\n \"type\": \"AudioParam\"\n },\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5556,\n \"description\": \"Set frequency of an oscillator to a value. Or, pass in an object\\nsuch as an oscillator to modulate the frequency with an audio signal.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"freq\",\n \"params\": [\n {\n \"name\": \"Frequency\",\n \"description\": \"Frequency in Hz\\n or modulating signal/oscillator\\n\",\n \"type\": \"Number|Object\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Ramp time (in seconds)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"Schedule this event to happen\\n at x seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Frequency If no value is provided,\\n returns the Web Audio API\\n AudioParam that controls\\n this oscillator's frequency\",\n \"type\": \"AudioParam\"\n },\n \"example\": [\n \"\\n\\nvar osc = new p5.Oscillator(300);\\nosc.start();\\nosc.freq(40, 10);\\n\"\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5615,\n \"description\": \"Set type to 'sine', 'triangle', 'sawtooth' or 'square'.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setType\",\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"'sine', 'triangle', 'sawtooth' or 'square'.\\n\",\n \"type\": \"String\"\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5627,\n \"description\": \"Connect to a p5.sound / Web Audio object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"A p5.sound or Web Audio object\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5644,\n \"description\": \"Disconnect all outputs\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5661,\n \"description\": \"Pan between Left (-1) and Right (1)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pan\",\n \"params\": [\n {\n \"name\": \"panning\",\n \"description\": \"Number between -1 and 1\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5693,\n \"description\": \"Set the phase of an oscillator between 0.0 and 1.0.\\nIn this implementation, phase is a delay time\\nbased on the oscillator's current frequency.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"phase\",\n \"params\": [\n {\n \"name\": \"phase\",\n \"description\": \"float between 0.0 and 1.0\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5747,\n \"description\": \"Add a value to the p5.Oscillator's output amplitude,\\nand return the oscillator. Calling this method again\\nwill override the initial add() with a new value.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"add\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"Constant number to add\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Oscillator Returns this oscillator\\n with scaled output\",\n \"type\": \"p5.Oscillator\"\n },\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5764,\n \"description\": \"Multiply the p5.Oscillator's output amplitude\\nby a fixed value (i.e. turn it up!). Calling this method\\nagain will override the initial mult() with a new value.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mult\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"Constant number to multiply\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Oscillator Returns this oscillator\\n with multiplied output\",\n \"type\": \"p5.Oscillator\"\n },\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5780,\n \"description\": \"Scale this oscillator's amplitude values to a given\\nrange, and return the oscillator. Calling this method\\nagain will override the initial scale() with new values.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"scale\",\n \"params\": [\n {\n \"name\": \"inMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"inMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Oscillator Returns this oscillator\\n with scaled output\",\n \"type\": \"p5.Oscillator\"\n },\n \"class\": \"p5.Oscillator\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 5879,\n \"class\": \"p5.SqrOsc\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6082,\n \"class\": \"p5.SqrOsc\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6369,\n \"description\": \"Time until envelope reaches attackLevel\\n\",\n \"itemtype\": \"property\",\n \"name\": \"attackTime\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6374,\n \"description\": \"Level once attack is complete.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"attackLevel\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6379,\n \"description\": \"Time until envelope reaches decayLevel.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"decayTime\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6384,\n \"description\": \"Level after decay. The envelope will sustain here until it is released.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"decayLevel\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6389,\n \"description\": \"Duration of the release portion of the envelope.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"releaseTime\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6394,\n \"description\": \"Level at the end of the release.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"releaseLevel\",\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6430,\n \"description\": \"Reset the envelope with a series of time/value pairs.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"attackTime\",\n \"description\": \"Time (in seconds) before level\\n reaches attackLevel\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"attackLevel\",\n \"description\": \"Typically an amplitude between\\n 0.0 and 1.0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"decayTime\",\n \"description\": \"Time\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"decayLevel\",\n \"description\": \"Amplitude (In a standard ADSR envelope,\\n decayLevel = sustainLevel)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"releaseTime\",\n \"description\": \"Release Time (in seconds)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"releaseLevel\",\n \"description\": \"Amplitude\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar t1 = 0.1; // attack time in seconds\\nvar l1 = 0.7; // attack level 0.0 to 1.0\\nvar t2 = 0.3; // decay time in seconds\\nvar l2 = 0.1; // decay level 0.0 to 1.0\\nvar t3 = 0.2; // sustain time in seconds\\nvar l3 = 0.5; // sustain level 0.0 to 1.0\\n// release level defaults to zero\\n\\nvar env;\\nvar triOsc;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope(t1, l1, t2, l2, t3, l3);\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env); // give the env control of the triOsc's amp\\n triOsc.start();\\n}\\n\\n// mouseClick triggers envelope if over canvas\\nfunction mouseClicked() {\\n // is mouse over canvas?\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n env.play(triOsc);\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6489,\n \"description\": \"Set values like a traditional\\n\\nADSR envelope\\n.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setADSR\",\n \"params\": [\n {\n \"name\": \"attackTime\",\n \"description\": \"Time (in seconds before envelope\\n reaches Attack Level\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"decayTime\",\n \"description\": \"Time (in seconds) before envelope\\n reaches Decay/Sustain Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"susRatio\",\n \"description\": \"Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\\n where 1.0 = attackLevel, 0.0 = releaseLevel.\\n The susRatio determines the decayLevel and the level at which the\\n sustain portion of the envelope will sustain.\\n For example, if attackLevel is 0.4, releaseLevel is 0,\\n and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\\n increased to 1.0 (using setRange),\\n then decayLevel would increase proportionally, to become 0.5.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"releaseTime\",\n \"description\": \"Time in seconds from now (defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n env.play();\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6554,\n \"description\": \"Set max (attackLevel) and min (releaseLevel) of envelope.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setRange\",\n \"params\": [\n {\n \"name\": \"aLevel\",\n \"description\": \"attack level (defaults to 1)\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rLevel\",\n \"description\": \"release level (defaults to 0)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n env.play();\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6633,\n \"description\": \"Assign a parameter to be controlled by this envelope.\\nIf a p5.Sound object is given, then the p5.Envelope will control its\\noutput gain. If multiple inputs are provided, the env will\\ncontrol all of them.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"inputs\",\n \"description\": \"A p5.sound object or\\n Web Audio Param.\\n\",\n \"type\": \"Object\",\n \"optional\": true,\n \"multiple\": true\n }\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6648,\n \"description\": \"Set whether the envelope ramp is linear (default) or exponential.\\nExponential ramps can be useful because we perceive amplitude\\nand frequency logarithmically.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setExp\",\n \"params\": [\n {\n \"name\": \"isExp\",\n \"description\": \"true is exponential, false is linear\\n\",\n \"type\": \"Boolean\"\n }\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6666,\n \"description\": \"Play tells the envelope to start acting on a given input.\\nIf the input is a p5.sound object (i.e. AudioIn, Oscillator,\\nSoundFile), then Envelope will control its output volume.\\nEnvelopes can also be used to control any \\nWeb Audio Audio Param.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"A p5.sound object or\\n Web Audio Param.\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"startTime\",\n \"description\": \"time from now (in seconds) at which to play\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"sustainTime\",\n \"description\": \"time to sustain before releasing the envelope\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n // trigger env on triOsc, 0 seconds from now\\n // After decay, sustain for 0.2 seconds before release\\n env.play(triOsc, 0, 0.2);\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6727,\n \"description\": \"Trigger the Attack, and Decay portion of the Envelope.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go. Input can be\\nany p5.sound object, or a \\nWeb Audio Param.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"triggerAttack\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"p5.sound Object or Web Audio Param\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time from now (in seconds)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.3;\\nvar susPercent = 0.4;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(envAttack);\\n}\\n\\nfunction envAttack() {\\n console.log('trigger attack');\\n env.triggerAttack();\\n\\n background(0,255,0);\\n text('attack!', width/2, height/2);\\n}\\n\\nfunction mouseReleased() {\\n env.triggerRelease();\\n\\n background(200);\\n text('click to play', width/2, height/2);\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6834,\n \"description\": \"Trigger the Release of the Envelope. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"triggerRelease\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"p5.sound Object or Web Audio Param\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time to trigger the release\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.3;\\nvar susPercent = 0.4;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(envAttack);\\n}\\n\\nfunction envAttack() {\\n console.log('trigger attack');\\n env.triggerAttack();\\n\\n background(0,255,0);\\n text('attack!', width/2, height/2);\\n}\\n\\nfunction mouseReleased() {\\n env.triggerRelease();\\n\\n background(200);\\n text('click to play', width/2, height/2);\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 6931,\n \"description\": \"Exponentially ramp to a value using the first two\\nvalues from setADSR(attackTime, decayTime)\\nas \\ntime constants for simple exponential ramps.\\nIf the value is higher than current value, it uses attackTime,\\nwhile a decrease uses decayTime.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ramp\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"p5.sound Object or Web Audio Param\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"When to trigger the ramp\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v\",\n \"description\": \"Target value\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"v2\",\n \"description\": \"Second target value (optional)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar env, osc, amp, cnv;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar attackLevel = 1;\\nvar decayLevel = 0;\\n\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n fill(0,255,0);\\n noStroke();\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime);\\n\\n osc = new p5.Oscillator();\\n osc.amp(env);\\n osc.start();\\n\\n amp = new p5.Amplitude();\\n\\n cnv.mousePressed(triggerRamp);\\n}\\n\\nfunction triggerRamp() {\\n env.ramp(osc, 0, attackLevel, decayLevel);\\n}\\n\\nfunction draw() {\\n background(20,20,20);\\n text('click me', 10, 20);\\n var h = map(amp.getLevel(), 0, 0.4, 0, height);;\\n\\n rect(0, height, width, -h);\\n}\\n\"\n ],\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7038,\n \"description\": \"Add a value to the p5.Oscillator's output amplitude,\\nand return the oscillator. Calling this method\\nagain will override the initial add() with new values.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"add\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"Constant number to add\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Envelope Returns this envelope\\n with scaled output\",\n \"type\": \"p5.Envelope\"\n },\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7054,\n \"description\": \"Multiply the p5.Envelope's output amplitude\\nby a fixed value. Calling this method\\nagain will override the initial mult() with new values.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"mult\",\n \"params\": [\n {\n \"name\": \"number\",\n \"description\": \"Constant number to multiply\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Envelope Returns this envelope\\n with scaled output\",\n \"type\": \"p5.Envelope\"\n },\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7070,\n \"description\": \"Scale this envelope's amplitude values to a given\\nrange, and return the envelope. Calling this method\\nagain will override the initial scale() with new values.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"scale\",\n \"params\": [\n {\n \"name\": \"inMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"inMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMin\",\n \"description\": \"input range minumum\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"outMax\",\n \"description\": \"input range maximum\\n\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Envelope Returns this envelope\\n with scaled output\",\n \"type\": \"p5.Envelope\"\n },\n \"class\": \"p5.Envelope\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7178,\n \"description\": \"Set the width of a Pulse object (an oscillator that implements\\nPulse Width Modulation).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"width\",\n \"params\": [\n {\n \"name\": \"width\",\n \"description\": \"Width between the pulses (0 to 1.0,\\n defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Pulse\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7365,\n \"description\": \"Set type of noise to 'white', 'pink' or 'brown'.\\nWhite is the default.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setType\",\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"'white', 'pink' or 'brown'\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Noise\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7478,\n \"itemtype\": \"property\",\n \"name\": \"input\",\n \"type\": \"GainNode\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7482,\n \"itemtype\": \"property\",\n \"name\": \"output\",\n \"type\": \"GainNode\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7486,\n \"itemtype\": \"property\",\n \"name\": \"stream\",\n \"type\": \"MediaStream|null\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7490,\n \"itemtype\": \"property\",\n \"name\": \"mediaStream\",\n \"type\": \"MediaStreamAudioSourceNode|null\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7494,\n \"itemtype\": \"property\",\n \"name\": \"currentSource\",\n \"type\": \"Number|null\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7498,\n \"description\": \"Client must allow browser to access their microphone / audioin source.\\nDefault: false. Will become true when the client enables acces.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"enabled\",\n \"type\": \"Boolean\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7505,\n \"description\": \"Input amplitude, connect to it by default but not to master out\\n\",\n \"itemtype\": \"property\",\n \"name\": \"amplitude\",\n \"type\": \"p5.Amplitude\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7518,\n \"description\": \"Start processing audio input. This enables the use of other\\nAudioIn methods like getLevel(). Note that by default, AudioIn\\nis not connected to p5.sound's output. So you won't hear\\nanything unless you use the connect() method.\\nCertain browsers limit access to the user's microphone. For example,\\nChrome only allows access from localhost and over https. For this reason,\\nyou may want to include an errorCallback—a function that is called in case\\nthe browser won't provide mic access.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"start\",\n \"params\": [\n {\n \"name\": \"successCallback\",\n \"description\": \"Name of a function to call on\\n success.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"Name of a function to call if\\n there was an error. For example,\\n some browsers do not support\\n getUserMedia.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7571,\n \"description\": \"Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel().\\nIf re-starting, the user may be prompted for permission access.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7587,\n \"description\": \"Connect to an audio unit. If no parameter is provided, will\\nconnect to the master output (i.e. your speakers).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"An object that accepts audio input,\\n such as an FFT\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7608,\n \"description\": \"Disconnect the AudioIn from all audio units. For example, if\\nconnect() had been called, disconnect() will stop sending\\nsignal to your speakers.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7622,\n \"description\": \"Read the Amplitude (volume level) of an AudioIn. The AudioIn\\nclass contains its own instance of the Amplitude class to help\\nmake it easy to get a microphone's volume level. Accepts an\\noptional smoothing value (0.0 < 1.0). NOTE: AudioIn must\\n.start() before using .getLevel().\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getLevel\",\n \"params\": [\n {\n \"name\": \"smoothing\",\n \"description\": \"Smoothing is 0.0 by default.\\n Smooths values based on previous values.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Volume level (between 0.0 and 1.0)\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7640,\n \"description\": \"Set amplitude (volume) of a mic input between 0 and 1.0. \\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"vol\",\n \"description\": \"between 0 and 1.0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"time\",\n \"description\": \"ramp time (optional)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7659,\n \"description\": \"Returns a list of available input sources. This is a wrapper\\nfor <a title="MediaDevices.enumerateDevices() - Web APIs | MDN" target="_blank" href=\\n "https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices"\\n\\nand it returns a Promise.\\n\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getSources\",\n \"params\": [\n {\n \"name\": \"successCallback\",\n \"description\": \"This callback function handles the sources when they\\n have been enumerated. The callback function\\n receives the deviceList array as its only argument\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"This optional callback receives the error\\n message as its argument.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"Returns a Promise that can be used in place of the callbacks, similar\\n to the enumerateDevices() method\",\n \"type\": \"Promise\"\n },\n \"example\": [\n \"\\n \\n var audiograb;\\n\\n function setup(){\\n //new audioIn\\n audioGrab = new p5.AudioIn();\\n\\n audioGrab.getSources(function(deviceList) {\\n //print out the array of available sources\\n console.log(deviceList);\\n //set the source to the first item in the deviceList array\\n audioGrab.setSource(0);\\n });\\n }\\n \"\n ],\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7710,\n \"description\": \"Set the input source. Accepts a number representing a\\nposition in the array returned by getSources().\\nThis is only available in browsers that support\\n<a title="MediaDevices.enumerateDevices() - Web APIs | MDN" target="_blank" href=\\n"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices"\\n\\nnavigator.mediaDevices.enumerateDevices().\\n\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setSource\",\n \"params\": [\n {\n \"name\": \"num\",\n \"description\": \"position of input source in the array\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7750,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7766,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7790,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7816,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7838,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7860,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7906,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7937,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 7955,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8292,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8314,\n \"class\": \"p5.AudioIn\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8390,\n \"description\": \"In classes that extend\\np5.Effect, connect effect nodes\\nto the wet parameter\\n\",\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8403,\n \"description\": \"Set the output volume of the filter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"vol\",\n \"description\": \"amplitude between 0 and 1.0\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"create a fade that lasts until rampTime\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"tFromNow\",\n \"description\": \"schedule this event to happen in tFromNow seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8420,\n \"description\": \"Link effects together in a chainExample usage: filter.chain(reverb, delay, panner);\\nMay be used with an open-ended number of arguments\\n\",\n \"itemtype\": \"method\",\n \"name\": \"chain\",\n \"params\": [\n {\n \"name\": \"arguments\",\n \"description\": \"Chain together multiple sound objects\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8437,\n \"description\": \"Adjust the dry/wet value.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"drywet\",\n \"params\": [\n {\n \"name\": \"fade\",\n \"description\": \"The desired drywet value (0 - 1.0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8449,\n \"description\": \"Send output to a p5.js-sound, Web Audio Node, or use signal to\\ncontrol an AudioParam\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8460,\n \"description\": \"Disconnect all output.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.Effect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8578,\n \"description\": \"The p5.Filter is built with a\\n\\nWeb Audio BiquadFilter Node.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"biquadFilter\",\n \"type\": \"DelayNode\",\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8596,\n \"description\": \"Filter an audio signal according to a set\\nof filter parameters.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"Signal\",\n \"description\": \"An object that outputs audio\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"freq\",\n \"description\": \"Frequency in Hz, from 10 to 22050\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"res\",\n \"description\": \"Resonance/Width of the filter frequency\\n from 0.001 to 1000\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8610,\n \"description\": \"Set the frequency and the resonance of the filter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Frequency in Hz, from 10 to 22050\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"res\",\n \"description\": \"Resonance (Q) from 0.001 to 1000\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8627,\n \"description\": \"Set the filter frequency, in Hz, from 10 to 22050 (the range of\\nhuman hearing, although in reality most people hear in a narrower\\nrange).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"freq\",\n \"params\": [\n {\n \"name\": \"freq\",\n \"description\": \"Filter Frequency\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"value Returns the current frequency value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8651,\n \"description\": \"Controls either width of a bandpass frequency,\\nor the resonance of a low/highpass cutoff frequency.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"res\",\n \"params\": [\n {\n \"name\": \"res\",\n \"description\": \"Resonance/Width of filter freq\\n from 0.001 to 1000\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"value Returns the current res value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8673,\n \"description\": \"Controls the gain attribute of a Biquad Filter.\\nThis is distinctly different from .amp() which is inherited from p5.Effect\\n.amp() controls the volume via the output gain node\\np5.Filter.gain() controls the gain parameter of a Biquad Filter node.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"gain\",\n \"params\": [\n {\n \"name\": \"gain\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Returns the current or updated gain value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8694,\n \"description\": \"Toggle function. Switches between the specified type and allpass\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toggle\",\n \"return\": {\n \"description\": \"[Toggle value]\",\n \"type\": \"Boolean\"\n },\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8709,\n \"description\": \"Set the type of a p5.Filter. Possible types include:\\n"lowpass" (default), "highpass", "bandpass",\\n"lowshelf", "highshelf", "peaking", "notch",\\n"allpass".\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setType\",\n \"params\": [\n {\n \"name\": \"t\",\n \"description\": \"\",\n \"type\": \"String\"\n }\n ],\n \"class\": \"p5.Filter\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8916,\n \"description\": \"The p5.EQ is built with abstracted p5.Filter objects.\\nTo modify any bands, use methods of the \\np5.Filter API, especially gain and freq.\\nBands are stored in an array, with indices 0 - 3, or 0 - 7\\n\",\n \"itemtype\": \"property\",\n \"name\": \"bands\",\n \"type\": \"Array\",\n \"class\": \"p5.EQ\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 8951,\n \"description\": \"Process an input by connecting it to the EQ\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"Audio source\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.EQ\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9039,\n \"description\": \"\\nWeb Audio Spatial Panner Node\\nProperties include\\n\\n<a title="w3 spec for Panning Model"\\nhref="https://www.w3.org/TR/webaudio/#idl-def-PanningModelType"\\npanningModel: "equal power" or "HRTF"\\n\\n\\n<a title="w3 spec for Distance Model"\\nhref="https://www.w3.org/TR/webaudio/#idl-def-DistanceModelType"\\ndistanceModel: "linear", "inverse", or "exponential"\\n\\n\\n\\n\",\n \"itemtype\": \"property\",\n \"name\": \"panner\",\n \"type\": \"AudioNode\",\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9062,\n \"description\": \"Connect an audio sorce\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"Input source\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9071,\n \"description\": \"Set the X,Y,Z position of the Panner\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"xVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"yVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"zVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"time\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Updated x, y, z values as an array\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9090,\n \"description\": \"Getter and setter methods for position coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"positionX\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9095,\n \"description\": \"Getter and setter methods for position coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"positionY\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9100,\n \"description\": \"Getter and setter methods for position coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"positionZ\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9138,\n \"description\": \"Set the X,Y,Z position of the Panner\\n\",\n \"itemtype\": \"method\",\n \"name\": \"orient\",\n \"params\": [\n {\n \"name\": \"xVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"yVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"zVal\",\n \"description\": \"\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"time\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"Updated x, y, z values as an array\",\n \"type\": \"Array\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9157,\n \"description\": \"Getter and setter methods for orient coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"orientX\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9162,\n \"description\": \"Getter and setter methods for orient coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"orientY\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9167,\n \"description\": \"Getter and setter methods for orient coordinates\\n\",\n \"itemtype\": \"method\",\n \"name\": \"orientZ\",\n \"return\": {\n \"description\": \"updated coordinate value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9205,\n \"description\": \"Set the rolloff factor and max distance\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setFalloff\",\n \"params\": [\n {\n \"name\": \"maxDistance\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"rolloffFactor\",\n \"description\": \"\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9215,\n \"description\": \"Maxium distance between the source and the listener\\n\",\n \"itemtype\": \"method\",\n \"name\": \"maxDist\",\n \"params\": [\n {\n \"name\": \"maxDistance\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"updated value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9227,\n \"description\": \"How quickly the volume is reduced as the source moves away from the listener\\n\",\n \"itemtype\": \"method\",\n \"name\": \"rollof\",\n \"params\": [\n {\n \"name\": \"rolloffFactor\",\n \"description\": \"\",\n \"type\": \"Number\"\n }\n ],\n \"return\": {\n \"description\": \"updated value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Panner3D\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9532,\n \"description\": \"The p5.Delay is built with two\\n\\nWeb Audio Delay Nodes, one for each stereo channel.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"leftDelay\",\n \"type\": \"DelayNode\",\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9540,\n \"description\": \"The p5.Delay is built with two\\n\\nWeb Audio Delay Nodes, one for each stereo channel.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"rightDelay\",\n \"type\": \"DelayNode\",\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9572,\n \"description\": \"Add delay to an audio signal according to a set\\nof delay parameters.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"Signal\",\n \"description\": \"An object that outputs audio\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"delayTime\",\n \"description\": \"Time (in seconds) of the delay/echo.\\n Some browsers limit delayTime to\\n 1 second.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"feedback\",\n \"description\": \"sends the delay back through itself\\n in a loop that decreases in volume\\n each time.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"lowPass\",\n \"description\": \"Cutoff frequency. Only frequencies\\n below the lowPass will be part of the\\n delay.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9607,\n \"description\": \"Set the delay (echo) time, in seconds. Usually this value will be\\na floating point number between 0.0 and 1.0.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"delayTime\",\n \"params\": [\n {\n \"name\": \"delayTime\",\n \"description\": \"Time (in seconds) of the delay\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9626,\n \"description\": \"Feedback occurs when Delay sends its signal back through its input\\nin a loop. The feedback amount determines how much signal to send each\\ntime through the loop. A feedback greater than 1.0 is not desirable because\\nit will increase the overall output each time through the loop,\\ncreating an infinite feedback loop. The default value is 0.5\\n\",\n \"itemtype\": \"method\",\n \"name\": \"feedback\",\n \"params\": [\n {\n \"name\": \"feedback\",\n \"description\": \"0.0 to 1.0, or an object such as an\\n Oscillator that can be used to\\n modulate this param\\n\",\n \"type\": \"Number|Object\"\n }\n ],\n \"return\": {\n \"description\": \"Feedback value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9654,\n \"description\": \"Set a lowpass filter frequency for the delay. A lowpass filter\\nwill cut off any frequencies higher than the filter frequency.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"filter\",\n \"params\": [\n {\n \"name\": \"cutoffFreq\",\n \"description\": \"A lowpass filter will cut off any\\n frequencies higher than the filter frequency.\\n\",\n \"type\": \"Number|Object\"\n },\n {\n \"name\": \"res\",\n \"description\": \"Resonance of the filter frequency\\n cutoff, or an object (i.e. a p5.Oscillator)\\n that can be used to modulate this parameter.\\n High numbers (i.e. 15) will produce a resonance,\\n low numbers (i.e. .2) will produce a slope.\\n\",\n \"type\": \"Number|Object\"\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9671,\n \"description\": \"Choose a preset type of delay. 'pingPong' bounces the signal\\nfrom the left to the right channel to produce a stereo effect.\\nAny other parameter will revert to the default delay setting.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setType\",\n \"params\": [\n {\n \"name\": \"type\",\n \"description\": \"'pingPong' (1) or 'default' (0)\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9704,\n \"description\": \"Set the output level of the delay effect.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"volume\",\n \"description\": \"amplitude between 0 and 1.0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"create a fade that lasts rampTime\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9713,\n \"description\": \"Send output to a p5.sound or web audio object\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9719,\n \"description\": \"Disconnect all output.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.Delay\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9812,\n \"description\": \"Connect a source to the reverb, and assign reverb parameters.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"p5.sound / Web Audio object with a sound\\n output.\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"seconds\",\n \"description\": \"Duration of the reverb, in seconds.\\n Min: 0, Max: 10. Defaults to 3.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"decayRate\",\n \"description\": \"Percentage of decay with each echo.\\n Min: 0, Max: 100. Defaults to 2.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"reverse\",\n \"description\": \"Play the reverb backwards or forwards.\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Reverb\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9841,\n \"description\": \"Set the reverb settings. Similar to .process(), but without\\nassigning a new input.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"seconds\",\n \"description\": \"Duration of the reverb, in seconds.\\n Min: 0, Max: 10. Defaults to 3.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"decayRate\",\n \"description\": \"Percentage of decay with each echo.\\n Min: 0, Max: 100. Defaults to 2.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"reverse\",\n \"description\": \"Play the reverb backwards or forwards.\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Reverb\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9869,\n \"description\": \"Set the output level of the reverb effect.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"volume\",\n \"description\": \"amplitude between 0 and 1.0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"create a fade that lasts rampTime\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Reverb\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9878,\n \"description\": \"Send output to a p5.sound or web audio object\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Reverb\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9884,\n \"description\": \"Disconnect all output.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.Reverb\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9975,\n \"description\": \"Internally, the p5.Convolver uses the a\\n\\nWeb Audio Convolver Node.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"convolverNode\",\n \"type\": \"ConvolverNode\",\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 9998,\n \"description\": \"Create a p5.Convolver. Accepts a path to a soundfile\\nthat will be used to generate an impulse response.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createConvolver\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to a sound file\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function to call if loading is successful.\\n The object will be passed in as the argument\\n to the callback function.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function to call if loading is not successful.\\n A custom error will be passed in as the argument\\n to the callback function.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"\",\n \"type\": \"p5.Convolver\"\n },\n \"example\": [\n \"\\n\\nvar cVerb, sound;\\nfunction preload() {\\n // We have both MP3 and OGG versions of all sound assets\\n soundFormats('ogg', 'mp3');\\n\\n // Try replacing 'bx-spring' with other soundfiles like\\n // 'concrete-tunnel' 'small-plate' 'drum' 'beatbox'\\n cVerb = createConvolver('assets/bx-spring.mp3');\\n\\n // Try replacing 'Damscray_DancingTiger' with\\n // 'beat', 'doorbell', lucky_dragons_-_power_melody'\\n sound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n // disconnect from master output...\\n sound.disconnect();\\n\\n // ...and process with cVerb\\n // so that we only hear the convolution\\n cVerb.process(sound);\\n\\n sound.play();\\n}\\n\"\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10122,\n \"description\": \"Connect a source to the reverb, and assign reverb parameters.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"p5.sound / Web Audio object with a sound\\n output.\\n\",\n \"type\": \"Object\"\n }\n ],\n \"example\": [\n \"\\n\\nvar cVerb, sound;\\nfunction preload() {\\n soundFormats('ogg', 'mp3');\\n\\n cVerb = createConvolver('assets/concrete-tunnel.mp3');\\n\\n sound = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n // disconnect from master output...\\n sound.disconnect();\\n\\n // ...and process with (i.e. connect to) cVerb\\n // so that we only hear the convolution\\n cVerb.process(sound);\\n\\n sound.play();\\n}\\n\"\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10154,\n \"description\": \"If you load multiple impulse files using the .addImpulse method,\\nthey will be stored as Objects in this Array. Toggle between them\\nwith the toggleImpulse(id) method.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"impulses\",\n \"type\": \"Array\",\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10162,\n \"description\": \"Load and assign a new Impulse Response to the p5.Convolver.\\nThe impulse is added to the .impulses array. Previous\\nimpulses can be accessed with the .toggleImpulse(id)\\nmethod.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addImpulse\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to a sound file\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function (optional)\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function (optional)\\n\",\n \"type\": \"Function\"\n }\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10180,\n \"description\": \"Similar to .addImpulse, except that the .impulses\\nArray is reset to save memory. A new .impulses\\narray is created with this impulse as the only item.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"resetImpulse\",\n \"params\": [\n {\n \"name\": \"path\",\n \"description\": \"path to a sound file\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"function (optional)\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"errorCallback\",\n \"description\": \"function (optional)\\n\",\n \"type\": \"Function\"\n }\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10198,\n \"description\": \"If you have used .addImpulse() to add multiple impulses\\nto a p5.Convolver, then you can use this method to toggle between\\nthe items in the .impulses Array. Accepts a parameter\\nto identify which impulse you wish to use, identified either by its\\noriginal filename (String) or by its position in the .impulses\\n Array (Number).\\nYou can access the objects in the .impulses Array directly. Each\\nObject has two attributes: an .audioBuffer (type:\\nWeb Audio \\nAudioBuffer) and a .name, a String that corresponds\\nwith the original filename.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toggleImpulse\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"Identify the impulse by its original filename\\n (String), or by its position in the\\n .impulses Array (Number).\\n\",\n \"type\": \"String|Number\"\n }\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10240,\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10265,\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10460,\n \"description\": \"Set the global tempo, in beats per minute, for all\\np5.Parts. This method will impact all active p5.Parts.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setBPM\",\n \"params\": [\n {\n \"name\": \"BPM\",\n \"description\": \"Beats Per Minute\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Seconds from now\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Convolver\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10550,\n \"description\": \"Array of values to pass into the callback\\nat each step of the phrase. Depending on the callback\\nfunction's requirements, these values may be numbers,\\nstrings, or an object with multiple parameters.\\nZero (0) indicates a rest.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"sequence\",\n \"type\": \"Array\",\n \"class\": \"p5.Phrase\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10638,\n \"description\": \"Set the tempo of this part, in Beats Per Minute.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setBPM\",\n \"params\": [\n {\n \"name\": \"BPM\",\n \"description\": \"Beats Per Minute\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10648,\n \"description\": \"Returns the tempo, in Beats Per Minute, of this part.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getBPM\",\n \"return\": {\n \"description\": \"\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10657,\n \"description\": \"Start playback of this part. It will play\\nthrough all of its phrases at a speed\\ndetermined by setBPM.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"start\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10673,\n \"description\": \"Loop playback of this part. It will begin\\nlooping through all of its phrases at a speed\\ndetermined by setBPM.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10690,\n \"description\": \"Tell the part to stop looping.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noLoop\",\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10702,\n \"description\": \"Stop the part and cue it to step 0. Playback will resume from the begining of the Part when it is played again.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10712,\n \"description\": \"Pause the part. Playback will resume\\nfrom the current step.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"seconds from now\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10724,\n \"description\": \"Add a p5.Phrase to this Part.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addPhrase\",\n \"params\": [\n {\n \"name\": \"phrase\",\n \"description\": \"reference to a p5.Phrase\\n\",\n \"type\": \"p5.Phrase\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10745,\n \"description\": \"Remove a phrase from this part, based on the name it was\\ngiven when it was created.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removePhrase\",\n \"params\": [\n {\n \"name\": \"phraseName\",\n \"description\": \"\",\n \"type\": \"String\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10759,\n \"description\": \"Get a phrase from this part, based on the name it was\\ngiven when it was created. Now you can modify its array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getPhrase\",\n \"params\": [\n {\n \"name\": \"phraseName\",\n \"description\": \"\",\n \"type\": \"String\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10773,\n \"description\": \"Find all sequences with the specified name, and replace their patterns with the specified array.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"replaceSequence\",\n \"params\": [\n {\n \"name\": \"phraseName\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"sequence\",\n \"description\": \"Array of values to pass into the callback\\n at each step of the phrase.\\n\",\n \"type\": \"Array\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10800,\n \"description\": \"Set the function that will be called at every step. This will clear the previous function.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"onStep\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"The name of the callback\\n you want to fire\\n on every beat/tatum.\\n\",\n \"type\": \"Function\"\n }\n ],\n \"class\": \"p5.Part\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10853,\n \"description\": \"Start playback of the score.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"start\",\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10862,\n \"description\": \"Stop playback of the score.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10872,\n \"description\": \"Pause playback of the score.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10880,\n \"description\": \"Loop playback of the score.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10889,\n \"description\": \"Stop looping playback of the score. If it\\nis currently playing, this will go into effect\\nafter the current round of playback completes.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noLoop\",\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10914,\n \"description\": \"Set the tempo for all parts in the score\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setBPM\",\n \"params\": [\n {\n \"name\": \"BPM\",\n \"description\": \"Beats Per Minute\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Seconds from now\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Score\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10982,\n \"description\": \"musicalTimeMode uses Tone.Time convention\\ntrue if string, false if number\\n\",\n \"itemtype\": \"property\",\n \"name\": \"musicalTimeMode\",\n \"type\": \"Boolean\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10989,\n \"description\": \"musicalTimeMode variables\\nmodify these only when the interval is specified in musicalTime format as a string\\n\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 10996,\n \"description\": \"Set a limit to the number of loops to play. defaults to Infinity\\n\",\n \"itemtype\": \"property\",\n \"name\": \"maxIterations\",\n \"type\": \"Number\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11005,\n \"description\": \"Do not initiate the callback if timeFromNow is < 0\\nThis ususually occurs for a few milliseconds when the page\\nis not fully loaded\\nThe callback should only be called until maxIterations is reached\\n\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11019,\n \"description\": \"Start the loop\\n\",\n \"itemtype\": \"method\",\n \"name\": \"start\",\n \"params\": [\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule a starting time\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11032,\n \"description\": \"Stop the loop\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"params\": [\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule a stopping time\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11045,\n \"description\": \"Pause the loop\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"params\": [\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule a pausing time\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11058,\n \"description\": \"Synchronize loops. Use this method to start two more more loops in synchronization\\nor to start a loop in synchronization with a loop that is already playing\\nThis method will schedule the implicit loop in sync with the explicit master loop\\ni.e. loopToStart.syncedStart(loopToSyncWith)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"syncedStart\",\n \"params\": [\n {\n \"name\": \"otherLoop\",\n \"description\": \"a p5.SoundLoop to sync with\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"Start the loops in sync after timeFromNow seconds\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11139,\n \"description\": \"Getters and Setters, setting any paramter will result in a change in the clock's\\nfrequency, that will be reflected after the next callback\\nbeats per minute (defaults to 60)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"bpm\",\n \"type\": \"Number\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11157,\n \"description\": \"number of quarter notes in a measure (defaults to 4)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"timeSignature\",\n \"type\": \"Number\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11173,\n \"description\": \"length of the loops interval\\n\",\n \"itemtype\": \"property\",\n \"name\": \"interval\",\n \"type\": \"Number|String\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11187,\n \"description\": \"how many times the callback has been called so far\\n\",\n \"itemtype\": \"property\",\n \"name\": \"iterations\",\n \"type\": \"Number\",\n \"readonly\": \"\",\n \"class\": \"p5.SoundLoop\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11228,\n \"description\": \"The p5.Compressor is built with a Web Audio Dynamics Compressor Node\\n \\n\",\n \"itemtype\": \"property\",\n \"name\": \"compressor\",\n \"type\": \"AudioNode\",\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11239,\n \"description\": \"Performs the same function as .connect, but also accepts\\noptional parameters to set compressor's audioParams\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"Sound source to be connected\\n\",\n \"type\": \"Object\"\n },\n {\n \"name\": \"attack\",\n \"description\": \"The amount of time (in seconds) to reduce the gain by 10dB,\\n default = .003, range 0 - 1\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"knee\",\n \"description\": \"A decibel value representing the range above the \\n threshold where the curve smoothly transitions to the "ratio" portion.\\n default = 30, range 0 - 40\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"ratio\",\n \"description\": \"The amount of dB change in input for a 1 dB change in output\\n default = 12, range 1 - 20\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"threshold\",\n \"description\": \"The decibel value above which the compression will start taking effect\\n default = -24, range -100 - 0\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"release\",\n \"description\": \"The amount of time (in seconds) to increase the gain by 10dB\\n default = .25, range 0 - 1\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11262,\n \"description\": \"Set the paramters of a compressor.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"attack\",\n \"description\": \"The amount of time (in seconds) to reduce the gain by 10dB,\\n default = .003, range 0 - 1\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"knee\",\n \"description\": \"A decibel value representing the range above the \\n threshold where the curve smoothly transitions to the "ratio" portion.\\n default = 30, range 0 - 40\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"ratio\",\n \"description\": \"The amount of dB change in input for a 1 dB change in output\\n default = 12, range 1 - 20\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"threshold\",\n \"description\": \"The decibel value above which the compression will start taking effect\\n default = -24, range -100 - 0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"release\",\n \"description\": \"The amount of time (in seconds) to increase the gain by 10dB\\n default = .25, range 0 - 1\\n\",\n \"type\": \"Number\"\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11294,\n \"description\": \"Get current attack or set value w/ time ramp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"attack\",\n \"params\": [\n {\n \"name\": \"attack\",\n \"description\": \"Attack is the amount of time (in seconds) to reduce the gain by 10dB,\\n default = .003, range 0 - 1\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"description\": \"Assign time value to schedule the change in value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11314,\n \"description\": \"Get current knee or set value w/ time ramp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"knee\",\n \"params\": [\n {\n \"name\": \"knee\",\n \"description\": \"A decibel value representing the range above the \\n threshold where the curve smoothly transitions to the "ratio" portion.\\n default = 30, range 0 - 40\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"description\": \"Assign time value to schedule the change in value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11334,\n \"description\": \"Get current ratio or set value w/ time ramp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"ratio\",\n \"params\": [\n {\n \"name\": \"ratio\",\n \"description\": \"The amount of dB change in input for a 1 dB change in output\\n default = 12, range 1 - 20\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"time\",\n \"description\": \"Assign time value to schedule the change in value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11353,\n \"description\": \"Get current threshold or set value w/ time ramp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"threshold\",\n \"params\": [\n {\n \"name\": \"threshold\",\n \"description\": \"The decibel value above which the compression will start taking effect\\n default = -24, range -100 - 0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"time\",\n \"description\": \"Assign time value to schedule the change in value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11372,\n \"description\": \"Get current release or set value w/ time ramp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"release\",\n \"params\": [\n {\n \"name\": \"release\",\n \"description\": \"The amount of time (in seconds) to increase the gain by 10dB\\n default = .25, range 0 - 1\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"time\",\n \"description\": \"Assign time value to schedule the change in value\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11392,\n \"description\": \"Return the current reduction value\\n\",\n \"itemtype\": \"method\",\n \"name\": \"reduction\",\n \"return\": {\n \"description\": \"Value of the amount of gain reduction that is applied to the signal\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Compressor\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11508,\n \"description\": \"Connect a specific device to the p5.SoundRecorder.\\nIf no parameter is given, p5.SoundRecorer will record\\nall audible p5.sound from your sketch.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"p5.sound object or a web audio unit\\n that outputs sound\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundRecorder\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11529,\n \"description\": \"Start recording. To access the recording, provide\\na p5.SoundFile as the first parameter. The p5.SoundRecorder\\nwill send its recording to that p5.SoundFile for playback once\\nrecording is complete. Optional parameters include duration\\n(in seconds) of the recording, and a callback function that\\nwill be called once the complete recording has been\\ntransfered to the p5.SoundFile.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"record\",\n \"params\": [\n {\n \"name\": \"soundFile\",\n \"description\": \"p5.SoundFile\\n\",\n \"type\": \"p5.SoundFile\"\n },\n {\n \"name\": \"duration\",\n \"description\": \"Time (in seconds)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"callback\",\n \"description\": \"The name of a function that will be\\n called once the recording completes\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.SoundRecorder\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11562,\n \"description\": \"Stop the recording. Once the recording is stopped,\\nthe results will be sent to the p5.SoundFile that\\nwas given on .record(), and if a callback function\\nwas provided on record, that function will be called.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"class\": \"p5.SoundRecorder\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11635,\n \"description\": \"Save a p5.SoundFile as a .wav file. The browser will prompt the user\\nto download the file to their device.\\nFor uploading audio to a server, use\\np5.SoundFile.saveBlob.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"saveSound\",\n \"params\": [\n {\n \"name\": \"soundFile\",\n \"description\": \"p5.SoundFile that you wish to save\\n\",\n \"type\": \"p5.SoundFile\"\n },\n {\n \"name\": \"fileName\",\n \"description\": \"name of the resulting .wav file.\\n\",\n \"type\": \"String\"\n }\n ],\n \"class\": \"p5\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11761,\n \"description\": \"isDetected is set to true when a peak is detected.\\n\",\n \"itemtype\": \"attribute\",\n \"name\": \"isDetected\",\n \"type\": \"Boolean\",\n \"default\": \"false\",\n \"class\": \"p5.PeakDetect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11774,\n \"description\": \"The update method is run in the draw loop.\\nAccepts an FFT object. You must call .analyze()\\non the FFT object prior to updating the peakDetect\\nbecause it relies on a completed FFT analysis.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"update\",\n \"params\": [\n {\n \"name\": \"fftObject\",\n \"description\": \"A p5.FFT object\\n\",\n \"type\": \"p5.FFT\"\n }\n ],\n \"class\": \"p5.PeakDetect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11805,\n \"description\": \"onPeak accepts two arguments: a function to call when\\na peak is detected. The value of the peak,\\nbetween 0.0 and 1.0, is passed to the callback.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"onPeak\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"Name of a function that will\\n be called when a peak is\\n detected.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"val\",\n \"description\": \"Optional value to pass\\n into the function when\\n a peak is detected.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar cnv, soundFile, fft, peakDetect;\\nvar ellipseWidth = 0;\\n\\nfunction preload() {\\n soundFile = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n cnv = createCanvas(100,100);\\n textAlign(CENTER);\\n\\n fft = new p5.FFT();\\n peakDetect = new p5.PeakDetect();\\n\\n setupSound();\\n\\n // when a beat is detected, call triggerBeat()\\n peakDetect.onPeak(triggerBeat);\\n}\\n\\nfunction draw() {\\n background(0);\\n fill(255);\\n text('click to play', width/2, height/2);\\n\\n fft.analyze();\\n peakDetect.update(fft);\\n\\n ellipseWidth *= 0.95;\\n ellipse(width/2, height/2, ellipseWidth, ellipseWidth);\\n}\\n\\n// this function is called by peakDetect.onPeak\\nfunction triggerBeat() {\\n ellipseWidth = 50;\\n}\\n\\n// mouseclick starts/stops sound\\nfunction setupSound() {\\n cnv.mouseClicked( function() {\\n if (soundFile.isPlaying() ) {\\n soundFile.stop();\\n } else {\\n soundFile.play();\\n }\\n });\\n}\\n\"\n ],\n \"class\": \"p5.PeakDetect\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11954,\n \"description\": \"Connect a source to the gain node.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setInput\",\n \"params\": [\n {\n \"name\": \"src\",\n \"description\": \"p5.sound / Web Audio object with a sound\\n output.\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Gain\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11964,\n \"description\": \"Send output to a p5.sound or web audio object\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.Gain\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11974,\n \"description\": \"Disconnect all output.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.Gain\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 11984,\n \"description\": \"Set the output level of the gain node.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"volume\",\n \"description\": \"amplitude between 0 and 1.0\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"create a fade that lasts rampTime\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"timeFromNow\",\n \"description\": \"schedule this event to happen\\n seconds from now\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.Gain\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12042,\n \"description\": \"Connect to p5 objects or Web Audio Nodes\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.AudioVoice\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12051,\n \"description\": \"Disconnect from soundOut\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.AudioVoice\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12131,\n \"description\": \"Play tells the MonoSynth to start playing a note. This method schedules\\nthe calling of .triggerAttack and .triggerRelease.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"the note you want to play, specified as a\\n frequency in Hertz (Number) or as a midi\\n value in Note/Octave format ("C4", "Eb3"...etc")\\n See \\n Tone. Defaults to 440 hz.\\n\",\n \"type\": \"String | Number\"\n },\n {\n \"name\": \"velocity\",\n \"description\": \"velocity of the note to play (ranging from 0 to 1)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time from now (in seconds) at which to play\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"sustainTime\",\n \"description\": \"time to sustain before releasing the envelope\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar monoSynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n monoSynth = new p5.MonoSynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // time from now (in seconds)\\n var time = 0;\\n // note duration (in seconds)\\n var dur = 1/6;\\n // note velocity (volume, from 0 to 1)\\n var v = random();\\n\\n monoSynth.play(\\\"Fb3\\\", v, 0, dur);\\n monoSynth.play(\\\"Gb3\\\", v, time += dur, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n\\n\"\n ],\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12179,\n \"description\": \"Trigger the Attack, and Decay portion of the Envelope.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go.\\n\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"the note you want to play, specified as a\\n frequency in Hertz (Number) or as a midi\\n value in Note/Octave format ("C4", "Eb3"...etc")\\n See \\n Tone. Defaults to 440 hz\\n\",\n \"type\": \"String | Number\"\n },\n {\n \"name\": \"velocity\",\n \"description\": \"velocity of the note to play (ranging from 0 to 1)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time from now (in seconds) at which to play\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"itemtype\": \"method\",\n \"name\": \"triggerAttack\",\n \"example\": [\n \"\\n\\nvar monoSynth = new p5.MonoSynth();\\n\\nfunction mousePressed() {\\n monoSynth.triggerAttack(\\\"E3\\\");\\n}\\n\\nfunction mouseReleased() {\\n monoSynth.triggerRelease();\\n}\\n\"\n ],\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12212,\n \"description\": \"Trigger the release of the Envelope. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.\\n\",\n \"params\": [\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time to trigger the release\\n\",\n \"type\": \"Number\"\n }\n ],\n \"itemtype\": \"method\",\n \"name\": \"triggerRelease\",\n \"example\": [\n \"\\n\\nvar monoSynth = new p5.MonoSynth();\\n\\nfunction mousePressed() {\\n monoSynth.triggerAttack(\\\"E3\\\");\\n}\\n\\nfunction mouseReleased() {\\n monoSynth.triggerRelease();\\n}\\n\"\n ],\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12236,\n \"description\": \"Set values like a traditional\\n\\nADSR envelope\\n.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setADSR\",\n \"params\": [\n {\n \"name\": \"attackTime\",\n \"description\": \"Time (in seconds before envelope\\n reaches Attack Level\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"decayTime\",\n \"description\": \"Time (in seconds) before envelope\\n reaches Decay/Sustain Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"susRatio\",\n \"description\": \"Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\\n where 1.0 = attackLevel, 0.0 = releaseLevel.\\n The susRatio determines the decayLevel and the level at which the\\n sustain portion of the envelope will sustain.\\n For example, if attackLevel is 0.4, releaseLevel is 0,\\n and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\\n increased to 1.0 (using setRange),\\n then decayLevel would increase proportionally, to become 0.5.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"releaseTime\",\n \"description\": \"Time in seconds from now (defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12260,\n \"description\": \"Getters and Setters\\n\",\n \"itemtype\": \"property\",\n \"name\": \"attack\",\n \"type\": \"Number\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12264,\n \"itemtype\": \"property\",\n \"name\": \"decay\",\n \"type\": \"Number\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12267,\n \"itemtype\": \"property\",\n \"name\": \"sustain\",\n \"type\": \"Number\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12270,\n \"itemtype\": \"property\",\n \"name\": \"release\",\n \"type\": \"Number\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12307,\n \"description\": \"MonoSynth amp\\n\",\n \"itemtype\": \"method\",\n \"name\": \"amp\",\n \"params\": [\n {\n \"name\": \"vol\",\n \"description\": \"desired volume\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"rampTime\",\n \"description\": \"Time to reach new volume\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"new volume value\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12321,\n \"description\": \"Connect to a p5.sound / Web Audio object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"A p5.sound or Web Audio object\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12331,\n \"description\": \"Disconnect all outputs\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12341,\n \"description\": \"Get rid of the MonoSynth and free up its resources / memory.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dispose\",\n \"class\": \"p5.MonoSynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12411,\n \"description\": \"An object that holds information about which notes have been played and\\nwhich notes are currently being played. New notes are added as keys\\non the fly. While a note has been attacked, but not released, the value of the\\nkey is the audiovoice which is generating that note. When notes are released,\\nthe value of the key becomes undefined.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"notes\",\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12423,\n \"description\": \"A PolySynth must have at least 1 voice, defaults to 8\\n\",\n \"itemtype\": \"property\",\n \"name\": \"polyvalue\",\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12428,\n \"description\": \"Monosynth that generates the sound for each note that is triggered. The\\np5.PolySynth defaults to using the p5.MonoSynth as its voice.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"AudioVoice\",\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12459,\n \"description\": \"Play a note by triggering noteAttack and noteRelease with sustain time\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"midi note to play (ranging from 0 to 127 - 60 being a middle C)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"velocity\",\n \"description\": \"velocity of the note to play (ranging from 0 to 1)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time from now (in seconds) at which to play\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"sustainTime\",\n \"description\": \"time to sustain before releasing the envelope\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar polySynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n polySynth = new p5.PolySynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // note duration (in seconds)\\n var dur = 0.1;\\n\\n // time from now (in seconds)\\n var time = 0;\\n\\n // velocity (volume, from 0 to 1)\\n var vel = 0.1;\\n\\n polySynth.play(\\\"G2\\\", vel, 0, dur);\\n polySynth.play(\\\"C3\\\", vel, 0, dur);\\n polySynth.play(\\\"G3\\\", vel, 0, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n\"\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12505,\n \"description\": \"noteADSR sets the envelope for a specific note that has just been triggered.\\nUsing this method modifies the envelope of whichever audiovoice is being used\\nto play the desired note. The envelope should be reset before noteRelease is called\\nin order to prevent the modified envelope from being used on other notes.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noteADSR\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"Midi note on which ADSR should be set.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"attackTime\",\n \"description\": \"Time (in seconds before envelope\\n reaches Attack Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"decayTime\",\n \"description\": \"Time (in seconds) before envelope\\n reaches Decay/Sustain Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"susRatio\",\n \"description\": \"Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\\n where 1.0 = attackLevel, 0.0 = releaseLevel.\\n The susRatio determines the decayLevel and the level at which the\\n sustain portion of the envelope will sustain.\\n For example, if attackLevel is 0.4, releaseLevel is 0,\\n and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\\n increased to 1.0 (using setRange),\\n then decayLevel would increase proportionally, to become 0.5.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"releaseTime\",\n \"description\": \"Time in seconds from now (defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12533,\n \"description\": \"Set the PolySynths global envelope. This method modifies the envelopes of each\\nmonosynth so that all notes are played with this envelope.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"setADSR\",\n \"params\": [\n {\n \"name\": \"attackTime\",\n \"description\": \"Time (in seconds before envelope\\n reaches Attack Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"decayTime\",\n \"description\": \"Time (in seconds) before envelope\\n reaches Decay/Sustain Level\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"susRatio\",\n \"description\": \"Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\\n where 1.0 = attackLevel, 0.0 = releaseLevel.\\n The susRatio determines the decayLevel and the level at which the\\n sustain portion of the envelope will sustain.\\n For example, if attackLevel is 0.4, releaseLevel is 0,\\n and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\\n increased to 1.0 (using setRange),\\n then decayLevel would increase proportionally, to become 0.5.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"releaseTime\",\n \"description\": \"Time in seconds from now (defaults to 0)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12557,\n \"description\": \"Trigger the Attack, and Decay portion of a MonoSynth.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noteAttack\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"midi note on which attack should be triggered.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"velocity\",\n \"description\": \"velocity of the note to play (ranging from 0 to 1)/\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time from now (in seconds)\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar polySynth = new p5.PolySynth();\\nvar pitches = [\\\"G\\\", \\\"D\\\", \\\"G\\\", \\\"C\\\"];\\nvar octaves = [2, 3, 4];\\n\\nfunction mousePressed() {\\n // play a chord: multiple notes at the same time\\n for (var i = 0; i < 4; i++) {\\n var note = random(pitches) + random(octaves);\\n polySynth.noteAttack(note, 0.1);\\n }\\n}\\n\\nfunction mouseReleased() {\\n // release all voices\\n polySynth.noteRelease();\\n}\\n\"\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12647,\n \"description\": \"Trigger the Release of an AudioVoice note. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noteRelease\",\n \"params\": [\n {\n \"name\": \"note\",\n \"description\": \"midi note on which attack should be triggered.\\n If no value is provided, all notes will be released.\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"secondsFromNow\",\n \"description\": \"time to trigger the release\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"example\": [\n \"\\n\\nvar pitches = [\\\"G\\\", \\\"D\\\", \\\"G\\\", \\\"C\\\"];\\nvar octaves = [2, 3, 4];\\nvar polySynth = new p5.PolySynth();\\n\\nfunction mousePressed() {\\n // play a chord: multiple notes at the same time\\n for (var i = 0; i < 4; i++) {\\n var note = random(pitches) + random(octaves);\\n polySynth.noteAttack(note, 0.1);\\n }\\n}\\n\\nfunction mouseReleased() {\\n // release all voices\\n polySynth.noteRelease();\\n}\\n\\n\"\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12712,\n \"description\": \"Connect to a p5.sound / Web Audio object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"unit\",\n \"description\": \"A p5.sound or Web Audio object\\n\",\n \"type\": \"Object\"\n }\n ],\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12722,\n \"description\": \"Disconnect all outputs\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12732,\n \"description\": \"Get rid of the MonoSynth and free up its resources / memory.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"dispose\",\n \"class\": \"p5.PolySynth\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12800,\n \"description\": \"The p5.Distortion is built with a\\n\\nWeb Audio WaveShaper Node.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"WaveShaperNode\",\n \"type\": \"AudioNode\",\n \"class\": \"p5.Distortion\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12815,\n \"description\": \"Process a sound source, optionally specify amount and oversample values.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"process\",\n \"params\": [\n {\n \"name\": \"amount\",\n \"description\": \"Unbounded distortion amount.\\n Normal values range from 0-1.\\n\",\n \"type\": \"Number\",\n \"optional\": true,\n \"optdefault\": \"0.25\"\n },\n {\n \"name\": \"oversample\",\n \"description\": \"'none', '2x', or '4x'.\\n\",\n \"type\": \"String\",\n \"optional\": true,\n \"optdefault\": \"'none'\"\n }\n ],\n \"class\": \"p5.Distortion\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12827,\n \"description\": \"Set the amount and oversample of the waveshaper distortion.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"set\",\n \"params\": [\n {\n \"name\": \"amount\",\n \"description\": \"Unbounded distortion amount.\\n Normal values range from 0-1.\\n\",\n \"type\": \"Number\",\n \"optional\": true,\n \"optdefault\": \"0.25\"\n },\n {\n \"name\": \"oversample\",\n \"description\": \"'none', '2x', or '4x'.\\n\",\n \"type\": \"String\",\n \"optional\": true,\n \"optdefault\": \"'none'\"\n }\n ],\n \"class\": \"p5.Distortion\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12845,\n \"description\": \"Return the distortion amount, typically between 0-1.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getAmount\",\n \"return\": {\n \"description\": \"Unbounded distortion amount.\\n Normal values range from 0-1.\",\n \"type\": \"Number\"\n },\n \"class\": \"p5.Distortion\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 12855,\n \"description\": \"Return the oversampling.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"getOversample\",\n \"return\": {\n \"description\": \"Oversample can either be 'none', '2x', or '4x'.\",\n \"type\": \"String\"\n },\n \"class\": \"p5.Distortion\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n }\n ],\n \"warnings\": [\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:16\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:61\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:91\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:134\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:332\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:363\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:400\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:497\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:527\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/creating_reading.js:567\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:52\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:253\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:280\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:307\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:334\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/p5.Color.js:768\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:15\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:181\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:220\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:341\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:498\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:539\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/color/setting.js:579\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:102\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:210\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:270\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:300\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:356\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:391\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:458\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:541\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/2d_primitives.js:595\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:14\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:83\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:116\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:185\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:219\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:256\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/attributes.js:323\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:13\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:96\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:139\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:194\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:273\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:364\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:406\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/curves.js:502\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:22\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:70\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:270\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:270\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:270\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:398\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:443\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:508\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:568\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:654\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:720\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:813\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:813\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:813\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/shape/vertex.js:813\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/constants.js:58\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/constants.js:77\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/constants.js:96\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/constants.js:115\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/constants.js:134\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:22\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:53\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:80\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:112\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:181\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:281\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:306\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:325\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:344\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:360\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:376\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:454\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:505\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/core/environment.js:540\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/core/environment.js:560\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:560\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:617\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:648\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/environment.js:671\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/main.js:49\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/main.js:90\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/main.js:121\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/main.js:401\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:52\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:122\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:162\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:197\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:258\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:307\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:373\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:427\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:483\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:541\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:584\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:626\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:674\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:714\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:763\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Element.js:801\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Graphics.js:65\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/p5.Graphics.js:117\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/rendering.js:17\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/rendering.js:119\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/rendering.js:174\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/rendering.js:197\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/rendering.js:236\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/structure.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/structure.js:74\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/structure.js:122\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/structure.js:191\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/structure.js:261\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:13\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:150\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:176\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:216\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:246\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:276\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:306\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:381\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:421\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/core/transform.js:461\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:23\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:46\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:69\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:135\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:166\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:197\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:233\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:278\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:322\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:380\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:419\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:462\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:506\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:538\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/acceleration.js:597\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:39\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:68\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:109\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:196\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:248\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/keyboard.js:312\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:22\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:48\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:74\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:106\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:137\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:176\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:215\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:256\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:298\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:337\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:428\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:483\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:564\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:641\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:719\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:789\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/mouse.js:874\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/touch.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/touch.js:74\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/touch.js:149\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/events/touch.js:222\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/image.js:22\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/image.js:102\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/image.js:195\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/loading_displaying.js:17\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/image/loading_displaying.js:110\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/loading_displaying.js:127\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/loading_displaying.js:298\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/loading_displaying.js:398\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/loading_displaying.js:464\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:90\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:117\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:153\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:232\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:268\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:316\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:371\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:409\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:494\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:575\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:638\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:674\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/p5.Image.js:796\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:14\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:83\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:177\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:236\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:415\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:506\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:543\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/image/pixels.js:617\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:19\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:180\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:293\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:603\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/io/files.js:714\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:714\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:1519\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:1577\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/files.js:1645\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:56\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:120\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:168\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:214\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:263\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:328\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:523\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:576\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:618\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:879\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:944\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:994\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1040\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1085\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1132\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1177\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1230\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.Table.js:1296\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:42\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:106\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:150\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:195\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:243\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.TableRow.js:299\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/io/p5.XML.js:11\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:36\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:76\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:121\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:190\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:240\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:279\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:327\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:383\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:422\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:478\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:528\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:578\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:631\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:665\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:704\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/calculation.js:751\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/math.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/noise.js:40\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/noise.js:187\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/noise.js:253\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/p5.Vector.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/random.js:48\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/random.js:79\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/random.js:166\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/trigonometry.js:124\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/trigonometry.js:160\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/trigonometry.js:188\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/trigonometry.js:216\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/math/trigonometry.js:296\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/math/trigonometry.js:332\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/math/trigonometry.js:347\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/math/trigonometry.js:362\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/attributes.js:13\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/attributes.js:84\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/attributes.js:122\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/attributes.js:154\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/attributes.js:191\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/loading_displaying.js:16\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/loading_displaying.js:143\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/loading_displaying.js:230\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/typography/p5.Font.js:32\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/conversion.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:15\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:44\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:132\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:243\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:319\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:381\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:459\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/string_functions.js:548\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:34\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:56\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:78\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:101\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:123\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/utilities/time_date.js:145\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/3d_primitives.js:14\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:13\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:146\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:146\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:146\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:146\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:146\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/interaction.js:380\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/light.js:12\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/light.js:87\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/light.js:185\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/light.js:287\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/loading.js:14\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/loading.js:14\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/loading.js:244\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:14\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/webgl/material.js:113\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:113\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:225\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:262\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:359\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:359\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:438\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:513\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:563\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/material.js:614\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:15\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:61\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:126\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:209\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:486\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:545\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:603\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:751\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:823\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.Camera.js:1088\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.RendererGL.js:228\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.RendererGL.js:474\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.RendererGL.js:516\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" src/webgl/p5.RendererGL.js:586\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:117\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/webgl/text.js:160\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:193\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:205\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:235\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:249\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:387\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" src/webgl/text.js:387\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:457\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:472\"\n },\n {\n \"message\": \"replacing incorrect tag: function with method\",\n \"line\": \" src/webgl/text.js:547\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" lib/addons/p5.dom.js:245\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" lib/addons/p5.dom.js:313\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.dom.js:1463\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.dom.js:1525\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.dom.js:1629\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.dom.js:1668\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.dom.js:1762\"\n },\n {\n \"message\": \"unknown tag: alt\",\n \"line\": \" lib/addons/p5.dom.js:2119\"\n },\n {\n \"message\": \"replacing incorrect tag: params with param\",\n \"line\": \" lib/addons/p5.sound.js:2480\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.sound.js:2480\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.sound.js:3094\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.sound.js:7659\"\n },\n {\n \"message\": \"replacing incorrect tag: returns with return\",\n \"line\": \" lib/addons/p5.sound.js:9626\"\n },\n {\n \"message\": \"Missing item type\\nConversions adapted from .\\n\\nIn these functions, hue is always in the range [0, 1], just like all other\\ncomponents are in the range [0, 1]. 'Brightness' and 'value' are used\\ninterchangeably.\",\n \"line\": \" src/color/color_conversion.js:10\"\n },\n {\n \"message\": \"Missing item type\\nConvert an HSBA array to HSLA.\",\n \"line\": \" src/color/color_conversion.js:21\"\n },\n {\n \"message\": \"Missing item type\\nConvert an HSBA array to RGBA.\",\n \"line\": \" src/color/color_conversion.js:47\"\n },\n {\n \"message\": \"Missing item type\\nConvert an HSLA array to HSBA.\",\n \"line\": \" src/color/color_conversion.js:102\"\n },\n {\n \"message\": \"Missing item type\\nConvert an HSLA array to RGBA.\\n\\nWe need to change basis from HSLA to something that can be more easily be\\nprojected onto RGBA. We will choose hue and brightness as our first two\\ncomponents, and pick a convenient third one ('zest') so that we don't need\\nto calculate formal HSBA saturation.\",\n \"line\": \" src/color/color_conversion.js:125\"\n },\n {\n \"message\": \"Missing item type\\nConvert an RGBA array to HSBA.\",\n \"line\": \" src/color/color_conversion.js:189\"\n },\n {\n \"message\": \"Missing item type\\nConvert an RGBA array to HSLA.\",\n \"line\": \" src/color/color_conversion.js:228\"\n },\n {\n \"message\": \"Missing item type\\nHue is the same in HSB and HSL, but the maximum value may be different.\\nThis function will return the HSB-normalized saturation when supplied with\\nan HSB color object, but will default to the HSL-normalized saturation\\notherwise.\",\n \"line\": \" src/color/p5.Color.js:415\"\n },\n {\n \"message\": \"Missing item type\\nSaturation is scaled differently in HSB and HSL. This function will return\\nthe HSB saturation when supplied with an HSB color object, but will default\\nto the HSL saturation otherwise.\",\n \"line\": \" src/color/p5.Color.js:446\"\n },\n {\n \"message\": \"Missing item type\\nCSS named colors.\",\n \"line\": \" src/color/p5.Color.js:465\"\n },\n {\n \"message\": \"Missing item type\\nThese regular expressions are used to build up the patterns for matching\\nviable CSS color strings: fragmenting the regexes in this way increases the\\nlegibility and comprehensibility of the code.\\n\\nNote that RGB values of .9 are not parsed by IE, but are supported here for\\ncolor string consistency.\",\n \"line\": \" src/color/p5.Color.js:618\"\n },\n {\n \"message\": \"Missing item type\\nFull color string patterns. The capture groups are necessary.\",\n \"line\": \" src/color/p5.Color.js:631\"\n },\n {\n \"message\": \"Missing item type\\nFor a number of different inputs, returns a color formatted as [r, g, b, a]\\narrays, with each component normalized between 0 and 1.\",\n \"line\": \" src/color/p5.Color.js:768\"\n },\n {\n \"message\": \"Missing item type\\nFor HSB and HSL, interpret the gray level as a brightness/lightness\\nvalue (they are equivalent when chroma is zero). For RGB, normalize the\\ngray level according to the blue maximum.\",\n \"line\": \" src/color/p5.Color.js:994\"\n },\n {\n \"message\": \"Missing item type\\nThis function does 3 things:\\n\\n 1. Bounds the desired start/stop angles for an arc (in radians) so that:\\n\\n 0 <= start < TWO_PI ; start <= stop < start + TWO_PI\\n\\n This means that the arc rendering functions don't have to be concerned\\n with what happens if stop is smaller than start, or if the arc 'goes\\n round more than once', etc.: they can just start at start and increase\\n until stop and the correct arc will be drawn.\\n\\n 2. Optionally adjusts the angles within each quadrant to counter the naive\\n scaling of the underlying ellipse up from the unit circle. Without\\n this, the angles become arbitrary when width != height: 45 degrees\\n might be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on\\n a 'tall' ellipse.\\n\\n 3. Flags up when start and stop correspond to the same place on the\\n underlying ellipse. This is useful if you want to do something special\\n there (like rendering a whole ellipse instead).\",\n \"line\": \" src/core/shape/2d_primitives.js:16\"\n },\n {\n \"message\": \"Missing item type\\nReturns the current framerate.\",\n \"line\": \" src/core/environment.js:255\"\n },\n {\n \"message\": \"Missing item type\\nSpecifies the number of frames to be displayed every second. For example,\\nthe function call frameRate(30) will attempt to refresh 30 times a second.\\nIf the processor is not fast enough to maintain the specified rate, the\\nframe rate will not be achieved. Setting the frame rate within setup() is\\nrecommended. The default rate is 60 frames per second.\\n\\nCalling frameRate() with no arguments returns the current framerate.\",\n \"line\": \" src/core/environment.js:265\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/core/error_helpers.js:1\"\n },\n {\n \"message\": \"Missing item type\\nValidates parameters\\nparam {String} func the name of the function\\nparam {Array} args user input arguments\\n\\nexample:\\n var a;\\n ellipse(10,10,a,5);\\nconsole ouput:\\n \\\"It looks like ellipse received an empty variable in spot #2.\\\"\\n\\nexample:\\n ellipse(10,\\\"foo\\\",5,5);\\nconsole output:\\n \\\"ellipse was expecting a number for parameter #1,\\n received \\\"foo\\\" instead.\\\"\",\n \"line\": \" src/core/error_helpers.js:584\"\n },\n {\n \"message\": \"Missing item type\\nPrints out all the colors in the color pallete with white text.\\nFor color blindness testing.\",\n \"line\": \" src/core/error_helpers.js:645\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/core/helpers.js:1\"\n },\n {\n \"message\": \"Missing item type\\n_globalInit\\n\\nTODO: ???\\nif sketch is on window\\nassume \\\"global\\\" mode\\nand instantiate p5 automatically\\notherwise do nothing\",\n \"line\": \" src/core/init.js:5\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/core/legacy.js:1\"\n },\n {\n \"message\": \"Missing item type\\nHelper fxn for sharing pixel methods\",\n \"line\": \" src/core/p5.Element.js:865\"\n },\n {\n \"message\": \"Missing item type\\nResize our canvas element.\",\n \"line\": \" src/core/p5.Renderer.js:97\"\n },\n {\n \"message\": \"Missing item type\\nHelper fxn to check font type (system or otf)\",\n \"line\": \" src/core/p5.Renderer.js:335\"\n },\n {\n \"message\": \"Missing item type\\nHelper fxn to measure ascent and descent.\\nAdapted from http://stackoverflow.com/a/25355178\",\n \"line\": \" src/core/p5.Renderer.js:388\"\n },\n {\n \"message\": \"Missing item type\\np5.Renderer2D\\nThe 2D graphics canvas renderer class.\\nextends p5.Renderer\",\n \"line\": \" src/core/p5.Renderer2D.js:9\"\n },\n {\n \"message\": \"Missing item type\\nGenerate a cubic Bezier representing an arc on the unit circle of total\\nangle `size` radians, beginning `start` radians above the x-axis. Up to\\nfour of these curves are combined to make a full arc.\\n\\nSee www.joecridge.me/bezier.pdf for an explanation of the method.\",\n \"line\": \" src/core/p5.Renderer2D.js:405\"\n },\n {\n \"message\": \"Missing item type\\nshim for Uint8ClampedArray.slice\\n(allows arrayCopy to work with pixels[])\\nwith thanks to http://halfpapstudios.com/blog/tag/html5-canvas/\\nEnumerable set to false to protect for...in from\\nUint8ClampedArray.prototype pollution.\",\n \"line\": \" src/core/shim.js:23\"\n },\n {\n \"message\": \"Missing item type\\nthis is implementation of Object.assign() which is unavailable in\\nIE11 and (non-Chrome) Android browsers.\\nThe assign() method is used to copy the values of all enumerable\\nown properties from one or more source objects to a target object.\\nIt will return the target object.\\nModified from https://github.com/ljharb/object.assign\",\n \"line\": \" src/core/shim.js:45\"\n },\n {\n \"message\": \"Missing item type\\nprivate helper function to handle the user passing in objects\\nduring construction or calls to create()\",\n \"line\": \" src/data/p5.TypedDict.js:203\"\n },\n {\n \"message\": \"Missing item type\\nprivate helper function to ensure that the user passed in valid\\nvalues for the Dictionary type\",\n \"line\": \" src/data/p5.TypedDict.js:394\"\n },\n {\n \"message\": \"Missing item type\\nprivate helper function to ensure that the user passed in valid\\nvalues for the Dictionary type\",\n \"line\": \" src/data/p5.TypedDict.js:437\"\n },\n {\n \"message\": \"Missing item type\\nprivate helper function for finding lowest or highest value\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'\",\n \"line\": \" src/data/p5.TypedDict.js:554\"\n },\n {\n \"message\": \"Missing item type\\nprivate helper function for finding lowest or highest key\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'\",\n \"line\": \" src/data/p5.TypedDict.js:621\"\n },\n {\n \"message\": \"Missing item type\\n_updatePAccelerations updates the pAcceleration values\",\n \"line\": \" src/events/acceleration.js:124\"\n },\n {\n \"message\": \"Missing item type\\nThe onblur function is called when the user is no longer focused\\non the p5 element. Because the keyup events will not fire if the user is\\nnot focused on the element we must assume all keys currently down have\\nbeen released.\",\n \"line\": \" src/events/keyboard.js:302\"\n },\n {\n \"message\": \"Missing item type\\nThe _areDownKeys function returns a boolean true if any keys pressed\\nand a false if no keys are currently pressed.\\n\\nHelps avoid instances where multiple keys are pressed simultaneously and\\nreleasing a single key will then switch the\\nkeyIsPressed property to true.\",\n \"line\": \" src/events/keyboard.js:389\"\n },\n {\n \"message\": \"Missing item type\\nThis module defines the filters for use with image buffers.\\n\\nThis module is basically a collection of functions stored in an object\\nas opposed to modules. The functions are destructive, modifying\\nthe passed in canvas rather than creating a copy.\\n\\nGenerally speaking users of this module will use the Filters.apply method\\non a canvas to create an effect.\\n\\nA number of functions are borrowed/adapted from\\nhttp://www.html5rocks.com/en/tutorials/canvas/imagefilters/\\nor the java processing implementation.\",\n \"line\": \" src/image/filters.js:3\"\n },\n {\n \"message\": \"Missing item type\\nReturns the pixel buffer for a canvas\",\n \"line\": \" src/image/filters.js:26\"\n },\n {\n \"message\": \"Missing item type\\nReturns a 32 bit number containing ARGB data at ith pixel in the\\n1D array containing pixels data.\",\n \"line\": \" src/image/filters.js:46\"\n },\n {\n \"message\": \"Missing item type\\nModifies pixels RGBA values to values contained in the data object.\",\n \"line\": \" src/image/filters.js:67\"\n },\n {\n \"message\": \"Missing item type\\nReturns the ImageData object for a canvas\\nhttps://developer.mozilla.org/en-US/docs/Web/API/ImageData\",\n \"line\": \" src/image/filters.js:87\"\n },\n {\n \"message\": \"Missing item type\\nReturns a blank ImageData object.\",\n \"line\": \" src/image/filters.js:107\"\n },\n {\n \"message\": \"Missing item type\\nApplys a filter function to a canvas.\\n\\nThe difference between this and the actual filter functions defined below\\nis that the filter functions generally modify the pixel buffer but do\\nnot actually put that data back to the canvas (where it would actually\\nupdate what is visible). By contrast this method does make the changes\\nactually visible in the canvas.\\n\\nThe apply method is the method that callers of this module would generally\\nuse. It has been separated from the actual filters to support an advanced\\nuse case of creating a filter chain that executes without actually updating\\nthe canvas in between everystep.\",\n \"line\": \" src/image/filters.js:122\"\n },\n {\n \"message\": \"Missing item type\\nConverts the image to black and white pixels depending if they are above or\\nbelow the threshold defined by the level parameter. The parameter must be\\nbetween 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used.\\n\\nBorrowed from http://www.html5rocks.com/en/tutorials/canvas/imagefilters/\",\n \"line\": \" src/image/filters.js:175\"\n },\n {\n \"message\": \"Missing item type\\nConverts any colors in the image to grayscale equivalents.\\nNo parameter is used.\\n\\nBorrowed from http://www.html5rocks.com/en/tutorials/canvas/imagefilters/\",\n \"line\": \" src/image/filters.js:209\"\n },\n {\n \"message\": \"Missing item type\\nSets the alpha channel to entirely opaque. No parameter is used.\",\n \"line\": \" src/image/filters.js:232\"\n },\n {\n \"message\": \"Missing item type\\nSets each pixel to its inverse value. No parameter is used.\",\n \"line\": \" src/image/filters.js:248\"\n },\n {\n \"message\": \"Missing item type\\nLimits each channel of the image to the number of colors specified as\\nthe parameter. The parameter can be set to values between 2 and 255, but\\nresults are most noticeable in the lower ranges.\\n\\nAdapted from java based processing implementation\",\n \"line\": \" src/image/filters.js:263\"\n },\n {\n \"message\": \"Missing item type\\nreduces the bright areas in an image\",\n \"line\": \" src/image/filters.js:295\"\n },\n {\n \"message\": \"Missing item type\\nincreases the bright areas in an image\",\n \"line\": \" src/image/filters.js:383\"\n },\n {\n \"message\": \"Missing item type\\nThis module defines the p5 methods for the p5.Image class\\nfor drawing images to the main display canvas.\",\n \"line\": \" src/image/image.js:8\"\n },\n {\n \"message\": \"Missing item type\\nValidates clipping params. Per drawImage spec sWidth and sHight cannot be\\nnegative or greater than image intrinsic width and height\",\n \"line\": \" src/image/loading_displaying.js:110\"\n },\n {\n \"message\": \"Missing item type\\nApply the current tint color to the input image, return the resulting\\ncanvas.\",\n \"line\": \" src/image/loading_displaying.js:427\"\n },\n {\n \"message\": \"Missing item type\\nThis module defines the p5.Image class and P5 methods for\\ndrawing images to the main display canvas.\",\n \"line\": \" src/image/p5.Image.js:9\"\n },\n {\n \"message\": \"Missing item type\\nHelper fxn for sharing pixel methods\",\n \"line\": \" src/image/p5.Image.js:223\"\n },\n {\n \"message\": \"Missing item type\\nGenerate a blob of file data as a url to prepare for download.\\nAccepts an array of data, a filename, and an extension (optional).\\nThis is a private function because it does not do any formatting,\\nbut it is used by saveStrings, saveJSON, saveTable etc.\",\n \"line\": \" src/io/files.js:1771\"\n },\n {\n \"message\": \"Missing item type\\nReturns a file extension, or another string\\nif the provided parameter has no extension.\",\n \"line\": \" src/io/files.js:1840\"\n },\n {\n \"message\": \"Missing item type\\nReturns true if the browser is Safari, false if not.\\nSafari makes trouble for downloading files.\",\n \"line\": \" src/io/files.js:1873\"\n },\n {\n \"message\": \"Missing item type\\nHelper function, a callback for download that deletes\\nan invisible anchor element from the DOM once the file\\nhas been automatically downloaded.\",\n \"line\": \" src/io/files.js:1885\"\n },\n {\n \"message\": \"Missing item type\\nTable Options\\nGeneric class for handling tabular data, typically from a\\nCSV, TSV, or other sort of spreadsheet file.\\nCSV files are\\n\\ncomma separated values, often with the data in quotes. TSV\\nfiles use tabs as separators, and usually don't bother with the\\nquotes.\\nFile names should end with .csv if they're comma separated.\\nA rough \\\"spec\\\" for CSV can be found\\nhere.\\nTo load files, use the loadTable method.\\nTo save tables to your computer, use the save method\\n or the saveTable method.\\n\\nPossible options include:\\n\\ncsv - parse the table as comma-separated values\\ntsv - parse the table as tab-separated values\\nheader - this table has a header (title) row\\n\",\n \"line\": \" src/io/p5.Table.js:11\"\n },\n {\n \"message\": \"Missing item type\\nMultiplies a vector by a scalar and returns a new vector.\",\n \"line\": \" src/math/p5.Vector.js:1611\"\n },\n {\n \"message\": \"Missing item type\\nDivides a vector by a scalar and returns a new vector.\",\n \"line\": \" src/math/p5.Vector.js:1638\"\n },\n {\n \"message\": \"Missing item type\\nCalculates the dot product of two vectors.\",\n \"line\": \" src/math/p5.Vector.js:1665\"\n },\n {\n \"message\": \"Missing item type\\nCalculates the cross product of two vectors.\",\n \"line\": \" src/math/p5.Vector.js:1679\"\n },\n {\n \"message\": \"Missing item type\\nCalculates the Euclidean distance between two points (considering a\\npoint as a vector object).\",\n \"line\": \" src/math/p5.Vector.js:1693\"\n },\n {\n \"message\": \"Missing item type\\nLinear interpolate a vector to another vector and return the result as a\\nnew vector.\",\n \"line\": \" src/math/p5.Vector.js:1708\"\n },\n {\n \"message\": \"Missing item type\\nHelper function to measure ascent and descent.\",\n \"line\": \" src/typography/attributes.js:284\"\n },\n {\n \"message\": \"Missing item type\\nReturns the set of opentype glyphs for the supplied string.\\n\\nNote that there is not a strict one-to-one mapping between characters\\nand glyphs, so the list of returned glyphs can be larger or smaller\\n than the length of the given string.\",\n \"line\": \" src/typography/p5.Font.js:255\"\n },\n {\n \"message\": \"Missing item type\\nReturns an opentype path for the supplied string and position.\",\n \"line\": \" src/typography/p5.Font.js:270\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/webgl/3d_primitives.js:260\"\n },\n {\n \"message\": \"Missing item type\\nDraws a point, a coordinate in space at the dimension of one pixel,\\ngiven x, y and z coordinates. The color of the point is determined\\nby the current stroke, while the point size is determined by current\\nstroke weight.\",\n \"line\": \" src/webgl/3d_primitives.js:732\"\n },\n {\n \"message\": \"Missing item type\\nDraw a line given two points\",\n \"line\": \" src/webgl/3d_primitives.js:1155\"\n },\n {\n \"message\": \"Missing item type\\nParse OBJ lines into model. For reference, this is what a simple model of a\\nsquare might look like:\\n\\nv -0.5 -0.5 0.5\\nv -0.5 -0.5 -0.5\\nv -0.5 0.5 -0.5\\nv -0.5 0.5 0.5\\n\\nf 4 3 2 1\",\n \"line\": \" src/webgl/loading.js:135\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/webgl/material.js:659\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/webgl/material.js:681\"\n },\n {\n \"message\": \"Missing item type\\nCreate a 2D array for establishing stroke connections\",\n \"line\": \" src/webgl/p5.Geometry.js:190\"\n },\n {\n \"message\": \"Missing item type\\nCreate 4 vertices for each stroke line, two at the beginning position\\nand two at the end position. These vertices are displaced relative to\\nthat line's normal on the GPU\",\n \"line\": \" src/webgl/p5.Geometry.js:211\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" src/webgl/p5.Matrix.js:1\"\n },\n {\n \"message\": \"Missing item type\\nPRIVATE\",\n \"line\": \" src/webgl/p5.Matrix.js:730\"\n },\n {\n \"message\": \"Missing item type\\nWelcome to RendererGL Immediate Mode.\\nImmediate mode is used for drawing custom shapes\\nfrom a set of vertices. Immediate Mode is activated\\nwhen you call beginShape() & de-activated when you call endShape().\\nImmediate mode is a style of programming borrowed\\nfrom OpenGL's (now-deprecated) immediate mode.\\nIt differs from p5.js' default, Retained Mode, which caches\\ngeometries and buffers on the CPU to reduce the number of webgl\\ndraw calls. Retained mode is more efficient & performative,\\nhowever, Immediate Mode is useful for sketching quick\\ngeometric ideas.\",\n \"line\": \" src/webgl/p5.RendererGL.Immediate.js:1\"\n },\n {\n \"message\": \"Missing item type\\nEnd shape drawing and render vertices to screen.\",\n \"line\": \" src/webgl/p5.RendererGL.Immediate.js:133\"\n },\n {\n \"message\": \"Missing item type\\ninitializes buffer defaults. runs each time a new geometry is\\nregistered\",\n \"line\": \" src/webgl/p5.RendererGL.Retained.js:8\"\n },\n {\n \"message\": \"Missing item type\\ncreateBuffers description\",\n \"line\": \" src/webgl/p5.RendererGL.Retained.js:47\"\n },\n {\n \"message\": \"Missing item type\\nDraws buffers given a geometry key ID\",\n \"line\": \" src/webgl/p5.RendererGL.Retained.js:196\"\n },\n {\n \"message\": \"Missing item type\\nmodel view, projection, & normal\\nmatrices\",\n \"line\": \" src/webgl/p5.RendererGL.js:80\"\n },\n {\n \"message\": \"Missing item type\\n[background description]\",\n \"line\": \" src/webgl/p5.RendererGL.js:456\"\n },\n {\n \"message\": \"Missing item type\\n[resize description]\",\n \"line\": \" src/webgl/p5.RendererGL.js:707\"\n },\n {\n \"message\": \"Missing item type\\nclears color and depth buffers\\nwith r,g,b,a\",\n \"line\": \" src/webgl/p5.RendererGL.js:738\"\n },\n {\n \"message\": \"Missing item type\\n[translate description]\",\n \"line\": \" src/webgl/p5.RendererGL.js:771\"\n },\n {\n \"message\": \"Missing item type\\nScales the Model View Matrix by a vector\",\n \"line\": \" src/webgl/p5.RendererGL.js:790\"\n },\n {\n \"message\": \"Missing item type\\nturn a two dimensional array into one dimensional array\",\n \"line\": \" src/webgl/p5.RendererGL.js:1139\"\n },\n {\n \"message\": \"Missing item type\\nturn a p5.Vector Array into a one dimensional number array\",\n \"line\": \" src/webgl/p5.RendererGL.js:1176\"\n },\n {\n \"message\": \"Missing item type\\nensures that p5 is using a 3d renderer. throws an error if not.\",\n \"line\": \" src/webgl/p5.RendererGL.js:1192\"\n },\n {\n \"message\": \"Missing item type\\nHelper function for select and selectAll\",\n \"line\": \" lib/addons/p5.dom.js:168\"\n },\n {\n \"message\": \"Missing item type\\nHelper function for getElement and getElements.\",\n \"line\": \" lib/addons/p5.dom.js:184\"\n },\n {\n \"message\": \"Missing item type\\nHelpers for create methods.\",\n \"line\": \" lib/addons/p5.dom.js:348\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:488\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:1070\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:1159\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:1199\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:3029\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:3095\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.dom.js:3157\"\n },\n {\n \"message\": \"Missing item type\\np5.sound \\nhttps://p5js.org/reference/#/libraries/p5.sound\\n\\nFrom the Processing Foundation and contributors\\nhttps://github.com/processing/p5.js-sound/graphs/contributors\\n\\nMIT License (MIT)\\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE\\n\\nSome of the many audio libraries & resources that inspire p5.sound:\\n - TONE.js (c) Yotam Mann. Licensed under The MIT License (MIT). https://github.com/TONEnoTONE/Tone.js\\n - buzz.js (c) Jay Salvat. Licensed under The MIT License (MIT). http://buzz.jaysalvat.com/\\n - Boris Smus Web Audio API book, 2013. Licensed under the Apache License http://www.apache.org/licenses/LICENSE-2.0\\n - wavesurfer.js https://github.com/katspaugh/wavesurfer.js\\n - Web Audio Components by Jordan Santell https://github.com/web-audio-components\\n - Wilm Thoben's Sound library for Processing https://github.com/processing/processing/tree/master/java/libraries/sound\\n\\n Web Audio API: http://w3.org/TR/webaudio/\",\n \"line\": \" lib/addons/p5.sound.js:46\"\n },\n {\n \"message\": \"Missing item type\\nDetermine which filetypes are supported (inspired by buzz.js)\\nThe audio element (el) will only be used to test browser support for various audio formats\",\n \"line\": \" lib/addons/p5.sound.js:214\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:363\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:740\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:810\"\n },\n {\n \"message\": \"Missing item type\\nMaster contains AudioContext and the master sound output.\",\n \"line\": \" lib/addons/p5.sound.js:1099\"\n },\n {\n \"message\": \"Missing item type\\na silent connection to the DesinationNode\\nwhich will ensure that anything connected to it\\nwill not be garbage collected\",\n \"line\": \" lib/addons/p5.sound.js:1194\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:1210\"\n },\n {\n \"message\": \"Missing item type\\nUsed by Osc and Envelope to chain signal math\",\n \"line\": \" lib/addons/p5.sound.js:1415\"\n },\n {\n \"message\": \"Missing item type\\nThis is a helper function that the p5.SoundFile calls to load\\nitself. Accepts a callback (the name of another function)\\nas an optional parameter.\",\n \"line\": \" lib/addons/p5.sound.js:1813\"\n },\n {\n \"message\": \"Missing item type\\nStop playback on all of this soundfile's sources.\",\n \"line\": \" lib/addons/p5.sound.js:2218\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:2656\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:2934\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4055\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4076\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4135\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4453\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4625\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4783\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4824\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:4881\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5049\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5097\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5128\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5149\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5169\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:5879\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:6082\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7750\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7766\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7790\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7816\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7838\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7860\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7906\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7937\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:7955\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:8292\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:8314\"\n },\n {\n \"message\": \"Missing item type\\nThe p5.Effect class is built\\n \\tusing Tone.js CrossFade\",\n \"line\": \" lib/addons/p5.sound.js:8384\"\n },\n {\n \"message\": \"Missing item type\\nIn classes that extend\\np5.Effect, connect effect nodes\\nto the wet parameter\",\n \"line\": \" lib/addons/p5.sound.js:8390\"\n },\n {\n \"message\": \"Missing item type\\nEQFilter extends p5.Filter with constraints\\nnecessary for the p5.EQ\",\n \"line\": \" lib/addons/p5.sound.js:8779\"\n },\n {\n \"message\": \"Missing item type\\nInspired by Simple Reverb by Jordan Santell\\nhttps://github.com/web-audio-components/simple-reverb/blob/master/index.js\\n\\nUtility function for building an impulse response\\nbased on the module parameters.\",\n \"line\": \" lib/addons/p5.sound.js:9889\"\n },\n {\n \"message\": \"Missing item type\\nPrivate method to load a buffer as an Impulse Response,\\nassign it to the convolverNode, and add to the Array of .impulses.\",\n \"line\": \" lib/addons/p5.sound.js:10056\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:10240\"\n },\n {\n \"message\": \"Missing item type\",\n \"line\": \" lib/addons/p5.sound.js:10265\"\n },\n {\n \"message\": \"Missing item type\\nmusicalTimeMode variables\\nmodify these only when the interval is specified in musicalTime format as a string\",\n \"line\": \" lib/addons/p5.sound.js:10989\"\n },\n {\n \"message\": \"Missing item type\\nDo not initiate the callback if timeFromNow is < 0\\nThis ususually occurs for a few milliseconds when the page\\nis not fully loaded\\n\\nThe callback should only be called until maxIterations is reached\",\n \"line\": \" lib/addons/p5.sound.js:11005\"\n },\n {\n \"message\": \"Missing item type\\ncallback invoked when the recording is over\",\n \"line\": \" lib/addons/p5.sound.js:11495\"\n },\n {\n \"message\": \"Missing item type\\ninternal method called on audio process\",\n \"line\": \" lib/addons/p5.sound.js:11581\"\n },\n {\n \"message\": \"Missing item type\\nPrivate method to ensure accurate values of this._voicesInUse\\nAny time a new value is scheduled, it is necessary to increment all subsequent\\nscheduledValues after attack, and decrement all subsequent\\nscheduledValues after release\",\n \"line\": \" lib/addons/p5.sound.js:12627\"\n },\n {\n \"message\": \"Missing item type\\np5.sound \\nhttps://p5js.org/reference/#/libraries/p5.sound\\n\\nFrom the Processing Foundation and contributors\\nhttps://github.com/processing/p5.js-sound/graphs/contributors\\n\\nMIT License (MIT)\\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE\\n\\nSome of the many audio libraries & resources that inspire p5.sound:\\n - TONE.js (c) Yotam Mann. Licensed under The MIT License (MIT). https://github.com/TONEnoTONE/Tone.js\\n - buzz.js (c) Jay Salvat. Licensed under The MIT License (MIT). http://buzz.jaysalvat.com/\\n - Boris Smus Web Audio API book, 2013. Licensed under the Apache License http://www.apache.org/licenses/LICENSE-2.0\\n - wavesurfer.js https://github.com/katspaugh/wavesurfer.js\\n - Web Audio Components by Jordan Santell https://github.com/web-audio-components\\n - Wilm Thoben's Sound library for Processing https://github.com/processing/processing/tree/master/java/libraries/sound\\n\\n Web Audio API: http://w3.org/TR/webaudio/\",\n \"line\": \" lib/addons/p5.sound.min.js:3\"\n }\n ],\n \"consts\": {\n \"RGB\": [\n \"p5.colorMode\"\n ],\n \"HSB\": [\n \"p5.colorMode\"\n ],\n \"HSL\": [\n \"p5.colorMode\"\n ],\n \"CHORD\": [\n \"p5.arc\"\n ],\n \"PIE\": [\n \"p5.arc\"\n ],\n \"OPEN\": [\n \"p5.arc\"\n ],\n \"CENTER\": [\n \"p5.ellipseMode\",\n \"p5.rectMode\",\n \"p5.imageMode\",\n \"p5.textAlign\"\n ],\n \"RADIUS\": [\n \"p5.ellipseMode\",\n \"p5.rectMode\"\n ],\n \"CORNER\": [\n \"p5.ellipseMode\",\n \"p5.rectMode\",\n \"p5.imageMode\"\n ],\n \"CORNERS\": [\n \"p5.ellipseMode\",\n \"p5.rectMode\",\n \"p5.imageMode\"\n ],\n \"SQUARE\": [\n \"p5.strokeCap\"\n ],\n \"PROJECT\": [\n \"p5.strokeCap\"\n ],\n \"ROUND\": [\n \"p5.strokeCap\",\n \"p5.strokeJoin\"\n ],\n \"MITER\": [\n \"p5.strokeJoin\"\n ],\n \"BEVEL\": [\n \"p5.strokeJoin\"\n ],\n \"POINTS\": [\n \"p5.beginShape\"\n ],\n \"LINES\": [\n \"p5.beginShape\"\n ],\n \"TRIANGLES\": [\n \"p5.beginShape\"\n ],\n \"TRIANGLE_FAN\": [\n \"p5.beginShape\"\n ],\n \"TRIANGLE_STRIP\": [\n \"p5.beginShape\"\n ],\n \"QUADS\": [\n \"p5.beginShape\"\n ],\n \"QUAD_STRIP\": [\n \"p5.beginShape\"\n ],\n \"CLOSE\": [\n \"p5.endShape\"\n ],\n \"ARROW\": [\n \"p5.cursor\"\n ],\n \"CROSS\": [\n \"p5.cursor\"\n ],\n \"HAND\": [\n \"p5.cursor\"\n ],\n \"MOVE\": [\n \"p5.cursor\"\n ],\n \"TEXT\": [\n \"p5.cursor\"\n ],\n \"P2D\": [\n \"p5.createCanvas\",\n \"p5.createGraphics\"\n ],\n \"WEBGL\": [\n \"p5.createCanvas\",\n \"p5.createGraphics\"\n ],\n \"BLEND\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"DARKEST\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"LIGHTEST\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"DIFFERENCE\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"MULTIPLY\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"EXCLUSION\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"SCREEN\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"REPLACE\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"OVERLAY\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"HARD_LIGHT\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"SOFT_LIGHT\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"DODGE\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"BURN\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"ADD\": [\n \"p5.blendMode\",\n \"p5.Image.blend\",\n \"p5.blend\"\n ],\n \"SUBTRACT\": [\n \"p5.blendMode\"\n ],\n \"THRESHOLD\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"GRAY\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"OPAQUE\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"INVERT\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"POSTERIZE\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"BLUR\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"ERODE\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"DILATE\": [\n \"p5.Image.filter\",\n \"p5.filter\"\n ],\n \"NORMAL\": [\n \"p5.Image.blend\",\n \"p5.blend\",\n \"p5.textStyle\",\n \"p5.textureMode\"\n ],\n \"RADIANS\": [\n \"p5.angleMode\"\n ],\n \"DEGREES\": [\n \"p5.angleMode\"\n ],\n \"LEFT\": [\n \"p5.textAlign\"\n ],\n \"RIGHT\": [\n \"p5.textAlign\"\n ],\n \"TOP\": [\n \"p5.textAlign\"\n ],\n \"BOTTOM\": [\n \"p5.textAlign\"\n ],\n \"BASELINE\": [\n \"p5.textAlign\"\n ],\n \"ITALIC\": [\n \"p5.textStyle\"\n ],\n \"BOLD\": [\n \"p5.textStyle\"\n ],\n \"BOLDITALIC\": [\n \"p5.textStyle\"\n ],\n \"IMAGE\": [\n \"p5.textureMode\"\n ],\n \"CLAMP\": [\n \"p5.textureWrap\"\n ],\n \"REPEAT\": [\n \"p5.textureWrap\"\n ],\n \"MIRROR\": [\n \"p5.textureWrap\"\n ],\n \"VIDEO\": [\n \"p5.createCapture\"\n ],\n \"AUDIO\": [\n \"p5.createCapture\"\n ]\n }\n}\n},{}],2:[function(_dereq_,module,exports){\n'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n for (var i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(\n uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)\n ))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n\n},{}],3:[function(_dereq_,module,exports){\n\n},{}],4:[function(_dereq_,module,exports){\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nvar base64 = _dereq_('base64-js')\nvar ieee754 = _dereq_('ieee754')\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nvar K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n var arr = new Uint8Array(1)\n arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n var buf = new Uint8Array(length)\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\n// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97\nif (typeof Symbol !== 'undefined' && Symbol.species != null &&\n Buffer[Symbol.species] === Buffer) {\n Object.defineProperty(Buffer, Symbol.species, {\n value: null,\n configurable: true,\n enumerable: false,\n writable: false\n })\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayLike(value)\n }\n\n if (value == null) {\n throw TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n var valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n var b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(\n value[Symbol.toPrimitive]('string'), encodingOrOffset, length\n )\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nBuffer.prototype.__proto__ = Uint8Array.prototype\nBuffer.__proto__ = Uint8Array\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpretted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n var length = byteLength(string, encoding) | 0\n var buf = createBuffer(length)\n\n var actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n var length = array.length < 0 ? 0 : checked(array.length) | 0\n var buf = createBuffer(length)\n for (var i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n var buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n buf.__proto__ = Buffer.prototype\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n var len = checked(obj.length) | 0\n var buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n var x = a.length\n var y = b.length\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n var i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n var buffer = Buffer.allocUnsafe(length)\n var pos = 0\n for (i = 0; i < list.length; ++i) {\n var buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n buf = Buffer.from(buf)\n }\n if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n buf.copy(buffer, pos)\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n var len = string.length\n var mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n var loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coersion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n var i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n var len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (var i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n var len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (var i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n var len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (var i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n var length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n var str = ''\n var max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n var x = thisEnd - thisStart\n var y = end - start\n var len = Math.min(x, y)\n\n var thisCopy = this.slice(thisStart, thisEnd)\n var targetCopy = target.slice(start, end)\n\n for (var i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n var indexSize = 1\n var arrLength = arr.length\n var valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n var i\n if (dir) {\n var foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n var found = true\n for (var j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n var remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n var strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n for (var i = 0; i < length; ++i) {\n var parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction latin1Write (buf, string, offset, length) {\n return asciiWrite(buf, string, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n var remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n var loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n return asciiWrite(this, string, offset, length)\n\n case 'latin1':\n case 'binary':\n return latin1Write(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n var res = []\n\n var i = start\n while (i < end) {\n var firstByte = buf[i]\n var codePoint = null\n var bytesPerSequence = (firstByte > 0xEF) ? 4\n : (firstByte > 0xDF) ? 3\n : (firstByte > 0xBF) ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n var secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nvar MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n var len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n var res = ''\n var i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n var ret = ''\n end = Math.min(buf.length, end)\n\n for (var i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n var len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n var out = ''\n for (var i = start; i < end; ++i) {\n out += toHex(buf[i])\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n var bytes = buf.slice(start, end)\n var res = ''\n for (var i = 0; i < bytes.length; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n var len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n var newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n newBuf.__proto__ = Buffer.prototype\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n var val = this[offset + --byteLength]\n var mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var val = this[offset]\n var mul = 1\n var i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n var i = byteLength\n var mul = 1\n var val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n var val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var mul = 1\n var i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n var maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n var i = byteLength - 1\n var mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = 0\n var mul = 1\n var sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n var limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n var i = byteLength - 1\n var mul = 1\n var sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n var len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else if (this === target && start < targetStart && targetStart < end) {\n // descending copy from end\n for (var i = len - 1; i >= 0; --i) {\n target[i + targetStart] = this[i + start]\n }\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n var code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n var i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n var bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n var len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// HELPER FUNCTIONS\n// ================\n\nvar INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction toHex (n) {\n if (n < 16) return '0' + n.toString(16)\n return n.toString(16)\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n var codePoint\n var length = string.length\n var leadSurrogate = null\n var bytes = []\n\n for (var i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n var c, hi, lo\n var byteArray = []\n for (var i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n for (var i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n},{\"base64-js\":2,\"ieee754\":8}],5:[function(_dereq_,module,exports){\n(function (process,global){\n/*!\n * @overview es6-promise - a tiny implementation of Promises/A+.\n * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n * @license Licensed under MIT license\n * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n * @version v4.2.6+9869a4bc\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ES6Promise = factory());\n}(this, (function () { 'use strict';\n\nfunction objectOrFunction(x) {\n var type = typeof x;\n return x !== null && (type === 'object' || type === 'function');\n}\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\n\n\nvar _isArray = void 0;\nif (Array.isArray) {\n _isArray = Array.isArray;\n} else {\n _isArray = function (x) {\n return Object.prototype.toString.call(x) === '[object Array]';\n };\n}\n\nvar isArray = _isArray;\n\nvar len = 0;\nvar vertxNext = void 0;\nvar customSchedulerFn = void 0;\n\nvar asap = function asap(callback, arg) {\n queue[len] = callback;\n queue[len + 1] = arg;\n len += 2;\n if (len === 2) {\n // If len is 2, that means that we need to schedule an async flush.\n // If additional callbacks are queued before the queue is flushed, they\n // will be processed by this flush that we are scheduling.\n if (customSchedulerFn) {\n customSchedulerFn(flush);\n } else {\n scheduleFlush();\n }\n }\n};\n\nfunction setScheduler(scheduleFn) {\n customSchedulerFn = scheduleFn;\n}\n\nfunction setAsap(asapFn) {\n asap = asapFn;\n}\n\nvar browserWindow = typeof window !== 'undefined' ? window : undefined;\nvar browserGlobal = browserWindow || {};\nvar BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\nvar isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n// test for web worker but not in IE10\nvar isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';\n\n// node\nfunction useNextTick() {\n // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n // see https://github.com/cujojs/when/issues/410 for details\n return function () {\n return process.nextTick(flush);\n };\n}\n\n// vertx\nfunction useVertxTimer() {\n if (typeof vertxNext !== 'undefined') {\n return function () {\n vertxNext(flush);\n };\n }\n\n return useSetTimeout();\n}\n\nfunction useMutationObserver() {\n var iterations = 0;\n var observer = new BrowserMutationObserver(flush);\n var node = document.createTextNode('');\n observer.observe(node, { characterData: true });\n\n return function () {\n node.data = iterations = ++iterations % 2;\n };\n}\n\n// web worker\nfunction useMessageChannel() {\n var channel = new MessageChannel();\n channel.port1.onmessage = flush;\n return function () {\n return channel.port2.postMessage(0);\n };\n}\n\nfunction useSetTimeout() {\n // Store setTimeout reference so es6-promise will be unaffected by\n // other code modifying setTimeout (like sinon.useFakeTimers())\n var globalSetTimeout = setTimeout;\n return function () {\n return globalSetTimeout(flush, 1);\n };\n}\n\nvar queue = new Array(1000);\nfunction flush() {\n for (var i = 0; i < len; i += 2) {\n var callback = queue[i];\n var arg = queue[i + 1];\n\n callback(arg);\n\n queue[i] = undefined;\n queue[i + 1] = undefined;\n }\n\n len = 0;\n}\n\nfunction attemptVertx() {\n try {\n var vertx = Function('return this')().require('vertx');\n vertxNext = vertx.runOnLoop || vertx.runOnContext;\n return useVertxTimer();\n } catch (e) {\n return useSetTimeout();\n }\n}\n\nvar scheduleFlush = void 0;\n// Decide what async method to use to triggering processing of queued callbacks:\nif (isNode) {\n scheduleFlush = useNextTick();\n} else if (BrowserMutationObserver) {\n scheduleFlush = useMutationObserver();\n} else if (isWorker) {\n scheduleFlush = useMessageChannel();\n} else if (browserWindow === undefined && typeof _dereq_ === 'function') {\n scheduleFlush = attemptVertx();\n} else {\n scheduleFlush = useSetTimeout();\n}\n\nfunction then(onFulfillment, onRejection) {\n var parent = this;\n\n var child = new this.constructor(noop);\n\n if (child[PROMISE_ID] === undefined) {\n makePromise(child);\n }\n\n var _state = parent._state;\n\n\n if (_state) {\n var callback = arguments[_state - 1];\n asap(function () {\n return invokeCallback(_state, child, callback, parent._result);\n });\n } else {\n subscribe(parent, child, onFulfillment, onRejection);\n }\n\n return child;\n}\n\n/**\n `Promise.resolve` returns a promise that will become resolved with the\n passed `value`. It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n resolve(1);\n });\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.resolve(1);\n\n promise.then(function(value){\n // value === 1\n });\n ```\n\n @method resolve\n @static\n @param {Any} value value that the returned promise will be resolved with\n Useful for tooling.\n @return {Promise} a promise that will become fulfilled with the given\n `value`\n*/\nfunction resolve$1(object) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (object && typeof object === 'object' && object.constructor === Constructor) {\n return object;\n }\n\n var promise = new Constructor(noop);\n resolve(promise, object);\n return promise;\n}\n\nvar PROMISE_ID = Math.random().toString(36).substring(2);\n\nfunction noop() {}\n\nvar PENDING = void 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\n\nvar TRY_CATCH_ERROR = { error: null };\n\nfunction selfFulfillment() {\n return new TypeError(\"You cannot resolve a promise with itself\");\n}\n\nfunction cannotReturnOwn() {\n return new TypeError('A promises callback cannot return that same promise.');\n}\n\nfunction getThen(promise) {\n try {\n return promise.then;\n } catch (error) {\n TRY_CATCH_ERROR.error = error;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n try {\n then$$1.call(value, fulfillmentHandler, rejectionHandler);\n } catch (e) {\n return e;\n }\n}\n\nfunction handleForeignThenable(promise, thenable, then$$1) {\n asap(function (promise) {\n var sealed = false;\n var error = tryThen(then$$1, thenable, function (value) {\n if (sealed) {\n return;\n }\n sealed = true;\n if (thenable !== value) {\n resolve(promise, value);\n } else {\n fulfill(promise, value);\n }\n }, function (reason) {\n if (sealed) {\n return;\n }\n sealed = true;\n\n reject(promise, reason);\n }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n if (!sealed && error) {\n sealed = true;\n reject(promise, error);\n }\n }, promise);\n}\n\nfunction handleOwnThenable(promise, thenable) {\n if (thenable._state === FULFILLED) {\n fulfill(promise, thenable._result);\n } else if (thenable._state === REJECTED) {\n reject(promise, thenable._result);\n } else {\n subscribe(thenable, undefined, function (value) {\n return resolve(promise, value);\n }, function (reason) {\n return reject(promise, reason);\n });\n }\n}\n\nfunction handleMaybeThenable(promise, maybeThenable, then$$1) {\n if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n handleOwnThenable(promise, maybeThenable);\n } else {\n if (then$$1 === TRY_CATCH_ERROR) {\n reject(promise, TRY_CATCH_ERROR.error);\n TRY_CATCH_ERROR.error = null;\n } else if (then$$1 === undefined) {\n fulfill(promise, maybeThenable);\n } else if (isFunction(then$$1)) {\n handleForeignThenable(promise, maybeThenable, then$$1);\n } else {\n fulfill(promise, maybeThenable);\n }\n }\n}\n\nfunction resolve(promise, value) {\n if (promise === value) {\n reject(promise, selfFulfillment());\n } else if (objectOrFunction(value)) {\n handleMaybeThenable(promise, value, getThen(value));\n } else {\n fulfill(promise, value);\n }\n}\n\nfunction publishRejection(promise) {\n if (promise._onerror) {\n promise._onerror(promise._result);\n }\n\n publish(promise);\n}\n\nfunction fulfill(promise, value) {\n if (promise._state !== PENDING) {\n return;\n }\n\n promise._result = value;\n promise._state = FULFILLED;\n\n if (promise._subscribers.length !== 0) {\n asap(publish, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state !== PENDING) {\n return;\n }\n promise._state = REJECTED;\n promise._result = reason;\n\n asap(publishRejection, promise);\n}\n\nfunction subscribe(parent, child, onFulfillment, onRejection) {\n var _subscribers = parent._subscribers;\n var length = _subscribers.length;\n\n\n parent._onerror = null;\n\n _subscribers[length] = child;\n _subscribers[length + FULFILLED] = onFulfillment;\n _subscribers[length + REJECTED] = onRejection;\n\n if (length === 0 && parent._state) {\n asap(publish, parent);\n }\n}\n\nfunction publish(promise) {\n var subscribers = promise._subscribers;\n var settled = promise._state;\n\n if (subscribers.length === 0) {\n return;\n }\n\n var child = void 0,\n callback = void 0,\n detail = promise._result;\n\n for (var i = 0; i < subscribers.length; i += 3) {\n child = subscribers[i];\n callback = subscribers[i + settled];\n\n if (child) {\n invokeCallback(settled, child, callback, detail);\n } else {\n callback(detail);\n }\n }\n\n promise._subscribers.length = 0;\n}\n\nfunction tryCatch(callback, detail) {\n try {\n return callback(detail);\n } catch (e) {\n TRY_CATCH_ERROR.error = e;\n return TRY_CATCH_ERROR;\n }\n}\n\nfunction invokeCallback(settled, promise, callback, detail) {\n var hasCallback = isFunction(callback),\n value = void 0,\n error = void 0,\n succeeded = void 0,\n failed = void 0;\n\n if (hasCallback) {\n value = tryCatch(callback, detail);\n\n if (value === TRY_CATCH_ERROR) {\n failed = true;\n error = value.error;\n value.error = null;\n } else {\n succeeded = true;\n }\n\n if (promise === value) {\n reject(promise, cannotReturnOwn());\n return;\n }\n } else {\n value = detail;\n succeeded = true;\n }\n\n if (promise._state !== PENDING) {\n // noop\n } else if (hasCallback && succeeded) {\n resolve(promise, value);\n } else if (failed) {\n reject(promise, error);\n } else if (settled === FULFILLED) {\n fulfill(promise, value);\n } else if (settled === REJECTED) {\n reject(promise, value);\n }\n}\n\nfunction initializePromise(promise, resolver) {\n try {\n resolver(function resolvePromise(value) {\n resolve(promise, value);\n }, function rejectPromise(reason) {\n reject(promise, reason);\n });\n } catch (e) {\n reject(promise, e);\n }\n}\n\nvar id = 0;\nfunction nextId() {\n return id++;\n}\n\nfunction makePromise(promise) {\n promise[PROMISE_ID] = id++;\n promise._state = undefined;\n promise._result = undefined;\n promise._subscribers = [];\n}\n\nfunction validationError() {\n return new Error('Array Methods must be provided an Array');\n}\n\nvar Enumerator = function () {\n function Enumerator(Constructor, input) {\n this._instanceConstructor = Constructor;\n this.promise = new Constructor(noop);\n\n if (!this.promise[PROMISE_ID]) {\n makePromise(this.promise);\n }\n\n if (isArray(input)) {\n this.length = input.length;\n this._remaining = input.length;\n\n this._result = new Array(this.length);\n\n if (this.length === 0) {\n fulfill(this.promise, this._result);\n } else {\n this.length = this.length || 0;\n this._enumerate(input);\n if (this._remaining === 0) {\n fulfill(this.promise, this._result);\n }\n }\n } else {\n reject(this.promise, validationError());\n }\n }\n\n Enumerator.prototype._enumerate = function _enumerate(input) {\n for (var i = 0; this._state === PENDING && i < input.length; i++) {\n this._eachEntry(input[i], i);\n }\n };\n\n Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n var c = this._instanceConstructor;\n var resolve$$1 = c.resolve;\n\n\n if (resolve$$1 === resolve$1) {\n var _then = getThen(entry);\n\n if (_then === then && entry._state !== PENDING) {\n this._settledAt(entry._state, i, entry._result);\n } else if (typeof _then !== 'function') {\n this._remaining--;\n this._result[i] = entry;\n } else if (c === Promise$1) {\n var promise = new c(noop);\n handleMaybeThenable(promise, entry, _then);\n this._willSettleAt(promise, i);\n } else {\n this._willSettleAt(new c(function (resolve$$1) {\n return resolve$$1(entry);\n }), i);\n }\n } else {\n this._willSettleAt(resolve$$1(entry), i);\n }\n };\n\n Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n var promise = this.promise;\n\n\n if (promise._state === PENDING) {\n this._remaining--;\n\n if (state === REJECTED) {\n reject(promise, value);\n } else {\n this._result[i] = value;\n }\n }\n\n if (this._remaining === 0) {\n fulfill(promise, this._result);\n }\n };\n\n Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n var enumerator = this;\n\n subscribe(promise, undefined, function (value) {\n return enumerator._settledAt(FULFILLED, i, value);\n }, function (reason) {\n return enumerator._settledAt(REJECTED, i, reason);\n });\n };\n\n return Enumerator;\n}();\n\n/**\n `Promise.all` accepts an array of promises, and returns a new promise which\n is fulfilled with an array of fulfillment values for the passed promises, or\n rejected with the reason of the first passed promise to be rejected. It casts all\n elements of the passed iterable to promises as it runs this algorithm.\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = resolve(2);\n let promise3 = resolve(3);\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // The array here would be [ 1, 2, 3 ];\n });\n ```\n\n If any of the `promises` given to `all` are rejected, the first promise\n that is rejected will be given as an argument to the returned promises's\n rejection handler. For example:\n\n Example:\n\n ```javascript\n let promise1 = resolve(1);\n let promise2 = reject(new Error(\"2\"));\n let promise3 = reject(new Error(\"3\"));\n let promises = [ promise1, promise2, promise3 ];\n\n Promise.all(promises).then(function(array){\n // Code here never runs because there are rejected promises!\n }, function(error) {\n // error.message === \"2\"\n });\n ```\n\n @method all\n @static\n @param {Array} entries array of promises\n @param {String} label optional string for labeling the promise.\n Useful for tooling.\n @return {Promise} promise that is fulfilled when all `promises` have been\n fulfilled, or rejected if any of them become rejected.\n @static\n*/\nfunction all(entries) {\n return new Enumerator(this, entries).promise;\n}\n\n/**\n `Promise.race` returns a new promise which is settled in the same way as the\n first passed promise to settle.\n\n Example:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 2');\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // result === 'promise 2' because it was resolved before promise1\n // was resolved.\n });\n ```\n\n `Promise.race` is deterministic in that only the state of the first\n settled promise matters. For example, even if other promises given to the\n `promises` array argument are resolved, but the first settled promise has\n become rejected before the other promises became fulfilled, the returned\n promise will become rejected:\n\n ```javascript\n let promise1 = new Promise(function(resolve, reject){\n setTimeout(function(){\n resolve('promise 1');\n }, 200);\n });\n\n let promise2 = new Promise(function(resolve, reject){\n setTimeout(function(){\n reject(new Error('promise 2'));\n }, 100);\n });\n\n Promise.race([promise1, promise2]).then(function(result){\n // Code here never runs\n }, function(reason){\n // reason.message === 'promise 2' because promise 2 became rejected before\n // promise 1 became fulfilled\n });\n ```\n\n An example real-world use case is implementing timeouts:\n\n ```javascript\n Promise.race([ajax('foo.json'), timeout(5000)])\n ```\n\n @method race\n @static\n @param {Array} promises array of promises to observe\n Useful for tooling.\n @return {Promise} a promise which settles in the same way as the first passed\n promise to settle.\n*/\nfunction race(entries) {\n /*jshint validthis:true */\n var Constructor = this;\n\n if (!isArray(entries)) {\n return new Constructor(function (_, reject) {\n return reject(new TypeError('You must pass an array to race.'));\n });\n } else {\n return new Constructor(function (resolve, reject) {\n var length = entries.length;\n for (var i = 0; i < length; i++) {\n Constructor.resolve(entries[i]).then(resolve, reject);\n }\n });\n }\n}\n\n/**\n `Promise.reject` returns a promise rejected with the passed `reason`.\n It is shorthand for the following:\n\n ```javascript\n let promise = new Promise(function(resolve, reject){\n reject(new Error('WHOOPS'));\n });\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n Instead of writing the above, your code now simply becomes the following:\n\n ```javascript\n let promise = Promise.reject(new Error('WHOOPS'));\n\n promise.then(function(value){\n // Code here doesn't run because the promise is rejected!\n }, function(reason){\n // reason.message === 'WHOOPS'\n });\n ```\n\n @method reject\n @static\n @param {Any} reason value that the returned promise will be rejected with.\n Useful for tooling.\n @return {Promise} a promise rejected with the given `reason`.\n*/\nfunction reject$1(reason) {\n /*jshint validthis:true */\n var Constructor = this;\n var promise = new Constructor(noop);\n reject(promise, reason);\n return promise;\n}\n\nfunction needsResolver() {\n throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n}\n\nfunction needsNew() {\n throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n}\n\n/**\n Promise objects represent the eventual result of an asynchronous operation. The\n primary way of interacting with a promise is through its `then` method, which\n registers callbacks to receive either a promise's eventual value or the reason\n why the promise cannot be fulfilled.\n\n Terminology\n -----------\n\n - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n - `thenable` is an object or function that defines a `then` method.\n - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n - `exception` is a value that is thrown using the throw statement.\n - `reason` is a value that indicates why a promise was rejected.\n - `settled` the final resting state of a promise, fulfilled or rejected.\n\n A promise can be in one of three states: pending, fulfilled, or rejected.\n\n Promises that are fulfilled have a fulfillment value and are in the fulfilled\n state. Promises that are rejected have a rejection reason and are in the\n rejected state. A fulfillment value is never a thenable.\n\n Promises can also be said to *resolve* a value. If this value is also a\n promise, then the original promise's settled state will match the value's\n settled state. So a promise that *resolves* a promise that rejects will\n itself reject, and a promise that *resolves* a promise that fulfills will\n itself fulfill.\n\n\n Basic Usage:\n ------------\n\n ```js\n let promise = new Promise(function(resolve, reject) {\n // on success\n resolve(value);\n\n // on failure\n reject(reason);\n });\n\n promise.then(function(value) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Advanced Usage:\n ---------------\n\n Promises shine when abstracting away asynchronous interactions such as\n `XMLHttpRequest`s.\n\n ```js\n function getJSON(url) {\n return new Promise(function(resolve, reject){\n let xhr = new XMLHttpRequest();\n\n xhr.open('GET', url);\n xhr.onreadystatechange = handler;\n xhr.responseType = 'json';\n xhr.setRequestHeader('Accept', 'application/json');\n xhr.send();\n\n function handler() {\n if (this.readyState === this.DONE) {\n if (this.status === 200) {\n resolve(this.response);\n } else {\n reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n }\n }\n };\n });\n }\n\n getJSON('/posts.json').then(function(json) {\n // on fulfillment\n }, function(reason) {\n // on rejection\n });\n ```\n\n Unlike callbacks, promises are great composable primitives.\n\n ```js\n Promise.all([\n getJSON('/posts'),\n getJSON('/comments')\n ]).then(function(values){\n values[0] // => postsJSON\n values[1] // => commentsJSON\n\n return values;\n });\n ```\n\n @class Promise\n @param {Function} resolver\n Useful for tooling.\n @constructor\n*/\n\nvar Promise$1 = function () {\n function Promise(resolver) {\n this[PROMISE_ID] = nextId();\n this._result = this._state = undefined;\n this._subscribers = [];\n\n if (noop !== resolver) {\n typeof resolver !== 'function' && needsResolver();\n this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n }\n }\n\n /**\n The primary way of interacting with a promise is through its `then` method,\n which registers callbacks to receive either a promise's eventual value or the\n reason why the promise cannot be fulfilled.\n ```js\n findUser().then(function(user){\n // user is available\n }, function(reason){\n // user is unavailable, and you are given the reason why\n });\n ```\n Chaining\n --------\n The return value of `then` is itself a promise. This second, 'downstream'\n promise is resolved with the return value of the first promise's fulfillment\n or rejection handler, or rejected if the handler throws an exception.\n ```js\n findUser().then(function (user) {\n return user.name;\n }, function (reason) {\n return 'default name';\n }).then(function (userName) {\n // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n // will be `'default name'`\n });\n findUser().then(function (user) {\n throw new Error('Found user, but still unhappy');\n }, function (reason) {\n throw new Error('`findUser` rejected and we're unhappy');\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n });\n ```\n If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n ```js\n findUser().then(function (user) {\n throw new PedagogicalException('Upstream error');\n }).then(function (value) {\n // never reached\n }).then(function (value) {\n // never reached\n }, function (reason) {\n // The `PedgagocialException` is propagated all the way down to here\n });\n ```\n Assimilation\n ------------\n Sometimes the value you want to propagate to a downstream promise can only be\n retrieved asynchronously. This can be achieved by returning a promise in the\n fulfillment or rejection handler. The downstream promise will then be pending\n until the returned promise is settled. This is called *assimilation*.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // The user's comments are now available\n });\n ```\n If the assimliated promise rejects, then the downstream promise will also reject.\n ```js\n findUser().then(function (user) {\n return findCommentsByAuthor(user);\n }).then(function (comments) {\n // If `findCommentsByAuthor` fulfills, we'll have the value here\n }, function (reason) {\n // If `findCommentsByAuthor` rejects, we'll have the reason here\n });\n ```\n Simple Example\n --------------\n Synchronous Example\n ```javascript\n let result;\n try {\n result = findResult();\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n findResult(function(result, err){\n if (err) {\n // failure\n } else {\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findResult().then(function(result){\n // success\n }, function(reason){\n // failure\n });\n ```\n Advanced Example\n --------------\n Synchronous Example\n ```javascript\n let author, books;\n try {\n author = findAuthor();\n books = findBooksByAuthor(author);\n // success\n } catch(reason) {\n // failure\n }\n ```\n Errback Example\n ```js\n function foundBooks(books) {\n }\n function failure(reason) {\n }\n findAuthor(function(author, err){\n if (err) {\n failure(err);\n // failure\n } else {\n try {\n findBoooksByAuthor(author, function(books, err) {\n if (err) {\n failure(err);\n } else {\n try {\n foundBooks(books);\n } catch(reason) {\n failure(reason);\n }\n }\n });\n } catch(error) {\n failure(err);\n }\n // success\n }\n });\n ```\n Promise Example;\n ```javascript\n findAuthor().\n then(findBooksByAuthor).\n then(function(books){\n // found books\n }).catch(function(reason){\n // something went wrong\n });\n ```\n @method then\n @param {Function} onFulfilled\n @param {Function} onRejected\n Useful for tooling.\n @return {Promise}\n */\n\n /**\n `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n as the catch block of a try/catch statement.\n ```js\n function findAuthor(){\n throw new Error('couldn't find that author');\n }\n // synchronous\n try {\n findAuthor();\n } catch(reason) {\n // something went wrong\n }\n // async with promises\n findAuthor().catch(function(reason){\n // something went wrong\n });\n ```\n @method catch\n @param {Function} onRejection\n Useful for tooling.\n @return {Promise}\n */\n\n\n Promise.prototype.catch = function _catch(onRejection) {\n return this.then(null, onRejection);\n };\n\n /**\n `finally` will be invoked regardless of the promise's fate just as native\n try/catch/finally behaves\n \n Synchronous example:\n \n ```js\n findAuthor() {\n if (Math.random() > 0.5) {\n throw new Error();\n }\n return new Author();\n }\n \n try {\n return findAuthor(); // succeed or fail\n } catch(error) {\n return findOtherAuther();\n } finally {\n // always runs\n // doesn't affect the return value\n }\n ```\n \n Asynchronous example:\n \n ```js\n findAuthor().catch(function(reason){\n return findOtherAuther();\n }).finally(function(){\n // author was either found, or not\n });\n ```\n \n @method finally\n @param {Function} callback\n @return {Promise}\n */\n\n\n Promise.prototype.finally = function _finally(callback) {\n var promise = this;\n var constructor = promise.constructor;\n\n if (isFunction(callback)) {\n return promise.then(function (value) {\n return constructor.resolve(callback()).then(function () {\n return value;\n });\n }, function (reason) {\n return constructor.resolve(callback()).then(function () {\n throw reason;\n });\n });\n }\n\n return promise.then(callback, callback);\n };\n\n return Promise;\n}();\n\nPromise$1.prototype.then = then;\nPromise$1.all = all;\nPromise$1.race = race;\nPromise$1.resolve = resolve$1;\nPromise$1.reject = reject$1;\nPromise$1._setScheduler = setScheduler;\nPromise$1._setAsap = setAsap;\nPromise$1._asap = asap;\n\n/*global self*/\nfunction polyfill() {\n var local = void 0;\n\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n\n var P = local.Promise;\n\n if (P) {\n var promiseToString = null;\n try {\n promiseToString = Object.prototype.toString.call(P.resolve());\n } catch (e) {\n // silently ignored\n }\n\n if (promiseToString === '[object Promise]' && !P.cast) {\n return;\n }\n }\n\n local.Promise = Promise$1;\n}\n\n// Strange compat..\nPromise$1.polyfill = polyfill;\nPromise$1.Promise = Promise$1;\n\nreturn Promise$1;\n\n})));\n\n\n\n\n\n}).call(this,_dereq_('_process'),typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"_process\":11}],6:[function(_dereq_,module,exports){\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['exports', 'module'], factory);\n } else if (typeof exports !== 'undefined' && typeof module !== 'undefined') {\n factory(exports, module);\n } else {\n var mod = {\n exports: {}\n };\n factory(mod.exports, mod);\n global.fetchJsonp = mod.exports;\n }\n})(this, function (exports, module) {\n 'use strict';\n\n var defaultOptions = {\n timeout: 5000,\n jsonpCallback: 'callback',\n jsonpCallbackFunction: null\n };\n\n function generateCallbackFunction() {\n return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);\n }\n\n function clearFunction(functionName) {\n // IE8 throws an exception when you try to delete a property on window\n // http://stackoverflow.com/a/1824228/751089\n try {\n delete window[functionName];\n } catch (e) {\n window[functionName] = undefined;\n }\n }\n\n function removeScript(scriptId) {\n var script = document.getElementById(scriptId);\n if (script) {\n document.getElementsByTagName('head')[0].removeChild(script);\n }\n }\n\n function fetchJsonp(_url) {\n var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n // to avoid param reassign\n var url = _url;\n var timeout = options.timeout || defaultOptions.timeout;\n var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;\n\n var timeoutId = undefined;\n\n return new Promise(function (resolve, reject) {\n var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();\n var scriptId = jsonpCallback + '_' + callbackFunction;\n\n window[callbackFunction] = function (response) {\n resolve({\n ok: true,\n // keep consistent with fetch API\n json: function json() {\n return Promise.resolve(response);\n }\n });\n\n if (timeoutId) clearTimeout(timeoutId);\n\n removeScript(scriptId);\n\n clearFunction(callbackFunction);\n };\n\n // Check if the user set their own params, and if not add a ? to start a list of params\n url += url.indexOf('?') === -1 ? '?' : '&';\n\n var jsonpScript = document.createElement('script');\n jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);\n if (options.charset) {\n jsonpScript.setAttribute('charset', options.charset);\n }\n jsonpScript.id = scriptId;\n document.getElementsByTagName('head')[0].appendChild(jsonpScript);\n\n timeoutId = setTimeout(function () {\n reject(new Error('JSONP request to ' + _url + ' timed out'));\n\n clearFunction(callbackFunction);\n removeScript(scriptId);\n window[callbackFunction] = function () {\n clearFunction(callbackFunction);\n };\n }, timeout);\n\n // Caught if got 404/500\n jsonpScript.onerror = function () {\n reject(new Error('JSONP request to ' + _url + ' failed'));\n\n clearFunction(callbackFunction);\n removeScript(scriptId);\n if (timeoutId) clearTimeout(timeoutId);\n };\n });\n }\n\n // export as global function\n /*\n let local;\n if (typeof global !== 'undefined') {\n local = global;\n } else if (typeof self !== 'undefined') {\n local = self;\n } else {\n try {\n local = Function('return this')();\n } catch (e) {\n throw new Error('polyfill failed because global object is unavailable in this environment');\n }\n }\n local.fetchJsonp = fetchJsonp;\n */\n\n module.exports = fetchJsonp;\n});\n},{}],7:[function(_dereq_,module,exports){\n/* FileSaver.js\n * A saveAs() FileSaver implementation.\n * 1.3.2\n * 2016-06-16 18:25:19\n *\n * By Eli Grey, http://eligrey.com\n * License: MIT\n * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md\n */\n\n/*global self */\n/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\n\nvar saveAs = saveAs || (function(view) {\n\t\"use strict\";\n\t// IE <10 is explicitly unsupported\n\tif (typeof view === \"undefined\" || typeof navigator !== \"undefined\" && /MSIE [1-9]\\./.test(navigator.userAgent)) {\n\t\treturn;\n\t}\n\tvar\n\t\t doc = view.document\n\t\t // only get URL when necessary in case Blob.js hasn't overridden it yet\n\t\t, get_URL = function() {\n\t\t\treturn view.URL || view.webkitURL || view;\n\t\t}\n\t\t, save_link = doc.createElementNS(\"http://www.w3.org/1999/xhtml\", \"a\")\n\t\t, can_use_save_link = \"download\" in save_link\n\t\t, click = function(node) {\n\t\t\tvar event = new MouseEvent(\"click\");\n\t\t\tnode.dispatchEvent(event);\n\t\t}\n\t\t, is_safari = /constructor/i.test(view.HTMLElement) || view.safari\n\t\t, is_chrome_ios =/CriOS\\/[\\d]+/.test(navigator.userAgent)\n\t\t, throw_outside = function(ex) {\n\t\t\t(view.setImmediate || view.setTimeout)(function() {\n\t\t\t\tthrow ex;\n\t\t\t}, 0);\n\t\t}\n\t\t, force_saveable_type = \"application/octet-stream\"\n\t\t// the Blob API is fundamentally broken as there is no \"downloadfinished\" event to subscribe to\n\t\t, arbitrary_revoke_timeout = 1000 * 40 // in ms\n\t\t, revoke = function(file) {\n\t\t\tvar revoker = function() {\n\t\t\t\tif (typeof file === \"string\") { // file is an object URL\n\t\t\t\t\tget_URL().revokeObjectURL(file);\n\t\t\t\t} else { // file is a File\n\t\t\t\t\tfile.remove();\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTimeout(revoker, arbitrary_revoke_timeout);\n\t\t}\n\t\t, dispatch = function(filesaver, event_types, event) {\n\t\t\tevent_types = [].concat(event_types);\n\t\t\tvar i = event_types.length;\n\t\t\twhile (i--) {\n\t\t\t\tvar listener = filesaver[\"on\" + event_types[i]];\n\t\t\t\tif (typeof listener === \"function\") {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlistener.call(filesaver, event || filesaver);\n\t\t\t\t\t} catch (ex) {\n\t\t\t\t\t\tthrow_outside(ex);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t, auto_bom = function(blob) {\n\t\t\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t\t\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\t\t\tif (/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\t\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});\n\t\t\t}\n\t\t\treturn blob;\n\t\t}\n\t\t, FileSaver = function(blob, name, no_auto_bom) {\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\t// First try a.download, then web filesystem, then object URLs\n\t\t\tvar\n\t\t\t\t filesaver = this\n\t\t\t\t, type = blob.type\n\t\t\t\t, force = type === force_saveable_type\n\t\t\t\t, object_url\n\t\t\t\t, dispatch_all = function() {\n\t\t\t\t\tdispatch(filesaver, \"writestart progress write writeend\".split(\" \"));\n\t\t\t\t}\n\t\t\t\t// on any filesys errors revert to saving with object URLs\n\t\t\t\t, fs_error = function() {\n\t\t\t\t\tif ((is_chrome_ios || (force && is_safari)) && view.FileReader) {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob urls\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function() {\n\t\t\t\t\t\t\tvar url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');\n\t\t\t\t\t\t\tvar popup = view.open(url, '_blank');\n\t\t\t\t\t\t\tif(!popup) view.location.href = url;\n\t\t\t\t\t\t\turl=undefined; // release reference before dispatching\n\t\t\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\t\t\tdispatch_all();\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t\tfilesaver.readyState = filesaver.INIT;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// don't create more object URLs than needed\n\t\t\t\t\tif (!object_url) {\n\t\t\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\t\t}\n\t\t\t\t\tif (force) {\n\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar opened = view.open(object_url, \"_blank\");\n\t\t\t\t\t\tif (!opened) {\n\t\t\t\t\t\t\t// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html\n\t\t\t\t\t\t\tview.location.href = object_url;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t}\n\t\t\t;\n\t\t\tfilesaver.readyState = filesaver.INIT;\n\n\t\t\tif (can_use_save_link) {\n\t\t\t\tobject_url = get_URL().createObjectURL(blob);\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tsave_link.href = object_url;\n\t\t\t\t\tsave_link.download = name;\n\t\t\t\t\tclick(save_link);\n\t\t\t\t\tdispatch_all();\n\t\t\t\t\trevoke(object_url);\n\t\t\t\t\tfilesaver.readyState = filesaver.DONE;\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfs_error();\n\t\t}\n\t\t, FS_proto = FileSaver.prototype\n\t\t, saveAs = function(blob, name, no_auto_bom) {\n\t\t\treturn new FileSaver(blob, name || blob.name || \"download\", no_auto_bom);\n\t\t}\n\t;\n\t// IE 10+ (native saveAs)\n\tif (typeof navigator !== \"undefined\" && navigator.msSaveOrOpenBlob) {\n\t\treturn function(blob, name, no_auto_bom) {\n\t\t\tname = name || blob.name || \"download\";\n\n\t\t\tif (!no_auto_bom) {\n\t\t\t\tblob = auto_bom(blob);\n\t\t\t}\n\t\t\treturn navigator.msSaveOrOpenBlob(blob, name);\n\t\t};\n\t}\n\n\tFS_proto.abort = function(){};\n\tFS_proto.readyState = FS_proto.INIT = 0;\n\tFS_proto.WRITING = 1;\n\tFS_proto.DONE = 2;\n\n\tFS_proto.error =\n\tFS_proto.onwritestart =\n\tFS_proto.onprogress =\n\tFS_proto.onwrite =\n\tFS_proto.onabort =\n\tFS_proto.onerror =\n\tFS_proto.onwriteend =\n\t\tnull;\n\n\treturn saveAs;\n}(\n\t typeof self !== \"undefined\" && self\n\t|| typeof window !== \"undefined\" && window\n\t|| this.content\n));\n// `self` is undefined in Firefox for Android content script context\n// while `this` is nsIContentFrameMessageManager\n// with an attribute `content` that corresponds to the window\n\nif (typeof module !== \"undefined\" && module.exports) {\n module.exports.saveAs = saveAs;\n} else if ((typeof define !== \"undefined\" && define !== null) && (define.amd !== null)) {\n define(\"FileSaver.js\", function() {\n return saveAs;\n });\n}\n\n},{}],8:[function(_dereq_,module,exports){\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n\n},{}],9:[function(_dereq_,module,exports){\n/*\n\n Copyright 2000, Silicon Graphics, Inc. All Rights Reserved.\n Copyright 2015, Google Inc. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to\n deal in the Software without restriction, including without limitation the\n rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n sell copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n\n The above copyright notice including the dates of first publication and\n either this permission notice or a reference to http://oss.sgi.com/projects/FreeB/\n shall be included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR\n IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n Original Code. The Original Code is: OpenGL Sample Implementation,\n Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,\n Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.\n Copyright in any portions created by third parties is as indicated\n elsewhere herein. All Rights Reserved.\n*/\n'use strict';var n;function t(a,b){return a.b===b.b&&a.a===b.a}function u(a,b){return a.ba?0:a;c=0>c?0:c;return a<=c?0===c?(b+d)/2:b+a/(a+c)*(d-b):d+c/(a+c)*(b-d)};function ea(a){var b=B(a.b);C(b,a.c);C(b.b,a.c);D(b,a.a);return b}function E(a,b){var c=!1,d=!1;a!==b&&(b.a!==a.a&&(d=!0,F(b.a,a.a)),b.d!==a.d&&(c=!0,G(b.d,a.d)),H(b,a),d||(C(b,a.a),a.a.c=a),c||(D(b,a.d),a.d.a=a))}function I(a){var b=a.b,c=!1;a.d!==a.b.d&&(c=!0,G(a.d,a.b.d));a.c===a?F(a.a,null):(a.b.d.a=J(a),a.a.c=a.c,H(a,J(a)),c||D(a,a.d));b.c===b?(F(b.a,null),G(b.d,null)):(a.d.a=J(b),b.a.c=b.c,H(b,J(b)));fa(a)}\nfunction K(a){var b=B(a),c=b.b;H(b,a.e);b.a=a.b.a;C(c,b.a);b.d=c.d=a.d;b=b.b;H(a.b,J(a.b));H(a.b,b);a.b.a=b.a;b.b.a.c=b.b;b.b.d=a.b.d;b.f=a.f;b.b.f=a.b.f;return b}function L(a,b){var c=!1,d=B(a),e=d.b;b.d!==a.d&&(c=!0,G(b.d,a.d));H(d,a.e);H(e,b);d.a=a.b.a;e.a=b.a;d.d=e.d=a.d;a.d.a=e;c||D(d,a.d);return d}function B(a){var b=new M,c=new M,d=a.b.h;c.h=d;d.b.h=b;b.h=a;a.b.h=c;b.b=c;b.c=b;b.e=c;c.b=b;c.c=c;return c.e=b}function H(a,b){var c=a.c,d=b.c;c.b.e=b;d.b.e=a;a.c=d;b.c=c}\nfunction C(a,b){var c=b.f,d=new N(b,c);c.e=d;b.f=d;c=d.c=a;do c.a=d,c=c.c;while(c!==a)}function D(a,b){var c=b.d,d=new ga(b,c);c.b=d;b.d=d;d.a=a;d.c=b.c;c=a;do c.d=d,c=c.e;while(c!==a)}function fa(a){var b=a.h;a=a.b.h;b.b.h=a;a.b.h=b}function F(a,b){var c=a.c,d=c;do d.a=b,d=d.c;while(d!==c);c=a.f;d=a.e;d.f=c;c.e=d}function G(a,b){var c=a.a,d=c;do d.d=b,d=d.e;while(d!==c);c=a.d;d=a.b;d.d=c;c.b=d};function ha(a){var b=0;Math.abs(a[1])>Math.abs(a[0])&&(b=1);Math.abs(a[2])>Math.abs(a[b])&&(b=2);return b};var O=4*1E150;function P(a,b){a.f+=b.f;a.b.f+=b.b.f}function ia(a,b,c){a=a.a;b=b.a;c=c.a;if(b.b.a===a)return c.b.a===a?u(b.a,c.a)?0>=x(c.b.a,b.a,c.a):0<=x(b.b.a,c.a,b.a):0>=x(c.b.a,a,c.a);if(c.b.a===a)return 0<=x(b.b.a,a,b.a);b=v(b.b.a,a,b.a);a=v(c.b.a,a,c.a);return b>=a}function Q(a){a.a.i=null;var b=a.e;b.a.c=b.c;b.c.a=b.a;a.e=null}function ja(a,b){I(a.a);a.c=!1;a.a=b;b.i=a}function ka(a){var b=a.a.a;do a=R(a);while(a.a.a===b);a.c&&(b=L(S(a).a.b,a.a.e),ja(a,b),a=R(a));return a}\nfunction la(a,b,c){var d=new ma;d.a=c;d.e=na(a.f,b.e,d);return c.i=d}function oa(a,b){switch(a.s){case 100130:return 0!==(b&1);case 100131:return 0!==b;case 100132:return 0b;case 100134:return 2<=b||-2>=b}return!1}function pa(a){var b=a.a,c=b.d;c.c=a.d;c.a=b;Q(a)}function T(a,b,c){a=b;for(b=b.a;a!==c;){a.c=!1;var d=S(a),e=d.a;if(e.a!==b.a){if(!d.c){pa(a);break}e=L(b.c.b,e.b);ja(d,e)}b.c!==e&&(E(J(e),e),E(b,e));pa(a);b=d.a;a=d}return b}\nfunction U(a,b,c,d,e,f){var g=!0;do la(a,b,c.b),c=c.c;while(c!==d);for(null===e&&(e=S(b).a.b.c);;){d=S(b);c=d.a.b;if(c.a!==e.a)break;c.c!==e&&(E(J(c),c),E(J(e),c));d.f=b.f-c.f;d.d=oa(a,d.f);b.b=!0;!g&&qa(a,b)&&(P(c,e),Q(b),I(e));g=!1;b=d;e=c}b.b=!0;f&&ra(a,b)}function sa(a,b,c,d,e){var f=[b.g[0],b.g[1],b.g[2]];b.d=null;b.d=a.o?a.o(f,c,d,a.c)||null:null;null===b.d&&(e?a.n||(V(a,100156),a.n=!0):b.d=c[0])}\nfunction ta(a,b,c){var d=[null,null,null,null];d[0]=b.a.d;d[1]=c.a.d;sa(a,b.a,d,[.5,.5,0,0],!1);E(b,c)}function ua(a,b,c,d,e){var f=Math.abs(b.b-a.b)+Math.abs(b.a-a.a),g=Math.abs(c.b-a.b)+Math.abs(c.a-a.a),h=e+1;d[e]=.5*g/(f+g);d[h]=.5*f/(f+g);a.g[0]+=d[e]*b.g[0]+d[h]*c.g[0];a.g[1]+=d[e]*b.g[1]+d[h]*c.g[1];a.g[2]+=d[e]*b.g[2]+d[h]*c.g[2]}\nfunction qa(a,b){var c=S(b),d=b.a,e=c.a;if(u(d.a,e.a)){if(0=l?W(c,l):u(h[g[l>>1]],h[g[l]])?W(c,l):va(c,l));h[f]=null;k[f]=c.b;c.b=f}else for(c.c[-(f+1)]=null;0x(d.b.a,e.a,d.a))return!1;R(b).b=b.b=!0;K(d.b);E(J(e),d)}return!0}\nfunction wa(a,b){var c=S(b),d=b.a,e=c.a,f=d.a,g=e.a,h=d.b.a,k=e.b.a,l=new N;x(h,a.a,f);x(k,a.a,g);if(f===g||Math.min(f.a,h.a)>Math.max(g.a,k.a))return!1;if(u(f,g)){if(0x(h,g,f))return!1;var r=h,p=f,q=k,y=g,m,w;u(r,p)||(m=r,r=p,p=m);u(q,y)||(m=q,q=y,y=m);u(r,q)||(m=r,r=q,q=m,m=p,p=y,y=m);u(q,p)?u(p,y)?(m=v(r,q,p),w=v(q,p,y),0>m+w&&(m=-m,w=-w),l.b=A(m,q.b,w,p.b)):(m=x(r,q,p),w=-x(r,y,p),0>m+w&&(m=-m,w=-w),l.b=A(m,q.b,w,y.b)):l.b=(q.b+p.b)/2;z(r,p)||(m=r,r=p,p=m);z(q,y)||\n(m=q,q=y,y=m);z(r,q)||(m=r,r=q,q=m,m=p,p=y,y=m);z(q,p)?z(p,y)?(m=aa(r,q,p),w=aa(q,p,y),0>m+w&&(m=-m,w=-w),l.a=A(m,q.a,w,p.a)):(m=ba(r,q,p),w=-ba(r,y,p),0>m+w&&(m=-m,w=-w),l.a=A(m,q.a,w,y.a)):l.a=(q.a+p.a)/2;u(l,a.a)&&(l.b=a.a.b,l.a=a.a.a);r=u(f,g)?f:g;u(r,l)&&(l.b=r.b,l.a=r.a);if(t(l,f)||t(l,g))return qa(a,b),!1;if(!t(h,a.a)&&0<=x(h,a.a,l)||!t(k,a.a)&&0>=x(k,a.a,l)){if(k===a.a)return K(d.b),E(e.b,d),b=ka(b),d=S(b).a,T(a,S(b),c),U(a,b,J(d),d,d,!0),!0;if(h===a.a){K(e.b);E(d.e,J(e));f=c=b;g=f.a.b.a;\ndo f=R(f);while(f.a.b.a===g);b=f;f=S(b).a.b.c;c.a=J(e);e=T(a,c,null);U(a,b,e.c,d.b.c,f,!0);return!0}0<=x(h,a.a,l)&&(R(b).b=b.b=!0,K(d.b),d.a.b=a.a.b,d.a.a=a.a.a);0>=x(k,a.a,l)&&(b.b=c.b=!0,K(e.b),e.a.b=a.a.b,e.a.a=a.a.a);return!1}K(d.b);K(e.b);E(J(e),d);d.a.b=l.b;d.a.a=l.a;d.a.h=xa(a.e,d.a);d=d.a;e=[0,0,0,0];l=[f.d,h.d,g.d,k.d];d.g[0]=d.g[1]=d.g[2]=0;ua(d,f,h,e,0);ua(d,g,k,e,2);sa(a,d,l,e,!0);R(b).b=b.b=c.b=!0;return!1}\nfunction ra(a,b){for(var c=S(b);;){for(;c.b;)b=c,c=S(c);if(!b.b&&(c=b,b=R(b),null===b||!b.b))break;b.b=!1;var d=b.a,e=c.a,f;if(f=d.b.a!==e.b.a)a:{f=b;var g=S(f),h=f.a,k=g.a,l=void 0;if(u(h.b.a,k.b.a)){if(0>x(h.b.a,k.b.a,h.a)){f=!1;break a}R(f).b=f.b=!0;l=K(h);E(k.b,l);l.d.c=f.d}else{if(0e;++e){var f=a[e];-1E150>f&&(f=-1E150,c=!0);1E150h;++h){var k=a.g[h];kb[h]&&(b[h]=k,c[h]=a)}a=0;b[1]-f[1]>b[0]-f[0]&&(a=1);b[2]-f[2]>b[a]-f[a]&&(a=2);if(f[a]>=b[a])e[0]=0,e[1]=0,e[2]=1;else{b=0;f=g[a];c=c[a];g=[0,0,0];f=[f.g[0]-c.g[0],f.g[1]-c.g[1],f.g[2]-c.g[2]];h=[0,0,0];for(a=d.e;a!==d;a=\na.e)h[0]=a.g[0]-c.g[0],h[1]=a.g[1]-c.g[1],h[2]=a.g[2]-c.g[2],g[0]=f[1]*h[2]-f[2]*h[1],g[1]=f[2]*h[0]-f[0]*h[2],g[2]=f[0]*h[1]-f[1]*h[0],k=g[0]*g[0]+g[1]*g[1]+g[2]*g[2],k>b&&(b=k,e[0]=g[0],e[1]=g[1],e[2]=g[2]);0>=b&&(e[0]=e[1]=e[2]=0,e[ha(f)]=1)}d=!0}g=ha(e);a=this.b.c;b=(g+1)%3;c=(g+2)%3;g=0=b.f)){do e+=(b.a.b-b.b.a.b)*(b.a.a+b.b.a.a),b=b.e;while(b!==a.a)}if(0>e)for(e=this.b.c,d=e.e;d!==\ne;d=d.e)d.a=-d.a}this.n=!1;e=this.b.b;for(a=e.h;a!==e;a=d)if(d=a.h,b=a.e,t(a.a,a.b.a)&&a.e.e!==a&&(ta(this,b,a),I(a),a=b,b=a.e),b.e===a){if(b!==a){if(b===d||b===d.b)d=d.h;I(b)}if(a===d||a===d.b)d=d.h;I(a)}this.e=e=new Da;d=this.b.c;for(a=d.e;a!==d;a=a.e)a.h=xa(e,a);Ea(e);this.f=new Aa(this);za(this,-O);for(za(this,O);null!==(e=Fa(this.e));){for(;;){a:if(a=this.e,0===a.a)d=Ga(a.b);else if(d=a.c[a.d[a.a-1]],0!==a.b.a&&(a=Ga(a.b),u(a,d))){d=a;break a}if(null===d||!t(d,e))break;d=Fa(this.e);ta(this,e.c,\nd.c)}ya(this,e)}this.a=this.f.a.a.b.a.a;for(e=0;null!==(d=this.f.a.a.b);)d.h||++e,Q(d);this.f=null;e=this.e;e.b=null;e.d=null;this.e=e.c=null;e=this.b;for(a=e.a.b;a!==e.a;a=d)d=a.b,a=a.a,a.e.e===a&&(P(a.c,a),I(a));if(!this.n){e=this.b;if(this.m)for(a=e.b.h;a!==e.b;a=d)d=a.h,a.b.d.c!==a.d.c?a.f=a.d.c?1:-1:I(a);else for(a=e.a.b;a!==e.a;a=d)if(d=a.b,a.c){for(a=a.a;u(a.b.a,a.a);a=a.c.b);for(;u(a.a,a.b.a);a=a.e);b=a.c.b;for(c=void 0;a.e!==b;)if(u(a.b.a,b.a)){for(;b.e!==a&&(ca(b.e)||0>=x(b.a,b.b.a,b.e.b.a));)c=\nL(b.e,b),b=c.b;b=b.c.b}else{for(;b.e!==a&&(da(a.c.b)||0<=x(a.b.a,a.a,a.c.b.a));)c=L(a,a.c.b),a=c.b;a=a.e}for(;b.e.e!==a;)c=L(b.e,b),b=c.b}if(this.h||this.i||this.k||this.l)if(this.m)for(e=this.b,d=e.a.b;d!==e.a;d=d.b){if(d.c){this.h&&this.h(2,this.c);a=d.a;do this.k&&this.k(a.a.d,this.c),a=a.e;while(a!==d.a);this.i&&this.i(this.c)}}else{e=this.b;d=!!this.l;a=!1;b=-1;for(c=e.a.d;c!==e.a;c=c.d)if(c.c){a||(this.h&&this.h(4,this.c),a=!0);g=c.a;do d&&(f=g.b.d.c?0:1,b!==f&&(b=f,this.l&&this.l(!!b,this.c))),\nthis.k&&this.k(g.a.d,this.c),g=g.e;while(g!==c.a)}a&&this.i&&this.i(this.c)}if(this.r){e=this.b;for(a=e.a.b;a!==e.a;a=d)if(d=a.b,!a.c){b=a.a;c=b.e;g=void 0;do g=c,c=g.e,g.d=null,null===g.b.d&&(g.c===g?F(g.a,null):(g.a.c=g.c,H(g,J(g))),f=g.b,f.c===f?F(f.a,null):(f.a.c=f.c,H(f,J(f))),fa(g));while(g!==b);b=a.d;a=a.b;a.d=b;b.b=a}this.r(this.b);this.c=this.b=null;return}}this.b=this.c=null};\nfunction Z(a,b){if(a.d!==b)for(;a.d!==b;)if(a.dc.f&&(c.f*=2,c.c=Ja(c.c,c.f+1));var e;0===c.b?e=d:(e=c.b,c.b=c.c[c.b]);c.e[e]=b;c.c[e]=d;c.d[d]=e;c.h&&va(c,d);return e}c=a.a++;a.c[c]=b;return-(c+1)}\nfunction Fa(a){if(0===a.a)return Ka(a.b);var b=a.c[a.d[a.a-1]];if(0!==a.b.a&&u(Ga(a.b),b))return Ka(a.b);do--a.a;while(0a.a||u(d[g],d[k])){c[f]=g;e[g]=f;break}c[f]=k;e[k]=f;f=h}}function va(a,b){for(var c=a.d,d=a.e,e=a.c,f=b,g=c[f];;){var h=f>>1,k=c[h];if(0===h||u(d[k],d[g])){c[f]=g;e[g]=f;break}c[f]=k;e[k]=f;f=h}};function ma(){this.e=this.a=null;this.f=0;this.c=this.b=this.h=this.d=!1}function S(a){return a.e.c.b}function R(a){return a.e.a.b};this.libtess={GluTesselator:X,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},\ngluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}};X.prototype.gluDeleteTess=X.prototype.x;\nX.prototype.gluTessProperty=X.prototype.B;X.prototype.gluGetTessProperty=X.prototype.y;X.prototype.gluTessNormal=X.prototype.A;X.prototype.gluTessCallback=X.prototype.z;X.prototype.gluTessVertex=X.prototype.C;X.prototype.gluTessBeginPolygon=X.prototype.u;X.prototype.gluTessBeginContour=X.prototype.t;X.prototype.gluTessEndContour=X.prototype.v;X.prototype.gluTessEndPolygon=X.prototype.w; if (typeof module !== 'undefined') { module.exports = this.libtess; }\n\n},{}],10:[function(_dereq_,module,exports){\n(function (Buffer){\n/**\n * https://opentype.js.org v0.9.0 | (c) Frederik De Bleser and other contributors | MIT License | Uses tiny-inflate by Devon Govett and string.prototype.codepointat polyfill by Mathias Bynens\n */\n\n(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof define === 'function' && define.amd ? define(['exports'], factory) :\n\t(factory((global.opentype = {})));\n}(this, (function (exports) { 'use strict';\n\n\t/*! https://mths.be/codepointat v0.2.0 by @mathias */\n\tif (!String.prototype.codePointAt) {\n\t\t(function() {\n\t\t\tvar defineProperty = (function() {\n\t\t\t\t// IE 8 only supports `Object.defineProperty` on DOM elements\n\t\t\t\ttry {\n\t\t\t\t\tvar object = {};\n\t\t\t\t\tvar $defineProperty = Object.defineProperty;\n\t\t\t\t\tvar result = $defineProperty(object, object, object) && $defineProperty;\n\t\t\t\t} catch(error) {}\n\t\t\t\treturn result;\n\t\t\t}());\n\t\t\tvar codePointAt = function(position) {\n\t\t\t\tif (this == null) {\n\t\t\t\t\tthrow TypeError();\n\t\t\t\t}\n\t\t\t\tvar string = String(this);\n\t\t\t\tvar size = string.length;\n\t\t\t\t// `ToInteger`\n\t\t\t\tvar index = position ? Number(position) : 0;\n\t\t\t\tif (index != index) { // better `isNaN`\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t\t// Account for out-of-bounds indices:\n\t\t\t\tif (index < 0 || index >= size) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t\t// Get the first code unit\n\t\t\t\tvar first = string.charCodeAt(index);\n\t\t\t\tvar second;\n\t\t\t\tif ( // check if it’s the start of a surrogate pair\n\t\t\t\t\tfirst >= 0xD800 && first <= 0xDBFF && // high surrogate\n\t\t\t\t\tsize > index + 1 // there is a next code unit\n\t\t\t\t) {\n\t\t\t\t\tsecond = string.charCodeAt(index + 1);\n\t\t\t\t\tif (second >= 0xDC00 && second <= 0xDFFF) { // low surrogate\n\t\t\t\t\t\t// https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n\t\t\t\t\t\treturn (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn first;\n\t\t\t};\n\t\t\tif (defineProperty) {\n\t\t\t\tdefineProperty(String.prototype, 'codePointAt', {\n\t\t\t\t\t'value': codePointAt,\n\t\t\t\t\t'configurable': true,\n\t\t\t\t\t'writable': true\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tString.prototype.codePointAt = codePointAt;\n\t\t\t}\n\t\t}());\n\t}\n\n\tvar TINF_OK = 0;\n\tvar TINF_DATA_ERROR = -3;\n\n\tfunction Tree() {\n\t this.table = new Uint16Array(16); /* table of code length counts */\n\t this.trans = new Uint16Array(288); /* code -> symbol translation table */\n\t}\n\n\tfunction Data(source, dest) {\n\t this.source = source;\n\t this.sourceIndex = 0;\n\t this.tag = 0;\n\t this.bitcount = 0;\n\t \n\t this.dest = dest;\n\t this.destLen = 0;\n\t \n\t this.ltree = new Tree(); /* dynamic length/symbol tree */\n\t this.dtree = new Tree(); /* dynamic distance tree */\n\t}\n\n\t/* --------------------------------------------------- *\n\t * -- uninitialized global data (static structures) -- *\n\t * --------------------------------------------------- */\n\n\tvar sltree = new Tree();\n\tvar sdtree = new Tree();\n\n\t/* extra bits and base tables for length codes */\n\tvar length_bits = new Uint8Array(30);\n\tvar length_base = new Uint16Array(30);\n\n\t/* extra bits and base tables for distance codes */\n\tvar dist_bits = new Uint8Array(30);\n\tvar dist_base = new Uint16Array(30);\n\n\t/* special ordering of code length codes */\n\tvar clcidx = new Uint8Array([\n\t 16, 17, 18, 0, 8, 7, 9, 6,\n\t 10, 5, 11, 4, 12, 3, 13, 2,\n\t 14, 1, 15\n\t]);\n\n\t/* used by tinf_decode_trees, avoids allocations every call */\n\tvar code_tree = new Tree();\n\tvar lengths = new Uint8Array(288 + 32);\n\n\t/* ----------------------- *\n\t * -- utility functions -- *\n\t * ----------------------- */\n\n\t/* build extra bits and base tables */\n\tfunction tinf_build_bits_base(bits, base, delta, first) {\n\t var i, sum;\n\n\t /* build bits table */\n\t for (i = 0; i < delta; ++i) { bits[i] = 0; }\n\t for (i = 0; i < 30 - delta; ++i) { bits[i + delta] = i / delta | 0; }\n\n\t /* build base table */\n\t for (sum = first, i = 0; i < 30; ++i) {\n\t base[i] = sum;\n\t sum += 1 << bits[i];\n\t }\n\t}\n\n\t/* build the fixed huffman trees */\n\tfunction tinf_build_fixed_trees(lt, dt) {\n\t var i;\n\n\t /* build fixed length tree */\n\t for (i = 0; i < 7; ++i) { lt.table[i] = 0; }\n\n\t lt.table[7] = 24;\n\t lt.table[8] = 152;\n\t lt.table[9] = 112;\n\n\t for (i = 0; i < 24; ++i) { lt.trans[i] = 256 + i; }\n\t for (i = 0; i < 144; ++i) { lt.trans[24 + i] = i; }\n\t for (i = 0; i < 8; ++i) { lt.trans[24 + 144 + i] = 280 + i; }\n\t for (i = 0; i < 112; ++i) { lt.trans[24 + 144 + 8 + i] = 144 + i; }\n\n\t /* build fixed distance tree */\n\t for (i = 0; i < 5; ++i) { dt.table[i] = 0; }\n\n\t dt.table[5] = 32;\n\n\t for (i = 0; i < 32; ++i) { dt.trans[i] = i; }\n\t}\n\n\t/* given an array of code lengths, build a tree */\n\tvar offs = new Uint16Array(16);\n\n\tfunction tinf_build_tree(t, lengths, off, num) {\n\t var i, sum;\n\n\t /* clear code length count table */\n\t for (i = 0; i < 16; ++i) { t.table[i] = 0; }\n\n\t /* scan symbol lengths, and sum code length counts */\n\t for (i = 0; i < num; ++i) { t.table[lengths[off + i]]++; }\n\n\t t.table[0] = 0;\n\n\t /* compute offset table for distribution sort */\n\t for (sum = 0, i = 0; i < 16; ++i) {\n\t offs[i] = sum;\n\t sum += t.table[i];\n\t }\n\n\t /* create code->symbol translation table (symbols sorted by code) */\n\t for (i = 0; i < num; ++i) {\n\t if (lengths[off + i]) { t.trans[offs[lengths[off + i]]++] = i; }\n\t }\n\t}\n\n\t/* ---------------------- *\n\t * -- decode functions -- *\n\t * ---------------------- */\n\n\t/* get one bit from source stream */\n\tfunction tinf_getbit(d) {\n\t /* check if tag is empty */\n\t if (!d.bitcount--) {\n\t /* load next tag */\n\t d.tag = d.source[d.sourceIndex++];\n\t d.bitcount = 7;\n\t }\n\n\t /* shift bit out of tag */\n\t var bit = d.tag & 1;\n\t d.tag >>>= 1;\n\n\t return bit;\n\t}\n\n\t/* read a num bit value from a stream and add base */\n\tfunction tinf_read_bits(d, num, base) {\n\t if (!num)\n\t { return base; }\n\n\t while (d.bitcount < 24) {\n\t d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n\t d.bitcount += 8;\n\t }\n\n\t var val = d.tag & (0xffff >>> (16 - num));\n\t d.tag >>>= num;\n\t d.bitcount -= num;\n\t return val + base;\n\t}\n\n\t/* given a data stream and a tree, decode a symbol */\n\tfunction tinf_decode_symbol(d, t) {\n\t while (d.bitcount < 24) {\n\t d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n\t d.bitcount += 8;\n\t }\n\t \n\t var sum = 0, cur = 0, len = 0;\n\t var tag = d.tag;\n\n\t /* get more bits while code value is above sum */\n\t do {\n\t cur = 2 * cur + (tag & 1);\n\t tag >>>= 1;\n\t ++len;\n\n\t sum += t.table[len];\n\t cur -= t.table[len];\n\t } while (cur >= 0);\n\t \n\t d.tag = tag;\n\t d.bitcount -= len;\n\n\t return t.trans[sum + cur];\n\t}\n\n\t/* given a data stream, decode dynamic trees from it */\n\tfunction tinf_decode_trees(d, lt, dt) {\n\t var hlit, hdist, hclen;\n\t var i, num, length;\n\n\t /* get 5 bits HLIT (257-286) */\n\t hlit = tinf_read_bits(d, 5, 257);\n\n\t /* get 5 bits HDIST (1-32) */\n\t hdist = tinf_read_bits(d, 5, 1);\n\n\t /* get 4 bits HCLEN (4-19) */\n\t hclen = tinf_read_bits(d, 4, 4);\n\n\t for (i = 0; i < 19; ++i) { lengths[i] = 0; }\n\n\t /* read code lengths for code length alphabet */\n\t for (i = 0; i < hclen; ++i) {\n\t /* get 3 bits code length (0-7) */\n\t var clen = tinf_read_bits(d, 3, 0);\n\t lengths[clcidx[i]] = clen;\n\t }\n\n\t /* build code length tree */\n\t tinf_build_tree(code_tree, lengths, 0, 19);\n\n\t /* decode code lengths for the dynamic trees */\n\t for (num = 0; num < hlit + hdist;) {\n\t var sym = tinf_decode_symbol(d, code_tree);\n\n\t switch (sym) {\n\t case 16:\n\t /* copy previous code length 3-6 times (read 2 bits) */\n\t var prev = lengths[num - 1];\n\t for (length = tinf_read_bits(d, 2, 3); length; --length) {\n\t lengths[num++] = prev;\n\t }\n\t break;\n\t case 17:\n\t /* repeat code length 0 for 3-10 times (read 3 bits) */\n\t for (length = tinf_read_bits(d, 3, 3); length; --length) {\n\t lengths[num++] = 0;\n\t }\n\t break;\n\t case 18:\n\t /* repeat code length 0 for 11-138 times (read 7 bits) */\n\t for (length = tinf_read_bits(d, 7, 11); length; --length) {\n\t lengths[num++] = 0;\n\t }\n\t break;\n\t default:\n\t /* values 0-15 represent the actual code lengths */\n\t lengths[num++] = sym;\n\t break;\n\t }\n\t }\n\n\t /* build dynamic trees */\n\t tinf_build_tree(lt, lengths, 0, hlit);\n\t tinf_build_tree(dt, lengths, hlit, hdist);\n\t}\n\n\t/* ----------------------------- *\n\t * -- block inflate functions -- *\n\t * ----------------------------- */\n\n\t/* given a stream and two trees, inflate a block of data */\n\tfunction tinf_inflate_block_data(d, lt, dt) {\n\t while (1) {\n\t var sym = tinf_decode_symbol(d, lt);\n\n\t /* check for end of block */\n\t if (sym === 256) {\n\t return TINF_OK;\n\t }\n\n\t if (sym < 256) {\n\t d.dest[d.destLen++] = sym;\n\t } else {\n\t var length, dist, offs;\n\t var i;\n\n\t sym -= 257;\n\n\t /* possibly get more bits from length code */\n\t length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n\t dist = tinf_decode_symbol(d, dt);\n\n\t /* possibly get more bits from distance code */\n\t offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n\t /* copy match */\n\t for (i = offs; i < offs + length; ++i) {\n\t d.dest[d.destLen++] = d.dest[i];\n\t }\n\t }\n\t }\n\t}\n\n\t/* inflate an uncompressed block of data */\n\tfunction tinf_inflate_uncompressed_block(d) {\n\t var length, invlength;\n\t var i;\n\t \n\t /* unread from bitbuffer */\n\t while (d.bitcount > 8) {\n\t d.sourceIndex--;\n\t d.bitcount -= 8;\n\t }\n\n\t /* get length */\n\t length = d.source[d.sourceIndex + 1];\n\t length = 256 * length + d.source[d.sourceIndex];\n\n\t /* get one's complement of length */\n\t invlength = d.source[d.sourceIndex + 3];\n\t invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n\t /* check length */\n\t if (length !== (~invlength & 0x0000ffff))\n\t { return TINF_DATA_ERROR; }\n\n\t d.sourceIndex += 4;\n\n\t /* copy block */\n\t for (i = length; i; --i)\n\t { d.dest[d.destLen++] = d.source[d.sourceIndex++]; }\n\n\t /* make sure we start next block on a byte boundary */\n\t d.bitcount = 0;\n\n\t return TINF_OK;\n\t}\n\n\t/* inflate stream from source to dest */\n\tfunction tinf_uncompress(source, dest) {\n\t var d = new Data(source, dest);\n\t var bfinal, btype, res;\n\n\t do {\n\t /* read final block flag */\n\t bfinal = tinf_getbit(d);\n\n\t /* read block type (2 bits) */\n\t btype = tinf_read_bits(d, 2, 0);\n\n\t /* decompress block */\n\t switch (btype) {\n\t case 0:\n\t /* decompress uncompressed block */\n\t res = tinf_inflate_uncompressed_block(d);\n\t break;\n\t case 1:\n\t /* decompress block with fixed huffman trees */\n\t res = tinf_inflate_block_data(d, sltree, sdtree);\n\t break;\n\t case 2:\n\t /* decompress block with dynamic huffman trees */\n\t tinf_decode_trees(d, d.ltree, d.dtree);\n\t res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n\t break;\n\t default:\n\t res = TINF_DATA_ERROR;\n\t }\n\n\t if (res !== TINF_OK)\n\t { throw new Error('Data error'); }\n\n\t } while (!bfinal);\n\n\t if (d.destLen < d.dest.length) {\n\t if (typeof d.dest.slice === 'function')\n\t { return d.dest.slice(0, d.destLen); }\n\t else\n\t { return d.dest.subarray(0, d.destLen); }\n\t }\n\t \n\t return d.dest;\n\t}\n\n\t/* -------------------- *\n\t * -- initialization -- *\n\t * -------------------- */\n\n\t/* build fixed huffman trees */\n\ttinf_build_fixed_trees(sltree, sdtree);\n\n\t/* build extra bits and base tables */\n\ttinf_build_bits_base(length_bits, length_base, 4, 3);\n\ttinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n\t/* fix a special case */\n\tlength_bits[28] = 0;\n\tlength_base[28] = 258;\n\n\tvar tinyInflate = tinf_uncompress;\n\n\t// The Bounding Box object\n\n\tfunction derive(v0, v1, v2, v3, t) {\n\t return Math.pow(1 - t, 3) * v0 +\n\t 3 * Math.pow(1 - t, 2) * t * v1 +\n\t 3 * (1 - t) * Math.pow(t, 2) * v2 +\n\t Math.pow(t, 3) * v3;\n\t}\n\t/**\n\t * A bounding box is an enclosing box that describes the smallest measure within which all the points lie.\n\t * It is used to calculate the bounding box of a glyph or text path.\n\t *\n\t * On initialization, x1/y1/x2/y2 will be NaN. Check if the bounding box is empty using `isEmpty()`.\n\t *\n\t * @exports opentype.BoundingBox\n\t * @class\n\t * @constructor\n\t */\n\tfunction BoundingBox() {\n\t this.x1 = Number.NaN;\n\t this.y1 = Number.NaN;\n\t this.x2 = Number.NaN;\n\t this.y2 = Number.NaN;\n\t}\n\n\t/**\n\t * Returns true if the bounding box is empty, that is, no points have been added to the box yet.\n\t */\n\tBoundingBox.prototype.isEmpty = function() {\n\t return isNaN(this.x1) || isNaN(this.y1) || isNaN(this.x2) || isNaN(this.y2);\n\t};\n\n\t/**\n\t * Add the point to the bounding box.\n\t * The x1/y1/x2/y2 coordinates of the bounding box will now encompass the given point.\n\t * @param {number} x - The X coordinate of the point.\n\t * @param {number} y - The Y coordinate of the point.\n\t */\n\tBoundingBox.prototype.addPoint = function(x, y) {\n\t if (typeof x === 'number') {\n\t if (isNaN(this.x1) || isNaN(this.x2)) {\n\t this.x1 = x;\n\t this.x2 = x;\n\t }\n\t if (x < this.x1) {\n\t this.x1 = x;\n\t }\n\t if (x > this.x2) {\n\t this.x2 = x;\n\t }\n\t }\n\t if (typeof y === 'number') {\n\t if (isNaN(this.y1) || isNaN(this.y2)) {\n\t this.y1 = y;\n\t this.y2 = y;\n\t }\n\t if (y < this.y1) {\n\t this.y1 = y;\n\t }\n\t if (y > this.y2) {\n\t this.y2 = y;\n\t }\n\t }\n\t};\n\n\t/**\n\t * Add a X coordinate to the bounding box.\n\t * This extends the bounding box to include the X coordinate.\n\t * This function is used internally inside of addBezier.\n\t * @param {number} x - The X coordinate of the point.\n\t */\n\tBoundingBox.prototype.addX = function(x) {\n\t this.addPoint(x, null);\n\t};\n\n\t/**\n\t * Add a Y coordinate to the bounding box.\n\t * This extends the bounding box to include the Y coordinate.\n\t * This function is used internally inside of addBezier.\n\t * @param {number} y - The Y coordinate of the point.\n\t */\n\tBoundingBox.prototype.addY = function(y) {\n\t this.addPoint(null, y);\n\t};\n\n\t/**\n\t * Add a Bézier curve to the bounding box.\n\t * This extends the bounding box to include the entire Bézier.\n\t * @param {number} x0 - The starting X coordinate.\n\t * @param {number} y0 - The starting Y coordinate.\n\t * @param {number} x1 - The X coordinate of the first control point.\n\t * @param {number} y1 - The Y coordinate of the first control point.\n\t * @param {number} x2 - The X coordinate of the second control point.\n\t * @param {number} y2 - The Y coordinate of the second control point.\n\t * @param {number} x - The ending X coordinate.\n\t * @param {number} y - The ending Y coordinate.\n\t */\n\tBoundingBox.prototype.addBezier = function(x0, y0, x1, y1, x2, y2, x, y) {\n\t var this$1 = this;\n\n\t // This code is based on http://nishiohirokazu.blogspot.com/2009/06/how-to-calculate-bezier-curves-bounding.html\n\t // and https://github.com/icons8/svg-path-bounding-box\n\n\t var p0 = [x0, y0];\n\t var p1 = [x1, y1];\n\t var p2 = [x2, y2];\n\t var p3 = [x, y];\n\n\t this.addPoint(x0, y0);\n\t this.addPoint(x, y);\n\n\t for (var i = 0; i <= 1; i++) {\n\t var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n\t var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n\t var c = 3 * p1[i] - 3 * p0[i];\n\n\t if (a === 0) {\n\t if (b === 0) { continue; }\n\t var t = -c / b;\n\t if (0 < t && t < 1) {\n\t if (i === 0) { this$1.addX(derive(p0[i], p1[i], p2[i], p3[i], t)); }\n\t if (i === 1) { this$1.addY(derive(p0[i], p1[i], p2[i], p3[i], t)); }\n\t }\n\t continue;\n\t }\n\n\t var b2ac = Math.pow(b, 2) - 4 * c * a;\n\t if (b2ac < 0) { continue; }\n\t var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n\t if (0 < t1 && t1 < 1) {\n\t if (i === 0) { this$1.addX(derive(p0[i], p1[i], p2[i], p3[i], t1)); }\n\t if (i === 1) { this$1.addY(derive(p0[i], p1[i], p2[i], p3[i], t1)); }\n\t }\n\t var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n\t if (0 < t2 && t2 < 1) {\n\t if (i === 0) { this$1.addX(derive(p0[i], p1[i], p2[i], p3[i], t2)); }\n\t if (i === 1) { this$1.addY(derive(p0[i], p1[i], p2[i], p3[i], t2)); }\n\t }\n\t }\n\t};\n\n\t/**\n\t * Add a quadratic curve to the bounding box.\n\t * This extends the bounding box to include the entire quadratic curve.\n\t * @param {number} x0 - The starting X coordinate.\n\t * @param {number} y0 - The starting Y coordinate.\n\t * @param {number} x1 - The X coordinate of the control point.\n\t * @param {number} y1 - The Y coordinate of the control point.\n\t * @param {number} x - The ending X coordinate.\n\t * @param {number} y - The ending Y coordinate.\n\t */\n\tBoundingBox.prototype.addQuad = function(x0, y0, x1, y1, x, y) {\n\t var cp1x = x0 + 2 / 3 * (x1 - x0);\n\t var cp1y = y0 + 2 / 3 * (y1 - y0);\n\t var cp2x = cp1x + 1 / 3 * (x - x0);\n\t var cp2y = cp1y + 1 / 3 * (y - y0);\n\t this.addBezier(x0, y0, cp1x, cp1y, cp2x, cp2y, x, y);\n\t};\n\n\t// Geometric objects\n\n\t/**\n\t * A bézier path containing a set of path commands similar to a SVG path.\n\t * Paths can be drawn on a context using `draw`.\n\t * @exports opentype.Path\n\t * @class\n\t * @constructor\n\t */\n\tfunction Path() {\n\t this.commands = [];\n\t this.fill = 'black';\n\t this.stroke = null;\n\t this.strokeWidth = 1;\n\t}\n\n\t/**\n\t * @param {number} x\n\t * @param {number} y\n\t */\n\tPath.prototype.moveTo = function(x, y) {\n\t this.commands.push({\n\t type: 'M',\n\t x: x,\n\t y: y\n\t });\n\t};\n\n\t/**\n\t * @param {number} x\n\t * @param {number} y\n\t */\n\tPath.prototype.lineTo = function(x, y) {\n\t this.commands.push({\n\t type: 'L',\n\t x: x,\n\t y: y\n\t });\n\t};\n\n\t/**\n\t * Draws cubic curve\n\t * @function\n\t * curveTo\n\t * @memberof opentype.Path.prototype\n\t * @param {number} x1 - x of control 1\n\t * @param {number} y1 - y of control 1\n\t * @param {number} x2 - x of control 2\n\t * @param {number} y2 - y of control 2\n\t * @param {number} x - x of path point\n\t * @param {number} y - y of path point\n\t */\n\n\t/**\n\t * Draws cubic curve\n\t * @function\n\t * bezierCurveTo\n\t * @memberof opentype.Path.prototype\n\t * @param {number} x1 - x of control 1\n\t * @param {number} y1 - y of control 1\n\t * @param {number} x2 - x of control 2\n\t * @param {number} y2 - y of control 2\n\t * @param {number} x - x of path point\n\t * @param {number} y - y of path point\n\t * @see curveTo\n\t */\n\tPath.prototype.curveTo = Path.prototype.bezierCurveTo = function(x1, y1, x2, y2, x, y) {\n\t this.commands.push({\n\t type: 'C',\n\t x1: x1,\n\t y1: y1,\n\t x2: x2,\n\t y2: y2,\n\t x: x,\n\t y: y\n\t });\n\t};\n\n\t/**\n\t * Draws quadratic curve\n\t * @function\n\t * quadraticCurveTo\n\t * @memberof opentype.Path.prototype\n\t * @param {number} x1 - x of control\n\t * @param {number} y1 - y of control\n\t * @param {number} x - x of path point\n\t * @param {number} y - y of path point\n\t */\n\n\t/**\n\t * Draws quadratic curve\n\t * @function\n\t * quadTo\n\t * @memberof opentype.Path.prototype\n\t * @param {number} x1 - x of control\n\t * @param {number} y1 - y of control\n\t * @param {number} x - x of path point\n\t * @param {number} y - y of path point\n\t */\n\tPath.prototype.quadTo = Path.prototype.quadraticCurveTo = function(x1, y1, x, y) {\n\t this.commands.push({\n\t type: 'Q',\n\t x1: x1,\n\t y1: y1,\n\t x: x,\n\t y: y\n\t });\n\t};\n\n\t/**\n\t * Closes the path\n\t * @function closePath\n\t * @memberof opentype.Path.prototype\n\t */\n\n\t/**\n\t * Close the path\n\t * @function close\n\t * @memberof opentype.Path.prototype\n\t */\n\tPath.prototype.close = Path.prototype.closePath = function() {\n\t this.commands.push({\n\t type: 'Z'\n\t });\n\t};\n\n\t/**\n\t * Add the given path or list of commands to the commands of this path.\n\t * @param {Array} pathOrCommands - another opentype.Path, an opentype.BoundingBox, or an array of commands.\n\t */\n\tPath.prototype.extend = function(pathOrCommands) {\n\t if (pathOrCommands.commands) {\n\t pathOrCommands = pathOrCommands.commands;\n\t } else if (pathOrCommands instanceof BoundingBox) {\n\t var box = pathOrCommands;\n\t this.moveTo(box.x1, box.y1);\n\t this.lineTo(box.x2, box.y1);\n\t this.lineTo(box.x2, box.y2);\n\t this.lineTo(box.x1, box.y2);\n\t this.close();\n\t return;\n\t }\n\n\t Array.prototype.push.apply(this.commands, pathOrCommands);\n\t};\n\n\t/**\n\t * Calculate the bounding box of the path.\n\t * @returns {opentype.BoundingBox}\n\t */\n\tPath.prototype.getBoundingBox = function() {\n\t var this$1 = this;\n\n\t var box = new BoundingBox();\n\n\t var startX = 0;\n\t var startY = 0;\n\t var prevX = 0;\n\t var prevY = 0;\n\t for (var i = 0; i < this.commands.length; i++) {\n\t var cmd = this$1.commands[i];\n\t switch (cmd.type) {\n\t case 'M':\n\t box.addPoint(cmd.x, cmd.y);\n\t startX = prevX = cmd.x;\n\t startY = prevY = cmd.y;\n\t break;\n\t case 'L':\n\t box.addPoint(cmd.x, cmd.y);\n\t prevX = cmd.x;\n\t prevY = cmd.y;\n\t break;\n\t case 'Q':\n\t box.addQuad(prevX, prevY, cmd.x1, cmd.y1, cmd.x, cmd.y);\n\t prevX = cmd.x;\n\t prevY = cmd.y;\n\t break;\n\t case 'C':\n\t box.addBezier(prevX, prevY, cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n\t prevX = cmd.x;\n\t prevY = cmd.y;\n\t break;\n\t case 'Z':\n\t prevX = startX;\n\t prevY = startY;\n\t break;\n\t default:\n\t throw new Error('Unexpected path command ' + cmd.type);\n\t }\n\t }\n\t if (box.isEmpty()) {\n\t box.addPoint(0, 0);\n\t }\n\t return box;\n\t};\n\n\t/**\n\t * Draw the path to a 2D context.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context.\n\t */\n\tPath.prototype.draw = function(ctx) {\n\t var this$1 = this;\n\n\t ctx.beginPath();\n\t for (var i = 0; i < this.commands.length; i += 1) {\n\t var cmd = this$1.commands[i];\n\t if (cmd.type === 'M') {\n\t ctx.moveTo(cmd.x, cmd.y);\n\t } else if (cmd.type === 'L') {\n\t ctx.lineTo(cmd.x, cmd.y);\n\t } else if (cmd.type === 'C') {\n\t ctx.bezierCurveTo(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n\t } else if (cmd.type === 'Q') {\n\t ctx.quadraticCurveTo(cmd.x1, cmd.y1, cmd.x, cmd.y);\n\t } else if (cmd.type === 'Z') {\n\t ctx.closePath();\n\t }\n\t }\n\n\t if (this.fill) {\n\t ctx.fillStyle = this.fill;\n\t ctx.fill();\n\t }\n\n\t if (this.stroke) {\n\t ctx.strokeStyle = this.stroke;\n\t ctx.lineWidth = this.strokeWidth;\n\t ctx.stroke();\n\t }\n\t};\n\n\t/**\n\t * Convert the Path to a string of path data instructions\n\t * See http://www.w3.org/TR/SVG/paths.html#PathData\n\t * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values\n\t * @return {string}\n\t */\n\tPath.prototype.toPathData = function(decimalPlaces) {\n\t var this$1 = this;\n\n\t decimalPlaces = decimalPlaces !== undefined ? decimalPlaces : 2;\n\n\t function floatToString(v) {\n\t if (Math.round(v) === v) {\n\t return '' + Math.round(v);\n\t } else {\n\t return v.toFixed(decimalPlaces);\n\t }\n\t }\n\n\t function packValues() {\n\t var arguments$1 = arguments;\n\n\t var s = '';\n\t for (var i = 0; i < arguments.length; i += 1) {\n\t var v = arguments$1[i];\n\t if (v >= 0 && i > 0) {\n\t s += ' ';\n\t }\n\n\t s += floatToString(v);\n\t }\n\n\t return s;\n\t }\n\n\t var d = '';\n\t for (var i = 0; i < this.commands.length; i += 1) {\n\t var cmd = this$1.commands[i];\n\t if (cmd.type === 'M') {\n\t d += 'M' + packValues(cmd.x, cmd.y);\n\t } else if (cmd.type === 'L') {\n\t d += 'L' + packValues(cmd.x, cmd.y);\n\t } else if (cmd.type === 'C') {\n\t d += 'C' + packValues(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n\t } else if (cmd.type === 'Q') {\n\t d += 'Q' + packValues(cmd.x1, cmd.y1, cmd.x, cmd.y);\n\t } else if (cmd.type === 'Z') {\n\t d += 'Z';\n\t }\n\t }\n\n\t return d;\n\t};\n\n\t/**\n\t * Convert the path to an SVG element, as a string.\n\t * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values\n\t * @return {string}\n\t */\n\tPath.prototype.toSVG = function(decimalPlaces) {\n\t var svg = '';\n\t return svg;\n\t};\n\n\t/**\n\t * Convert the path to a DOM element.\n\t * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values\n\t * @return {SVGPathElement}\n\t */\n\tPath.prototype.toDOMElement = function(decimalPlaces) {\n\t var temporaryPath = this.toPathData(decimalPlaces);\n\t var newPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n\n\t newPath.setAttribute('d', temporaryPath);\n\n\t return newPath;\n\t};\n\n\t// Run-time checking of preconditions.\n\n\tfunction fail(message) {\n\t throw new Error(message);\n\t}\n\n\t// Precondition function that checks if the given predicate is true.\n\t// If not, it will throw an error.\n\tfunction argument(predicate, message) {\n\t if (!predicate) {\n\t fail(message);\n\t }\n\t}\n\tvar check = { fail: fail, argument: argument, assert: argument };\n\n\t// Data types used in the OpenType font file.\n\n\tvar LIMIT16 = 32768; // The limit at which a 16-bit number switches signs == 2^15\n\tvar LIMIT32 = 2147483648; // The limit at which a 32-bit number switches signs == 2 ^ 31\n\n\t/**\n\t * @exports opentype.decode\n\t * @class\n\t */\n\tvar decode = {};\n\t/**\n\t * @exports opentype.encode\n\t * @class\n\t */\n\tvar encode = {};\n\t/**\n\t * @exports opentype.sizeOf\n\t * @class\n\t */\n\tvar sizeOf = {};\n\n\t// Return a function that always returns the same value.\n\tfunction constant(v) {\n\t return function() {\n\t return v;\n\t };\n\t}\n\n\t// OpenType data types //////////////////////////////////////////////////////\n\n\t/**\n\t * Convert an 8-bit unsigned integer to a list of 1 byte.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.BYTE = function(v) {\n\t check.argument(v >= 0 && v <= 255, 'Byte value should be between 0 and 255.');\n\t return [v];\n\t};\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.BYTE = constant(1);\n\n\t/**\n\t * Convert a 8-bit signed integer to a list of 1 byte.\n\t * @param {string}\n\t * @returns {Array}\n\t */\n\tencode.CHAR = function(v) {\n\t return [v.charCodeAt(0)];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.CHAR = constant(1);\n\n\t/**\n\t * Convert an ASCII string to a list of bytes.\n\t * @param {string}\n\t * @returns {Array}\n\t */\n\tencode.CHARARRAY = function(v) {\n\t var b = [];\n\t for (var i = 0; i < v.length; i += 1) {\n\t b[i] = v.charCodeAt(i);\n\t }\n\n\t return b;\n\t};\n\n\t/**\n\t * @param {Array}\n\t * @returns {number}\n\t */\n\tsizeOf.CHARARRAY = function(v) {\n\t return v.length;\n\t};\n\n\t/**\n\t * Convert a 16-bit unsigned integer to a list of 2 bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.USHORT = function(v) {\n\t return [(v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.USHORT = constant(2);\n\n\t/**\n\t * Convert a 16-bit signed integer to a list of 2 bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.SHORT = function(v) {\n\t // Two's complement\n\t if (v >= LIMIT16) {\n\t v = -(2 * LIMIT16 - v);\n\t }\n\n\t return [(v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.SHORT = constant(2);\n\n\t/**\n\t * Convert a 24-bit unsigned integer to a list of 3 bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.UINT24 = function(v) {\n\t return [(v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.UINT24 = constant(3);\n\n\t/**\n\t * Convert a 32-bit unsigned integer to a list of 4 bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.ULONG = function(v) {\n\t return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.ULONG = constant(4);\n\n\t/**\n\t * Convert a 32-bit unsigned integer to a list of 4 bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.LONG = function(v) {\n\t // Two's complement\n\t if (v >= LIMIT32) {\n\t v = -(2 * LIMIT32 - v);\n\t }\n\n\t return [(v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.LONG = constant(4);\n\n\tencode.FIXED = encode.ULONG;\n\tsizeOf.FIXED = sizeOf.ULONG;\n\n\tencode.FWORD = encode.SHORT;\n\tsizeOf.FWORD = sizeOf.SHORT;\n\n\tencode.UFWORD = encode.USHORT;\n\tsizeOf.UFWORD = sizeOf.USHORT;\n\n\t/**\n\t * Convert a 32-bit Apple Mac timestamp integer to a list of 8 bytes, 64-bit timestamp.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.LONGDATETIME = function(v) {\n\t return [0, 0, 0, 0, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.LONGDATETIME = constant(8);\n\n\t/**\n\t * Convert a 4-char tag to a list of 4 bytes.\n\t * @param {string}\n\t * @returns {Array}\n\t */\n\tencode.TAG = function(v) {\n\t check.argument(v.length === 4, 'Tag should be exactly 4 ASCII characters.');\n\t return [v.charCodeAt(0),\n\t v.charCodeAt(1),\n\t v.charCodeAt(2),\n\t v.charCodeAt(3)];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.TAG = constant(4);\n\n\t// CFF data types ///////////////////////////////////////////////////////////\n\n\tencode.Card8 = encode.BYTE;\n\tsizeOf.Card8 = sizeOf.BYTE;\n\n\tencode.Card16 = encode.USHORT;\n\tsizeOf.Card16 = sizeOf.USHORT;\n\n\tencode.OffSize = encode.BYTE;\n\tsizeOf.OffSize = sizeOf.BYTE;\n\n\tencode.SID = encode.USHORT;\n\tsizeOf.SID = sizeOf.USHORT;\n\n\t// Convert a numeric operand or charstring number to a variable-size list of bytes.\n\t/**\n\t * Convert a numeric operand or charstring number to a variable-size list of bytes.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.NUMBER = function(v) {\n\t if (v >= -107 && v <= 107) {\n\t return [v + 139];\n\t } else if (v >= 108 && v <= 1131) {\n\t v = v - 108;\n\t return [(v >> 8) + 247, v & 0xFF];\n\t } else if (v >= -1131 && v <= -108) {\n\t v = -v - 108;\n\t return [(v >> 8) + 251, v & 0xFF];\n\t } else if (v >= -32768 && v <= 32767) {\n\t return encode.NUMBER16(v);\n\t } else {\n\t return encode.NUMBER32(v);\n\t }\n\t};\n\n\t/**\n\t * @param {number}\n\t * @returns {number}\n\t */\n\tsizeOf.NUMBER = function(v) {\n\t return encode.NUMBER(v).length;\n\t};\n\n\t/**\n\t * Convert a signed number between -32768 and +32767 to a three-byte value.\n\t * This ensures we always use three bytes, but is not the most compact format.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.NUMBER16 = function(v) {\n\t return [28, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.NUMBER16 = constant(3);\n\n\t/**\n\t * Convert a signed number between -(2^31) and +(2^31-1) to a five-byte value.\n\t * This is useful if you want to be sure you always use four bytes,\n\t * at the expense of wasting a few bytes for smaller numbers.\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.NUMBER32 = function(v) {\n\t return [29, (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF];\n\t};\n\n\t/**\n\t * @constant\n\t * @type {number}\n\t */\n\tsizeOf.NUMBER32 = constant(5);\n\n\t/**\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.REAL = function(v) {\n\t var value = v.toString();\n\n\t // Some numbers use an epsilon to encode the value. (e.g. JavaScript will store 0.0000001 as 1e-7)\n\t // This code converts it back to a number without the epsilon.\n\t var m = /\\.(\\d*?)(?:9{5,20}|0{5,20})\\d{0,2}(?:e(.+)|$)/.exec(value);\n\t if (m) {\n\t var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));\n\t value = (Math.round(v * epsilon) / epsilon).toString();\n\t }\n\n\t var nibbles = '';\n\t for (var i = 0, ii = value.length; i < ii; i += 1) {\n\t var c = value[i];\n\t if (c === 'e') {\n\t nibbles += value[++i] === '-' ? 'c' : 'b';\n\t } else if (c === '.') {\n\t nibbles += 'a';\n\t } else if (c === '-') {\n\t nibbles += 'e';\n\t } else {\n\t nibbles += c;\n\t }\n\t }\n\n\t nibbles += (nibbles.length & 1) ? 'f' : 'ff';\n\t var out = [30];\n\t for (var i$1 = 0, ii$1 = nibbles.length; i$1 < ii$1; i$1 += 2) {\n\t out.push(parseInt(nibbles.substr(i$1, 2), 16));\n\t }\n\n\t return out;\n\t};\n\n\t/**\n\t * @param {number}\n\t * @returns {number}\n\t */\n\tsizeOf.REAL = function(v) {\n\t return encode.REAL(v).length;\n\t};\n\n\tencode.NAME = encode.CHARARRAY;\n\tsizeOf.NAME = sizeOf.CHARARRAY;\n\n\tencode.STRING = encode.CHARARRAY;\n\tsizeOf.STRING = sizeOf.CHARARRAY;\n\n\t/**\n\t * @param {DataView} data\n\t * @param {number} offset\n\t * @param {number} numBytes\n\t * @returns {string}\n\t */\n\tdecode.UTF8 = function(data, offset, numBytes) {\n\t var codePoints = [];\n\t var numChars = numBytes;\n\t for (var j = 0; j < numChars; j++, offset += 1) {\n\t codePoints[j] = data.getUint8(offset);\n\t }\n\n\t return String.fromCharCode.apply(null, codePoints);\n\t};\n\n\t/**\n\t * @param {DataView} data\n\t * @param {number} offset\n\t * @param {number} numBytes\n\t * @returns {string}\n\t */\n\tdecode.UTF16 = function(data, offset, numBytes) {\n\t var codePoints = [];\n\t var numChars = numBytes / 2;\n\t for (var j = 0; j < numChars; j++, offset += 2) {\n\t codePoints[j] = data.getUint16(offset);\n\t }\n\n\t return String.fromCharCode.apply(null, codePoints);\n\t};\n\n\t/**\n\t * Convert a JavaScript string to UTF16-BE.\n\t * @param {string}\n\t * @returns {Array}\n\t */\n\tencode.UTF16 = function(v) {\n\t var b = [];\n\t for (var i = 0; i < v.length; i += 1) {\n\t var codepoint = v.charCodeAt(i);\n\t b[b.length] = (codepoint >> 8) & 0xFF;\n\t b[b.length] = codepoint & 0xFF;\n\t }\n\n\t return b;\n\t};\n\n\t/**\n\t * @param {string}\n\t * @returns {number}\n\t */\n\tsizeOf.UTF16 = function(v) {\n\t return v.length * 2;\n\t};\n\n\t// Data for converting old eight-bit Macintosh encodings to Unicode.\n\t// This representation is optimized for decoding; encoding is slower\n\t// and needs more memory. The assumption is that all opentype.js users\n\t// want to open fonts, but saving a font will be comparatively rare\n\t// so it can be more expensive. Keyed by IANA character set name.\n\t//\n\t// Python script for generating these strings:\n\t//\n\t// s = u''.join([chr(c).decode('mac_greek') for c in range(128, 256)])\n\t// print(s.encode('utf-8'))\n\t/**\n\t * @private\n\t */\n\tvar eightBitMacEncodings = {\n\t 'x-mac-croatian': // Python: 'mac_croatian'\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø' +\n\t '¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',\n\t 'x-mac-cyrillic': // Python: 'mac_cyrillic'\n\t 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњ' +\n\t 'јЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю',\n\t 'x-mac-gaelic': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/GAELIC.TXT\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæø' +\n\t 'ṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',\n\t 'x-mac-greek': // Python: 'mac_greek'\n\t 'Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩ' +\n\t 'άΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\\u00AD',\n\t 'x-mac-icelandic': // Python: 'mac_iceland'\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +\n\t '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n\t 'x-mac-inuit': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/INUIT.TXT\n\t 'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗ' +\n\t 'ᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',\n\t 'x-mac-ce': // Python: 'mac_latin2'\n\t 'ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅ' +\n\t 'ņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',\n\t macintosh: // Python: 'mac_roman'\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +\n\t '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n\t 'x-mac-romanian': // Python: 'mac_romanian'\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș' +\n\t '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',\n\t 'x-mac-turkish': // Python: 'mac_turkish'\n\t 'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +\n\t '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'\n\t};\n\n\t/**\n\t * Decodes an old-style Macintosh string. Returns either a Unicode JavaScript\n\t * string, or 'undefined' if the encoding is unsupported. For example, we do\n\t * not support Chinese, Japanese or Korean because these would need large\n\t * mapping tables.\n\t * @param {DataView} dataView\n\t * @param {number} offset\n\t * @param {number} dataLength\n\t * @param {string} encoding\n\t * @returns {string}\n\t */\n\tdecode.MACSTRING = function(dataView, offset, dataLength, encoding) {\n\t var table = eightBitMacEncodings[encoding];\n\t if (table === undefined) {\n\t return undefined;\n\t }\n\n\t var result = '';\n\t for (var i = 0; i < dataLength; i++) {\n\t var c = dataView.getUint8(offset + i);\n\t // In all eight-bit Mac encodings, the characters 0x00..0x7F are\n\t // mapped to U+0000..U+007F; we only need to look up the others.\n\t if (c <= 0x7F) {\n\t result += String.fromCharCode(c);\n\t } else {\n\t result += table[c & 0x7F];\n\t }\n\t }\n\n\t return result;\n\t};\n\n\t// Helper function for encode.MACSTRING. Returns a dictionary for mapping\n\t// Unicode character codes to their 8-bit MacOS equivalent. This table\n\t// is not exactly a super cheap data structure, but we do not care because\n\t// encoding Macintosh strings is only rarely needed in typical applications.\n\tvar macEncodingTableCache = typeof WeakMap === 'function' && new WeakMap();\n\tvar macEncodingCacheKeys;\n\tvar getMacEncodingTable = function (encoding) {\n\t // Since we use encoding as a cache key for WeakMap, it has to be\n\t // a String object and not a literal. And at least on NodeJS 2.10.1,\n\t // WeakMap requires that the same String instance is passed for cache hits.\n\t if (!macEncodingCacheKeys) {\n\t macEncodingCacheKeys = {};\n\t for (var e in eightBitMacEncodings) {\n\t /*jshint -W053 */ // Suppress \"Do not use String as a constructor.\"\n\t macEncodingCacheKeys[e] = new String(e);\n\t }\n\t }\n\n\t var cacheKey = macEncodingCacheKeys[encoding];\n\t if (cacheKey === undefined) {\n\t return undefined;\n\t }\n\n\t // We can't do \"if (cache.has(key)) {return cache.get(key)}\" here:\n\t // since garbage collection may run at any time, it could also kick in\n\t // between the calls to cache.has() and cache.get(). In that case,\n\t // we would return 'undefined' even though we do support the encoding.\n\t if (macEncodingTableCache) {\n\t var cachedTable = macEncodingTableCache.get(cacheKey);\n\t if (cachedTable !== undefined) {\n\t return cachedTable;\n\t }\n\t }\n\n\t var decodingTable = eightBitMacEncodings[encoding];\n\t if (decodingTable === undefined) {\n\t return undefined;\n\t }\n\n\t var encodingTable = {};\n\t for (var i = 0; i < decodingTable.length; i++) {\n\t encodingTable[decodingTable.charCodeAt(i)] = i + 0x80;\n\t }\n\n\t if (macEncodingTableCache) {\n\t macEncodingTableCache.set(cacheKey, encodingTable);\n\t }\n\n\t return encodingTable;\n\t};\n\n\t/**\n\t * Encodes an old-style Macintosh string. Returns a byte array upon success.\n\t * If the requested encoding is unsupported, or if the input string contains\n\t * a character that cannot be expressed in the encoding, the function returns\n\t * 'undefined'.\n\t * @param {string} str\n\t * @param {string} encoding\n\t * @returns {Array}\n\t */\n\tencode.MACSTRING = function(str, encoding) {\n\t var table = getMacEncodingTable(encoding);\n\t if (table === undefined) {\n\t return undefined;\n\t }\n\n\t var result = [];\n\t for (var i = 0; i < str.length; i++) {\n\t var c = str.charCodeAt(i);\n\n\t // In all eight-bit Mac encodings, the characters 0x00..0x7F are\n\t // mapped to U+0000..U+007F; we only need to look up the others.\n\t if (c >= 0x80) {\n\t c = table[c];\n\t if (c === undefined) {\n\t // str contains a Unicode character that cannot be encoded\n\t // in the requested encoding.\n\t return undefined;\n\t }\n\t }\n\t result[i] = c;\n\t // result.push(c);\n\t }\n\n\t return result;\n\t};\n\n\t/**\n\t * @param {string} str\n\t * @param {string} encoding\n\t * @returns {number}\n\t */\n\tsizeOf.MACSTRING = function(str, encoding) {\n\t var b = encode.MACSTRING(str, encoding);\n\t if (b !== undefined) {\n\t return b.length;\n\t } else {\n\t return 0;\n\t }\n\t};\n\n\t// Helper for encode.VARDELTAS\n\tfunction isByteEncodable(value) {\n\t return value >= -128 && value <= 127;\n\t}\n\n\t// Helper for encode.VARDELTAS\n\tfunction encodeVarDeltaRunAsZeroes(deltas, pos, result) {\n\t var runLength = 0;\n\t var numDeltas = deltas.length;\n\t while (pos < numDeltas && runLength < 64 && deltas[pos] === 0) {\n\t ++pos;\n\t ++runLength;\n\t }\n\t result.push(0x80 | (runLength - 1));\n\t return pos;\n\t}\n\n\t// Helper for encode.VARDELTAS\n\tfunction encodeVarDeltaRunAsBytes(deltas, offset, result) {\n\t var runLength = 0;\n\t var numDeltas = deltas.length;\n\t var pos = offset;\n\t while (pos < numDeltas && runLength < 64) {\n\t var value = deltas[pos];\n\t if (!isByteEncodable(value)) {\n\t break;\n\t }\n\n\t // Within a byte-encoded run of deltas, a single zero is best\n\t // stored literally as 0x00 value. However, if we have two or\n\t // more zeroes in a sequence, it is better to start a new run.\n\t // Fore example, the sequence of deltas [15, 15, 0, 15, 15]\n\t // becomes 6 bytes (04 0F 0F 00 0F 0F) when storing the zero\n\t // within the current run, but 7 bytes (01 0F 0F 80 01 0F 0F)\n\t // when starting a new run.\n\t if (value === 0 && pos + 1 < numDeltas && deltas[pos + 1] === 0) {\n\t break;\n\t }\n\n\t ++pos;\n\t ++runLength;\n\t }\n\t result.push(runLength - 1);\n\t for (var i = offset; i < pos; ++i) {\n\t result.push((deltas[i] + 256) & 0xff);\n\t }\n\t return pos;\n\t}\n\n\t// Helper for encode.VARDELTAS\n\tfunction encodeVarDeltaRunAsWords(deltas, offset, result) {\n\t var runLength = 0;\n\t var numDeltas = deltas.length;\n\t var pos = offset;\n\t while (pos < numDeltas && runLength < 64) {\n\t var value = deltas[pos];\n\n\t // Within a word-encoded run of deltas, it is easiest to start\n\t // a new run (with a different encoding) whenever we encounter\n\t // a zero value. For example, the sequence [0x6666, 0, 0x7777]\n\t // needs 7 bytes when storing the zero inside the current run\n\t // (42 66 66 00 00 77 77), and equally 7 bytes when starting a\n\t // new run (40 66 66 80 40 77 77).\n\t if (value === 0) {\n\t break;\n\t }\n\n\t // Within a word-encoded run of deltas, a single value in the\n\t // range (-128..127) should be encoded within the current run\n\t // because it is more compact. For example, the sequence\n\t // [0x6666, 2, 0x7777] becomes 7 bytes when storing the value\n\t // literally (42 66 66 00 02 77 77), but 8 bytes when starting\n\t // a new run (40 66 66 00 02 40 77 77).\n\t if (isByteEncodable(value) && pos + 1 < numDeltas && isByteEncodable(deltas[pos + 1])) {\n\t break;\n\t }\n\n\t ++pos;\n\t ++runLength;\n\t }\n\t result.push(0x40 | (runLength - 1));\n\t for (var i = offset; i < pos; ++i) {\n\t var val = deltas[i];\n\t result.push(((val + 0x10000) >> 8) & 0xff, (val + 0x100) & 0xff);\n\t }\n\t return pos;\n\t}\n\n\t/**\n\t * Encode a list of variation adjustment deltas.\n\t *\n\t * Variation adjustment deltas are used in ‘gvar’ and ‘cvar’ tables.\n\t * They indicate how points (in ‘gvar’) or values (in ‘cvar’) get adjusted\n\t * when generating instances of variation fonts.\n\t *\n\t * @see https://www.microsoft.com/typography/otspec/gvar.htm\n\t * @see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6gvar.html\n\t * @param {Array}\n\t * @return {Array}\n\t */\n\tencode.VARDELTAS = function(deltas) {\n\t var pos = 0;\n\t var result = [];\n\t while (pos < deltas.length) {\n\t var value = deltas[pos];\n\t if (value === 0) {\n\t pos = encodeVarDeltaRunAsZeroes(deltas, pos, result);\n\t } else if (value >= -128 && value <= 127) {\n\t pos = encodeVarDeltaRunAsBytes(deltas, pos, result);\n\t } else {\n\t pos = encodeVarDeltaRunAsWords(deltas, pos, result);\n\t }\n\t }\n\t return result;\n\t};\n\n\t// Convert a list of values to a CFF INDEX structure.\n\t// The values should be objects containing name / type / value.\n\t/**\n\t * @param {Array} l\n\t * @returns {Array}\n\t */\n\tencode.INDEX = function(l) {\n\t //var offset, offsets, offsetEncoder, encodedOffsets, encodedOffset, data,\n\t // i, v;\n\t // Because we have to know which data type to use to encode the offsets,\n\t // we have to go through the values twice: once to encode the data and\n\t // calculate the offsets, then again to encode the offsets using the fitting data type.\n\t var offset = 1; // First offset is always 1.\n\t var offsets = [offset];\n\t var data = [];\n\t for (var i = 0; i < l.length; i += 1) {\n\t var v = encode.OBJECT(l[i]);\n\t Array.prototype.push.apply(data, v);\n\t offset += v.length;\n\t offsets.push(offset);\n\t }\n\n\t if (data.length === 0) {\n\t return [0, 0];\n\t }\n\n\t var encodedOffsets = [];\n\t var offSize = (1 + Math.floor(Math.log(offset) / Math.log(2)) / 8) | 0;\n\t var offsetEncoder = [undefined, encode.BYTE, encode.USHORT, encode.UINT24, encode.ULONG][offSize];\n\t for (var i$1 = 0; i$1 < offsets.length; i$1 += 1) {\n\t var encodedOffset = offsetEncoder(offsets[i$1]);\n\t Array.prototype.push.apply(encodedOffsets, encodedOffset);\n\t }\n\n\t return Array.prototype.concat(encode.Card16(l.length),\n\t encode.OffSize(offSize),\n\t encodedOffsets,\n\t data);\n\t};\n\n\t/**\n\t * @param {Array}\n\t * @returns {number}\n\t */\n\tsizeOf.INDEX = function(v) {\n\t return encode.INDEX(v).length;\n\t};\n\n\t/**\n\t * Convert an object to a CFF DICT structure.\n\t * The keys should be numeric.\n\t * The values should be objects containing name / type / value.\n\t * @param {Object} m\n\t * @returns {Array}\n\t */\n\tencode.DICT = function(m) {\n\t var d = [];\n\t var keys = Object.keys(m);\n\t var length = keys.length;\n\n\t for (var i = 0; i < length; i += 1) {\n\t // Object.keys() return string keys, but our keys are always numeric.\n\t var k = parseInt(keys[i], 0);\n\t var v = m[k];\n\t // Value comes before the key.\n\t d = d.concat(encode.OPERAND(v.value, v.type));\n\t d = d.concat(encode.OPERATOR(k));\n\t }\n\n\t return d;\n\t};\n\n\t/**\n\t * @param {Object}\n\t * @returns {number}\n\t */\n\tsizeOf.DICT = function(m) {\n\t return encode.DICT(m).length;\n\t};\n\n\t/**\n\t * @param {number}\n\t * @returns {Array}\n\t */\n\tencode.OPERATOR = function(v) {\n\t if (v < 1200) {\n\t return [v];\n\t } else {\n\t return [12, v - 1200];\n\t }\n\t};\n\n\t/**\n\t * @param {Array} v\n\t * @param {string}\n\t * @returns {Array}\n\t */\n\tencode.OPERAND = function(v, type) {\n\t var d = [];\n\t if (Array.isArray(type)) {\n\t for (var i = 0; i < type.length; i += 1) {\n\t check.argument(v.length === type.length, 'Not enough arguments given for type' + type);\n\t d = d.concat(encode.OPERAND(v[i], type[i]));\n\t }\n\t } else {\n\t if (type === 'SID') {\n\t d = d.concat(encode.NUMBER(v));\n\t } else if (type === 'offset') {\n\t // We make it easy for ourselves and always encode offsets as\n\t // 4 bytes. This makes offset calculation for the top dict easier.\n\t d = d.concat(encode.NUMBER32(v));\n\t } else if (type === 'number') {\n\t d = d.concat(encode.NUMBER(v));\n\t } else if (type === 'real') {\n\t d = d.concat(encode.REAL(v));\n\t } else {\n\t throw new Error('Unknown operand type ' + type);\n\t // FIXME Add support for booleans\n\t }\n\t }\n\n\t return d;\n\t};\n\n\tencode.OP = encode.BYTE;\n\tsizeOf.OP = sizeOf.BYTE;\n\n\t// memoize charstring encoding using WeakMap if available\n\tvar wmm = typeof WeakMap === 'function' && new WeakMap();\n\n\t/**\n\t * Convert a list of CharString operations to bytes.\n\t * @param {Array}\n\t * @returns {Array}\n\t */\n\tencode.CHARSTRING = function(ops) {\n\t // See encode.MACSTRING for why we don't do \"if (wmm && wmm.has(ops))\".\n\t if (wmm) {\n\t var cachedValue = wmm.get(ops);\n\t if (cachedValue !== undefined) {\n\t return cachedValue;\n\t }\n\t }\n\n\t var d = [];\n\t var length = ops.length;\n\n\t for (var i = 0; i < length; i += 1) {\n\t var op = ops[i];\n\t d = d.concat(encode[op.type](op.value));\n\t }\n\n\t if (wmm) {\n\t wmm.set(ops, d);\n\t }\n\n\t return d;\n\t};\n\n\t/**\n\t * @param {Array}\n\t * @returns {number}\n\t */\n\tsizeOf.CHARSTRING = function(ops) {\n\t return encode.CHARSTRING(ops).length;\n\t};\n\n\t// Utility functions ////////////////////////////////////////////////////////\n\n\t/**\n\t * Convert an object containing name / type / value to bytes.\n\t * @param {Object}\n\t * @returns {Array}\n\t */\n\tencode.OBJECT = function(v) {\n\t var encodingFunction = encode[v.type];\n\t check.argument(encodingFunction !== undefined, 'No encoding function for type ' + v.type);\n\t return encodingFunction(v.value);\n\t};\n\n\t/**\n\t * @param {Object}\n\t * @returns {number}\n\t */\n\tsizeOf.OBJECT = function(v) {\n\t var sizeOfFunction = sizeOf[v.type];\n\t check.argument(sizeOfFunction !== undefined, 'No sizeOf function for type ' + v.type);\n\t return sizeOfFunction(v.value);\n\t};\n\n\t/**\n\t * Convert a table object to bytes.\n\t * A table contains a list of fields containing the metadata (name, type and default value).\n\t * The table itself has the field values set as attributes.\n\t * @param {opentype.Table}\n\t * @returns {Array}\n\t */\n\tencode.TABLE = function(table) {\n\t var d = [];\n\t var length = table.fields.length;\n\t var subtables = [];\n\t var subtableOffsets = [];\n\n\t for (var i = 0; i < length; i += 1) {\n\t var field = table.fields[i];\n\t var encodingFunction = encode[field.type];\n\t check.argument(encodingFunction !== undefined, 'No encoding function for field type ' + field.type + ' (' + field.name + ')');\n\t var value = table[field.name];\n\t if (value === undefined) {\n\t value = field.value;\n\t }\n\n\t var bytes = encodingFunction(value);\n\n\t if (field.type === 'TABLE') {\n\t subtableOffsets.push(d.length);\n\t d = d.concat([0, 0]);\n\t subtables.push(bytes);\n\t } else {\n\t d = d.concat(bytes);\n\t }\n\t }\n\n\t for (var i$1 = 0; i$1 < subtables.length; i$1 += 1) {\n\t var o = subtableOffsets[i$1];\n\t var offset = d.length;\n\t check.argument(offset < 65536, 'Table ' + table.tableName + ' too big.');\n\t d[o] = offset >> 8;\n\t d[o + 1] = offset & 0xff;\n\t d = d.concat(subtables[i$1]);\n\t }\n\n\t return d;\n\t};\n\n\t/**\n\t * @param {opentype.Table}\n\t * @returns {number}\n\t */\n\tsizeOf.TABLE = function(table) {\n\t var numBytes = 0;\n\t var length = table.fields.length;\n\n\t for (var i = 0; i < length; i += 1) {\n\t var field = table.fields[i];\n\t var sizeOfFunction = sizeOf[field.type];\n\t check.argument(sizeOfFunction !== undefined, 'No sizeOf function for field type ' + field.type + ' (' + field.name + ')');\n\t var value = table[field.name];\n\t if (value === undefined) {\n\t value = field.value;\n\t }\n\n\t numBytes += sizeOfFunction(value);\n\n\t // Subtables take 2 more bytes for offsets.\n\t if (field.type === 'TABLE') {\n\t numBytes += 2;\n\t }\n\t }\n\n\t return numBytes;\n\t};\n\n\tencode.RECORD = encode.TABLE;\n\tsizeOf.RECORD = sizeOf.TABLE;\n\n\t// Merge in a list of bytes.\n\tencode.LITERAL = function(v) {\n\t return v;\n\t};\n\n\tsizeOf.LITERAL = function(v) {\n\t return v.length;\n\t};\n\n\t// Table metadata\n\n\t/**\n\t * @exports opentype.Table\n\t * @class\n\t * @param {string} tableName\n\t * @param {Array} fields\n\t * @param {Object} options\n\t * @constructor\n\t */\n\tfunction Table(tableName, fields, options) {\n\t var this$1 = this;\n\n\t for (var i = 0; i < fields.length; i += 1) {\n\t var field = fields[i];\n\t this$1[field.name] = field.value;\n\t }\n\n\t this.tableName = tableName;\n\t this.fields = fields;\n\t if (options) {\n\t var optionKeys = Object.keys(options);\n\t for (var i$1 = 0; i$1 < optionKeys.length; i$1 += 1) {\n\t var k = optionKeys[i$1];\n\t var v = options[k];\n\t if (this$1[k] !== undefined) {\n\t this$1[k] = v;\n\t }\n\t }\n\t }\n\t}\n\n\t/**\n\t * Encodes the table and returns an array of bytes\n\t * @return {Array}\n\t */\n\tTable.prototype.encode = function() {\n\t return encode.TABLE(this);\n\t};\n\n\t/**\n\t * Get the size of the table.\n\t * @return {number}\n\t */\n\tTable.prototype.sizeOf = function() {\n\t return sizeOf.TABLE(this);\n\t};\n\n\t/**\n\t * @private\n\t */\n\tfunction ushortList(itemName, list, count) {\n\t if (count === undefined) {\n\t count = list.length;\n\t }\n\t var fields = new Array(list.length + 1);\n\t fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count};\n\t for (var i = 0; i < list.length; i++) {\n\t fields[i + 1] = {name: itemName + i, type: 'USHORT', value: list[i]};\n\t }\n\t return fields;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tfunction tableList(itemName, records, itemCallback) {\n\t var count = records.length;\n\t var fields = new Array(count + 1);\n\t fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count};\n\t for (var i = 0; i < count; i++) {\n\t fields[i + 1] = {name: itemName + i, type: 'TABLE', value: itemCallback(records[i], i)};\n\t }\n\t return fields;\n\t}\n\n\t/**\n\t * @private\n\t */\n\tfunction recordList(itemName, records, itemCallback) {\n\t var count = records.length;\n\t var fields = [];\n\t fields[0] = {name: itemName + 'Count', type: 'USHORT', value: count};\n\t for (var i = 0; i < count; i++) {\n\t fields = fields.concat(itemCallback(records[i], i));\n\t }\n\t return fields;\n\t}\n\n\t// Common Layout Tables\n\n\t/**\n\t * @exports opentype.Coverage\n\t * @class\n\t * @param {opentype.Table}\n\t * @constructor\n\t * @extends opentype.Table\n\t */\n\tfunction Coverage(coverageTable) {\n\t if (coverageTable.format === 1) {\n\t Table.call(this, 'coverageTable',\n\t [{name: 'coverageFormat', type: 'USHORT', value: 1}]\n\t .concat(ushortList('glyph', coverageTable.glyphs))\n\t );\n\t } else {\n\t check.assert(false, 'Can\\'t create coverage table format 2 yet.');\n\t }\n\t}\n\tCoverage.prototype = Object.create(Table.prototype);\n\tCoverage.prototype.constructor = Coverage;\n\n\tfunction ScriptList(scriptListTable) {\n\t Table.call(this, 'scriptListTable',\n\t recordList('scriptRecord', scriptListTable, function(scriptRecord, i) {\n\t var script = scriptRecord.script;\n\t var defaultLangSys = script.defaultLangSys;\n\t check.assert(!!defaultLangSys, 'Unable to write GSUB: script ' + scriptRecord.tag + ' has no default language system.');\n\t return [\n\t {name: 'scriptTag' + i, type: 'TAG', value: scriptRecord.tag},\n\t {name: 'script' + i, type: 'TABLE', value: new Table('scriptTable', [\n\t {name: 'defaultLangSys', type: 'TABLE', value: new Table('defaultLangSys', [\n\t {name: 'lookupOrder', type: 'USHORT', value: 0},\n\t {name: 'reqFeatureIndex', type: 'USHORT', value: defaultLangSys.reqFeatureIndex}]\n\t .concat(ushortList('featureIndex', defaultLangSys.featureIndexes)))}\n\t ].concat(recordList('langSys', script.langSysRecords, function(langSysRecord, i) {\n\t var langSys = langSysRecord.langSys;\n\t return [\n\t {name: 'langSysTag' + i, type: 'TAG', value: langSysRecord.tag},\n\t {name: 'langSys' + i, type: 'TABLE', value: new Table('langSys', [\n\t {name: 'lookupOrder', type: 'USHORT', value: 0},\n\t {name: 'reqFeatureIndex', type: 'USHORT', value: langSys.reqFeatureIndex}\n\t ].concat(ushortList('featureIndex', langSys.featureIndexes)))}\n\t ];\n\t })))}\n\t ];\n\t })\n\t );\n\t}\n\tScriptList.prototype = Object.create(Table.prototype);\n\tScriptList.prototype.constructor = ScriptList;\n\n\t/**\n\t * @exports opentype.FeatureList\n\t * @class\n\t * @param {opentype.Table}\n\t * @constructor\n\t * @extends opentype.Table\n\t */\n\tfunction FeatureList(featureListTable) {\n\t Table.call(this, 'featureListTable',\n\t recordList('featureRecord', featureListTable, function(featureRecord, i) {\n\t var feature = featureRecord.feature;\n\t return [\n\t {name: 'featureTag' + i, type: 'TAG', value: featureRecord.tag},\n\t {name: 'feature' + i, type: 'TABLE', value: new Table('featureTable', [\n\t {name: 'featureParams', type: 'USHORT', value: feature.featureParams} ].concat(ushortList('lookupListIndex', feature.lookupListIndexes)))}\n\t ];\n\t })\n\t );\n\t}\n\tFeatureList.prototype = Object.create(Table.prototype);\n\tFeatureList.prototype.constructor = FeatureList;\n\n\t/**\n\t * @exports opentype.LookupList\n\t * @class\n\t * @param {opentype.Table}\n\t * @param {Object}\n\t * @constructor\n\t * @extends opentype.Table\n\t */\n\tfunction LookupList(lookupListTable, subtableMakers) {\n\t Table.call(this, 'lookupListTable', tableList('lookup', lookupListTable, function(lookupTable) {\n\t var subtableCallback = subtableMakers[lookupTable.lookupType];\n\t check.assert(!!subtableCallback, 'Unable to write GSUB lookup type ' + lookupTable.lookupType + ' tables.');\n\t return new Table('lookupTable', [\n\t {name: 'lookupType', type: 'USHORT', value: lookupTable.lookupType},\n\t {name: 'lookupFlag', type: 'USHORT', value: lookupTable.lookupFlag}\n\t ].concat(tableList('subtable', lookupTable.subtables, subtableCallback)));\n\t }));\n\t}\n\tLookupList.prototype = Object.create(Table.prototype);\n\tLookupList.prototype.constructor = LookupList;\n\n\t// Record = same as Table, but inlined (a Table has an offset and its data is further in the stream)\n\t// Don't use offsets inside Records (probable bug), only in Tables.\n\tvar table = {\n\t Table: Table,\n\t Record: Table,\n\t Coverage: Coverage,\n\t ScriptList: ScriptList,\n\t FeatureList: FeatureList,\n\t LookupList: LookupList,\n\t ushortList: ushortList,\n\t tableList: tableList,\n\t recordList: recordList,\n\t};\n\n\t// Parsing utility functions\n\n\t// Retrieve an unsigned byte from the DataView.\n\tfunction getByte(dataView, offset) {\n\t return dataView.getUint8(offset);\n\t}\n\n\t// Retrieve an unsigned 16-bit short from the DataView.\n\t// The value is stored in big endian.\n\tfunction getUShort(dataView, offset) {\n\t return dataView.getUint16(offset, false);\n\t}\n\n\t// Retrieve a signed 16-bit short from the DataView.\n\t// The value is stored in big endian.\n\tfunction getShort(dataView, offset) {\n\t return dataView.getInt16(offset, false);\n\t}\n\n\t// Retrieve an unsigned 32-bit long from the DataView.\n\t// The value is stored in big endian.\n\tfunction getULong(dataView, offset) {\n\t return dataView.getUint32(offset, false);\n\t}\n\n\t// Retrieve a 32-bit signed fixed-point number (16.16) from the DataView.\n\t// The value is stored in big endian.\n\tfunction getFixed(dataView, offset) {\n\t var decimal = dataView.getInt16(offset, false);\n\t var fraction = dataView.getUint16(offset + 2, false);\n\t return decimal + fraction / 65535;\n\t}\n\n\t// Retrieve a 4-character tag from the DataView.\n\t// Tags are used to identify tables.\n\tfunction getTag(dataView, offset) {\n\t var tag = '';\n\t for (var i = offset; i < offset + 4; i += 1) {\n\t tag += String.fromCharCode(dataView.getInt8(i));\n\t }\n\n\t return tag;\n\t}\n\n\t// Retrieve an offset from the DataView.\n\t// Offsets are 1 to 4 bytes in length, depending on the offSize argument.\n\tfunction getOffset(dataView, offset, offSize) {\n\t var v = 0;\n\t for (var i = 0; i < offSize; i += 1) {\n\t v <<= 8;\n\t v += dataView.getUint8(offset + i);\n\t }\n\n\t return v;\n\t}\n\n\t// Retrieve a number of bytes from start offset to the end offset from the DataView.\n\tfunction getBytes(dataView, startOffset, endOffset) {\n\t var bytes = [];\n\t for (var i = startOffset; i < endOffset; i += 1) {\n\t bytes.push(dataView.getUint8(i));\n\t }\n\n\t return bytes;\n\t}\n\n\t// Convert the list of bytes to a string.\n\tfunction bytesToString(bytes) {\n\t var s = '';\n\t for (var i = 0; i < bytes.length; i += 1) {\n\t s += String.fromCharCode(bytes[i]);\n\t }\n\n\t return s;\n\t}\n\n\tvar typeOffsets = {\n\t byte: 1,\n\t uShort: 2,\n\t short: 2,\n\t uLong: 4,\n\t fixed: 4,\n\t longDateTime: 8,\n\t tag: 4\n\t};\n\n\t// A stateful parser that changes the offset whenever a value is retrieved.\n\t// The data is a DataView.\n\tfunction Parser(data, offset) {\n\t this.data = data;\n\t this.offset = offset;\n\t this.relativeOffset = 0;\n\t}\n\n\tParser.prototype.parseByte = function() {\n\t var v = this.data.getUint8(this.offset + this.relativeOffset);\n\t this.relativeOffset += 1;\n\t return v;\n\t};\n\n\tParser.prototype.parseChar = function() {\n\t var v = this.data.getInt8(this.offset + this.relativeOffset);\n\t this.relativeOffset += 1;\n\t return v;\n\t};\n\n\tParser.prototype.parseCard8 = Parser.prototype.parseByte;\n\n\tParser.prototype.parseUShort = function() {\n\t var v = this.data.getUint16(this.offset + this.relativeOffset);\n\t this.relativeOffset += 2;\n\t return v;\n\t};\n\n\tParser.prototype.parseCard16 = Parser.prototype.parseUShort;\n\tParser.prototype.parseSID = Parser.prototype.parseUShort;\n\tParser.prototype.parseOffset16 = Parser.prototype.parseUShort;\n\n\tParser.prototype.parseShort = function() {\n\t var v = this.data.getInt16(this.offset + this.relativeOffset);\n\t this.relativeOffset += 2;\n\t return v;\n\t};\n\n\tParser.prototype.parseF2Dot14 = function() {\n\t var v = this.data.getInt16(this.offset + this.relativeOffset) / 16384;\n\t this.relativeOffset += 2;\n\t return v;\n\t};\n\n\tParser.prototype.parseULong = function() {\n\t var v = getULong(this.data, this.offset + this.relativeOffset);\n\t this.relativeOffset += 4;\n\t return v;\n\t};\n\n\tParser.prototype.parseOffset32 = Parser.prototype.parseULong;\n\n\tParser.prototype.parseFixed = function() {\n\t var v = getFixed(this.data, this.offset + this.relativeOffset);\n\t this.relativeOffset += 4;\n\t return v;\n\t};\n\n\tParser.prototype.parseString = function(length) {\n\t var dataView = this.data;\n\t var offset = this.offset + this.relativeOffset;\n\t var string = '';\n\t this.relativeOffset += length;\n\t for (var i = 0; i < length; i++) {\n\t string += String.fromCharCode(dataView.getUint8(offset + i));\n\t }\n\n\t return string;\n\t};\n\n\tParser.prototype.parseTag = function() {\n\t return this.parseString(4);\n\t};\n\n\t// LONGDATETIME is a 64-bit integer.\n\t// JavaScript and unix timestamps traditionally use 32 bits, so we\n\t// only take the last 32 bits.\n\t// + Since until 2038 those bits will be filled by zeros we can ignore them.\n\tParser.prototype.parseLongDateTime = function() {\n\t var v = getULong(this.data, this.offset + this.relativeOffset + 4);\n\t // Subtract seconds between 01/01/1904 and 01/01/1970\n\t // to convert Apple Mac timestamp to Standard Unix timestamp\n\t v -= 2082844800;\n\t this.relativeOffset += 8;\n\t return v;\n\t};\n\n\tParser.prototype.parseVersion = function(minorBase) {\n\t var major = getUShort(this.data, this.offset + this.relativeOffset);\n\n\t // How to interpret the minor version is very vague in the spec. 0x5000 is 5, 0x1000 is 1\n\t // Default returns the correct number if minor = 0xN000 where N is 0-9\n\t // Set minorBase to 1 for tables that use minor = N where N is 0-9\n\t var minor = getUShort(this.data, this.offset + this.relativeOffset + 2);\n\t this.relativeOffset += 4;\n\t if (minorBase === undefined) { minorBase = 0x1000; }\n\t return major + minor / minorBase / 10;\n\t};\n\n\tParser.prototype.skip = function(type, amount) {\n\t if (amount === undefined) {\n\t amount = 1;\n\t }\n\n\t this.relativeOffset += typeOffsets[type] * amount;\n\t};\n\n\t///// Parsing lists and records ///////////////////////////////\n\n\t// Parse a list of 32 bit unsigned integers.\n\tParser.prototype.parseULongList = function(count) {\n\t if (count === undefined) { count = this.parseULong(); }\n\t var offsets = new Array(count);\n\t var dataView = this.data;\n\t var offset = this.offset + this.relativeOffset;\n\t for (var i = 0; i < count; i++) {\n\t offsets[i] = dataView.getUint32(offset);\n\t offset += 4;\n\t }\n\n\t this.relativeOffset += count * 4;\n\t return offsets;\n\t};\n\n\t// Parse a list of 16 bit unsigned integers. The length of the list can be read on the stream\n\t// or provided as an argument.\n\tParser.prototype.parseOffset16List =\n\tParser.prototype.parseUShortList = function(count) {\n\t if (count === undefined) { count = this.parseUShort(); }\n\t var offsets = new Array(count);\n\t var dataView = this.data;\n\t var offset = this.offset + this.relativeOffset;\n\t for (var i = 0; i < count; i++) {\n\t offsets[i] = dataView.getUint16(offset);\n\t offset += 2;\n\t }\n\n\t this.relativeOffset += count * 2;\n\t return offsets;\n\t};\n\n\t// Parses a list of 16 bit signed integers.\n\tParser.prototype.parseShortList = function(count) {\n\t var list = new Array(count);\n\t var dataView = this.data;\n\t var offset = this.offset + this.relativeOffset;\n\t for (var i = 0; i < count; i++) {\n\t list[i] = dataView.getInt16(offset);\n\t offset += 2;\n\t }\n\n\t this.relativeOffset += count * 2;\n\t return list;\n\t};\n\n\t// Parses a list of bytes.\n\tParser.prototype.parseByteList = function(count) {\n\t var list = new Array(count);\n\t var dataView = this.data;\n\t var offset = this.offset + this.relativeOffset;\n\t for (var i = 0; i < count; i++) {\n\t list[i] = dataView.getUint8(offset++);\n\t }\n\n\t this.relativeOffset += count;\n\t return list;\n\t};\n\n\t/**\n\t * Parse a list of items.\n\t * Record count is optional, if omitted it is read from the stream.\n\t * itemCallback is one of the Parser methods.\n\t */\n\tParser.prototype.parseList = function(count, itemCallback) {\n\t var this$1 = this;\n\n\t if (!itemCallback) {\n\t itemCallback = count;\n\t count = this.parseUShort();\n\t }\n\t var list = new Array(count);\n\t for (var i = 0; i < count; i++) {\n\t list[i] = itemCallback.call(this$1);\n\t }\n\t return list;\n\t};\n\n\tParser.prototype.parseList32 = function(count, itemCallback) {\n\t var this$1 = this;\n\n\t if (!itemCallback) {\n\t itemCallback = count;\n\t count = this.parseULong();\n\t }\n\t var list = new Array(count);\n\t for (var i = 0; i < count; i++) {\n\t list[i] = itemCallback.call(this$1);\n\t }\n\t return list;\n\t};\n\n\t/**\n\t * Parse a list of records.\n\t * Record count is optional, if omitted it is read from the stream.\n\t * Example of recordDescription: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort }\n\t */\n\tParser.prototype.parseRecordList = function(count, recordDescription) {\n\t var this$1 = this;\n\n\t // If the count argument is absent, read it in the stream.\n\t if (!recordDescription) {\n\t recordDescription = count;\n\t count = this.parseUShort();\n\t }\n\t var records = new Array(count);\n\t var fields = Object.keys(recordDescription);\n\t for (var i = 0; i < count; i++) {\n\t var rec = {};\n\t for (var j = 0; j < fields.length; j++) {\n\t var fieldName = fields[j];\n\t var fieldType = recordDescription[fieldName];\n\t rec[fieldName] = fieldType.call(this$1);\n\t }\n\t records[i] = rec;\n\t }\n\t return records;\n\t};\n\n\tParser.prototype.parseRecordList32 = function(count, recordDescription) {\n\t var this$1 = this;\n\n\t // If the count argument is absent, read it in the stream.\n\t if (!recordDescription) {\n\t recordDescription = count;\n\t count = this.parseULong();\n\t }\n\t var records = new Array(count);\n\t var fields = Object.keys(recordDescription);\n\t for (var i = 0; i < count; i++) {\n\t var rec = {};\n\t for (var j = 0; j < fields.length; j++) {\n\t var fieldName = fields[j];\n\t var fieldType = recordDescription[fieldName];\n\t rec[fieldName] = fieldType.call(this$1);\n\t }\n\t records[i] = rec;\n\t }\n\t return records;\n\t};\n\n\t// Parse a data structure into an object\n\t// Example of description: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort }\n\tParser.prototype.parseStruct = function(description) {\n\t var this$1 = this;\n\n\t if (typeof description === 'function') {\n\t return description.call(this);\n\t } else {\n\t var fields = Object.keys(description);\n\t var struct = {};\n\t for (var j = 0; j < fields.length; j++) {\n\t var fieldName = fields[j];\n\t var fieldType = description[fieldName];\n\t struct[fieldName] = fieldType.call(this$1);\n\t }\n\t return struct;\n\t }\n\t};\n\n\t/**\n\t * Parse a GPOS valueRecord\n\t * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record\n\t * valueFormat is optional, if omitted it is read from the stream.\n\t */\n\tParser.prototype.parseValueRecord = function(valueFormat) {\n\t if (valueFormat === undefined) {\n\t valueFormat = this.parseUShort();\n\t }\n\t if (valueFormat === 0) {\n\t // valueFormat2 in kerning pairs is most often 0\n\t // in this case return undefined instead of an empty object, to save space\n\t return;\n\t }\n\t var valueRecord = {};\n\n\t if (valueFormat & 0x0001) { valueRecord.xPlacement = this.parseShort(); }\n\t if (valueFormat & 0x0002) { valueRecord.yPlacement = this.parseShort(); }\n\t if (valueFormat & 0x0004) { valueRecord.xAdvance = this.parseShort(); }\n\t if (valueFormat & 0x0008) { valueRecord.yAdvance = this.parseShort(); }\n\n\t // Device table (non-variable font) / VariationIndex table (variable font) not supported\n\t // https://docs.microsoft.com/fr-fr/typography/opentype/spec/chapter2#devVarIdxTbls\n\t if (valueFormat & 0x0010) { valueRecord.xPlaDevice = undefined; this.parseShort(); }\n\t if (valueFormat & 0x0020) { valueRecord.yPlaDevice = undefined; this.parseShort(); }\n\t if (valueFormat & 0x0040) { valueRecord.xAdvDevice = undefined; this.parseShort(); }\n\t if (valueFormat & 0x0080) { valueRecord.yAdvDevice = undefined; this.parseShort(); }\n\n\t return valueRecord;\n\t};\n\n\t/**\n\t * Parse a list of GPOS valueRecords\n\t * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record\n\t * valueFormat and valueCount are read from the stream.\n\t */\n\tParser.prototype.parseValueRecordList = function() {\n\t var this$1 = this;\n\n\t var valueFormat = this.parseUShort();\n\t var valueCount = this.parseUShort();\n\t var values = new Array(valueCount);\n\t for (var i = 0; i < valueCount; i++) {\n\t values[i] = this$1.parseValueRecord(valueFormat);\n\t }\n\t return values;\n\t};\n\n\tParser.prototype.parsePointer = function(description) {\n\t var structOffset = this.parseOffset16();\n\t if (structOffset > 0) {\n\t // NULL offset => return undefined\n\t return new Parser(this.data, this.offset + structOffset).parseStruct(description);\n\t }\n\t return undefined;\n\t};\n\n\tParser.prototype.parsePointer32 = function(description) {\n\t var structOffset = this.parseOffset32();\n\t if (structOffset > 0) {\n\t // NULL offset => return undefined\n\t return new Parser(this.data, this.offset + structOffset).parseStruct(description);\n\t }\n\t return undefined;\n\t};\n\n\t/**\n\t * Parse a list of offsets to lists of 16-bit integers,\n\t * or a list of offsets to lists of offsets to any kind of items.\n\t * If itemCallback is not provided, a list of list of UShort is assumed.\n\t * If provided, itemCallback is called on each item and must parse the item.\n\t * See examples in tables/gsub.js\n\t */\n\tParser.prototype.parseListOfLists = function(itemCallback) {\n\t var this$1 = this;\n\n\t var offsets = this.parseOffset16List();\n\t var count = offsets.length;\n\t var relativeOffset = this.relativeOffset;\n\t var list = new Array(count);\n\t for (var i = 0; i < count; i++) {\n\t var start = offsets[i];\n\t if (start === 0) {\n\t // NULL offset\n\t // Add i as owned property to list. Convenient with assert.\n\t list[i] = undefined;\n\t continue;\n\t }\n\t this$1.relativeOffset = start;\n\t if (itemCallback) {\n\t var subOffsets = this$1.parseOffset16List();\n\t var subList = new Array(subOffsets.length);\n\t for (var j = 0; j < subOffsets.length; j++) {\n\t this$1.relativeOffset = start + subOffsets[j];\n\t subList[j] = itemCallback.call(this$1);\n\t }\n\t list[i] = subList;\n\t } else {\n\t list[i] = this$1.parseUShortList();\n\t }\n\t }\n\t this.relativeOffset = relativeOffset;\n\t return list;\n\t};\n\n\t///// Complex tables parsing //////////////////////////////////\n\n\t// Parse a coverage table in a GSUB, GPOS or GDEF table.\n\t// https://www.microsoft.com/typography/OTSPEC/chapter2.htm\n\t// parser.offset must point to the start of the table containing the coverage.\n\tParser.prototype.parseCoverage = function() {\n\t var this$1 = this;\n\n\t var startOffset = this.offset + this.relativeOffset;\n\t var format = this.parseUShort();\n\t var count = this.parseUShort();\n\t if (format === 1) {\n\t return {\n\t format: 1,\n\t glyphs: this.parseUShortList(count)\n\t };\n\t } else if (format === 2) {\n\t var ranges = new Array(count);\n\t for (var i = 0; i < count; i++) {\n\t ranges[i] = {\n\t start: this$1.parseUShort(),\n\t end: this$1.parseUShort(),\n\t index: this$1.parseUShort()\n\t };\n\t }\n\t return {\n\t format: 2,\n\t ranges: ranges\n\t };\n\t }\n\t throw new Error('0x' + startOffset.toString(16) + ': Coverage format must be 1 or 2.');\n\t};\n\n\t// Parse a Class Definition Table in a GSUB, GPOS or GDEF table.\n\t// https://www.microsoft.com/typography/OTSPEC/chapter2.htm\n\tParser.prototype.parseClassDef = function() {\n\t var startOffset = this.offset + this.relativeOffset;\n\t var format = this.parseUShort();\n\t if (format === 1) {\n\t return {\n\t format: 1,\n\t startGlyph: this.parseUShort(),\n\t classes: this.parseUShortList()\n\t };\n\t } else if (format === 2) {\n\t return {\n\t format: 2,\n\t ranges: this.parseRecordList({\n\t start: Parser.uShort,\n\t end: Parser.uShort,\n\t classId: Parser.uShort\n\t })\n\t };\n\t }\n\t throw new Error('0x' + startOffset.toString(16) + ': ClassDef format must be 1 or 2.');\n\t};\n\n\t///// Static methods ///////////////////////////////////\n\t// These convenience methods can be used as callbacks and should be called with \"this\" context set to a Parser instance.\n\n\tParser.list = function(count, itemCallback) {\n\t return function() {\n\t return this.parseList(count, itemCallback);\n\t };\n\t};\n\n\tParser.list32 = function(count, itemCallback) {\n\t return function() {\n\t return this.parseList32(count, itemCallback);\n\t };\n\t};\n\n\tParser.recordList = function(count, recordDescription) {\n\t return function() {\n\t return this.parseRecordList(count, recordDescription);\n\t };\n\t};\n\n\tParser.recordList32 = function(count, recordDescription) {\n\t return function() {\n\t return this.parseRecordList32(count, recordDescription);\n\t };\n\t};\n\n\tParser.pointer = function(description) {\n\t return function() {\n\t return this.parsePointer(description);\n\t };\n\t};\n\n\tParser.pointer32 = function(description) {\n\t return function() {\n\t return this.parsePointer32(description);\n\t };\n\t};\n\n\tParser.tag = Parser.prototype.parseTag;\n\tParser.byte = Parser.prototype.parseByte;\n\tParser.uShort = Parser.offset16 = Parser.prototype.parseUShort;\n\tParser.uShortList = Parser.prototype.parseUShortList;\n\tParser.uLong = Parser.offset32 = Parser.prototype.parseULong;\n\tParser.uLongList = Parser.prototype.parseULongList;\n\tParser.struct = Parser.prototype.parseStruct;\n\tParser.coverage = Parser.prototype.parseCoverage;\n\tParser.classDef = Parser.prototype.parseClassDef;\n\n\t///// Script, Feature, Lookup lists ///////////////////////////////////////////////\n\t// https://www.microsoft.com/typography/OTSPEC/chapter2.htm\n\n\tvar langSysTable = {\n\t reserved: Parser.uShort,\n\t reqFeatureIndex: Parser.uShort,\n\t featureIndexes: Parser.uShortList\n\t};\n\n\tParser.prototype.parseScriptList = function() {\n\t return this.parsePointer(Parser.recordList({\n\t tag: Parser.tag,\n\t script: Parser.pointer({\n\t defaultLangSys: Parser.pointer(langSysTable),\n\t langSysRecords: Parser.recordList({\n\t tag: Parser.tag,\n\t langSys: Parser.pointer(langSysTable)\n\t })\n\t })\n\t })) || [];\n\t};\n\n\tParser.prototype.parseFeatureList = function() {\n\t return this.parsePointer(Parser.recordList({\n\t tag: Parser.tag,\n\t feature: Parser.pointer({\n\t featureParams: Parser.offset16,\n\t lookupListIndexes: Parser.uShortList\n\t })\n\t })) || [];\n\t};\n\n\tParser.prototype.parseLookupList = function(lookupTableParsers) {\n\t return this.parsePointer(Parser.list(Parser.pointer(function() {\n\t var lookupType = this.parseUShort();\n\t check.argument(1 <= lookupType && lookupType <= 9, 'GPOS/GSUB lookup type ' + lookupType + ' unknown.');\n\t var lookupFlag = this.parseUShort();\n\t var useMarkFilteringSet = lookupFlag & 0x10;\n\t return {\n\t lookupType: lookupType,\n\t lookupFlag: lookupFlag,\n\t subtables: this.parseList(Parser.pointer(lookupTableParsers[lookupType])),\n\t markFilteringSet: useMarkFilteringSet ? this.parseUShort() : undefined\n\t };\n\t }))) || [];\n\t};\n\n\tParser.prototype.parseFeatureVariationsList = function() {\n\t return this.parsePointer32(function() {\n\t var majorVersion = this.parseUShort();\n\t var minorVersion = this.parseUShort();\n\t check.argument(majorVersion === 1 && minorVersion < 1, 'GPOS/GSUB feature variations table unknown.');\n\t var featureVariations = this.parseRecordList32({\n\t conditionSetOffset: Parser.offset32,\n\t featureTableSubstitutionOffset: Parser.offset32\n\t });\n\t return featureVariations;\n\t }) || [];\n\t};\n\n\tvar parse = {\n\t getByte: getByte,\n\t getCard8: getByte,\n\t getUShort: getUShort,\n\t getCard16: getUShort,\n\t getShort: getShort,\n\t getULong: getULong,\n\t getFixed: getFixed,\n\t getTag: getTag,\n\t getOffset: getOffset,\n\t getBytes: getBytes,\n\t bytesToString: bytesToString,\n\t Parser: Parser,\n\t};\n\n\t// The `cmap` table stores the mappings from characters to glyphs.\n\n\tfunction parseCmapTableFormat12(cmap, p) {\n\t //Skip reserved.\n\t p.parseUShort();\n\n\t // Length in bytes of the sub-tables.\n\t cmap.length = p.parseULong();\n\t cmap.language = p.parseULong();\n\n\t var groupCount;\n\t cmap.groupCount = groupCount = p.parseULong();\n\t cmap.glyphIndexMap = {};\n\n\t for (var i = 0; i < groupCount; i += 1) {\n\t var startCharCode = p.parseULong();\n\t var endCharCode = p.parseULong();\n\t var startGlyphId = p.parseULong();\n\n\t for (var c = startCharCode; c <= endCharCode; c += 1) {\n\t cmap.glyphIndexMap[c] = startGlyphId;\n\t startGlyphId++;\n\t }\n\t }\n\t}\n\n\tfunction parseCmapTableFormat4(cmap, p, data, start, offset) {\n\t // Length in bytes of the sub-tables.\n\t cmap.length = p.parseUShort();\n\t cmap.language = p.parseUShort();\n\n\t // segCount is stored x 2.\n\t var segCount;\n\t cmap.segCount = segCount = p.parseUShort() >> 1;\n\n\t // Skip searchRange, entrySelector, rangeShift.\n\t p.skip('uShort', 3);\n\n\t // The \"unrolled\" mapping from character codes to glyph indices.\n\t cmap.glyphIndexMap = {};\n\t var endCountParser = new parse.Parser(data, start + offset + 14);\n\t var startCountParser = new parse.Parser(data, start + offset + 16 + segCount * 2);\n\t var idDeltaParser = new parse.Parser(data, start + offset + 16 + segCount * 4);\n\t var idRangeOffsetParser = new parse.Parser(data, start + offset + 16 + segCount * 6);\n\t var glyphIndexOffset = start + offset + 16 + segCount * 8;\n\t for (var i = 0; i < segCount - 1; i += 1) {\n\t var glyphIndex = (void 0);\n\t var endCount = endCountParser.parseUShort();\n\t var startCount = startCountParser.parseUShort();\n\t var idDelta = idDeltaParser.parseShort();\n\t var idRangeOffset = idRangeOffsetParser.parseUShort();\n\t for (var c = startCount; c <= endCount; c += 1) {\n\t if (idRangeOffset !== 0) {\n\t // The idRangeOffset is relative to the current position in the idRangeOffset array.\n\t // Take the current offset in the idRangeOffset array.\n\t glyphIndexOffset = (idRangeOffsetParser.offset + idRangeOffsetParser.relativeOffset - 2);\n\n\t // Add the value of the idRangeOffset, which will move us into the glyphIndex array.\n\t glyphIndexOffset += idRangeOffset;\n\n\t // Then add the character index of the current segment, multiplied by 2 for USHORTs.\n\t glyphIndexOffset += (c - startCount) * 2;\n\t glyphIndex = parse.getUShort(data, glyphIndexOffset);\n\t if (glyphIndex !== 0) {\n\t glyphIndex = (glyphIndex + idDelta) & 0xFFFF;\n\t }\n\t } else {\n\t glyphIndex = (c + idDelta) & 0xFFFF;\n\t }\n\n\t cmap.glyphIndexMap[c] = glyphIndex;\n\t }\n\t }\n\t}\n\n\t// Parse the `cmap` table. This table stores the mappings from characters to glyphs.\n\t// There are many available formats, but we only support the Windows format 4 and 12.\n\t// This function returns a `CmapEncoding` object or null if no supported format could be found.\n\tfunction parseCmapTable(data, start) {\n\t var cmap = {};\n\t cmap.version = parse.getUShort(data, start);\n\t check.argument(cmap.version === 0, 'cmap table version should be 0.');\n\n\t // The cmap table can contain many sub-tables, each with their own format.\n\t // We're only interested in a \"platform 0\" (Unicode format) and \"platform 3\" (Windows format) table.\n\t cmap.numTables = parse.getUShort(data, start + 2);\n\t var offset = -1;\n\t for (var i = cmap.numTables - 1; i >= 0; i -= 1) {\n\t var platformId = parse.getUShort(data, start + 4 + (i * 8));\n\t var encodingId = parse.getUShort(data, start + 4 + (i * 8) + 2);\n\t if ((platformId === 3 && (encodingId === 0 || encodingId === 1 || encodingId === 10)) ||\n\t (platformId === 0 && (encodingId === 0 || encodingId === 1 || encodingId === 2 || encodingId === 3 || encodingId === 4))) {\n\t offset = parse.getULong(data, start + 4 + (i * 8) + 4);\n\t break;\n\t }\n\t }\n\n\t if (offset === -1) {\n\t // There is no cmap table in the font that we support.\n\t throw new Error('No valid cmap sub-tables found.');\n\t }\n\n\t var p = new parse.Parser(data, start + offset);\n\t cmap.format = p.parseUShort();\n\n\t if (cmap.format === 12) {\n\t parseCmapTableFormat12(cmap, p);\n\t } else if (cmap.format === 4) {\n\t parseCmapTableFormat4(cmap, p, data, start, offset);\n\t } else {\n\t throw new Error('Only format 4 and 12 cmap tables are supported (found format ' + cmap.format + ').');\n\t }\n\n\t return cmap;\n\t}\n\n\tfunction addSegment(t, code, glyphIndex) {\n\t t.segments.push({\n\t end: code,\n\t start: code,\n\t delta: -(code - glyphIndex),\n\t offset: 0,\n\t glyphIndex: glyphIndex\n\t });\n\t}\n\n\tfunction addTerminatorSegment(t) {\n\t t.segments.push({\n\t end: 0xFFFF,\n\t start: 0xFFFF,\n\t delta: 1,\n\t offset: 0\n\t });\n\t}\n\n\t// Make cmap table, format 4 by default, 12 if needed only\n\tfunction makeCmapTable(glyphs) {\n\t // Plan 0 is the base Unicode Plan but emojis, for example are on another plan, and needs cmap 12 format (with 32bit)\n\t var isPlan0Only = true;\n\t var i;\n\n\t // Check if we need to add cmap format 12 or if format 4 only is fine\n\t for (i = glyphs.length - 1; i > 0; i -= 1) {\n\t var g = glyphs.get(i);\n\t if (g.unicode > 65535) {\n\t console.log('Adding CMAP format 12 (needed!)');\n\t isPlan0Only = false;\n\t break;\n\t }\n\t }\n\n\t var cmapTable = [\n\t {name: 'version', type: 'USHORT', value: 0},\n\t {name: 'numTables', type: 'USHORT', value: isPlan0Only ? 1 : 2},\n\n\t // CMAP 4 header\n\t {name: 'platformID', type: 'USHORT', value: 3},\n\t {name: 'encodingID', type: 'USHORT', value: 1},\n\t {name: 'offset', type: 'ULONG', value: isPlan0Only ? 12 : (12 + 8)}\n\t ];\n\n\t if (!isPlan0Only)\n\t { cmapTable = cmapTable.concat([\n\t // CMAP 12 header\n\t {name: 'cmap12PlatformID', type: 'USHORT', value: 3}, // We encode only for PlatformID = 3 (Windows) because it is supported everywhere\n\t {name: 'cmap12EncodingID', type: 'USHORT', value: 10},\n\t {name: 'cmap12Offset', type: 'ULONG', value: 0}\n\t ]); }\n\n\t cmapTable = cmapTable.concat([\n\t // CMAP 4 Subtable\n\t {name: 'format', type: 'USHORT', value: 4},\n\t {name: 'cmap4Length', type: 'USHORT', value: 0},\n\t {name: 'language', type: 'USHORT', value: 0},\n\t {name: 'segCountX2', type: 'USHORT', value: 0},\n\t {name: 'searchRange', type: 'USHORT', value: 0},\n\t {name: 'entrySelector', type: 'USHORT', value: 0},\n\t {name: 'rangeShift', type: 'USHORT', value: 0}\n\t ]);\n\n\t var t = new table.Table('cmap', cmapTable);\n\n\t t.segments = [];\n\t for (i = 0; i < glyphs.length; i += 1) {\n\t var glyph = glyphs.get(i);\n\t for (var j = 0; j < glyph.unicodes.length; j += 1) {\n\t addSegment(t, glyph.unicodes[j], i);\n\t }\n\n\t t.segments = t.segments.sort(function (a, b) {\n\t return a.start - b.start;\n\t });\n\t }\n\n\t addTerminatorSegment(t);\n\n\t var segCount = t.segments.length;\n\t var segCountToRemove = 0;\n\n\t // CMAP 4\n\t // Set up parallel segment arrays.\n\t var endCounts = [];\n\t var startCounts = [];\n\t var idDeltas = [];\n\t var idRangeOffsets = [];\n\t var glyphIds = [];\n\n\t // CMAP 12\n\t var cmap12Groups = [];\n\n\t // Reminder this loop is not following the specification at 100%\n\t // The specification -> find suites of characters and make a group\n\t // Here we're doing one group for each letter\n\t // Doing as the spec can save 8 times (or more) space\n\t for (i = 0; i < segCount; i += 1) {\n\t var segment = t.segments[i];\n\n\t // CMAP 4\n\t if (segment.end <= 65535 && segment.start <= 65535) {\n\t endCounts = endCounts.concat({name: 'end_' + i, type: 'USHORT', value: segment.end});\n\t startCounts = startCounts.concat({name: 'start_' + i, type: 'USHORT', value: segment.start});\n\t idDeltas = idDeltas.concat({name: 'idDelta_' + i, type: 'SHORT', value: segment.delta});\n\t idRangeOffsets = idRangeOffsets.concat({name: 'idRangeOffset_' + i, type: 'USHORT', value: segment.offset});\n\t if (segment.glyphId !== undefined) {\n\t glyphIds = glyphIds.concat({name: 'glyph_' + i, type: 'USHORT', value: segment.glyphId});\n\t }\n\t } else {\n\t // Skip Unicode > 65535 (16bit unsigned max) for CMAP 4, will be added in CMAP 12\n\t segCountToRemove += 1;\n\t }\n\n\t // CMAP 12\n\t // Skip Terminator Segment\n\t if (!isPlan0Only && segment.glyphIndex !== undefined) {\n\t cmap12Groups = cmap12Groups.concat({name: 'cmap12Start_' + i, type: 'ULONG', value: segment.start});\n\t cmap12Groups = cmap12Groups.concat({name: 'cmap12End_' + i, type: 'ULONG', value: segment.end});\n\t cmap12Groups = cmap12Groups.concat({name: 'cmap12Glyph_' + i, type: 'ULONG', value: segment.glyphIndex});\n\t }\n\t }\n\n\t // CMAP 4 Subtable\n\t t.segCountX2 = (segCount - segCountToRemove) * 2;\n\t t.searchRange = Math.pow(2, Math.floor(Math.log((segCount - segCountToRemove)) / Math.log(2))) * 2;\n\t t.entrySelector = Math.log(t.searchRange / 2) / Math.log(2);\n\t t.rangeShift = t.segCountX2 - t.searchRange;\n\n\t t.fields = t.fields.concat(endCounts);\n\t t.fields.push({name: 'reservedPad', type: 'USHORT', value: 0});\n\t t.fields = t.fields.concat(startCounts);\n\t t.fields = t.fields.concat(idDeltas);\n\t t.fields = t.fields.concat(idRangeOffsets);\n\t t.fields = t.fields.concat(glyphIds);\n\n\t t.cmap4Length = 14 + // Subtable header\n\t endCounts.length * 2 +\n\t 2 + // reservedPad\n\t startCounts.length * 2 +\n\t idDeltas.length * 2 +\n\t idRangeOffsets.length * 2 +\n\t glyphIds.length * 2;\n\n\t if (!isPlan0Only) {\n\t // CMAP 12 Subtable\n\t var cmap12Length = 16 + // Subtable header\n\t cmap12Groups.length * 4;\n\n\t t.cmap12Offset = 12 + (2 * 2) + 4 + t.cmap4Length;\n\t t.fields = t.fields.concat([\n\t {name: 'cmap12Format', type: 'USHORT', value: 12},\n\t {name: 'cmap12Reserved', type: 'USHORT', value: 0},\n\t {name: 'cmap12Length', type: 'ULONG', value: cmap12Length},\n\t {name: 'cmap12Language', type: 'ULONG', value: 0},\n\t {name: 'cmap12nGroups', type: 'ULONG', value: cmap12Groups.length / 3}\n\t ]);\n\n\t t.fields = t.fields.concat(cmap12Groups);\n\t }\n\n\t return t;\n\t}\n\n\tvar cmap = { parse: parseCmapTable, make: makeCmapTable };\n\n\t// Glyph encoding\n\n\tvar cffStandardStrings = [\n\t '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n\t 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n\t 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n\t 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n\t 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n\t 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n\t 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling',\n\t 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft',\n\t 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph',\n\t 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand',\n\t 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring',\n\t 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE',\n\t 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n\t 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn',\n\t 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n\t 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex',\n\t 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n\t 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute',\n\t 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute',\n\t 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute',\n\t 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave',\n\t 'yacute', 'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior',\n\t 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', '266 ff', 'onedotenleader',\n\t 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle',\n\t 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior', 'threequartersemdash', 'periodsuperior',\n\t 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n\t 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl',\n\t 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n\t 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n\t 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n\t 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall',\n\t 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall',\n\t 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall',\n\t 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds',\n\t 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n\t 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior',\n\t 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior',\n\t 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall',\n\t 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall',\n\t 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall',\n\t 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall',\n\t 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall', '001.000',\n\t '001.001', '001.002', '001.003', 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'];\n\n\tvar cffStandardEncoding = [\n\t '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n\t '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n\t 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n\t 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n\t 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n\t 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n\t 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n\t 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n\t '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n\t 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n\t 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n\t 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n\t 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n\t 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n\t 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n\t '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n\t 'lslash', 'oslash', 'oe', 'germandbls'];\n\n\tvar cffExpertEncoding = [\n\t '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n\t '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n\t 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n\t 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n\t 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n\t 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n\t 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n\t 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n\t 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n\t 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n\t 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n\t 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n\t '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n\t 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n\t 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n\t '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n\t 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n\t '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n\t 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n\t 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n\t 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n\t 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n\t 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n\t 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n\t 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n\t 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];\n\n\tvar standardNames = [\n\t '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n\t 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n\t 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n\t 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n\t 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n\t 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n\t 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n\t 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n\t 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n\t 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n\t 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n\t 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n\t 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n\t 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n\t 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n\t 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n\t 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n\t 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n\t 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n\t 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n\t 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n\t 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n\t 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n\t 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n\t 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'];\n\n\t/**\n\t * This is the encoding used for fonts created from scratch.\n\t * It loops through all glyphs and finds the appropriate unicode value.\n\t * Since it's linear time, other encodings will be faster.\n\t * @exports opentype.DefaultEncoding\n\t * @class\n\t * @constructor\n\t * @param {opentype.Font}\n\t */\n\tfunction DefaultEncoding(font) {\n\t this.font = font;\n\t}\n\n\tDefaultEncoding.prototype.charToGlyphIndex = function(c) {\n\t var code = c.codePointAt(0);\n\t var glyphs = this.font.glyphs;\n\t if (glyphs) {\n\t for (var i = 0; i < glyphs.length; i += 1) {\n\t var glyph = glyphs.get(i);\n\t for (var j = 0; j < glyph.unicodes.length; j += 1) {\n\t if (glyph.unicodes[j] === code) {\n\t return i;\n\t }\n\t }\n\t }\n\t }\n\t return null;\n\t};\n\n\t/**\n\t * @exports opentype.CmapEncoding\n\t * @class\n\t * @constructor\n\t * @param {Object} cmap - a object with the cmap encoded data\n\t */\n\tfunction CmapEncoding(cmap) {\n\t this.cmap = cmap;\n\t}\n\n\t/**\n\t * @param {string} c - the character\n\t * @return {number} The glyph index.\n\t */\n\tCmapEncoding.prototype.charToGlyphIndex = function(c) {\n\t return this.cmap.glyphIndexMap[c.codePointAt(0)] || 0;\n\t};\n\n\t/**\n\t * @exports opentype.CffEncoding\n\t * @class\n\t * @constructor\n\t * @param {string} encoding - The encoding\n\t * @param {Array} charset - The character set.\n\t */\n\tfunction CffEncoding(encoding, charset) {\n\t this.encoding = encoding;\n\t this.charset = charset;\n\t}\n\n\t/**\n\t * @param {string} s - The character\n\t * @return {number} The index.\n\t */\n\tCffEncoding.prototype.charToGlyphIndex = function(s) {\n\t var code = s.codePointAt(0);\n\t var charName = this.encoding[code];\n\t return this.charset.indexOf(charName);\n\t};\n\n\t/**\n\t * @exports opentype.GlyphNames\n\t * @class\n\t * @constructor\n\t * @param {Object} post\n\t */\n\tfunction GlyphNames(post) {\n\t var this$1 = this;\n\n\t switch (post.version) {\n\t case 1:\n\t this.names = standardNames.slice();\n\t break;\n\t case 2:\n\t this.names = new Array(post.numberOfGlyphs);\n\t for (var i = 0; i < post.numberOfGlyphs; i++) {\n\t if (post.glyphNameIndex[i] < standardNames.length) {\n\t this$1.names[i] = standardNames[post.glyphNameIndex[i]];\n\t } else {\n\t this$1.names[i] = post.names[post.glyphNameIndex[i] - standardNames.length];\n\t }\n\t }\n\n\t break;\n\t case 2.5:\n\t this.names = new Array(post.numberOfGlyphs);\n\t for (var i$1 = 0; i$1 < post.numberOfGlyphs; i$1++) {\n\t this$1.names[i$1] = standardNames[i$1 + post.glyphNameIndex[i$1]];\n\t }\n\n\t break;\n\t case 3:\n\t this.names = [];\n\t break;\n\t default:\n\t this.names = [];\n\t break;\n\t }\n\t}\n\n\t/**\n\t * Gets the index of a glyph by name.\n\t * @param {string} name - The glyph name\n\t * @return {number} The index\n\t */\n\tGlyphNames.prototype.nameToGlyphIndex = function(name) {\n\t return this.names.indexOf(name);\n\t};\n\n\t/**\n\t * @param {number} gid\n\t * @return {string}\n\t */\n\tGlyphNames.prototype.glyphIndexToName = function(gid) {\n\t return this.names[gid];\n\t};\n\n\t/**\n\t * @alias opentype.addGlyphNames\n\t * @param {opentype.Font}\n\t */\n\tfunction addGlyphNames(font) {\n\t var glyph;\n\t var glyphIndexMap = font.tables.cmap.glyphIndexMap;\n\t var charCodes = Object.keys(glyphIndexMap);\n\n\t for (var i = 0; i < charCodes.length; i += 1) {\n\t var c = charCodes[i];\n\t var glyphIndex = glyphIndexMap[c];\n\t glyph = font.glyphs.get(glyphIndex);\n\t glyph.addUnicode(parseInt(c));\n\t }\n\n\t for (var i$1 = 0; i$1 < font.glyphs.length; i$1 += 1) {\n\t glyph = font.glyphs.get(i$1);\n\t if (font.cffEncoding) {\n\t if (font.isCIDFont) {\n\t glyph.name = 'gid' + i$1;\n\t } else {\n\t glyph.name = font.cffEncoding.charset[i$1];\n\t }\n\t } else if (font.glyphNames.names) {\n\t glyph.name = font.glyphNames.glyphIndexToName(i$1);\n\t }\n\t }\n\t}\n\n\t// Drawing utility functions.\n\n\t// Draw a line on the given context from point `x1,y1` to point `x2,y2`.\n\tfunction line(ctx, x1, y1, x2, y2) {\n\t ctx.beginPath();\n\t ctx.moveTo(x1, y1);\n\t ctx.lineTo(x2, y2);\n\t ctx.stroke();\n\t}\n\n\tvar draw = { line: line };\n\n\t// The Glyph object\n\t// import glyf from './tables/glyf' Can't be imported here, because it's a circular dependency\n\n\tfunction getPathDefinition(glyph, path) {\n\t var _path = path || new Path();\n\t return {\n\t configurable: true,\n\n\t get: function() {\n\t if (typeof _path === 'function') {\n\t _path = _path();\n\t }\n\n\t return _path;\n\t },\n\n\t set: function(p) {\n\t _path = p;\n\t }\n\t };\n\t}\n\t/**\n\t * @typedef GlyphOptions\n\t * @type Object\n\t * @property {string} [name] - The glyph name\n\t * @property {number} [unicode]\n\t * @property {Array} [unicodes]\n\t * @property {number} [xMin]\n\t * @property {number} [yMin]\n\t * @property {number} [xMax]\n\t * @property {number} [yMax]\n\t * @property {number} [advanceWidth]\n\t */\n\n\t// A Glyph is an individual mark that often corresponds to a character.\n\t// Some glyphs, such as ligatures, are a combination of many characters.\n\t// Glyphs are the basic building blocks of a font.\n\t//\n\t// The `Glyph` class contains utility methods for drawing the path and its points.\n\t/**\n\t * @exports opentype.Glyph\n\t * @class\n\t * @param {GlyphOptions}\n\t * @constructor\n\t */\n\tfunction Glyph(options) {\n\t // By putting all the code on a prototype function (which is only declared once)\n\t // we reduce the memory requirements for larger fonts by some 2%\n\t this.bindConstructorValues(options);\n\t}\n\n\t/**\n\t * @param {GlyphOptions}\n\t */\n\tGlyph.prototype.bindConstructorValues = function(options) {\n\t this.index = options.index || 0;\n\n\t // These three values cannot be deferred for memory optimization:\n\t this.name = options.name || null;\n\t this.unicode = options.unicode || undefined;\n\t this.unicodes = options.unicodes || options.unicode !== undefined ? [options.unicode] : [];\n\n\t // But by binding these values only when necessary, we reduce can\n\t // the memory requirements by almost 3% for larger fonts.\n\t if (options.xMin) {\n\t this.xMin = options.xMin;\n\t }\n\n\t if (options.yMin) {\n\t this.yMin = options.yMin;\n\t }\n\n\t if (options.xMax) {\n\t this.xMax = options.xMax;\n\t }\n\n\t if (options.yMax) {\n\t this.yMax = options.yMax;\n\t }\n\n\t if (options.advanceWidth) {\n\t this.advanceWidth = options.advanceWidth;\n\t }\n\n\t // The path for a glyph is the most memory intensive, and is bound as a value\n\t // with a getter/setter to ensure we actually do path parsing only once the\n\t // path is actually needed by anything.\n\t Object.defineProperty(this, 'path', getPathDefinition(this, options.path));\n\t};\n\n\t/**\n\t * @param {number}\n\t */\n\tGlyph.prototype.addUnicode = function(unicode) {\n\t if (this.unicodes.length === 0) {\n\t this.unicode = unicode;\n\t }\n\n\t this.unicodes.push(unicode);\n\t};\n\n\t/**\n\t * Calculate the minimum bounding box for this glyph.\n\t * @return {opentype.BoundingBox}\n\t */\n\tGlyph.prototype.getBoundingBox = function() {\n\t return this.path.getBoundingBox();\n\t};\n\n\t/**\n\t * Convert the glyph to a Path we can draw on a drawing context.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {Object=} options - xScale, yScale to stretch the glyph.\n\t * @param {opentype.Font} if hinting is to be used, the font\n\t * @return {opentype.Path}\n\t */\n\tGlyph.prototype.getPath = function(x, y, fontSize, options, font) {\n\t x = x !== undefined ? x : 0;\n\t y = y !== undefined ? y : 0;\n\t fontSize = fontSize !== undefined ? fontSize : 72;\n\t var commands;\n\t var hPoints;\n\t if (!options) { options = { }; }\n\t var xScale = options.xScale;\n\t var yScale = options.yScale;\n\n\t if (options.hinting && font && font.hinting) {\n\t // in case of hinting, the hinting engine takes care\n\t // of scaling the points (not the path) before hinting.\n\t hPoints = this.path && font.hinting.exec(this, fontSize);\n\t // in case the hinting engine failed hPoints is undefined\n\t // and thus reverts to plain rending\n\t }\n\n\t if (hPoints) {\n\t // Call font.hinting.getCommands instead of `glyf.getPath(hPoints).commands` to avoid a circular dependency\n\t commands = font.hinting.getCommands(hPoints);\n\t x = Math.round(x);\n\t y = Math.round(y);\n\t // TODO in case of hinting xyScaling is not yet supported\n\t xScale = yScale = 1;\n\t } else {\n\t commands = this.path.commands;\n\t var scale = 1 / this.path.unitsPerEm * fontSize;\n\t if (xScale === undefined) { xScale = scale; }\n\t if (yScale === undefined) { yScale = scale; }\n\t }\n\n\t var p = new Path();\n\t for (var i = 0; i < commands.length; i += 1) {\n\t var cmd = commands[i];\n\t if (cmd.type === 'M') {\n\t p.moveTo(x + (cmd.x * xScale), y + (-cmd.y * yScale));\n\t } else if (cmd.type === 'L') {\n\t p.lineTo(x + (cmd.x * xScale), y + (-cmd.y * yScale));\n\t } else if (cmd.type === 'Q') {\n\t p.quadraticCurveTo(x + (cmd.x1 * xScale), y + (-cmd.y1 * yScale),\n\t x + (cmd.x * xScale), y + (-cmd.y * yScale));\n\t } else if (cmd.type === 'C') {\n\t p.curveTo(x + (cmd.x1 * xScale), y + (-cmd.y1 * yScale),\n\t x + (cmd.x2 * xScale), y + (-cmd.y2 * yScale),\n\t x + (cmd.x * xScale), y + (-cmd.y * yScale));\n\t } else if (cmd.type === 'Z') {\n\t p.closePath();\n\t }\n\t }\n\n\t return p;\n\t};\n\n\t/**\n\t * Split the glyph into contours.\n\t * This function is here for backwards compatibility, and to\n\t * provide raw access to the TrueType glyph outlines.\n\t * @return {Array}\n\t */\n\tGlyph.prototype.getContours = function() {\n\t var this$1 = this;\n\n\t if (this.points === undefined) {\n\t return [];\n\t }\n\n\t var contours = [];\n\t var currentContour = [];\n\t for (var i = 0; i < this.points.length; i += 1) {\n\t var pt = this$1.points[i];\n\t currentContour.push(pt);\n\t if (pt.lastPointOfContour) {\n\t contours.push(currentContour);\n\t currentContour = [];\n\t }\n\t }\n\n\t check.argument(currentContour.length === 0, 'There are still points left in the current contour.');\n\t return contours;\n\t};\n\n\t/**\n\t * Calculate the xMin/yMin/xMax/yMax/lsb/rsb for a Glyph.\n\t * @return {Object}\n\t */\n\tGlyph.prototype.getMetrics = function() {\n\t var commands = this.path.commands;\n\t var xCoords = [];\n\t var yCoords = [];\n\t for (var i = 0; i < commands.length; i += 1) {\n\t var cmd = commands[i];\n\t if (cmd.type !== 'Z') {\n\t xCoords.push(cmd.x);\n\t yCoords.push(cmd.y);\n\t }\n\n\t if (cmd.type === 'Q' || cmd.type === 'C') {\n\t xCoords.push(cmd.x1);\n\t yCoords.push(cmd.y1);\n\t }\n\n\t if (cmd.type === 'C') {\n\t xCoords.push(cmd.x2);\n\t yCoords.push(cmd.y2);\n\t }\n\t }\n\n\t var metrics = {\n\t xMin: Math.min.apply(null, xCoords),\n\t yMin: Math.min.apply(null, yCoords),\n\t xMax: Math.max.apply(null, xCoords),\n\t yMax: Math.max.apply(null, yCoords),\n\t leftSideBearing: this.leftSideBearing\n\t };\n\n\t if (!isFinite(metrics.xMin)) {\n\t metrics.xMin = 0;\n\t }\n\n\t if (!isFinite(metrics.xMax)) {\n\t metrics.xMax = this.advanceWidth;\n\t }\n\n\t if (!isFinite(metrics.yMin)) {\n\t metrics.yMin = 0;\n\t }\n\n\t if (!isFinite(metrics.yMax)) {\n\t metrics.yMax = 0;\n\t }\n\n\t metrics.rightSideBearing = this.advanceWidth - metrics.leftSideBearing - (metrics.xMax - metrics.xMin);\n\t return metrics;\n\t};\n\n\t/**\n\t * Draw the glyph on the given context.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {Object=} options - xScale, yScale to stretch the glyph.\n\t */\n\tGlyph.prototype.draw = function(ctx, x, y, fontSize, options) {\n\t this.getPath(x, y, fontSize, options).draw(ctx);\n\t};\n\n\t/**\n\t * Draw the points of the glyph.\n\t * On-curve points will be drawn in blue, off-curve points will be drawn in red.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t */\n\tGlyph.prototype.drawPoints = function(ctx, x, y, fontSize) {\n\t function drawCircles(l, x, y, scale) {\n\t var PI_SQ = Math.PI * 2;\n\t ctx.beginPath();\n\t for (var j = 0; j < l.length; j += 1) {\n\t ctx.moveTo(x + (l[j].x * scale), y + (l[j].y * scale));\n\t ctx.arc(x + (l[j].x * scale), y + (l[j].y * scale), 2, 0, PI_SQ, false);\n\t }\n\n\t ctx.closePath();\n\t ctx.fill();\n\t }\n\n\t x = x !== undefined ? x : 0;\n\t y = y !== undefined ? y : 0;\n\t fontSize = fontSize !== undefined ? fontSize : 24;\n\t var scale = 1 / this.path.unitsPerEm * fontSize;\n\n\t var blueCircles = [];\n\t var redCircles = [];\n\t var path = this.path;\n\t for (var i = 0; i < path.commands.length; i += 1) {\n\t var cmd = path.commands[i];\n\t if (cmd.x !== undefined) {\n\t blueCircles.push({x: cmd.x, y: -cmd.y});\n\t }\n\n\t if (cmd.x1 !== undefined) {\n\t redCircles.push({x: cmd.x1, y: -cmd.y1});\n\t }\n\n\t if (cmd.x2 !== undefined) {\n\t redCircles.push({x: cmd.x2, y: -cmd.y2});\n\t }\n\t }\n\n\t ctx.fillStyle = 'blue';\n\t drawCircles(blueCircles, x, y, scale);\n\t ctx.fillStyle = 'red';\n\t drawCircles(redCircles, x, y, scale);\n\t};\n\n\t/**\n\t * Draw lines indicating important font measurements.\n\t * Black lines indicate the origin of the coordinate system (point 0,0).\n\t * Blue lines indicate the glyph bounding box.\n\t * Green line indicates the advance width of the glyph.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t */\n\tGlyph.prototype.drawMetrics = function(ctx, x, y, fontSize) {\n\t var scale;\n\t x = x !== undefined ? x : 0;\n\t y = y !== undefined ? y : 0;\n\t fontSize = fontSize !== undefined ? fontSize : 24;\n\t scale = 1 / this.path.unitsPerEm * fontSize;\n\t ctx.lineWidth = 1;\n\n\t // Draw the origin\n\t ctx.strokeStyle = 'black';\n\t draw.line(ctx, x, -10000, x, 10000);\n\t draw.line(ctx, -10000, y, 10000, y);\n\n\t // This code is here due to memory optimization: by not using\n\t // defaults in the constructor, we save a notable amount of memory.\n\t var xMin = this.xMin || 0;\n\t var yMin = this.yMin || 0;\n\t var xMax = this.xMax || 0;\n\t var yMax = this.yMax || 0;\n\t var advanceWidth = this.advanceWidth || 0;\n\n\t // Draw the glyph box\n\t ctx.strokeStyle = 'blue';\n\t draw.line(ctx, x + (xMin * scale), -10000, x + (xMin * scale), 10000);\n\t draw.line(ctx, x + (xMax * scale), -10000, x + (xMax * scale), 10000);\n\t draw.line(ctx, -10000, y + (-yMin * scale), 10000, y + (-yMin * scale));\n\t draw.line(ctx, -10000, y + (-yMax * scale), 10000, y + (-yMax * scale));\n\n\t // Draw the advance width\n\t ctx.strokeStyle = 'green';\n\t draw.line(ctx, x + (advanceWidth * scale), -10000, x + (advanceWidth * scale), 10000);\n\t};\n\n\t// The GlyphSet object\n\n\t// Define a property on the glyph that depends on the path being loaded.\n\tfunction defineDependentProperty(glyph, externalName, internalName) {\n\t Object.defineProperty(glyph, externalName, {\n\t get: function() {\n\t // Request the path property to make sure the path is loaded.\n\t glyph.path; // jshint ignore:line\n\t return glyph[internalName];\n\t },\n\t set: function(newValue) {\n\t glyph[internalName] = newValue;\n\t },\n\t enumerable: true,\n\t configurable: true\n\t });\n\t}\n\n\t/**\n\t * A GlyphSet represents all glyphs available in the font, but modelled using\n\t * a deferred glyph loader, for retrieving glyphs only once they are absolutely\n\t * necessary, to keep the memory footprint down.\n\t * @exports opentype.GlyphSet\n\t * @class\n\t * @param {opentype.Font}\n\t * @param {Array}\n\t */\n\tfunction GlyphSet(font, glyphs) {\n\t var this$1 = this;\n\n\t this.font = font;\n\t this.glyphs = {};\n\t if (Array.isArray(glyphs)) {\n\t for (var i = 0; i < glyphs.length; i++) {\n\t this$1.glyphs[i] = glyphs[i];\n\t }\n\t }\n\n\t this.length = (glyphs && glyphs.length) || 0;\n\t}\n\n\t/**\n\t * @param {number} index\n\t * @return {opentype.Glyph}\n\t */\n\tGlyphSet.prototype.get = function(index) {\n\t if (typeof this.glyphs[index] === 'function') {\n\t this.glyphs[index] = this.glyphs[index]();\n\t }\n\n\t return this.glyphs[index];\n\t};\n\n\t/**\n\t * @param {number} index\n\t * @param {Object}\n\t */\n\tGlyphSet.prototype.push = function(index, loader) {\n\t this.glyphs[index] = loader;\n\t this.length++;\n\t};\n\n\t/**\n\t * @alias opentype.glyphLoader\n\t * @param {opentype.Font} font\n\t * @param {number} index\n\t * @return {opentype.Glyph}\n\t */\n\tfunction glyphLoader(font, index) {\n\t return new Glyph({index: index, font: font});\n\t}\n\n\t/**\n\t * Generate a stub glyph that can be filled with all metadata *except*\n\t * the \"points\" and \"path\" properties, which must be loaded only once\n\t * the glyph's path is actually requested for text shaping.\n\t * @alias opentype.ttfGlyphLoader\n\t * @param {opentype.Font} font\n\t * @param {number} index\n\t * @param {Function} parseGlyph\n\t * @param {Object} data\n\t * @param {number} position\n\t * @param {Function} buildPath\n\t * @return {opentype.Glyph}\n\t */\n\tfunction ttfGlyphLoader(font, index, parseGlyph, data, position, buildPath) {\n\t return function() {\n\t var glyph = new Glyph({index: index, font: font});\n\n\t glyph.path = function() {\n\t parseGlyph(glyph, data, position);\n\t var path = buildPath(font.glyphs, glyph);\n\t path.unitsPerEm = font.unitsPerEm;\n\t return path;\n\t };\n\n\t defineDependentProperty(glyph, 'xMin', '_xMin');\n\t defineDependentProperty(glyph, 'xMax', '_xMax');\n\t defineDependentProperty(glyph, 'yMin', '_yMin');\n\t defineDependentProperty(glyph, 'yMax', '_yMax');\n\n\t return glyph;\n\t };\n\t}\n\t/**\n\t * @alias opentype.cffGlyphLoader\n\t * @param {opentype.Font} font\n\t * @param {number} index\n\t * @param {Function} parseCFFCharstring\n\t * @param {string} charstring\n\t * @return {opentype.Glyph}\n\t */\n\tfunction cffGlyphLoader(font, index, parseCFFCharstring, charstring) {\n\t return function() {\n\t var glyph = new Glyph({index: index, font: font});\n\n\t glyph.path = function() {\n\t var path = parseCFFCharstring(font, glyph, charstring);\n\t path.unitsPerEm = font.unitsPerEm;\n\t return path;\n\t };\n\n\t return glyph;\n\t };\n\t}\n\n\tvar glyphset = { GlyphSet: GlyphSet, glyphLoader: glyphLoader, ttfGlyphLoader: ttfGlyphLoader, cffGlyphLoader: cffGlyphLoader };\n\n\t// The `CFF` table contains the glyph outlines in PostScript format.\n\n\t// Custom equals function that can also check lists.\n\tfunction equals(a, b) {\n\t if (a === b) {\n\t return true;\n\t } else if (Array.isArray(a) && Array.isArray(b)) {\n\t if (a.length !== b.length) {\n\t return false;\n\t }\n\n\t for (var i = 0; i < a.length; i += 1) {\n\t if (!equals(a[i], b[i])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t}\n\n\t// Subroutines are encoded using the negative half of the number space.\n\t// See type 2 chapter 4.7 \"Subroutine operators\".\n\tfunction calcCFFSubroutineBias(subrs) {\n\t var bias;\n\t if (subrs.length < 1240) {\n\t bias = 107;\n\t } else if (subrs.length < 33900) {\n\t bias = 1131;\n\t } else {\n\t bias = 32768;\n\t }\n\n\t return bias;\n\t}\n\n\t// Parse a `CFF` INDEX array.\n\t// An index array consists of a list of offsets, then a list of objects at those offsets.\n\tfunction parseCFFIndex(data, start, conversionFn) {\n\t var offsets = [];\n\t var objects = [];\n\t var count = parse.getCard16(data, start);\n\t var objectOffset;\n\t var endOffset;\n\t if (count !== 0) {\n\t var offsetSize = parse.getByte(data, start + 2);\n\t objectOffset = start + ((count + 1) * offsetSize) + 2;\n\t var pos = start + 3;\n\t for (var i = 0; i < count + 1; i += 1) {\n\t offsets.push(parse.getOffset(data, pos, offsetSize));\n\t pos += offsetSize;\n\t }\n\n\t // The total size of the index array is 4 header bytes + the value of the last offset.\n\t endOffset = objectOffset + offsets[count];\n\t } else {\n\t endOffset = start + 2;\n\t }\n\n\t for (var i$1 = 0; i$1 < offsets.length - 1; i$1 += 1) {\n\t var value = parse.getBytes(data, objectOffset + offsets[i$1], objectOffset + offsets[i$1 + 1]);\n\t if (conversionFn) {\n\t value = conversionFn(value);\n\t }\n\n\t objects.push(value);\n\t }\n\n\t return {objects: objects, startOffset: start, endOffset: endOffset};\n\t}\n\n\t// Parse a `CFF` DICT real value.\n\tfunction parseFloatOperand(parser) {\n\t var s = '';\n\t var eof = 15;\n\t var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-'];\n\t while (true) {\n\t var b = parser.parseByte();\n\t var n1 = b >> 4;\n\t var n2 = b & 15;\n\n\t if (n1 === eof) {\n\t break;\n\t }\n\n\t s += lookup[n1];\n\n\t if (n2 === eof) {\n\t break;\n\t }\n\n\t s += lookup[n2];\n\t }\n\n\t return parseFloat(s);\n\t}\n\n\t// Parse a `CFF` DICT operand.\n\tfunction parseOperand(parser, b0) {\n\t var b1;\n\t var b2;\n\t var b3;\n\t var b4;\n\t if (b0 === 28) {\n\t b1 = parser.parseByte();\n\t b2 = parser.parseByte();\n\t return b1 << 8 | b2;\n\t }\n\n\t if (b0 === 29) {\n\t b1 = parser.parseByte();\n\t b2 = parser.parseByte();\n\t b3 = parser.parseByte();\n\t b4 = parser.parseByte();\n\t return b1 << 24 | b2 << 16 | b3 << 8 | b4;\n\t }\n\n\t if (b0 === 30) {\n\t return parseFloatOperand(parser);\n\t }\n\n\t if (b0 >= 32 && b0 <= 246) {\n\t return b0 - 139;\n\t }\n\n\t if (b0 >= 247 && b0 <= 250) {\n\t b1 = parser.parseByte();\n\t return (b0 - 247) * 256 + b1 + 108;\n\t }\n\n\t if (b0 >= 251 && b0 <= 254) {\n\t b1 = parser.parseByte();\n\t return -(b0 - 251) * 256 - b1 - 108;\n\t }\n\n\t throw new Error('Invalid b0 ' + b0);\n\t}\n\n\t// Convert the entries returned by `parseDict` to a proper dictionary.\n\t// If a value is a list of one, it is unpacked.\n\tfunction entriesToObject(entries) {\n\t var o = {};\n\t for (var i = 0; i < entries.length; i += 1) {\n\t var key = entries[i][0];\n\t var values = entries[i][1];\n\t var value = (void 0);\n\t if (values.length === 1) {\n\t value = values[0];\n\t } else {\n\t value = values;\n\t }\n\n\t if (o.hasOwnProperty(key) && !isNaN(o[key])) {\n\t throw new Error('Object ' + o + ' already has key ' + key);\n\t }\n\n\t o[key] = value;\n\t }\n\n\t return o;\n\t}\n\n\t// Parse a `CFF` DICT object.\n\t// A dictionary contains key-value pairs in a compact tokenized format.\n\tfunction parseCFFDict(data, start, size) {\n\t start = start !== undefined ? start : 0;\n\t var parser = new parse.Parser(data, start);\n\t var entries = [];\n\t var operands = [];\n\t size = size !== undefined ? size : data.length;\n\n\t while (parser.relativeOffset < size) {\n\t var op = parser.parseByte();\n\n\t // The first byte for each dict item distinguishes between operator (key) and operand (value).\n\t // Values <= 21 are operators.\n\t if (op <= 21) {\n\t // Two-byte operators have an initial escape byte of 12.\n\t if (op === 12) {\n\t op = 1200 + parser.parseByte();\n\t }\n\n\t entries.push([op, operands]);\n\t operands = [];\n\t } else {\n\t // Since the operands (values) come before the operators (keys), we store all operands in a list\n\t // until we encounter an operator.\n\t operands.push(parseOperand(parser, op));\n\t }\n\t }\n\n\t return entriesToObject(entries);\n\t}\n\n\t// Given a String Index (SID), return the value of the string.\n\t// Strings below index 392 are standard CFF strings and are not encoded in the font.\n\tfunction getCFFString(strings, index) {\n\t if (index <= 390) {\n\t index = cffStandardStrings[index];\n\t } else {\n\t index = strings[index - 391];\n\t }\n\n\t return index;\n\t}\n\n\t// Interpret a dictionary and return a new dictionary with readable keys and values for missing entries.\n\t// This function takes `meta` which is a list of objects containing `operand`, `name` and `default`.\n\tfunction interpretDict(dict, meta, strings) {\n\t var newDict = {};\n\t var value;\n\n\t // Because we also want to include missing values, we start out from the meta list\n\t // and lookup values in the dict.\n\t for (var i = 0; i < meta.length; i += 1) {\n\t var m = meta[i];\n\n\t if (Array.isArray(m.type)) {\n\t var values = [];\n\t values.length = m.type.length;\n\t for (var j = 0; j < m.type.length; j++) {\n\t value = dict[m.op] !== undefined ? dict[m.op][j] : undefined;\n\t if (value === undefined) {\n\t value = m.value !== undefined && m.value[j] !== undefined ? m.value[j] : null;\n\t }\n\t if (m.type[j] === 'SID') {\n\t value = getCFFString(strings, value);\n\t }\n\t values[j] = value;\n\t }\n\t newDict[m.name] = values;\n\t } else {\n\t value = dict[m.op];\n\t if (value === undefined) {\n\t value = m.value !== undefined ? m.value : null;\n\t }\n\n\t if (m.type === 'SID') {\n\t value = getCFFString(strings, value);\n\t }\n\t newDict[m.name] = value;\n\t }\n\t }\n\n\t return newDict;\n\t}\n\n\t// Parse the CFF header.\n\tfunction parseCFFHeader(data, start) {\n\t var header = {};\n\t header.formatMajor = parse.getCard8(data, start);\n\t header.formatMinor = parse.getCard8(data, start + 1);\n\t header.size = parse.getCard8(data, start + 2);\n\t header.offsetSize = parse.getCard8(data, start + 3);\n\t header.startOffset = start;\n\t header.endOffset = start + 4;\n\t return header;\n\t}\n\n\tvar TOP_DICT_META = [\n\t {name: 'version', op: 0, type: 'SID'},\n\t {name: 'notice', op: 1, type: 'SID'},\n\t {name: 'copyright', op: 1200, type: 'SID'},\n\t {name: 'fullName', op: 2, type: 'SID'},\n\t {name: 'familyName', op: 3, type: 'SID'},\n\t {name: 'weight', op: 4, type: 'SID'},\n\t {name: 'isFixedPitch', op: 1201, type: 'number', value: 0},\n\t {name: 'italicAngle', op: 1202, type: 'number', value: 0},\n\t {name: 'underlinePosition', op: 1203, type: 'number', value: -100},\n\t {name: 'underlineThickness', op: 1204, type: 'number', value: 50},\n\t {name: 'paintType', op: 1205, type: 'number', value: 0},\n\t {name: 'charstringType', op: 1206, type: 'number', value: 2},\n\t {\n\t name: 'fontMatrix',\n\t op: 1207,\n\t type: ['real', 'real', 'real', 'real', 'real', 'real'],\n\t value: [0.001, 0, 0, 0.001, 0, 0]\n\t },\n\t {name: 'uniqueId', op: 13, type: 'number'},\n\t {name: 'fontBBox', op: 5, type: ['number', 'number', 'number', 'number'], value: [0, 0, 0, 0]},\n\t {name: 'strokeWidth', op: 1208, type: 'number', value: 0},\n\t {name: 'xuid', op: 14, type: [], value: null},\n\t {name: 'charset', op: 15, type: 'offset', value: 0},\n\t {name: 'encoding', op: 16, type: 'offset', value: 0},\n\t {name: 'charStrings', op: 17, type: 'offset', value: 0},\n\t {name: 'private', op: 18, type: ['number', 'offset'], value: [0, 0]},\n\t {name: 'ros', op: 1230, type: ['SID', 'SID', 'number']},\n\t {name: 'cidFontVersion', op: 1231, type: 'number', value: 0},\n\t {name: 'cidFontRevision', op: 1232, type: 'number', value: 0},\n\t {name: 'cidFontType', op: 1233, type: 'number', value: 0},\n\t {name: 'cidCount', op: 1234, type: 'number', value: 8720},\n\t {name: 'uidBase', op: 1235, type: 'number'},\n\t {name: 'fdArray', op: 1236, type: 'offset'},\n\t {name: 'fdSelect', op: 1237, type: 'offset'},\n\t {name: 'fontName', op: 1238, type: 'SID'}\n\t];\n\n\tvar PRIVATE_DICT_META = [\n\t {name: 'subrs', op: 19, type: 'offset', value: 0},\n\t {name: 'defaultWidthX', op: 20, type: 'number', value: 0},\n\t {name: 'nominalWidthX', op: 21, type: 'number', value: 0}\n\t];\n\n\t// Parse the CFF top dictionary. A CFF table can contain multiple fonts, each with their own top dictionary.\n\t// The top dictionary contains the essential metadata for the font, together with the private dictionary.\n\tfunction parseCFFTopDict(data, strings) {\n\t var dict = parseCFFDict(data, 0, data.byteLength);\n\t return interpretDict(dict, TOP_DICT_META, strings);\n\t}\n\n\t// Parse the CFF private dictionary. We don't fully parse out all the values, only the ones we need.\n\tfunction parseCFFPrivateDict(data, start, size, strings) {\n\t var dict = parseCFFDict(data, start, size);\n\t return interpretDict(dict, PRIVATE_DICT_META, strings);\n\t}\n\n\t// Returns a list of \"Top DICT\"s found using an INDEX list.\n\t// Used to read both the usual high-level Top DICTs and also the FDArray\n\t// discovered inside CID-keyed fonts. When a Top DICT has a reference to\n\t// a Private DICT that is read and saved into the Top DICT.\n\t//\n\t// In addition to the expected/optional values as outlined in TOP_DICT_META\n\t// the following values might be saved into the Top DICT.\n\t//\n\t// _subrs [] array of local CFF subroutines from Private DICT\n\t// _subrsBias bias value computed from number of subroutines\n\t// (see calcCFFSubroutineBias() and parseCFFCharstring())\n\t// _defaultWidthX default widths for CFF characters\n\t// _nominalWidthX bias added to width embedded within glyph description\n\t//\n\t// _privateDict saved copy of parsed Private DICT from Top DICT\n\tfunction gatherCFFTopDicts(data, start, cffIndex, strings) {\n\t var topDictArray = [];\n\t for (var iTopDict = 0; iTopDict < cffIndex.length; iTopDict += 1) {\n\t var topDictData = new DataView(new Uint8Array(cffIndex[iTopDict]).buffer);\n\t var topDict = parseCFFTopDict(topDictData, strings);\n\t topDict._subrs = [];\n\t topDict._subrsBias = 0;\n\t var privateSize = topDict.private[0];\n\t var privateOffset = topDict.private[1];\n\t if (privateSize !== 0 && privateOffset !== 0) {\n\t var privateDict = parseCFFPrivateDict(data, privateOffset + start, privateSize, strings);\n\t topDict._defaultWidthX = privateDict.defaultWidthX;\n\t topDict._nominalWidthX = privateDict.nominalWidthX;\n\t if (privateDict.subrs !== 0) {\n\t var subrOffset = privateOffset + privateDict.subrs;\n\t var subrIndex = parseCFFIndex(data, subrOffset + start);\n\t topDict._subrs = subrIndex.objects;\n\t topDict._subrsBias = calcCFFSubroutineBias(topDict._subrs);\n\t }\n\t topDict._privateDict = privateDict;\n\t }\n\t topDictArray.push(topDict);\n\t }\n\t return topDictArray;\n\t}\n\n\t// Parse the CFF charset table, which contains internal names for all the glyphs.\n\t// This function will return a list of glyph names.\n\t// See Adobe TN #5176 chapter 13, \"Charsets\".\n\tfunction parseCFFCharset(data, start, nGlyphs, strings) {\n\t var sid;\n\t var count;\n\t var parser = new parse.Parser(data, start);\n\n\t // The .notdef glyph is not included, so subtract 1.\n\t nGlyphs -= 1;\n\t var charset = ['.notdef'];\n\n\t var format = parser.parseCard8();\n\t if (format === 0) {\n\t for (var i = 0; i < nGlyphs; i += 1) {\n\t sid = parser.parseSID();\n\t charset.push(getCFFString(strings, sid));\n\t }\n\t } else if (format === 1) {\n\t while (charset.length <= nGlyphs) {\n\t sid = parser.parseSID();\n\t count = parser.parseCard8();\n\t for (var i$1 = 0; i$1 <= count; i$1 += 1) {\n\t charset.push(getCFFString(strings, sid));\n\t sid += 1;\n\t }\n\t }\n\t } else if (format === 2) {\n\t while (charset.length <= nGlyphs) {\n\t sid = parser.parseSID();\n\t count = parser.parseCard16();\n\t for (var i$2 = 0; i$2 <= count; i$2 += 1) {\n\t charset.push(getCFFString(strings, sid));\n\t sid += 1;\n\t }\n\t }\n\t } else {\n\t throw new Error('Unknown charset format ' + format);\n\t }\n\n\t return charset;\n\t}\n\n\t// Parse the CFF encoding data. Only one encoding can be specified per font.\n\t// See Adobe TN #5176 chapter 12, \"Encodings\".\n\tfunction parseCFFEncoding(data, start, charset) {\n\t var code;\n\t var enc = {};\n\t var parser = new parse.Parser(data, start);\n\t var format = parser.parseCard8();\n\t if (format === 0) {\n\t var nCodes = parser.parseCard8();\n\t for (var i = 0; i < nCodes; i += 1) {\n\t code = parser.parseCard8();\n\t enc[code] = i;\n\t }\n\t } else if (format === 1) {\n\t var nRanges = parser.parseCard8();\n\t code = 1;\n\t for (var i$1 = 0; i$1 < nRanges; i$1 += 1) {\n\t var first = parser.parseCard8();\n\t var nLeft = parser.parseCard8();\n\t for (var j = first; j <= first + nLeft; j += 1) {\n\t enc[j] = code;\n\t code += 1;\n\t }\n\t }\n\t } else {\n\t throw new Error('Unknown encoding format ' + format);\n\t }\n\n\t return new CffEncoding(enc, charset);\n\t}\n\n\t// Take in charstring code and return a Glyph object.\n\t// The encoding is described in the Type 2 Charstring Format\n\t// https://www.microsoft.com/typography/OTSPEC/charstr2.htm\n\tfunction parseCFFCharstring(font, glyph, code) {\n\t var c1x;\n\t var c1y;\n\t var c2x;\n\t var c2y;\n\t var p = new Path();\n\t var stack = [];\n\t var nStems = 0;\n\t var haveWidth = false;\n\t var open = false;\n\t var x = 0;\n\t var y = 0;\n\t var subrs;\n\t var subrsBias;\n\t var defaultWidthX;\n\t var nominalWidthX;\n\t if (font.isCIDFont) {\n\t var fdIndex = font.tables.cff.topDict._fdSelect[glyph.index];\n\t var fdDict = font.tables.cff.topDict._fdArray[fdIndex];\n\t subrs = fdDict._subrs;\n\t subrsBias = fdDict._subrsBias;\n\t defaultWidthX = fdDict._defaultWidthX;\n\t nominalWidthX = fdDict._nominalWidthX;\n\t } else {\n\t subrs = font.tables.cff.topDict._subrs;\n\t subrsBias = font.tables.cff.topDict._subrsBias;\n\t defaultWidthX = font.tables.cff.topDict._defaultWidthX;\n\t nominalWidthX = font.tables.cff.topDict._nominalWidthX;\n\t }\n\t var width = defaultWidthX;\n\n\t function newContour(x, y) {\n\t if (open) {\n\t p.closePath();\n\t }\n\n\t p.moveTo(x, y);\n\t open = true;\n\t }\n\n\t function parseStems() {\n\t var hasWidthArg;\n\n\t // The number of stem operators on the stack is always even.\n\t // If the value is uneven, that means a width is specified.\n\t hasWidthArg = stack.length % 2 !== 0;\n\t if (hasWidthArg && !haveWidth) {\n\t width = stack.shift() + nominalWidthX;\n\t }\n\n\t nStems += stack.length >> 1;\n\t stack.length = 0;\n\t haveWidth = true;\n\t }\n\n\t function parse$$1(code) {\n\t var b1;\n\t var b2;\n\t var b3;\n\t var b4;\n\t var codeIndex;\n\t var subrCode;\n\t var jpx;\n\t var jpy;\n\t var c3x;\n\t var c3y;\n\t var c4x;\n\t var c4y;\n\n\t var i = 0;\n\t while (i < code.length) {\n\t var v = code[i];\n\t i += 1;\n\t switch (v) {\n\t case 1: // hstem\n\t parseStems();\n\t break;\n\t case 3: // vstem\n\t parseStems();\n\t break;\n\t case 4: // vmoveto\n\t if (stack.length > 1 && !haveWidth) {\n\t width = stack.shift() + nominalWidthX;\n\t haveWidth = true;\n\t }\n\n\t y += stack.pop();\n\t newContour(x, y);\n\t break;\n\t case 5: // rlineto\n\t while (stack.length > 0) {\n\t x += stack.shift();\n\t y += stack.shift();\n\t p.lineTo(x, y);\n\t }\n\n\t break;\n\t case 6: // hlineto\n\t while (stack.length > 0) {\n\t x += stack.shift();\n\t p.lineTo(x, y);\n\t if (stack.length === 0) {\n\t break;\n\t }\n\n\t y += stack.shift();\n\t p.lineTo(x, y);\n\t }\n\n\t break;\n\t case 7: // vlineto\n\t while (stack.length > 0) {\n\t y += stack.shift();\n\t p.lineTo(x, y);\n\t if (stack.length === 0) {\n\t break;\n\t }\n\n\t x += stack.shift();\n\t p.lineTo(x, y);\n\t }\n\n\t break;\n\t case 8: // rrcurveto\n\t while (stack.length > 0) {\n\t c1x = x + stack.shift();\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y + stack.shift();\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t break;\n\t case 10: // callsubr\n\t codeIndex = stack.pop() + subrsBias;\n\t subrCode = subrs[codeIndex];\n\t if (subrCode) {\n\t parse$$1(subrCode);\n\t }\n\n\t break;\n\t case 11: // return\n\t return;\n\t case 12: // flex operators\n\t v = code[i];\n\t i += 1;\n\t switch (v) {\n\t case 35: // flex\n\t // |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 dx6 dy6 fd flex (12 35) |-\n\t c1x = x + stack.shift(); // dx1\n\t c1y = y + stack.shift(); // dy1\n\t c2x = c1x + stack.shift(); // dx2\n\t c2y = c1y + stack.shift(); // dy2\n\t jpx = c2x + stack.shift(); // dx3\n\t jpy = c2y + stack.shift(); // dy3\n\t c3x = jpx + stack.shift(); // dx4\n\t c3y = jpy + stack.shift(); // dy4\n\t c4x = c3x + stack.shift(); // dx5\n\t c4y = c3y + stack.shift(); // dy5\n\t x = c4x + stack.shift(); // dx6\n\t y = c4y + stack.shift(); // dy6\n\t stack.shift(); // flex depth\n\t p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy);\n\t p.curveTo(c3x, c3y, c4x, c4y, x, y);\n\t break;\n\t case 34: // hflex\n\t // |- dx1 dx2 dy2 dx3 dx4 dx5 dx6 hflex (12 34) |-\n\t c1x = x + stack.shift(); // dx1\n\t c1y = y; // dy1\n\t c2x = c1x + stack.shift(); // dx2\n\t c2y = c1y + stack.shift(); // dy2\n\t jpx = c2x + stack.shift(); // dx3\n\t jpy = c2y; // dy3\n\t c3x = jpx + stack.shift(); // dx4\n\t c3y = c2y; // dy4\n\t c4x = c3x + stack.shift(); // dx5\n\t c4y = y; // dy5\n\t x = c4x + stack.shift(); // dx6\n\t p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy);\n\t p.curveTo(c3x, c3y, c4x, c4y, x, y);\n\t break;\n\t case 36: // hflex1\n\t // |- dx1 dy1 dx2 dy2 dx3 dx4 dx5 dy5 dx6 hflex1 (12 36) |-\n\t c1x = x + stack.shift(); // dx1\n\t c1y = y + stack.shift(); // dy1\n\t c2x = c1x + stack.shift(); // dx2\n\t c2y = c1y + stack.shift(); // dy2\n\t jpx = c2x + stack.shift(); // dx3\n\t jpy = c2y; // dy3\n\t c3x = jpx + stack.shift(); // dx4\n\t c3y = c2y; // dy4\n\t c4x = c3x + stack.shift(); // dx5\n\t c4y = c3y + stack.shift(); // dy5\n\t x = c4x + stack.shift(); // dx6\n\t p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy);\n\t p.curveTo(c3x, c3y, c4x, c4y, x, y);\n\t break;\n\t case 37: // flex1\n\t // |- dx1 dy1 dx2 dy2 dx3 dy3 dx4 dy4 dx5 dy5 d6 flex1 (12 37) |-\n\t c1x = x + stack.shift(); // dx1\n\t c1y = y + stack.shift(); // dy1\n\t c2x = c1x + stack.shift(); // dx2\n\t c2y = c1y + stack.shift(); // dy2\n\t jpx = c2x + stack.shift(); // dx3\n\t jpy = c2y + stack.shift(); // dy3\n\t c3x = jpx + stack.shift(); // dx4\n\t c3y = jpy + stack.shift(); // dy4\n\t c4x = c3x + stack.shift(); // dx5\n\t c4y = c3y + stack.shift(); // dy5\n\t if (Math.abs(c4x - x) > Math.abs(c4y - y)) {\n\t x = c4x + stack.shift();\n\t } else {\n\t y = c4y + stack.shift();\n\t }\n\n\t p.curveTo(c1x, c1y, c2x, c2y, jpx, jpy);\n\t p.curveTo(c3x, c3y, c4x, c4y, x, y);\n\t break;\n\t default:\n\t console.log('Glyph ' + glyph.index + ': unknown operator ' + 1200 + v);\n\t stack.length = 0;\n\t }\n\t break;\n\t case 14: // endchar\n\t if (stack.length > 0 && !haveWidth) {\n\t width = stack.shift() + nominalWidthX;\n\t haveWidth = true;\n\t }\n\n\t if (open) {\n\t p.closePath();\n\t open = false;\n\t }\n\n\t break;\n\t case 18: // hstemhm\n\t parseStems();\n\t break;\n\t case 19: // hintmask\n\t case 20: // cntrmask\n\t parseStems();\n\t i += (nStems + 7) >> 3;\n\t break;\n\t case 21: // rmoveto\n\t if (stack.length > 2 && !haveWidth) {\n\t width = stack.shift() + nominalWidthX;\n\t haveWidth = true;\n\t }\n\n\t y += stack.pop();\n\t x += stack.pop();\n\t newContour(x, y);\n\t break;\n\t case 22: // hmoveto\n\t if (stack.length > 1 && !haveWidth) {\n\t width = stack.shift() + nominalWidthX;\n\t haveWidth = true;\n\t }\n\n\t x += stack.pop();\n\t newContour(x, y);\n\t break;\n\t case 23: // vstemhm\n\t parseStems();\n\t break;\n\t case 24: // rcurveline\n\t while (stack.length > 2) {\n\t c1x = x + stack.shift();\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y + stack.shift();\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t x += stack.shift();\n\t y += stack.shift();\n\t p.lineTo(x, y);\n\t break;\n\t case 25: // rlinecurve\n\t while (stack.length > 6) {\n\t x += stack.shift();\n\t y += stack.shift();\n\t p.lineTo(x, y);\n\t }\n\n\t c1x = x + stack.shift();\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y + stack.shift();\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t break;\n\t case 26: // vvcurveto\n\t if (stack.length % 2) {\n\t x += stack.shift();\n\t }\n\n\t while (stack.length > 0) {\n\t c1x = x;\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x;\n\t y = c2y + stack.shift();\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t break;\n\t case 27: // hhcurveto\n\t if (stack.length % 2) {\n\t y += stack.shift();\n\t }\n\n\t while (stack.length > 0) {\n\t c1x = x + stack.shift();\n\t c1y = y;\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y;\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t break;\n\t case 28: // shortint\n\t b1 = code[i];\n\t b2 = code[i + 1];\n\t stack.push(((b1 << 24) | (b2 << 16)) >> 16);\n\t i += 2;\n\t break;\n\t case 29: // callgsubr\n\t codeIndex = stack.pop() + font.gsubrsBias;\n\t subrCode = font.gsubrs[codeIndex];\n\t if (subrCode) {\n\t parse$$1(subrCode);\n\t }\n\n\t break;\n\t case 30: // vhcurveto\n\t while (stack.length > 0) {\n\t c1x = x;\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y + (stack.length === 1 ? stack.shift() : 0);\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t if (stack.length === 0) {\n\t break;\n\t }\n\n\t c1x = x + stack.shift();\n\t c1y = y;\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t y = c2y + stack.shift();\n\t x = c2x + (stack.length === 1 ? stack.shift() : 0);\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t break;\n\t case 31: // hvcurveto\n\t while (stack.length > 0) {\n\t c1x = x + stack.shift();\n\t c1y = y;\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t y = c2y + stack.shift();\n\t x = c2x + (stack.length === 1 ? stack.shift() : 0);\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t if (stack.length === 0) {\n\t break;\n\t }\n\n\t c1x = x;\n\t c1y = y + stack.shift();\n\t c2x = c1x + stack.shift();\n\t c2y = c1y + stack.shift();\n\t x = c2x + stack.shift();\n\t y = c2y + (stack.length === 1 ? stack.shift() : 0);\n\t p.curveTo(c1x, c1y, c2x, c2y, x, y);\n\t }\n\n\t break;\n\t default:\n\t if (v < 32) {\n\t console.log('Glyph ' + glyph.index + ': unknown operator ' + v);\n\t } else if (v < 247) {\n\t stack.push(v - 139);\n\t } else if (v < 251) {\n\t b1 = code[i];\n\t i += 1;\n\t stack.push((v - 247) * 256 + b1 + 108);\n\t } else if (v < 255) {\n\t b1 = code[i];\n\t i += 1;\n\t stack.push(-(v - 251) * 256 - b1 - 108);\n\t } else {\n\t b1 = code[i];\n\t b2 = code[i + 1];\n\t b3 = code[i + 2];\n\t b4 = code[i + 3];\n\t i += 4;\n\t stack.push(((b1 << 24) | (b2 << 16) | (b3 << 8) | b4) / 65536);\n\t }\n\t }\n\t }\n\t }\n\n\t parse$$1(code);\n\n\t glyph.advanceWidth = width;\n\t return p;\n\t}\n\n\tfunction parseCFFFDSelect(data, start, nGlyphs, fdArrayCount) {\n\t var fdSelect = [];\n\t var fdIndex;\n\t var parser = new parse.Parser(data, start);\n\t var format = parser.parseCard8();\n\t if (format === 0) {\n\t // Simple list of nGlyphs elements\n\t for (var iGid = 0; iGid < nGlyphs; iGid++) {\n\t fdIndex = parser.parseCard8();\n\t if (fdIndex >= fdArrayCount) {\n\t throw new Error('CFF table CID Font FDSelect has bad FD index value ' + fdIndex + ' (FD count ' + fdArrayCount + ')');\n\t }\n\t fdSelect.push(fdIndex);\n\t }\n\t } else if (format === 3) {\n\t // Ranges\n\t var nRanges = parser.parseCard16();\n\t var first = parser.parseCard16();\n\t if (first !== 0) {\n\t throw new Error('CFF Table CID Font FDSelect format 3 range has bad initial GID ' + first);\n\t }\n\t var next;\n\t for (var iRange = 0; iRange < nRanges; iRange++) {\n\t fdIndex = parser.parseCard8();\n\t next = parser.parseCard16();\n\t if (fdIndex >= fdArrayCount) {\n\t throw new Error('CFF table CID Font FDSelect has bad FD index value ' + fdIndex + ' (FD count ' + fdArrayCount + ')');\n\t }\n\t if (next > nGlyphs) {\n\t throw new Error('CFF Table CID Font FDSelect format 3 range has bad GID ' + next);\n\t }\n\t for (; first < next; first++) {\n\t fdSelect.push(fdIndex);\n\t }\n\t first = next;\n\t }\n\t if (next !== nGlyphs) {\n\t throw new Error('CFF Table CID Font FDSelect format 3 range has bad final GID ' + next);\n\t }\n\t } else {\n\t throw new Error('CFF Table CID Font FDSelect table has unsupported format ' + format);\n\t }\n\t return fdSelect;\n\t}\n\n\t// Parse the `CFF` table, which contains the glyph outlines in PostScript format.\n\tfunction parseCFFTable(data, start, font) {\n\t font.tables.cff = {};\n\t var header = parseCFFHeader(data, start);\n\t var nameIndex = parseCFFIndex(data, header.endOffset, parse.bytesToString);\n\t var topDictIndex = parseCFFIndex(data, nameIndex.endOffset);\n\t var stringIndex = parseCFFIndex(data, topDictIndex.endOffset, parse.bytesToString);\n\t var globalSubrIndex = parseCFFIndex(data, stringIndex.endOffset);\n\t font.gsubrs = globalSubrIndex.objects;\n\t font.gsubrsBias = calcCFFSubroutineBias(font.gsubrs);\n\n\t var topDictArray = gatherCFFTopDicts(data, start, topDictIndex.objects, stringIndex.objects);\n\t if (topDictArray.length !== 1) {\n\t throw new Error('CFF table has too many fonts in \\'FontSet\\' - count of fonts NameIndex.length = ' + topDictArray.length);\n\t }\n\n\t var topDict = topDictArray[0];\n\t font.tables.cff.topDict = topDict;\n\n\t if (topDict._privateDict) {\n\t font.defaultWidthX = topDict._privateDict.defaultWidthX;\n\t font.nominalWidthX = topDict._privateDict.nominalWidthX;\n\t }\n\n\t if (topDict.ros[0] !== undefined && topDict.ros[1] !== undefined) {\n\t font.isCIDFont = true;\n\t }\n\n\t if (font.isCIDFont) {\n\t var fdArrayOffset = topDict.fdArray;\n\t var fdSelectOffset = topDict.fdSelect;\n\t if (fdArrayOffset === 0 || fdSelectOffset === 0) {\n\t throw new Error('Font is marked as a CID font, but FDArray and/or FDSelect information is missing');\n\t }\n\t fdArrayOffset += start;\n\t var fdArrayIndex = parseCFFIndex(data, fdArrayOffset);\n\t var fdArray = gatherCFFTopDicts(data, start, fdArrayIndex.objects, stringIndex.objects);\n\t topDict._fdArray = fdArray;\n\t fdSelectOffset += start;\n\t topDict._fdSelect = parseCFFFDSelect(data, fdSelectOffset, font.numGlyphs, fdArray.length);\n\t }\n\n\t var privateDictOffset = start + topDict.private[1];\n\t var privateDict = parseCFFPrivateDict(data, privateDictOffset, topDict.private[0], stringIndex.objects);\n\t font.defaultWidthX = privateDict.defaultWidthX;\n\t font.nominalWidthX = privateDict.nominalWidthX;\n\n\t if (privateDict.subrs !== 0) {\n\t var subrOffset = privateDictOffset + privateDict.subrs;\n\t var subrIndex = parseCFFIndex(data, subrOffset);\n\t font.subrs = subrIndex.objects;\n\t font.subrsBias = calcCFFSubroutineBias(font.subrs);\n\t } else {\n\t font.subrs = [];\n\t font.subrsBias = 0;\n\t }\n\n\t // Offsets in the top dict are relative to the beginning of the CFF data, so add the CFF start offset.\n\t var charStringsIndex = parseCFFIndex(data, start + topDict.charStrings);\n\t font.nGlyphs = charStringsIndex.objects.length;\n\n\t var charset = parseCFFCharset(data, start + topDict.charset, font.nGlyphs, stringIndex.objects);\n\t if (topDict.encoding === 0) {\n\t // Standard encoding\n\t font.cffEncoding = new CffEncoding(cffStandardEncoding, charset);\n\t } else if (topDict.encoding === 1) {\n\t // Expert encoding\n\t font.cffEncoding = new CffEncoding(cffExpertEncoding, charset);\n\t } else {\n\t font.cffEncoding = parseCFFEncoding(data, start + topDict.encoding, charset);\n\t }\n\n\t // Prefer the CMAP encoding to the CFF encoding.\n\t font.encoding = font.encoding || font.cffEncoding;\n\n\t font.glyphs = new glyphset.GlyphSet(font);\n\t for (var i = 0; i < font.nGlyphs; i += 1) {\n\t var charString = charStringsIndex.objects[i];\n\t font.glyphs.push(i, glyphset.cffGlyphLoader(font, i, parseCFFCharstring, charString));\n\t }\n\t}\n\n\t// Convert a string to a String ID (SID).\n\t// The list of strings is modified in place.\n\tfunction encodeString(s, strings) {\n\t var sid;\n\n\t // Is the string in the CFF standard strings?\n\t var i = cffStandardStrings.indexOf(s);\n\t if (i >= 0) {\n\t sid = i;\n\t }\n\n\t // Is the string already in the string index?\n\t i = strings.indexOf(s);\n\t if (i >= 0) {\n\t sid = i + cffStandardStrings.length;\n\t } else {\n\t sid = cffStandardStrings.length + strings.length;\n\t strings.push(s);\n\t }\n\n\t return sid;\n\t}\n\n\tfunction makeHeader() {\n\t return new table.Record('Header', [\n\t {name: 'major', type: 'Card8', value: 1},\n\t {name: 'minor', type: 'Card8', value: 0},\n\t {name: 'hdrSize', type: 'Card8', value: 4},\n\t {name: 'major', type: 'Card8', value: 1}\n\t ]);\n\t}\n\n\tfunction makeNameIndex(fontNames) {\n\t var t = new table.Record('Name INDEX', [\n\t {name: 'names', type: 'INDEX', value: []}\n\t ]);\n\t t.names = [];\n\t for (var i = 0; i < fontNames.length; i += 1) {\n\t t.names.push({name: 'name_' + i, type: 'NAME', value: fontNames[i]});\n\t }\n\n\t return t;\n\t}\n\n\t// Given a dictionary's metadata, create a DICT structure.\n\tfunction makeDict(meta, attrs, strings) {\n\t var m = {};\n\t for (var i = 0; i < meta.length; i += 1) {\n\t var entry = meta[i];\n\t var value = attrs[entry.name];\n\t if (value !== undefined && !equals(value, entry.value)) {\n\t if (entry.type === 'SID') {\n\t value = encodeString(value, strings);\n\t }\n\n\t m[entry.op] = {name: entry.name, type: entry.type, value: value};\n\t }\n\t }\n\n\t return m;\n\t}\n\n\t// The Top DICT houses the global font attributes.\n\tfunction makeTopDict(attrs, strings) {\n\t var t = new table.Record('Top DICT', [\n\t {name: 'dict', type: 'DICT', value: {}}\n\t ]);\n\t t.dict = makeDict(TOP_DICT_META, attrs, strings);\n\t return t;\n\t}\n\n\tfunction makeTopDictIndex(topDict) {\n\t var t = new table.Record('Top DICT INDEX', [\n\t {name: 'topDicts', type: 'INDEX', value: []}\n\t ]);\n\t t.topDicts = [{name: 'topDict_0', type: 'TABLE', value: topDict}];\n\t return t;\n\t}\n\n\tfunction makeStringIndex(strings) {\n\t var t = new table.Record('String INDEX', [\n\t {name: 'strings', type: 'INDEX', value: []}\n\t ]);\n\t t.strings = [];\n\t for (var i = 0; i < strings.length; i += 1) {\n\t t.strings.push({name: 'string_' + i, type: 'STRING', value: strings[i]});\n\t }\n\n\t return t;\n\t}\n\n\tfunction makeGlobalSubrIndex() {\n\t // Currently we don't use subroutines.\n\t return new table.Record('Global Subr INDEX', [\n\t {name: 'subrs', type: 'INDEX', value: []}\n\t ]);\n\t}\n\n\tfunction makeCharsets(glyphNames, strings) {\n\t var t = new table.Record('Charsets', [\n\t {name: 'format', type: 'Card8', value: 0}\n\t ]);\n\t for (var i = 0; i < glyphNames.length; i += 1) {\n\t var glyphName = glyphNames[i];\n\t var glyphSID = encodeString(glyphName, strings);\n\t t.fields.push({name: 'glyph_' + i, type: 'SID', value: glyphSID});\n\t }\n\n\t return t;\n\t}\n\n\tfunction glyphToOps(glyph) {\n\t var ops = [];\n\t var path = glyph.path;\n\t ops.push({name: 'width', type: 'NUMBER', value: glyph.advanceWidth});\n\t var x = 0;\n\t var y = 0;\n\t for (var i = 0; i < path.commands.length; i += 1) {\n\t var dx = (void 0);\n\t var dy = (void 0);\n\t var cmd = path.commands[i];\n\t if (cmd.type === 'Q') {\n\t // CFF only supports bézier curves, so convert the quad to a bézier.\n\t var _13 = 1 / 3;\n\t var _23 = 2 / 3;\n\n\t // We're going to create a new command so we don't change the original path.\n\t cmd = {\n\t type: 'C',\n\t x: cmd.x,\n\t y: cmd.y,\n\t x1: _13 * x + _23 * cmd.x1,\n\t y1: _13 * y + _23 * cmd.y1,\n\t x2: _13 * cmd.x + _23 * cmd.x1,\n\t y2: _13 * cmd.y + _23 * cmd.y1\n\t };\n\t }\n\n\t if (cmd.type === 'M') {\n\t dx = Math.round(cmd.x - x);\n\t dy = Math.round(cmd.y - y);\n\t ops.push({name: 'dx', type: 'NUMBER', value: dx});\n\t ops.push({name: 'dy', type: 'NUMBER', value: dy});\n\t ops.push({name: 'rmoveto', type: 'OP', value: 21});\n\t x = Math.round(cmd.x);\n\t y = Math.round(cmd.y);\n\t } else if (cmd.type === 'L') {\n\t dx = Math.round(cmd.x - x);\n\t dy = Math.round(cmd.y - y);\n\t ops.push({name: 'dx', type: 'NUMBER', value: dx});\n\t ops.push({name: 'dy', type: 'NUMBER', value: dy});\n\t ops.push({name: 'rlineto', type: 'OP', value: 5});\n\t x = Math.round(cmd.x);\n\t y = Math.round(cmd.y);\n\t } else if (cmd.type === 'C') {\n\t var dx1 = Math.round(cmd.x1 - x);\n\t var dy1 = Math.round(cmd.y1 - y);\n\t var dx2 = Math.round(cmd.x2 - cmd.x1);\n\t var dy2 = Math.round(cmd.y2 - cmd.y1);\n\t dx = Math.round(cmd.x - cmd.x2);\n\t dy = Math.round(cmd.y - cmd.y2);\n\t ops.push({name: 'dx1', type: 'NUMBER', value: dx1});\n\t ops.push({name: 'dy1', type: 'NUMBER', value: dy1});\n\t ops.push({name: 'dx2', type: 'NUMBER', value: dx2});\n\t ops.push({name: 'dy2', type: 'NUMBER', value: dy2});\n\t ops.push({name: 'dx', type: 'NUMBER', value: dx});\n\t ops.push({name: 'dy', type: 'NUMBER', value: dy});\n\t ops.push({name: 'rrcurveto', type: 'OP', value: 8});\n\t x = Math.round(cmd.x);\n\t y = Math.round(cmd.y);\n\t }\n\n\t // Contours are closed automatically.\n\t }\n\n\t ops.push({name: 'endchar', type: 'OP', value: 14});\n\t return ops;\n\t}\n\n\tfunction makeCharStringsIndex(glyphs) {\n\t var t = new table.Record('CharStrings INDEX', [\n\t {name: 'charStrings', type: 'INDEX', value: []}\n\t ]);\n\n\t for (var i = 0; i < glyphs.length; i += 1) {\n\t var glyph = glyphs.get(i);\n\t var ops = glyphToOps(glyph);\n\t t.charStrings.push({name: glyph.name, type: 'CHARSTRING', value: ops});\n\t }\n\n\t return t;\n\t}\n\n\tfunction makePrivateDict(attrs, strings) {\n\t var t = new table.Record('Private DICT', [\n\t {name: 'dict', type: 'DICT', value: {}}\n\t ]);\n\t t.dict = makeDict(PRIVATE_DICT_META, attrs, strings);\n\t return t;\n\t}\n\n\tfunction makeCFFTable(glyphs, options) {\n\t var t = new table.Table('CFF ', [\n\t {name: 'header', type: 'RECORD'},\n\t {name: 'nameIndex', type: 'RECORD'},\n\t {name: 'topDictIndex', type: 'RECORD'},\n\t {name: 'stringIndex', type: 'RECORD'},\n\t {name: 'globalSubrIndex', type: 'RECORD'},\n\t {name: 'charsets', type: 'RECORD'},\n\t {name: 'charStringsIndex', type: 'RECORD'},\n\t {name: 'privateDict', type: 'RECORD'}\n\t ]);\n\n\t var fontScale = 1 / options.unitsPerEm;\n\t // We use non-zero values for the offsets so that the DICT encodes them.\n\t // This is important because the size of the Top DICT plays a role in offset calculation,\n\t // and the size shouldn't change after we've written correct offsets.\n\t var attrs = {\n\t version: options.version,\n\t fullName: options.fullName,\n\t familyName: options.familyName,\n\t weight: options.weightName,\n\t fontBBox: options.fontBBox || [0, 0, 0, 0],\n\t fontMatrix: [fontScale, 0, 0, fontScale, 0, 0],\n\t charset: 999,\n\t encoding: 0,\n\t charStrings: 999,\n\t private: [0, 999]\n\t };\n\n\t var privateAttrs = {};\n\n\t var glyphNames = [];\n\t var glyph;\n\n\t // Skip first glyph (.notdef)\n\t for (var i = 1; i < glyphs.length; i += 1) {\n\t glyph = glyphs.get(i);\n\t glyphNames.push(glyph.name);\n\t }\n\n\t var strings = [];\n\n\t t.header = makeHeader();\n\t t.nameIndex = makeNameIndex([options.postScriptName]);\n\t var topDict = makeTopDict(attrs, strings);\n\t t.topDictIndex = makeTopDictIndex(topDict);\n\t t.globalSubrIndex = makeGlobalSubrIndex();\n\t t.charsets = makeCharsets(glyphNames, strings);\n\t t.charStringsIndex = makeCharStringsIndex(glyphs);\n\t t.privateDict = makePrivateDict(privateAttrs, strings);\n\n\t // Needs to come at the end, to encode all custom strings used in the font.\n\t t.stringIndex = makeStringIndex(strings);\n\n\t var startOffset = t.header.sizeOf() +\n\t t.nameIndex.sizeOf() +\n\t t.topDictIndex.sizeOf() +\n\t t.stringIndex.sizeOf() +\n\t t.globalSubrIndex.sizeOf();\n\t attrs.charset = startOffset;\n\n\t // We use the CFF standard encoding; proper encoding will be handled in cmap.\n\t attrs.encoding = 0;\n\t attrs.charStrings = attrs.charset + t.charsets.sizeOf();\n\t attrs.private[1] = attrs.charStrings + t.charStringsIndex.sizeOf();\n\n\t // Recreate the Top DICT INDEX with the correct offsets.\n\t topDict = makeTopDict(attrs, strings);\n\t t.topDictIndex = makeTopDictIndex(topDict);\n\n\t return t;\n\t}\n\n\tvar cff = { parse: parseCFFTable, make: makeCFFTable };\n\n\t// The `head` table contains global information about the font.\n\n\t// Parse the header `head` table\n\tfunction parseHeadTable(data, start) {\n\t var head = {};\n\t var p = new parse.Parser(data, start);\n\t head.version = p.parseVersion();\n\t head.fontRevision = Math.round(p.parseFixed() * 1000) / 1000;\n\t head.checkSumAdjustment = p.parseULong();\n\t head.magicNumber = p.parseULong();\n\t check.argument(head.magicNumber === 0x5F0F3CF5, 'Font header has wrong magic number.');\n\t head.flags = p.parseUShort();\n\t head.unitsPerEm = p.parseUShort();\n\t head.created = p.parseLongDateTime();\n\t head.modified = p.parseLongDateTime();\n\t head.xMin = p.parseShort();\n\t head.yMin = p.parseShort();\n\t head.xMax = p.parseShort();\n\t head.yMax = p.parseShort();\n\t head.macStyle = p.parseUShort();\n\t head.lowestRecPPEM = p.parseUShort();\n\t head.fontDirectionHint = p.parseShort();\n\t head.indexToLocFormat = p.parseShort();\n\t head.glyphDataFormat = p.parseShort();\n\t return head;\n\t}\n\n\tfunction makeHeadTable(options) {\n\t // Apple Mac timestamp epoch is 01/01/1904 not 01/01/1970\n\t var timestamp = Math.round(new Date().getTime() / 1000) + 2082844800;\n\t var createdTimestamp = timestamp;\n\n\t if (options.createdTimestamp) {\n\t createdTimestamp = options.createdTimestamp + 2082844800;\n\t }\n\n\t return new table.Table('head', [\n\t {name: 'version', type: 'FIXED', value: 0x00010000},\n\t {name: 'fontRevision', type: 'FIXED', value: 0x00010000},\n\t {name: 'checkSumAdjustment', type: 'ULONG', value: 0},\n\t {name: 'magicNumber', type: 'ULONG', value: 0x5F0F3CF5},\n\t {name: 'flags', type: 'USHORT', value: 0},\n\t {name: 'unitsPerEm', type: 'USHORT', value: 1000},\n\t {name: 'created', type: 'LONGDATETIME', value: createdTimestamp},\n\t {name: 'modified', type: 'LONGDATETIME', value: timestamp},\n\t {name: 'xMin', type: 'SHORT', value: 0},\n\t {name: 'yMin', type: 'SHORT', value: 0},\n\t {name: 'xMax', type: 'SHORT', value: 0},\n\t {name: 'yMax', type: 'SHORT', value: 0},\n\t {name: 'macStyle', type: 'USHORT', value: 0},\n\t {name: 'lowestRecPPEM', type: 'USHORT', value: 0},\n\t {name: 'fontDirectionHint', type: 'SHORT', value: 2},\n\t {name: 'indexToLocFormat', type: 'SHORT', value: 0},\n\t {name: 'glyphDataFormat', type: 'SHORT', value: 0}\n\t ], options);\n\t}\n\n\tvar head = { parse: parseHeadTable, make: makeHeadTable };\n\n\t// The `hhea` table contains information for horizontal layout.\n\n\t// Parse the horizontal header `hhea` table\n\tfunction parseHheaTable(data, start) {\n\t var hhea = {};\n\t var p = new parse.Parser(data, start);\n\t hhea.version = p.parseVersion();\n\t hhea.ascender = p.parseShort();\n\t hhea.descender = p.parseShort();\n\t hhea.lineGap = p.parseShort();\n\t hhea.advanceWidthMax = p.parseUShort();\n\t hhea.minLeftSideBearing = p.parseShort();\n\t hhea.minRightSideBearing = p.parseShort();\n\t hhea.xMaxExtent = p.parseShort();\n\t hhea.caretSlopeRise = p.parseShort();\n\t hhea.caretSlopeRun = p.parseShort();\n\t hhea.caretOffset = p.parseShort();\n\t p.relativeOffset += 8;\n\t hhea.metricDataFormat = p.parseShort();\n\t hhea.numberOfHMetrics = p.parseUShort();\n\t return hhea;\n\t}\n\n\tfunction makeHheaTable(options) {\n\t return new table.Table('hhea', [\n\t {name: 'version', type: 'FIXED', value: 0x00010000},\n\t {name: 'ascender', type: 'FWORD', value: 0},\n\t {name: 'descender', type: 'FWORD', value: 0},\n\t {name: 'lineGap', type: 'FWORD', value: 0},\n\t {name: 'advanceWidthMax', type: 'UFWORD', value: 0},\n\t {name: 'minLeftSideBearing', type: 'FWORD', value: 0},\n\t {name: 'minRightSideBearing', type: 'FWORD', value: 0},\n\t {name: 'xMaxExtent', type: 'FWORD', value: 0},\n\t {name: 'caretSlopeRise', type: 'SHORT', value: 1},\n\t {name: 'caretSlopeRun', type: 'SHORT', value: 0},\n\t {name: 'caretOffset', type: 'SHORT', value: 0},\n\t {name: 'reserved1', type: 'SHORT', value: 0},\n\t {name: 'reserved2', type: 'SHORT', value: 0},\n\t {name: 'reserved3', type: 'SHORT', value: 0},\n\t {name: 'reserved4', type: 'SHORT', value: 0},\n\t {name: 'metricDataFormat', type: 'SHORT', value: 0},\n\t {name: 'numberOfHMetrics', type: 'USHORT', value: 0}\n\t ], options);\n\t}\n\n\tvar hhea = { parse: parseHheaTable, make: makeHheaTable };\n\n\t// The `hmtx` table contains the horizontal metrics for all glyphs.\n\n\t// Parse the `hmtx` table, which contains the horizontal metrics for all glyphs.\n\t// This function augments the glyph array, adding the advanceWidth and leftSideBearing to each glyph.\n\tfunction parseHmtxTable(data, start, numMetrics, numGlyphs, glyphs) {\n\t var advanceWidth;\n\t var leftSideBearing;\n\t var p = new parse.Parser(data, start);\n\t for (var i = 0; i < numGlyphs; i += 1) {\n\t // If the font is monospaced, only one entry is needed. This last entry applies to all subsequent glyphs.\n\t if (i < numMetrics) {\n\t advanceWidth = p.parseUShort();\n\t leftSideBearing = p.parseShort();\n\t }\n\n\t var glyph = glyphs.get(i);\n\t glyph.advanceWidth = advanceWidth;\n\t glyph.leftSideBearing = leftSideBearing;\n\t }\n\t}\n\n\tfunction makeHmtxTable(glyphs) {\n\t var t = new table.Table('hmtx', []);\n\t for (var i = 0; i < glyphs.length; i += 1) {\n\t var glyph = glyphs.get(i);\n\t var advanceWidth = glyph.advanceWidth || 0;\n\t var leftSideBearing = glyph.leftSideBearing || 0;\n\t t.fields.push({name: 'advanceWidth_' + i, type: 'USHORT', value: advanceWidth});\n\t t.fields.push({name: 'leftSideBearing_' + i, type: 'SHORT', value: leftSideBearing});\n\t }\n\n\t return t;\n\t}\n\n\tvar hmtx = { parse: parseHmtxTable, make: makeHmtxTable };\n\n\t// The `ltag` table stores IETF BCP-47 language tags. It allows supporting\n\n\tfunction makeLtagTable(tags) {\n\t var result = new table.Table('ltag', [\n\t {name: 'version', type: 'ULONG', value: 1},\n\t {name: 'flags', type: 'ULONG', value: 0},\n\t {name: 'numTags', type: 'ULONG', value: tags.length}\n\t ]);\n\n\t var stringPool = '';\n\t var stringPoolOffset = 12 + tags.length * 4;\n\t for (var i = 0; i < tags.length; ++i) {\n\t var pos = stringPool.indexOf(tags[i]);\n\t if (pos < 0) {\n\t pos = stringPool.length;\n\t stringPool += tags[i];\n\t }\n\n\t result.fields.push({name: 'offset ' + i, type: 'USHORT', value: stringPoolOffset + pos});\n\t result.fields.push({name: 'length ' + i, type: 'USHORT', value: tags[i].length});\n\t }\n\n\t result.fields.push({name: 'stringPool', type: 'CHARARRAY', value: stringPool});\n\t return result;\n\t}\n\n\tfunction parseLtagTable(data, start) {\n\t var p = new parse.Parser(data, start);\n\t var tableVersion = p.parseULong();\n\t check.argument(tableVersion === 1, 'Unsupported ltag table version.');\n\t // The 'ltag' specification does not define any flags; skip the field.\n\t p.skip('uLong', 1);\n\t var numTags = p.parseULong();\n\n\t var tags = [];\n\t for (var i = 0; i < numTags; i++) {\n\t var tag = '';\n\t var offset = start + p.parseUShort();\n\t var length = p.parseUShort();\n\t for (var j = offset; j < offset + length; ++j) {\n\t tag += String.fromCharCode(data.getInt8(j));\n\t }\n\n\t tags.push(tag);\n\t }\n\n\t return tags;\n\t}\n\n\tvar ltag = { make: makeLtagTable, parse: parseLtagTable };\n\n\t// The `maxp` table establishes the memory requirements for the font.\n\n\t// Parse the maximum profile `maxp` table.\n\tfunction parseMaxpTable(data, start) {\n\t var maxp = {};\n\t var p = new parse.Parser(data, start);\n\t maxp.version = p.parseVersion();\n\t maxp.numGlyphs = p.parseUShort();\n\t if (maxp.version === 1.0) {\n\t maxp.maxPoints = p.parseUShort();\n\t maxp.maxContours = p.parseUShort();\n\t maxp.maxCompositePoints = p.parseUShort();\n\t maxp.maxCompositeContours = p.parseUShort();\n\t maxp.maxZones = p.parseUShort();\n\t maxp.maxTwilightPoints = p.parseUShort();\n\t maxp.maxStorage = p.parseUShort();\n\t maxp.maxFunctionDefs = p.parseUShort();\n\t maxp.maxInstructionDefs = p.parseUShort();\n\t maxp.maxStackElements = p.parseUShort();\n\t maxp.maxSizeOfInstructions = p.parseUShort();\n\t maxp.maxComponentElements = p.parseUShort();\n\t maxp.maxComponentDepth = p.parseUShort();\n\t }\n\n\t return maxp;\n\t}\n\n\tfunction makeMaxpTable(numGlyphs) {\n\t return new table.Table('maxp', [\n\t {name: 'version', type: 'FIXED', value: 0x00005000},\n\t {name: 'numGlyphs', type: 'USHORT', value: numGlyphs}\n\t ]);\n\t}\n\n\tvar maxp = { parse: parseMaxpTable, make: makeMaxpTable };\n\n\t// The `name` naming table.\n\n\t// NameIDs for the name table.\n\tvar nameTableNames = [\n\t 'copyright', // 0\n\t 'fontFamily', // 1\n\t 'fontSubfamily', // 2\n\t 'uniqueID', // 3\n\t 'fullName', // 4\n\t 'version', // 5\n\t 'postScriptName', // 6\n\t 'trademark', // 7\n\t 'manufacturer', // 8\n\t 'designer', // 9\n\t 'description', // 10\n\t 'manufacturerURL', // 11\n\t 'designerURL', // 12\n\t 'license', // 13\n\t 'licenseURL', // 14\n\t 'reserved', // 15\n\t 'preferredFamily', // 16\n\t 'preferredSubfamily', // 17\n\t 'compatibleFullName', // 18\n\t 'sampleText', // 19\n\t 'postScriptFindFontName', // 20\n\t 'wwsFamily', // 21\n\t 'wwsSubfamily' // 22\n\t];\n\n\tvar macLanguages = {\n\t 0: 'en',\n\t 1: 'fr',\n\t 2: 'de',\n\t 3: 'it',\n\t 4: 'nl',\n\t 5: 'sv',\n\t 6: 'es',\n\t 7: 'da',\n\t 8: 'pt',\n\t 9: 'no',\n\t 10: 'he',\n\t 11: 'ja',\n\t 12: 'ar',\n\t 13: 'fi',\n\t 14: 'el',\n\t 15: 'is',\n\t 16: 'mt',\n\t 17: 'tr',\n\t 18: 'hr',\n\t 19: 'zh-Hant',\n\t 20: 'ur',\n\t 21: 'hi',\n\t 22: 'th',\n\t 23: 'ko',\n\t 24: 'lt',\n\t 25: 'pl',\n\t 26: 'hu',\n\t 27: 'es',\n\t 28: 'lv',\n\t 29: 'se',\n\t 30: 'fo',\n\t 31: 'fa',\n\t 32: 'ru',\n\t 33: 'zh',\n\t 34: 'nl-BE',\n\t 35: 'ga',\n\t 36: 'sq',\n\t 37: 'ro',\n\t 38: 'cz',\n\t 39: 'sk',\n\t 40: 'si',\n\t 41: 'yi',\n\t 42: 'sr',\n\t 43: 'mk',\n\t 44: 'bg',\n\t 45: 'uk',\n\t 46: 'be',\n\t 47: 'uz',\n\t 48: 'kk',\n\t 49: 'az-Cyrl',\n\t 50: 'az-Arab',\n\t 51: 'hy',\n\t 52: 'ka',\n\t 53: 'mo',\n\t 54: 'ky',\n\t 55: 'tg',\n\t 56: 'tk',\n\t 57: 'mn-CN',\n\t 58: 'mn',\n\t 59: 'ps',\n\t 60: 'ks',\n\t 61: 'ku',\n\t 62: 'sd',\n\t 63: 'bo',\n\t 64: 'ne',\n\t 65: 'sa',\n\t 66: 'mr',\n\t 67: 'bn',\n\t 68: 'as',\n\t 69: 'gu',\n\t 70: 'pa',\n\t 71: 'or',\n\t 72: 'ml',\n\t 73: 'kn',\n\t 74: 'ta',\n\t 75: 'te',\n\t 76: 'si',\n\t 77: 'my',\n\t 78: 'km',\n\t 79: 'lo',\n\t 80: 'vi',\n\t 81: 'id',\n\t 82: 'tl',\n\t 83: 'ms',\n\t 84: 'ms-Arab',\n\t 85: 'am',\n\t 86: 'ti',\n\t 87: 'om',\n\t 88: 'so',\n\t 89: 'sw',\n\t 90: 'rw',\n\t 91: 'rn',\n\t 92: 'ny',\n\t 93: 'mg',\n\t 94: 'eo',\n\t 128: 'cy',\n\t 129: 'eu',\n\t 130: 'ca',\n\t 131: 'la',\n\t 132: 'qu',\n\t 133: 'gn',\n\t 134: 'ay',\n\t 135: 'tt',\n\t 136: 'ug',\n\t 137: 'dz',\n\t 138: 'jv',\n\t 139: 'su',\n\t 140: 'gl',\n\t 141: 'af',\n\t 142: 'br',\n\t 143: 'iu',\n\t 144: 'gd',\n\t 145: 'gv',\n\t 146: 'ga',\n\t 147: 'to',\n\t 148: 'el-polyton',\n\t 149: 'kl',\n\t 150: 'az',\n\t 151: 'nn'\n\t};\n\n\t// MacOS language ID → MacOS script ID\n\t//\n\t// Note that the script ID is not sufficient to determine what encoding\n\t// to use in TrueType files. For some languages, MacOS used a modification\n\t// of a mainstream script. For example, an Icelandic name would be stored\n\t// with smRoman in the TrueType naming table, but the actual encoding\n\t// is a special Icelandic version of the normal Macintosh Roman encoding.\n\t// As another example, Inuktitut uses an 8-bit encoding for Canadian Aboriginal\n\t// Syllables but MacOS had run out of available script codes, so this was\n\t// done as a (pretty radical) \"modification\" of Ethiopic.\n\t//\n\t// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\n\tvar macLanguageToScript = {\n\t 0: 0, // langEnglish → smRoman\n\t 1: 0, // langFrench → smRoman\n\t 2: 0, // langGerman → smRoman\n\t 3: 0, // langItalian → smRoman\n\t 4: 0, // langDutch → smRoman\n\t 5: 0, // langSwedish → smRoman\n\t 6: 0, // langSpanish → smRoman\n\t 7: 0, // langDanish → smRoman\n\t 8: 0, // langPortuguese → smRoman\n\t 9: 0, // langNorwegian → smRoman\n\t 10: 5, // langHebrew → smHebrew\n\t 11: 1, // langJapanese → smJapanese\n\t 12: 4, // langArabic → smArabic\n\t 13: 0, // langFinnish → smRoman\n\t 14: 6, // langGreek → smGreek\n\t 15: 0, // langIcelandic → smRoman (modified)\n\t 16: 0, // langMaltese → smRoman\n\t 17: 0, // langTurkish → smRoman (modified)\n\t 18: 0, // langCroatian → smRoman (modified)\n\t 19: 2, // langTradChinese → smTradChinese\n\t 20: 4, // langUrdu → smArabic\n\t 21: 9, // langHindi → smDevanagari\n\t 22: 21, // langThai → smThai\n\t 23: 3, // langKorean → smKorean\n\t 24: 29, // langLithuanian → smCentralEuroRoman\n\t 25: 29, // langPolish → smCentralEuroRoman\n\t 26: 29, // langHungarian → smCentralEuroRoman\n\t 27: 29, // langEstonian → smCentralEuroRoman\n\t 28: 29, // langLatvian → smCentralEuroRoman\n\t 29: 0, // langSami → smRoman\n\t 30: 0, // langFaroese → smRoman (modified)\n\t 31: 4, // langFarsi → smArabic (modified)\n\t 32: 7, // langRussian → smCyrillic\n\t 33: 25, // langSimpChinese → smSimpChinese\n\t 34: 0, // langFlemish → smRoman\n\t 35: 0, // langIrishGaelic → smRoman (modified)\n\t 36: 0, // langAlbanian → smRoman\n\t 37: 0, // langRomanian → smRoman (modified)\n\t 38: 29, // langCzech → smCentralEuroRoman\n\t 39: 29, // langSlovak → smCentralEuroRoman\n\t 40: 0, // langSlovenian → smRoman (modified)\n\t 41: 5, // langYiddish → smHebrew\n\t 42: 7, // langSerbian → smCyrillic\n\t 43: 7, // langMacedonian → smCyrillic\n\t 44: 7, // langBulgarian → smCyrillic\n\t 45: 7, // langUkrainian → smCyrillic (modified)\n\t 46: 7, // langByelorussian → smCyrillic\n\t 47: 7, // langUzbek → smCyrillic\n\t 48: 7, // langKazakh → smCyrillic\n\t 49: 7, // langAzerbaijani → smCyrillic\n\t 50: 4, // langAzerbaijanAr → smArabic\n\t 51: 24, // langArmenian → smArmenian\n\t 52: 23, // langGeorgian → smGeorgian\n\t 53: 7, // langMoldavian → smCyrillic\n\t 54: 7, // langKirghiz → smCyrillic\n\t 55: 7, // langTajiki → smCyrillic\n\t 56: 7, // langTurkmen → smCyrillic\n\t 57: 27, // langMongolian → smMongolian\n\t 58: 7, // langMongolianCyr → smCyrillic\n\t 59: 4, // langPashto → smArabic\n\t 60: 4, // langKurdish → smArabic\n\t 61: 4, // langKashmiri → smArabic\n\t 62: 4, // langSindhi → smArabic\n\t 63: 26, // langTibetan → smTibetan\n\t 64: 9, // langNepali → smDevanagari\n\t 65: 9, // langSanskrit → smDevanagari\n\t 66: 9, // langMarathi → smDevanagari\n\t 67: 13, // langBengali → smBengali\n\t 68: 13, // langAssamese → smBengali\n\t 69: 11, // langGujarati → smGujarati\n\t 70: 10, // langPunjabi → smGurmukhi\n\t 71: 12, // langOriya → smOriya\n\t 72: 17, // langMalayalam → smMalayalam\n\t 73: 16, // langKannada → smKannada\n\t 74: 14, // langTamil → smTamil\n\t 75: 15, // langTelugu → smTelugu\n\t 76: 18, // langSinhalese → smSinhalese\n\t 77: 19, // langBurmese → smBurmese\n\t 78: 20, // langKhmer → smKhmer\n\t 79: 22, // langLao → smLao\n\t 80: 30, // langVietnamese → smVietnamese\n\t 81: 0, // langIndonesian → smRoman\n\t 82: 0, // langTagalog → smRoman\n\t 83: 0, // langMalayRoman → smRoman\n\t 84: 4, // langMalayArabic → smArabic\n\t 85: 28, // langAmharic → smEthiopic\n\t 86: 28, // langTigrinya → smEthiopic\n\t 87: 28, // langOromo → smEthiopic\n\t 88: 0, // langSomali → smRoman\n\t 89: 0, // langSwahili → smRoman\n\t 90: 0, // langKinyarwanda → smRoman\n\t 91: 0, // langRundi → smRoman\n\t 92: 0, // langNyanja → smRoman\n\t 93: 0, // langMalagasy → smRoman\n\t 94: 0, // langEsperanto → smRoman\n\t 128: 0, // langWelsh → smRoman (modified)\n\t 129: 0, // langBasque → smRoman\n\t 130: 0, // langCatalan → smRoman\n\t 131: 0, // langLatin → smRoman\n\t 132: 0, // langQuechua → smRoman\n\t 133: 0, // langGuarani → smRoman\n\t 134: 0, // langAymara → smRoman\n\t 135: 7, // langTatar → smCyrillic\n\t 136: 4, // langUighur → smArabic\n\t 137: 26, // langDzongkha → smTibetan\n\t 138: 0, // langJavaneseRom → smRoman\n\t 139: 0, // langSundaneseRom → smRoman\n\t 140: 0, // langGalician → smRoman\n\t 141: 0, // langAfrikaans → smRoman\n\t 142: 0, // langBreton → smRoman (modified)\n\t 143: 28, // langInuktitut → smEthiopic (modified)\n\t 144: 0, // langScottishGaelic → smRoman (modified)\n\t 145: 0, // langManxGaelic → smRoman (modified)\n\t 146: 0, // langIrishGaelicScript → smRoman (modified)\n\t 147: 0, // langTongan → smRoman\n\t 148: 6, // langGreekAncient → smRoman\n\t 149: 0, // langGreenlandic → smRoman\n\t 150: 0, // langAzerbaijanRoman → smRoman\n\t 151: 0 // langNynorsk → smRoman\n\t};\n\n\t// While Microsoft indicates a region/country for all its language\n\t// IDs, we omit the region code if it's equal to the \"most likely\n\t// region subtag\" according to Unicode CLDR. For scripts, we omit\n\t// the subtag if it is equal to the Suppress-Script entry in the\n\t// IANA language subtag registry for IETF BCP 47.\n\t//\n\t// For example, Microsoft states that its language code 0x041A is\n\t// Croatian in Croatia. We transform this to the BCP 47 language code 'hr'\n\t// and not 'hr-HR' because Croatia is the default country for Croatian,\n\t// according to Unicode CLDR. As another example, Microsoft states\n\t// that 0x101A is Croatian (Latin) in Bosnia-Herzegovina. We transform\n\t// this to 'hr-BA' and not 'hr-Latn-BA' because Latin is the default script\n\t// for the Croatian language, according to IANA.\n\t//\n\t// http://www.unicode.org/cldr/charts/latest/supplemental/likely_subtags.html\n\t// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry\n\tvar windowsLanguages = {\n\t 0x0436: 'af',\n\t 0x041C: 'sq',\n\t 0x0484: 'gsw',\n\t 0x045E: 'am',\n\t 0x1401: 'ar-DZ',\n\t 0x3C01: 'ar-BH',\n\t 0x0C01: 'ar',\n\t 0x0801: 'ar-IQ',\n\t 0x2C01: 'ar-JO',\n\t 0x3401: 'ar-KW',\n\t 0x3001: 'ar-LB',\n\t 0x1001: 'ar-LY',\n\t 0x1801: 'ary',\n\t 0x2001: 'ar-OM',\n\t 0x4001: 'ar-QA',\n\t 0x0401: 'ar-SA',\n\t 0x2801: 'ar-SY',\n\t 0x1C01: 'aeb',\n\t 0x3801: 'ar-AE',\n\t 0x2401: 'ar-YE',\n\t 0x042B: 'hy',\n\t 0x044D: 'as',\n\t 0x082C: 'az-Cyrl',\n\t 0x042C: 'az',\n\t 0x046D: 'ba',\n\t 0x042D: 'eu',\n\t 0x0423: 'be',\n\t 0x0845: 'bn',\n\t 0x0445: 'bn-IN',\n\t 0x201A: 'bs-Cyrl',\n\t 0x141A: 'bs',\n\t 0x047E: 'br',\n\t 0x0402: 'bg',\n\t 0x0403: 'ca',\n\t 0x0C04: 'zh-HK',\n\t 0x1404: 'zh-MO',\n\t 0x0804: 'zh',\n\t 0x1004: 'zh-SG',\n\t 0x0404: 'zh-TW',\n\t 0x0483: 'co',\n\t 0x041A: 'hr',\n\t 0x101A: 'hr-BA',\n\t 0x0405: 'cs',\n\t 0x0406: 'da',\n\t 0x048C: 'prs',\n\t 0x0465: 'dv',\n\t 0x0813: 'nl-BE',\n\t 0x0413: 'nl',\n\t 0x0C09: 'en-AU',\n\t 0x2809: 'en-BZ',\n\t 0x1009: 'en-CA',\n\t 0x2409: 'en-029',\n\t 0x4009: 'en-IN',\n\t 0x1809: 'en-IE',\n\t 0x2009: 'en-JM',\n\t 0x4409: 'en-MY',\n\t 0x1409: 'en-NZ',\n\t 0x3409: 'en-PH',\n\t 0x4809: 'en-SG',\n\t 0x1C09: 'en-ZA',\n\t 0x2C09: 'en-TT',\n\t 0x0809: 'en-GB',\n\t 0x0409: 'en',\n\t 0x3009: 'en-ZW',\n\t 0x0425: 'et',\n\t 0x0438: 'fo',\n\t 0x0464: 'fil',\n\t 0x040B: 'fi',\n\t 0x080C: 'fr-BE',\n\t 0x0C0C: 'fr-CA',\n\t 0x040C: 'fr',\n\t 0x140C: 'fr-LU',\n\t 0x180C: 'fr-MC',\n\t 0x100C: 'fr-CH',\n\t 0x0462: 'fy',\n\t 0x0456: 'gl',\n\t 0x0437: 'ka',\n\t 0x0C07: 'de-AT',\n\t 0x0407: 'de',\n\t 0x1407: 'de-LI',\n\t 0x1007: 'de-LU',\n\t 0x0807: 'de-CH',\n\t 0x0408: 'el',\n\t 0x046F: 'kl',\n\t 0x0447: 'gu',\n\t 0x0468: 'ha',\n\t 0x040D: 'he',\n\t 0x0439: 'hi',\n\t 0x040E: 'hu',\n\t 0x040F: 'is',\n\t 0x0470: 'ig',\n\t 0x0421: 'id',\n\t 0x045D: 'iu',\n\t 0x085D: 'iu-Latn',\n\t 0x083C: 'ga',\n\t 0x0434: 'xh',\n\t 0x0435: 'zu',\n\t 0x0410: 'it',\n\t 0x0810: 'it-CH',\n\t 0x0411: 'ja',\n\t 0x044B: 'kn',\n\t 0x043F: 'kk',\n\t 0x0453: 'km',\n\t 0x0486: 'quc',\n\t 0x0487: 'rw',\n\t 0x0441: 'sw',\n\t 0x0457: 'kok',\n\t 0x0412: 'ko',\n\t 0x0440: 'ky',\n\t 0x0454: 'lo',\n\t 0x0426: 'lv',\n\t 0x0427: 'lt',\n\t 0x082E: 'dsb',\n\t 0x046E: 'lb',\n\t 0x042F: 'mk',\n\t 0x083E: 'ms-BN',\n\t 0x043E: 'ms',\n\t 0x044C: 'ml',\n\t 0x043A: 'mt',\n\t 0x0481: 'mi',\n\t 0x047A: 'arn',\n\t 0x044E: 'mr',\n\t 0x047C: 'moh',\n\t 0x0450: 'mn',\n\t 0x0850: 'mn-CN',\n\t 0x0461: 'ne',\n\t 0x0414: 'nb',\n\t 0x0814: 'nn',\n\t 0x0482: 'oc',\n\t 0x0448: 'or',\n\t 0x0463: 'ps',\n\t 0x0415: 'pl',\n\t 0x0416: 'pt',\n\t 0x0816: 'pt-PT',\n\t 0x0446: 'pa',\n\t 0x046B: 'qu-BO',\n\t 0x086B: 'qu-EC',\n\t 0x0C6B: 'qu',\n\t 0x0418: 'ro',\n\t 0x0417: 'rm',\n\t 0x0419: 'ru',\n\t 0x243B: 'smn',\n\t 0x103B: 'smj-NO',\n\t 0x143B: 'smj',\n\t 0x0C3B: 'se-FI',\n\t 0x043B: 'se',\n\t 0x083B: 'se-SE',\n\t 0x203B: 'sms',\n\t 0x183B: 'sma-NO',\n\t 0x1C3B: 'sms',\n\t 0x044F: 'sa',\n\t 0x1C1A: 'sr-Cyrl-BA',\n\t 0x0C1A: 'sr',\n\t 0x181A: 'sr-Latn-BA',\n\t 0x081A: 'sr-Latn',\n\t 0x046C: 'nso',\n\t 0x0432: 'tn',\n\t 0x045B: 'si',\n\t 0x041B: 'sk',\n\t 0x0424: 'sl',\n\t 0x2C0A: 'es-AR',\n\t 0x400A: 'es-BO',\n\t 0x340A: 'es-CL',\n\t 0x240A: 'es-CO',\n\t 0x140A: 'es-CR',\n\t 0x1C0A: 'es-DO',\n\t 0x300A: 'es-EC',\n\t 0x440A: 'es-SV',\n\t 0x100A: 'es-GT',\n\t 0x480A: 'es-HN',\n\t 0x080A: 'es-MX',\n\t 0x4C0A: 'es-NI',\n\t 0x180A: 'es-PA',\n\t 0x3C0A: 'es-PY',\n\t 0x280A: 'es-PE',\n\t 0x500A: 'es-PR',\n\n\t // Microsoft has defined two different language codes for\n\t // “Spanish with modern sorting” and “Spanish with traditional\n\t // sorting”. This makes sense for collation APIs, and it would be\n\t // possible to express this in BCP 47 language tags via Unicode\n\t // extensions (eg., es-u-co-trad is Spanish with traditional\n\t // sorting). However, for storing names in fonts, the distinction\n\t // does not make sense, so we give “es” in both cases.\n\t 0x0C0A: 'es',\n\t 0x040A: 'es',\n\n\t 0x540A: 'es-US',\n\t 0x380A: 'es-UY',\n\t 0x200A: 'es-VE',\n\t 0x081D: 'sv-FI',\n\t 0x041D: 'sv',\n\t 0x045A: 'syr',\n\t 0x0428: 'tg',\n\t 0x085F: 'tzm',\n\t 0x0449: 'ta',\n\t 0x0444: 'tt',\n\t 0x044A: 'te',\n\t 0x041E: 'th',\n\t 0x0451: 'bo',\n\t 0x041F: 'tr',\n\t 0x0442: 'tk',\n\t 0x0480: 'ug',\n\t 0x0422: 'uk',\n\t 0x042E: 'hsb',\n\t 0x0420: 'ur',\n\t 0x0843: 'uz-Cyrl',\n\t 0x0443: 'uz',\n\t 0x042A: 'vi',\n\t 0x0452: 'cy',\n\t 0x0488: 'wo',\n\t 0x0485: 'sah',\n\t 0x0478: 'ii',\n\t 0x046A: 'yo'\n\t};\n\n\t// Returns a IETF BCP 47 language code, for example 'zh-Hant'\n\t// for 'Chinese in the traditional script'.\n\tfunction getLanguageCode(platformID, languageID, ltag) {\n\t switch (platformID) {\n\t case 0: // Unicode\n\t if (languageID === 0xFFFF) {\n\t return 'und';\n\t } else if (ltag) {\n\t return ltag[languageID];\n\t }\n\n\t break;\n\n\t case 1: // Macintosh\n\t return macLanguages[languageID];\n\n\t case 3: // Windows\n\t return windowsLanguages[languageID];\n\t }\n\n\t return undefined;\n\t}\n\n\tvar utf16 = 'utf-16';\n\n\t// MacOS script ID → encoding. This table stores the default case,\n\t// which can be overridden by macLanguageEncodings.\n\tvar macScriptEncodings = {\n\t 0: 'macintosh', // smRoman\n\t 1: 'x-mac-japanese', // smJapanese\n\t 2: 'x-mac-chinesetrad', // smTradChinese\n\t 3: 'x-mac-korean', // smKorean\n\t 6: 'x-mac-greek', // smGreek\n\t 7: 'x-mac-cyrillic', // smCyrillic\n\t 9: 'x-mac-devanagai', // smDevanagari\n\t 10: 'x-mac-gurmukhi', // smGurmukhi\n\t 11: 'x-mac-gujarati', // smGujarati\n\t 12: 'x-mac-oriya', // smOriya\n\t 13: 'x-mac-bengali', // smBengali\n\t 14: 'x-mac-tamil', // smTamil\n\t 15: 'x-mac-telugu', // smTelugu\n\t 16: 'x-mac-kannada', // smKannada\n\t 17: 'x-mac-malayalam', // smMalayalam\n\t 18: 'x-mac-sinhalese', // smSinhalese\n\t 19: 'x-mac-burmese', // smBurmese\n\t 20: 'x-mac-khmer', // smKhmer\n\t 21: 'x-mac-thai', // smThai\n\t 22: 'x-mac-lao', // smLao\n\t 23: 'x-mac-georgian', // smGeorgian\n\t 24: 'x-mac-armenian', // smArmenian\n\t 25: 'x-mac-chinesesimp', // smSimpChinese\n\t 26: 'x-mac-tibetan', // smTibetan\n\t 27: 'x-mac-mongolian', // smMongolian\n\t 28: 'x-mac-ethiopic', // smEthiopic\n\t 29: 'x-mac-ce', // smCentralEuroRoman\n\t 30: 'x-mac-vietnamese', // smVietnamese\n\t 31: 'x-mac-extarabic' // smExtArabic\n\t};\n\n\t// MacOS language ID → encoding. This table stores the exceptional\n\t// cases, which override macScriptEncodings. For writing MacOS naming\n\t// tables, we need to emit a MacOS script ID. Therefore, we cannot\n\t// merge macScriptEncodings into macLanguageEncodings.\n\t//\n\t// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\n\tvar macLanguageEncodings = {\n\t 15: 'x-mac-icelandic', // langIcelandic\n\t 17: 'x-mac-turkish', // langTurkish\n\t 18: 'x-mac-croatian', // langCroatian\n\t 24: 'x-mac-ce', // langLithuanian\n\t 25: 'x-mac-ce', // langPolish\n\t 26: 'x-mac-ce', // langHungarian\n\t 27: 'x-mac-ce', // langEstonian\n\t 28: 'x-mac-ce', // langLatvian\n\t 30: 'x-mac-icelandic', // langFaroese\n\t 37: 'x-mac-romanian', // langRomanian\n\t 38: 'x-mac-ce', // langCzech\n\t 39: 'x-mac-ce', // langSlovak\n\t 40: 'x-mac-ce', // langSlovenian\n\t 143: 'x-mac-inuit', // langInuktitut\n\t 146: 'x-mac-gaelic' // langIrishGaelicScript\n\t};\n\n\tfunction getEncoding(platformID, encodingID, languageID) {\n\t switch (platformID) {\n\t case 0: // Unicode\n\t return utf16;\n\n\t case 1: // Apple Macintosh\n\t return macLanguageEncodings[languageID] || macScriptEncodings[encodingID];\n\n\t case 3: // Microsoft Windows\n\t if (encodingID === 1 || encodingID === 10) {\n\t return utf16;\n\t }\n\n\t break;\n\t }\n\n\t return undefined;\n\t}\n\n\t// Parse the naming `name` table.\n\t// FIXME: Format 1 additional fields are not supported yet.\n\t// ltag is the content of the `ltag' table, such as ['en', 'zh-Hans', 'de-CH-1904'].\n\tfunction parseNameTable(data, start, ltag) {\n\t var name = {};\n\t var p = new parse.Parser(data, start);\n\t var format = p.parseUShort();\n\t var count = p.parseUShort();\n\t var stringOffset = p.offset + p.parseUShort();\n\t for (var i = 0; i < count; i++) {\n\t var platformID = p.parseUShort();\n\t var encodingID = p.parseUShort();\n\t var languageID = p.parseUShort();\n\t var nameID = p.parseUShort();\n\t var property = nameTableNames[nameID] || nameID;\n\t var byteLength = p.parseUShort();\n\t var offset = p.parseUShort();\n\t var language = getLanguageCode(platformID, languageID, ltag);\n\t var encoding = getEncoding(platformID, encodingID, languageID);\n\t if (encoding !== undefined && language !== undefined) {\n\t var text = (void 0);\n\t if (encoding === utf16) {\n\t text = decode.UTF16(data, stringOffset + offset, byteLength);\n\t } else {\n\t text = decode.MACSTRING(data, stringOffset + offset, byteLength, encoding);\n\t }\n\n\t if (text) {\n\t var translations = name[property];\n\t if (translations === undefined) {\n\t translations = name[property] = {};\n\t }\n\n\t translations[language] = text;\n\t }\n\t }\n\t }\n\n\t var langTagCount = 0;\n\t if (format === 1) {\n\t // FIXME: Also handle Microsoft's 'name' table 1.\n\t langTagCount = p.parseUShort();\n\t }\n\n\t return name;\n\t}\n\n\t// {23: 'foo'} → {'foo': 23}\n\t// ['bar', 'baz'] → {'bar': 0, 'baz': 1}\n\tfunction reverseDict(dict) {\n\t var result = {};\n\t for (var key in dict) {\n\t result[dict[key]] = parseInt(key);\n\t }\n\n\t return result;\n\t}\n\n\tfunction makeNameRecord(platformID, encodingID, languageID, nameID, length, offset) {\n\t return new table.Record('NameRecord', [\n\t {name: 'platformID', type: 'USHORT', value: platformID},\n\t {name: 'encodingID', type: 'USHORT', value: encodingID},\n\t {name: 'languageID', type: 'USHORT', value: languageID},\n\t {name: 'nameID', type: 'USHORT', value: nameID},\n\t {name: 'length', type: 'USHORT', value: length},\n\t {name: 'offset', type: 'USHORT', value: offset}\n\t ]);\n\t}\n\n\t// Finds the position of needle in haystack, or -1 if not there.\n\t// Like String.indexOf(), but for arrays.\n\tfunction findSubArray(needle, haystack) {\n\t var needleLength = needle.length;\n\t var limit = haystack.length - needleLength + 1;\n\n\t loop:\n\t for (var pos = 0; pos < limit; pos++) {\n\t for (; pos < limit; pos++) {\n\t for (var k = 0; k < needleLength; k++) {\n\t if (haystack[pos + k] !== needle[k]) {\n\t continue loop;\n\t }\n\t }\n\n\t return pos;\n\t }\n\t }\n\n\t return -1;\n\t}\n\n\tfunction addStringToPool(s, pool) {\n\t var offset = findSubArray(s, pool);\n\t if (offset < 0) {\n\t offset = pool.length;\n\t var i = 0;\n\t var len = s.length;\n\t for (; i < len; ++i) {\n\t pool.push(s[i]);\n\t }\n\n\t }\n\n\t return offset;\n\t}\n\n\tfunction makeNameTable(names, ltag) {\n\t var nameID;\n\t var nameIDs = [];\n\n\t var namesWithNumericKeys = {};\n\t var nameTableIds = reverseDict(nameTableNames);\n\t for (var key in names) {\n\t var id = nameTableIds[key];\n\t if (id === undefined) {\n\t id = key;\n\t }\n\n\t nameID = parseInt(id);\n\n\t if (isNaN(nameID)) {\n\t throw new Error('Name table entry \"' + key + '\" does not exist, see nameTableNames for complete list.');\n\t }\n\n\t namesWithNumericKeys[nameID] = names[key];\n\t nameIDs.push(nameID);\n\t }\n\n\t var macLanguageIds = reverseDict(macLanguages);\n\t var windowsLanguageIds = reverseDict(windowsLanguages);\n\n\t var nameRecords = [];\n\t var stringPool = [];\n\n\t for (var i = 0; i < nameIDs.length; i++) {\n\t nameID = nameIDs[i];\n\t var translations = namesWithNumericKeys[nameID];\n\t for (var lang in translations) {\n\t var text = translations[lang];\n\n\t // For MacOS, we try to emit the name in the form that was introduced\n\t // in the initial version of the TrueType spec (in the late 1980s).\n\t // However, this can fail for various reasons: the requested BCP 47\n\t // language code might not have an old-style Mac equivalent;\n\t // we might not have a codec for the needed character encoding;\n\t // or the name might contain characters that cannot be expressed\n\t // in the old-style Macintosh encoding. In case of failure, we emit\n\t // the name in a more modern fashion (Unicode encoding with BCP 47\n\t // language tags) that is recognized by MacOS 10.5, released in 2009.\n\t // If fonts were only read by operating systems, we could simply\n\t // emit all names in the modern form; this would be much easier.\n\t // However, there are many applications and libraries that read\n\t // 'name' tables directly, and these will usually only recognize\n\t // the ancient form (silently skipping the unrecognized names).\n\t var macPlatform = 1; // Macintosh\n\t var macLanguage = macLanguageIds[lang];\n\t var macScript = macLanguageToScript[macLanguage];\n\t var macEncoding = getEncoding(macPlatform, macScript, macLanguage);\n\t var macName = encode.MACSTRING(text, macEncoding);\n\t if (macName === undefined) {\n\t macPlatform = 0; // Unicode\n\t macLanguage = ltag.indexOf(lang);\n\t if (macLanguage < 0) {\n\t macLanguage = ltag.length;\n\t ltag.push(lang);\n\t }\n\n\t macScript = 4; // Unicode 2.0 and later\n\t macName = encode.UTF16(text);\n\t }\n\n\t var macNameOffset = addStringToPool(macName, stringPool);\n\t nameRecords.push(makeNameRecord(macPlatform, macScript, macLanguage,\n\t nameID, macName.length, macNameOffset));\n\n\t var winLanguage = windowsLanguageIds[lang];\n\t if (winLanguage !== undefined) {\n\t var winName = encode.UTF16(text);\n\t var winNameOffset = addStringToPool(winName, stringPool);\n\t nameRecords.push(makeNameRecord(3, 1, winLanguage,\n\t nameID, winName.length, winNameOffset));\n\t }\n\t }\n\t }\n\n\t nameRecords.sort(function(a, b) {\n\t return ((a.platformID - b.platformID) ||\n\t (a.encodingID - b.encodingID) ||\n\t (a.languageID - b.languageID) ||\n\t (a.nameID - b.nameID));\n\t });\n\n\t var t = new table.Table('name', [\n\t {name: 'format', type: 'USHORT', value: 0},\n\t {name: 'count', type: 'USHORT', value: nameRecords.length},\n\t {name: 'stringOffset', type: 'USHORT', value: 6 + nameRecords.length * 12}\n\t ]);\n\n\t for (var r = 0; r < nameRecords.length; r++) {\n\t t.fields.push({name: 'record_' + r, type: 'RECORD', value: nameRecords[r]});\n\t }\n\n\t t.fields.push({name: 'strings', type: 'LITERAL', value: stringPool});\n\t return t;\n\t}\n\n\tvar _name = { parse: parseNameTable, make: makeNameTable };\n\n\t// The `OS/2` table contains metrics required in OpenType fonts.\n\n\tvar unicodeRanges = [\n\t {begin: 0x0000, end: 0x007F}, // Basic Latin\n\t {begin: 0x0080, end: 0x00FF}, // Latin-1 Supplement\n\t {begin: 0x0100, end: 0x017F}, // Latin Extended-A\n\t {begin: 0x0180, end: 0x024F}, // Latin Extended-B\n\t {begin: 0x0250, end: 0x02AF}, // IPA Extensions\n\t {begin: 0x02B0, end: 0x02FF}, // Spacing Modifier Letters\n\t {begin: 0x0300, end: 0x036F}, // Combining Diacritical Marks\n\t {begin: 0x0370, end: 0x03FF}, // Greek and Coptic\n\t {begin: 0x2C80, end: 0x2CFF}, // Coptic\n\t {begin: 0x0400, end: 0x04FF}, // Cyrillic\n\t {begin: 0x0530, end: 0x058F}, // Armenian\n\t {begin: 0x0590, end: 0x05FF}, // Hebrew\n\t {begin: 0xA500, end: 0xA63F}, // Vai\n\t {begin: 0x0600, end: 0x06FF}, // Arabic\n\t {begin: 0x07C0, end: 0x07FF}, // NKo\n\t {begin: 0x0900, end: 0x097F}, // Devanagari\n\t {begin: 0x0980, end: 0x09FF}, // Bengali\n\t {begin: 0x0A00, end: 0x0A7F}, // Gurmukhi\n\t {begin: 0x0A80, end: 0x0AFF}, // Gujarati\n\t {begin: 0x0B00, end: 0x0B7F}, // Oriya\n\t {begin: 0x0B80, end: 0x0BFF}, // Tamil\n\t {begin: 0x0C00, end: 0x0C7F}, // Telugu\n\t {begin: 0x0C80, end: 0x0CFF}, // Kannada\n\t {begin: 0x0D00, end: 0x0D7F}, // Malayalam\n\t {begin: 0x0E00, end: 0x0E7F}, // Thai\n\t {begin: 0x0E80, end: 0x0EFF}, // Lao\n\t {begin: 0x10A0, end: 0x10FF}, // Georgian\n\t {begin: 0x1B00, end: 0x1B7F}, // Balinese\n\t {begin: 0x1100, end: 0x11FF}, // Hangul Jamo\n\t {begin: 0x1E00, end: 0x1EFF}, // Latin Extended Additional\n\t {begin: 0x1F00, end: 0x1FFF}, // Greek Extended\n\t {begin: 0x2000, end: 0x206F}, // General Punctuation\n\t {begin: 0x2070, end: 0x209F}, // Superscripts And Subscripts\n\t {begin: 0x20A0, end: 0x20CF}, // Currency Symbol\n\t {begin: 0x20D0, end: 0x20FF}, // Combining Diacritical Marks For Symbols\n\t {begin: 0x2100, end: 0x214F}, // Letterlike Symbols\n\t {begin: 0x2150, end: 0x218F}, // Number Forms\n\t {begin: 0x2190, end: 0x21FF}, // Arrows\n\t {begin: 0x2200, end: 0x22FF}, // Mathematical Operators\n\t {begin: 0x2300, end: 0x23FF}, // Miscellaneous Technical\n\t {begin: 0x2400, end: 0x243F}, // Control Pictures\n\t {begin: 0x2440, end: 0x245F}, // Optical Character Recognition\n\t {begin: 0x2460, end: 0x24FF}, // Enclosed Alphanumerics\n\t {begin: 0x2500, end: 0x257F}, // Box Drawing\n\t {begin: 0x2580, end: 0x259F}, // Block Elements\n\t {begin: 0x25A0, end: 0x25FF}, // Geometric Shapes\n\t {begin: 0x2600, end: 0x26FF}, // Miscellaneous Symbols\n\t {begin: 0x2700, end: 0x27BF}, // Dingbats\n\t {begin: 0x3000, end: 0x303F}, // CJK Symbols And Punctuation\n\t {begin: 0x3040, end: 0x309F}, // Hiragana\n\t {begin: 0x30A0, end: 0x30FF}, // Katakana\n\t {begin: 0x3100, end: 0x312F}, // Bopomofo\n\t {begin: 0x3130, end: 0x318F}, // Hangul Compatibility Jamo\n\t {begin: 0xA840, end: 0xA87F}, // Phags-pa\n\t {begin: 0x3200, end: 0x32FF}, // Enclosed CJK Letters And Months\n\t {begin: 0x3300, end: 0x33FF}, // CJK Compatibility\n\t {begin: 0xAC00, end: 0xD7AF}, // Hangul Syllables\n\t {begin: 0xD800, end: 0xDFFF}, // Non-Plane 0 *\n\t {begin: 0x10900, end: 0x1091F}, // Phoenicia\n\t {begin: 0x4E00, end: 0x9FFF}, // CJK Unified Ideographs\n\t {begin: 0xE000, end: 0xF8FF}, // Private Use Area (plane 0)\n\t {begin: 0x31C0, end: 0x31EF}, // CJK Strokes\n\t {begin: 0xFB00, end: 0xFB4F}, // Alphabetic Presentation Forms\n\t {begin: 0xFB50, end: 0xFDFF}, // Arabic Presentation Forms-A\n\t {begin: 0xFE20, end: 0xFE2F}, // Combining Half Marks\n\t {begin: 0xFE10, end: 0xFE1F}, // Vertical Forms\n\t {begin: 0xFE50, end: 0xFE6F}, // Small Form Variants\n\t {begin: 0xFE70, end: 0xFEFF}, // Arabic Presentation Forms-B\n\t {begin: 0xFF00, end: 0xFFEF}, // Halfwidth And Fullwidth Forms\n\t {begin: 0xFFF0, end: 0xFFFF}, // Specials\n\t {begin: 0x0F00, end: 0x0FFF}, // Tibetan\n\t {begin: 0x0700, end: 0x074F}, // Syriac\n\t {begin: 0x0780, end: 0x07BF}, // Thaana\n\t {begin: 0x0D80, end: 0x0DFF}, // Sinhala\n\t {begin: 0x1000, end: 0x109F}, // Myanmar\n\t {begin: 0x1200, end: 0x137F}, // Ethiopic\n\t {begin: 0x13A0, end: 0x13FF}, // Cherokee\n\t {begin: 0x1400, end: 0x167F}, // Unified Canadian Aboriginal Syllabics\n\t {begin: 0x1680, end: 0x169F}, // Ogham\n\t {begin: 0x16A0, end: 0x16FF}, // Runic\n\t {begin: 0x1780, end: 0x17FF}, // Khmer\n\t {begin: 0x1800, end: 0x18AF}, // Mongolian\n\t {begin: 0x2800, end: 0x28FF}, // Braille Patterns\n\t {begin: 0xA000, end: 0xA48F}, // Yi Syllables\n\t {begin: 0x1700, end: 0x171F}, // Tagalog\n\t {begin: 0x10300, end: 0x1032F}, // Old Italic\n\t {begin: 0x10330, end: 0x1034F}, // Gothic\n\t {begin: 0x10400, end: 0x1044F}, // Deseret\n\t {begin: 0x1D000, end: 0x1D0FF}, // Byzantine Musical Symbols\n\t {begin: 0x1D400, end: 0x1D7FF}, // Mathematical Alphanumeric Symbols\n\t {begin: 0xFF000, end: 0xFFFFD}, // Private Use (plane 15)\n\t {begin: 0xFE00, end: 0xFE0F}, // Variation Selectors\n\t {begin: 0xE0000, end: 0xE007F}, // Tags\n\t {begin: 0x1900, end: 0x194F}, // Limbu\n\t {begin: 0x1950, end: 0x197F}, // Tai Le\n\t {begin: 0x1980, end: 0x19DF}, // New Tai Lue\n\t {begin: 0x1A00, end: 0x1A1F}, // Buginese\n\t {begin: 0x2C00, end: 0x2C5F}, // Glagolitic\n\t {begin: 0x2D30, end: 0x2D7F}, // Tifinagh\n\t {begin: 0x4DC0, end: 0x4DFF}, // Yijing Hexagram Symbols\n\t {begin: 0xA800, end: 0xA82F}, // Syloti Nagri\n\t {begin: 0x10000, end: 0x1007F}, // Linear B Syllabary\n\t {begin: 0x10140, end: 0x1018F}, // Ancient Greek Numbers\n\t {begin: 0x10380, end: 0x1039F}, // Ugaritic\n\t {begin: 0x103A0, end: 0x103DF}, // Old Persian\n\t {begin: 0x10450, end: 0x1047F}, // Shavian\n\t {begin: 0x10480, end: 0x104AF}, // Osmanya\n\t {begin: 0x10800, end: 0x1083F}, // Cypriot Syllabary\n\t {begin: 0x10A00, end: 0x10A5F}, // Kharoshthi\n\t {begin: 0x1D300, end: 0x1D35F}, // Tai Xuan Jing Symbols\n\t {begin: 0x12000, end: 0x123FF}, // Cuneiform\n\t {begin: 0x1D360, end: 0x1D37F}, // Counting Rod Numerals\n\t {begin: 0x1B80, end: 0x1BBF}, // Sundanese\n\t {begin: 0x1C00, end: 0x1C4F}, // Lepcha\n\t {begin: 0x1C50, end: 0x1C7F}, // Ol Chiki\n\t {begin: 0xA880, end: 0xA8DF}, // Saurashtra\n\t {begin: 0xA900, end: 0xA92F}, // Kayah Li\n\t {begin: 0xA930, end: 0xA95F}, // Rejang\n\t {begin: 0xAA00, end: 0xAA5F}, // Cham\n\t {begin: 0x10190, end: 0x101CF}, // Ancient Symbols\n\t {begin: 0x101D0, end: 0x101FF}, // Phaistos Disc\n\t {begin: 0x102A0, end: 0x102DF}, // Carian\n\t {begin: 0x1F030, end: 0x1F09F} // Domino Tiles\n\t];\n\n\tfunction getUnicodeRange(unicode) {\n\t for (var i = 0; i < unicodeRanges.length; i += 1) {\n\t var range = unicodeRanges[i];\n\t if (unicode >= range.begin && unicode < range.end) {\n\t return i;\n\t }\n\t }\n\n\t return -1;\n\t}\n\n\t// Parse the OS/2 and Windows metrics `OS/2` table\n\tfunction parseOS2Table(data, start) {\n\t var os2 = {};\n\t var p = new parse.Parser(data, start);\n\t os2.version = p.parseUShort();\n\t os2.xAvgCharWidth = p.parseShort();\n\t os2.usWeightClass = p.parseUShort();\n\t os2.usWidthClass = p.parseUShort();\n\t os2.fsType = p.parseUShort();\n\t os2.ySubscriptXSize = p.parseShort();\n\t os2.ySubscriptYSize = p.parseShort();\n\t os2.ySubscriptXOffset = p.parseShort();\n\t os2.ySubscriptYOffset = p.parseShort();\n\t os2.ySuperscriptXSize = p.parseShort();\n\t os2.ySuperscriptYSize = p.parseShort();\n\t os2.ySuperscriptXOffset = p.parseShort();\n\t os2.ySuperscriptYOffset = p.parseShort();\n\t os2.yStrikeoutSize = p.parseShort();\n\t os2.yStrikeoutPosition = p.parseShort();\n\t os2.sFamilyClass = p.parseShort();\n\t os2.panose = [];\n\t for (var i = 0; i < 10; i++) {\n\t os2.panose[i] = p.parseByte();\n\t }\n\n\t os2.ulUnicodeRange1 = p.parseULong();\n\t os2.ulUnicodeRange2 = p.parseULong();\n\t os2.ulUnicodeRange3 = p.parseULong();\n\t os2.ulUnicodeRange4 = p.parseULong();\n\t os2.achVendID = String.fromCharCode(p.parseByte(), p.parseByte(), p.parseByte(), p.parseByte());\n\t os2.fsSelection = p.parseUShort();\n\t os2.usFirstCharIndex = p.parseUShort();\n\t os2.usLastCharIndex = p.parseUShort();\n\t os2.sTypoAscender = p.parseShort();\n\t os2.sTypoDescender = p.parseShort();\n\t os2.sTypoLineGap = p.parseShort();\n\t os2.usWinAscent = p.parseUShort();\n\t os2.usWinDescent = p.parseUShort();\n\t if (os2.version >= 1) {\n\t os2.ulCodePageRange1 = p.parseULong();\n\t os2.ulCodePageRange2 = p.parseULong();\n\t }\n\n\t if (os2.version >= 2) {\n\t os2.sxHeight = p.parseShort();\n\t os2.sCapHeight = p.parseShort();\n\t os2.usDefaultChar = p.parseUShort();\n\t os2.usBreakChar = p.parseUShort();\n\t os2.usMaxContent = p.parseUShort();\n\t }\n\n\t return os2;\n\t}\n\n\tfunction makeOS2Table(options) {\n\t return new table.Table('OS/2', [\n\t {name: 'version', type: 'USHORT', value: 0x0003},\n\t {name: 'xAvgCharWidth', type: 'SHORT', value: 0},\n\t {name: 'usWeightClass', type: 'USHORT', value: 0},\n\t {name: 'usWidthClass', type: 'USHORT', value: 0},\n\t {name: 'fsType', type: 'USHORT', value: 0},\n\t {name: 'ySubscriptXSize', type: 'SHORT', value: 650},\n\t {name: 'ySubscriptYSize', type: 'SHORT', value: 699},\n\t {name: 'ySubscriptXOffset', type: 'SHORT', value: 0},\n\t {name: 'ySubscriptYOffset', type: 'SHORT', value: 140},\n\t {name: 'ySuperscriptXSize', type: 'SHORT', value: 650},\n\t {name: 'ySuperscriptYSize', type: 'SHORT', value: 699},\n\t {name: 'ySuperscriptXOffset', type: 'SHORT', value: 0},\n\t {name: 'ySuperscriptYOffset', type: 'SHORT', value: 479},\n\t {name: 'yStrikeoutSize', type: 'SHORT', value: 49},\n\t {name: 'yStrikeoutPosition', type: 'SHORT', value: 258},\n\t {name: 'sFamilyClass', type: 'SHORT', value: 0},\n\t {name: 'bFamilyType', type: 'BYTE', value: 0},\n\t {name: 'bSerifStyle', type: 'BYTE', value: 0},\n\t {name: 'bWeight', type: 'BYTE', value: 0},\n\t {name: 'bProportion', type: 'BYTE', value: 0},\n\t {name: 'bContrast', type: 'BYTE', value: 0},\n\t {name: 'bStrokeVariation', type: 'BYTE', value: 0},\n\t {name: 'bArmStyle', type: 'BYTE', value: 0},\n\t {name: 'bLetterform', type: 'BYTE', value: 0},\n\t {name: 'bMidline', type: 'BYTE', value: 0},\n\t {name: 'bXHeight', type: 'BYTE', value: 0},\n\t {name: 'ulUnicodeRange1', type: 'ULONG', value: 0},\n\t {name: 'ulUnicodeRange2', type: 'ULONG', value: 0},\n\t {name: 'ulUnicodeRange3', type: 'ULONG', value: 0},\n\t {name: 'ulUnicodeRange4', type: 'ULONG', value: 0},\n\t {name: 'achVendID', type: 'CHARARRAY', value: 'XXXX'},\n\t {name: 'fsSelection', type: 'USHORT', value: 0},\n\t {name: 'usFirstCharIndex', type: 'USHORT', value: 0},\n\t {name: 'usLastCharIndex', type: 'USHORT', value: 0},\n\t {name: 'sTypoAscender', type: 'SHORT', value: 0},\n\t {name: 'sTypoDescender', type: 'SHORT', value: 0},\n\t {name: 'sTypoLineGap', type: 'SHORT', value: 0},\n\t {name: 'usWinAscent', type: 'USHORT', value: 0},\n\t {name: 'usWinDescent', type: 'USHORT', value: 0},\n\t {name: 'ulCodePageRange1', type: 'ULONG', value: 0},\n\t {name: 'ulCodePageRange2', type: 'ULONG', value: 0},\n\t {name: 'sxHeight', type: 'SHORT', value: 0},\n\t {name: 'sCapHeight', type: 'SHORT', value: 0},\n\t {name: 'usDefaultChar', type: 'USHORT', value: 0},\n\t {name: 'usBreakChar', type: 'USHORT', value: 0},\n\t {name: 'usMaxContext', type: 'USHORT', value: 0}\n\t ], options);\n\t}\n\n\tvar os2 = { parse: parseOS2Table, make: makeOS2Table, unicodeRanges: unicodeRanges, getUnicodeRange: getUnicodeRange };\n\n\t// The `post` table stores additional PostScript information, such as glyph names.\n\n\t// Parse the PostScript `post` table\n\tfunction parsePostTable(data, start) {\n\t var post = {};\n\t var p = new parse.Parser(data, start);\n\t post.version = p.parseVersion();\n\t post.italicAngle = p.parseFixed();\n\t post.underlinePosition = p.parseShort();\n\t post.underlineThickness = p.parseShort();\n\t post.isFixedPitch = p.parseULong();\n\t post.minMemType42 = p.parseULong();\n\t post.maxMemType42 = p.parseULong();\n\t post.minMemType1 = p.parseULong();\n\t post.maxMemType1 = p.parseULong();\n\t switch (post.version) {\n\t case 1:\n\t post.names = standardNames.slice();\n\t break;\n\t case 2:\n\t post.numberOfGlyphs = p.parseUShort();\n\t post.glyphNameIndex = new Array(post.numberOfGlyphs);\n\t for (var i = 0; i < post.numberOfGlyphs; i++) {\n\t post.glyphNameIndex[i] = p.parseUShort();\n\t }\n\n\t post.names = [];\n\t for (var i$1 = 0; i$1 < post.numberOfGlyphs; i$1++) {\n\t if (post.glyphNameIndex[i$1] >= standardNames.length) {\n\t var nameLength = p.parseChar();\n\t post.names.push(p.parseString(nameLength));\n\t }\n\t }\n\n\t break;\n\t case 2.5:\n\t post.numberOfGlyphs = p.parseUShort();\n\t post.offset = new Array(post.numberOfGlyphs);\n\t for (var i$2 = 0; i$2 < post.numberOfGlyphs; i$2++) {\n\t post.offset[i$2] = p.parseChar();\n\t }\n\n\t break;\n\t }\n\t return post;\n\t}\n\n\tfunction makePostTable() {\n\t return new table.Table('post', [\n\t {name: 'version', type: 'FIXED', value: 0x00030000},\n\t {name: 'italicAngle', type: 'FIXED', value: 0},\n\t {name: 'underlinePosition', type: 'FWORD', value: 0},\n\t {name: 'underlineThickness', type: 'FWORD', value: 0},\n\t {name: 'isFixedPitch', type: 'ULONG', value: 0},\n\t {name: 'minMemType42', type: 'ULONG', value: 0},\n\t {name: 'maxMemType42', type: 'ULONG', value: 0},\n\t {name: 'minMemType1', type: 'ULONG', value: 0},\n\t {name: 'maxMemType1', type: 'ULONG', value: 0}\n\t ]);\n\t}\n\n\tvar post = { parse: parsePostTable, make: makePostTable };\n\n\t// The `GSUB` table contains ligatures, among other things.\n\n\tvar subtableParsers = new Array(9); // subtableParsers[0] is unused\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#SS\n\tsubtableParsers[1] = function parseLookup1() {\n\t var start = this.offset + this.relativeOffset;\n\t var substFormat = this.parseUShort();\n\t if (substFormat === 1) {\n\t return {\n\t substFormat: 1,\n\t coverage: this.parsePointer(Parser.coverage),\n\t deltaGlyphId: this.parseUShort()\n\t };\n\t } else if (substFormat === 2) {\n\t return {\n\t substFormat: 2,\n\t coverage: this.parsePointer(Parser.coverage),\n\t substitute: this.parseOffset16List()\n\t };\n\t }\n\t check.assert(false, '0x' + start.toString(16) + ': lookup type 1 format must be 1 or 2.');\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#MS\n\tsubtableParsers[2] = function parseLookup2() {\n\t var substFormat = this.parseUShort();\n\t check.argument(substFormat === 1, 'GSUB Multiple Substitution Subtable identifier-format must be 1');\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t sequences: this.parseListOfLists()\n\t };\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#AS\n\tsubtableParsers[3] = function parseLookup3() {\n\t var substFormat = this.parseUShort();\n\t check.argument(substFormat === 1, 'GSUB Alternate Substitution Subtable identifier-format must be 1');\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t alternateSets: this.parseListOfLists()\n\t };\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#LS\n\tsubtableParsers[4] = function parseLookup4() {\n\t var substFormat = this.parseUShort();\n\t check.argument(substFormat === 1, 'GSUB ligature table identifier-format must be 1');\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t ligatureSets: this.parseListOfLists(function() {\n\t return {\n\t ligGlyph: this.parseUShort(),\n\t components: this.parseUShortList(this.parseUShort() - 1)\n\t };\n\t })\n\t };\n\t};\n\n\tvar lookupRecordDesc = {\n\t sequenceIndex: Parser.uShort,\n\t lookupListIndex: Parser.uShort\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#CSF\n\tsubtableParsers[5] = function parseLookup5() {\n\t var start = this.offset + this.relativeOffset;\n\t var substFormat = this.parseUShort();\n\n\t if (substFormat === 1) {\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t ruleSets: this.parseListOfLists(function() {\n\t var glyphCount = this.parseUShort();\n\t var substCount = this.parseUShort();\n\t return {\n\t input: this.parseUShortList(glyphCount - 1),\n\t lookupRecords: this.parseRecordList(substCount, lookupRecordDesc)\n\t };\n\t })\n\t };\n\t } else if (substFormat === 2) {\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t classDef: this.parsePointer(Parser.classDef),\n\t classSets: this.parseListOfLists(function() {\n\t var glyphCount = this.parseUShort();\n\t var substCount = this.parseUShort();\n\t return {\n\t classes: this.parseUShortList(glyphCount - 1),\n\t lookupRecords: this.parseRecordList(substCount, lookupRecordDesc)\n\t };\n\t })\n\t };\n\t } else if (substFormat === 3) {\n\t var glyphCount = this.parseUShort();\n\t var substCount = this.parseUShort();\n\t return {\n\t substFormat: substFormat,\n\t coverages: this.parseList(glyphCount, Parser.pointer(Parser.coverage)),\n\t lookupRecords: this.parseRecordList(substCount, lookupRecordDesc)\n\t };\n\t }\n\t check.assert(false, '0x' + start.toString(16) + ': lookup type 5 format must be 1, 2 or 3.');\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#CC\n\tsubtableParsers[6] = function parseLookup6() {\n\t var start = this.offset + this.relativeOffset;\n\t var substFormat = this.parseUShort();\n\t if (substFormat === 1) {\n\t return {\n\t substFormat: 1,\n\t coverage: this.parsePointer(Parser.coverage),\n\t chainRuleSets: this.parseListOfLists(function() {\n\t return {\n\t backtrack: this.parseUShortList(),\n\t input: this.parseUShortList(this.parseShort() - 1),\n\t lookahead: this.parseUShortList(),\n\t lookupRecords: this.parseRecordList(lookupRecordDesc)\n\t };\n\t })\n\t };\n\t } else if (substFormat === 2) {\n\t return {\n\t substFormat: 2,\n\t coverage: this.parsePointer(Parser.coverage),\n\t backtrackClassDef: this.parsePointer(Parser.classDef),\n\t inputClassDef: this.parsePointer(Parser.classDef),\n\t lookaheadClassDef: this.parsePointer(Parser.classDef),\n\t chainClassSet: this.parseListOfLists(function() {\n\t return {\n\t backtrack: this.parseUShortList(),\n\t input: this.parseUShortList(this.parseShort() - 1),\n\t lookahead: this.parseUShortList(),\n\t lookupRecords: this.parseRecordList(lookupRecordDesc)\n\t };\n\t })\n\t };\n\t } else if (substFormat === 3) {\n\t return {\n\t substFormat: 3,\n\t backtrackCoverage: this.parseList(Parser.pointer(Parser.coverage)),\n\t inputCoverage: this.parseList(Parser.pointer(Parser.coverage)),\n\t lookaheadCoverage: this.parseList(Parser.pointer(Parser.coverage)),\n\t lookupRecords: this.parseRecordList(lookupRecordDesc)\n\t };\n\t }\n\t check.assert(false, '0x' + start.toString(16) + ': lookup type 6 format must be 1, 2 or 3.');\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#ES\n\tsubtableParsers[7] = function parseLookup7() {\n\t // Extension Substitution subtable\n\t var substFormat = this.parseUShort();\n\t check.argument(substFormat === 1, 'GSUB Extension Substitution subtable identifier-format must be 1');\n\t var extensionLookupType = this.parseUShort();\n\t var extensionParser = new Parser(this.data, this.offset + this.parseULong());\n\t return {\n\t substFormat: 1,\n\t lookupType: extensionLookupType,\n\t extension: subtableParsers[extensionLookupType].call(extensionParser)\n\t };\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/GSUB.htm#RCCS\n\tsubtableParsers[8] = function parseLookup8() {\n\t var substFormat = this.parseUShort();\n\t check.argument(substFormat === 1, 'GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1');\n\t return {\n\t substFormat: substFormat,\n\t coverage: this.parsePointer(Parser.coverage),\n\t backtrackCoverage: this.parseList(Parser.pointer(Parser.coverage)),\n\t lookaheadCoverage: this.parseList(Parser.pointer(Parser.coverage)),\n\t substitutes: this.parseUShortList()\n\t };\n\t};\n\n\t// https://www.microsoft.com/typography/OTSPEC/gsub.htm\n\tfunction parseGsubTable(data, start) {\n\t start = start || 0;\n\t var p = new Parser(data, start);\n\t var tableVersion = p.parseVersion(1);\n\t check.argument(tableVersion === 1 || tableVersion === 1.1, 'Unsupported GSUB table version.');\n\t if (tableVersion === 1) {\n\t return {\n\t version: tableVersion,\n\t scripts: p.parseScriptList(),\n\t features: p.parseFeatureList(),\n\t lookups: p.parseLookupList(subtableParsers)\n\t };\n\t } else {\n\t return {\n\t version: tableVersion,\n\t scripts: p.parseScriptList(),\n\t features: p.parseFeatureList(),\n\t lookups: p.parseLookupList(subtableParsers),\n\t variations: p.parseFeatureVariationsList()\n\t };\n\t }\n\n\t}\n\n\t// GSUB Writing //////////////////////////////////////////////\n\tvar subtableMakers = new Array(9);\n\n\tsubtableMakers[1] = function makeLookup1(subtable) {\n\t if (subtable.substFormat === 1) {\n\t return new table.Table('substitutionTable', [\n\t {name: 'substFormat', type: 'USHORT', value: 1},\n\t {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)},\n\t {name: 'deltaGlyphID', type: 'USHORT', value: subtable.deltaGlyphId}\n\t ]);\n\t } else {\n\t return new table.Table('substitutionTable', [\n\t {name: 'substFormat', type: 'USHORT', value: 2},\n\t {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)}\n\t ].concat(table.ushortList('substitute', subtable.substitute)));\n\t }\n\t check.fail('Lookup type 1 substFormat must be 1 or 2.');\n\t};\n\n\tsubtableMakers[3] = function makeLookup3(subtable) {\n\t check.assert(subtable.substFormat === 1, 'Lookup type 3 substFormat must be 1.');\n\t return new table.Table('substitutionTable', [\n\t {name: 'substFormat', type: 'USHORT', value: 1},\n\t {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)}\n\t ].concat(table.tableList('altSet', subtable.alternateSets, function(alternateSet) {\n\t return new table.Table('alternateSetTable', table.ushortList('alternate', alternateSet));\n\t })));\n\t};\n\n\tsubtableMakers[4] = function makeLookup4(subtable) {\n\t check.assert(subtable.substFormat === 1, 'Lookup type 4 substFormat must be 1.');\n\t return new table.Table('substitutionTable', [\n\t {name: 'substFormat', type: 'USHORT', value: 1},\n\t {name: 'coverage', type: 'TABLE', value: new table.Coverage(subtable.coverage)}\n\t ].concat(table.tableList('ligSet', subtable.ligatureSets, function(ligatureSet) {\n\t return new table.Table('ligatureSetTable', table.tableList('ligature', ligatureSet, function(ligature) {\n\t return new table.Table('ligatureTable',\n\t [{name: 'ligGlyph', type: 'USHORT', value: ligature.ligGlyph}]\n\t .concat(table.ushortList('component', ligature.components, ligature.components.length + 1))\n\t );\n\t }));\n\t })));\n\t};\n\n\tfunction makeGsubTable(gsub) {\n\t return new table.Table('GSUB', [\n\t {name: 'version', type: 'ULONG', value: 0x10000},\n\t {name: 'scripts', type: 'TABLE', value: new table.ScriptList(gsub.scripts)},\n\t {name: 'features', type: 'TABLE', value: new table.FeatureList(gsub.features)},\n\t {name: 'lookups', type: 'TABLE', value: new table.LookupList(gsub.lookups, subtableMakers)}\n\t ]);\n\t}\n\n\tvar gsub = { parse: parseGsubTable, make: makeGsubTable };\n\n\t// The `GPOS` table contains kerning pairs, among other things.\n\n\t// Parse the metadata `meta` table.\n\t// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6meta.html\n\tfunction parseMetaTable(data, start) {\n\t var p = new parse.Parser(data, start);\n\t var tableVersion = p.parseULong();\n\t check.argument(tableVersion === 1, 'Unsupported META table version.');\n\t p.parseULong(); // flags - currently unused and set to 0\n\t p.parseULong(); // tableOffset\n\t var numDataMaps = p.parseULong();\n\n\t var tags = {};\n\t for (var i = 0; i < numDataMaps; i++) {\n\t var tag = p.parseTag();\n\t var dataOffset = p.parseULong();\n\t var dataLength = p.parseULong();\n\t var text = decode.UTF8(data, start + dataOffset, dataLength);\n\n\t tags[tag] = text;\n\t }\n\t return tags;\n\t}\n\n\tfunction makeMetaTable(tags) {\n\t var numTags = Object.keys(tags).length;\n\t var stringPool = '';\n\t var stringPoolOffset = 16 + numTags * 12;\n\n\t var result = new table.Table('meta', [\n\t {name: 'version', type: 'ULONG', value: 1},\n\t {name: 'flags', type: 'ULONG', value: 0},\n\t {name: 'offset', type: 'ULONG', value: stringPoolOffset},\n\t {name: 'numTags', type: 'ULONG', value: numTags}\n\t ]);\n\n\t for (var tag in tags) {\n\t var pos = stringPool.length;\n\t stringPool += tags[tag];\n\n\t result.fields.push({name: 'tag ' + tag, type: 'TAG', value: tag});\n\t result.fields.push({name: 'offset ' + tag, type: 'ULONG', value: stringPoolOffset + pos});\n\t result.fields.push({name: 'length ' + tag, type: 'ULONG', value: tags[tag].length});\n\t }\n\n\t result.fields.push({name: 'stringPool', type: 'CHARARRAY', value: stringPool});\n\n\t return result;\n\t}\n\n\tvar meta = { parse: parseMetaTable, make: makeMetaTable };\n\n\t// The `sfnt` wrapper provides organization for the tables in the font.\n\n\tfunction log2(v) {\n\t return Math.log(v) / Math.log(2) | 0;\n\t}\n\n\tfunction computeCheckSum(bytes) {\n\t while (bytes.length % 4 !== 0) {\n\t bytes.push(0);\n\t }\n\n\t var sum = 0;\n\t for (var i = 0; i < bytes.length; i += 4) {\n\t sum += (bytes[i] << 24) +\n\t (bytes[i + 1] << 16) +\n\t (bytes[i + 2] << 8) +\n\t (bytes[i + 3]);\n\t }\n\n\t sum %= Math.pow(2, 32);\n\t return sum;\n\t}\n\n\tfunction makeTableRecord(tag, checkSum, offset, length) {\n\t return new table.Record('Table Record', [\n\t {name: 'tag', type: 'TAG', value: tag !== undefined ? tag : ''},\n\t {name: 'checkSum', type: 'ULONG', value: checkSum !== undefined ? checkSum : 0},\n\t {name: 'offset', type: 'ULONG', value: offset !== undefined ? offset : 0},\n\t {name: 'length', type: 'ULONG', value: length !== undefined ? length : 0}\n\t ]);\n\t}\n\n\tfunction makeSfntTable(tables) {\n\t var sfnt = new table.Table('sfnt', [\n\t {name: 'version', type: 'TAG', value: 'OTTO'},\n\t {name: 'numTables', type: 'USHORT', value: 0},\n\t {name: 'searchRange', type: 'USHORT', value: 0},\n\t {name: 'entrySelector', type: 'USHORT', value: 0},\n\t {name: 'rangeShift', type: 'USHORT', value: 0}\n\t ]);\n\t sfnt.tables = tables;\n\t sfnt.numTables = tables.length;\n\t var highestPowerOf2 = Math.pow(2, log2(sfnt.numTables));\n\t sfnt.searchRange = 16 * highestPowerOf2;\n\t sfnt.entrySelector = log2(highestPowerOf2);\n\t sfnt.rangeShift = sfnt.numTables * 16 - sfnt.searchRange;\n\n\t var recordFields = [];\n\t var tableFields = [];\n\n\t var offset = sfnt.sizeOf() + (makeTableRecord().sizeOf() * sfnt.numTables);\n\t while (offset % 4 !== 0) {\n\t offset += 1;\n\t tableFields.push({name: 'padding', type: 'BYTE', value: 0});\n\t }\n\n\t for (var i = 0; i < tables.length; i += 1) {\n\t var t = tables[i];\n\t check.argument(t.tableName.length === 4, 'Table name' + t.tableName + ' is invalid.');\n\t var tableLength = t.sizeOf();\n\t var tableRecord = makeTableRecord(t.tableName, computeCheckSum(t.encode()), offset, tableLength);\n\t recordFields.push({name: tableRecord.tag + ' Table Record', type: 'RECORD', value: tableRecord});\n\t tableFields.push({name: t.tableName + ' table', type: 'RECORD', value: t});\n\t offset += tableLength;\n\t check.argument(!isNaN(offset), 'Something went wrong calculating the offset.');\n\t while (offset % 4 !== 0) {\n\t offset += 1;\n\t tableFields.push({name: 'padding', type: 'BYTE', value: 0});\n\t }\n\t }\n\n\t // Table records need to be sorted alphabetically.\n\t recordFields.sort(function(r1, r2) {\n\t if (r1.value.tag > r2.value.tag) {\n\t return 1;\n\t } else {\n\t return -1;\n\t }\n\t });\n\n\t sfnt.fields = sfnt.fields.concat(recordFields);\n\t sfnt.fields = sfnt.fields.concat(tableFields);\n\t return sfnt;\n\t}\n\n\t// Get the metrics for a character. If the string has more than one character\n\t// this function returns metrics for the first available character.\n\t// You can provide optional fallback metrics if no characters are available.\n\tfunction metricsForChar(font, chars, notFoundMetrics) {\n\t for (var i = 0; i < chars.length; i += 1) {\n\t var glyphIndex = font.charToGlyphIndex(chars[i]);\n\t if (glyphIndex > 0) {\n\t var glyph = font.glyphs.get(glyphIndex);\n\t return glyph.getMetrics();\n\t }\n\t }\n\n\t return notFoundMetrics;\n\t}\n\n\tfunction average(vs) {\n\t var sum = 0;\n\t for (var i = 0; i < vs.length; i += 1) {\n\t sum += vs[i];\n\t }\n\n\t return sum / vs.length;\n\t}\n\n\t// Convert the font object to a SFNT data structure.\n\t// This structure contains all the necessary tables and metadata to create a binary OTF file.\n\tfunction fontToSfntTable(font) {\n\t var xMins = [];\n\t var yMins = [];\n\t var xMaxs = [];\n\t var yMaxs = [];\n\t var advanceWidths = [];\n\t var leftSideBearings = [];\n\t var rightSideBearings = [];\n\t var firstCharIndex;\n\t var lastCharIndex = 0;\n\t var ulUnicodeRange1 = 0;\n\t var ulUnicodeRange2 = 0;\n\t var ulUnicodeRange3 = 0;\n\t var ulUnicodeRange4 = 0;\n\n\t for (var i = 0; i < font.glyphs.length; i += 1) {\n\t var glyph = font.glyphs.get(i);\n\t var unicode = glyph.unicode | 0;\n\n\t if (isNaN(glyph.advanceWidth)) {\n\t throw new Error('Glyph ' + glyph.name + ' (' + i + '): advanceWidth is not a number.');\n\t }\n\n\t if (firstCharIndex > unicode || firstCharIndex === undefined) {\n\t // ignore .notdef char\n\t if (unicode > 0) {\n\t firstCharIndex = unicode;\n\t }\n\t }\n\n\t if (lastCharIndex < unicode) {\n\t lastCharIndex = unicode;\n\t }\n\n\t var position = os2.getUnicodeRange(unicode);\n\t if (position < 32) {\n\t ulUnicodeRange1 |= 1 << position;\n\t } else if (position < 64) {\n\t ulUnicodeRange2 |= 1 << position - 32;\n\t } else if (position < 96) {\n\t ulUnicodeRange3 |= 1 << position - 64;\n\t } else if (position < 123) {\n\t ulUnicodeRange4 |= 1 << position - 96;\n\t } else {\n\t throw new Error('Unicode ranges bits > 123 are reserved for internal usage');\n\t }\n\t // Skip non-important characters.\n\t if (glyph.name === '.notdef') { continue; }\n\t var metrics = glyph.getMetrics();\n\t xMins.push(metrics.xMin);\n\t yMins.push(metrics.yMin);\n\t xMaxs.push(metrics.xMax);\n\t yMaxs.push(metrics.yMax);\n\t leftSideBearings.push(metrics.leftSideBearing);\n\t rightSideBearings.push(metrics.rightSideBearing);\n\t advanceWidths.push(glyph.advanceWidth);\n\t }\n\n\t var globals = {\n\t xMin: Math.min.apply(null, xMins),\n\t yMin: Math.min.apply(null, yMins),\n\t xMax: Math.max.apply(null, xMaxs),\n\t yMax: Math.max.apply(null, yMaxs),\n\t advanceWidthMax: Math.max.apply(null, advanceWidths),\n\t advanceWidthAvg: average(advanceWidths),\n\t minLeftSideBearing: Math.min.apply(null, leftSideBearings),\n\t maxLeftSideBearing: Math.max.apply(null, leftSideBearings),\n\t minRightSideBearing: Math.min.apply(null, rightSideBearings)\n\t };\n\t globals.ascender = font.ascender;\n\t globals.descender = font.descender;\n\n\t var headTable = head.make({\n\t flags: 3, // 00000011 (baseline for font at y=0; left sidebearing point at x=0)\n\t unitsPerEm: font.unitsPerEm,\n\t xMin: globals.xMin,\n\t yMin: globals.yMin,\n\t xMax: globals.xMax,\n\t yMax: globals.yMax,\n\t lowestRecPPEM: 3,\n\t createdTimestamp: font.createdTimestamp\n\t });\n\n\t var hheaTable = hhea.make({\n\t ascender: globals.ascender,\n\t descender: globals.descender,\n\t advanceWidthMax: globals.advanceWidthMax,\n\t minLeftSideBearing: globals.minLeftSideBearing,\n\t minRightSideBearing: globals.minRightSideBearing,\n\t xMaxExtent: globals.maxLeftSideBearing + (globals.xMax - globals.xMin),\n\t numberOfHMetrics: font.glyphs.length\n\t });\n\n\t var maxpTable = maxp.make(font.glyphs.length);\n\n\t var os2Table = os2.make({\n\t xAvgCharWidth: Math.round(globals.advanceWidthAvg),\n\t usWeightClass: font.tables.os2.usWeightClass,\n\t usWidthClass: font.tables.os2.usWidthClass,\n\t usFirstCharIndex: firstCharIndex,\n\t usLastCharIndex: lastCharIndex,\n\t ulUnicodeRange1: ulUnicodeRange1,\n\t ulUnicodeRange2: ulUnicodeRange2,\n\t ulUnicodeRange3: ulUnicodeRange3,\n\t ulUnicodeRange4: ulUnicodeRange4,\n\t fsSelection: font.tables.os2.fsSelection, // REGULAR\n\t // See http://typophile.com/node/13081 for more info on vertical metrics.\n\t // We get metrics for typical characters (such as \"x\" for xHeight).\n\t // We provide some fallback characters if characters are unavailable: their\n\t // ordering was chosen experimentally.\n\t sTypoAscender: globals.ascender,\n\t sTypoDescender: globals.descender,\n\t sTypoLineGap: 0,\n\t usWinAscent: globals.yMax,\n\t usWinDescent: Math.abs(globals.yMin),\n\t ulCodePageRange1: 1, // FIXME: hard-code Latin 1 support for now\n\t sxHeight: metricsForChar(font, 'xyvw', {yMax: Math.round(globals.ascender / 2)}).yMax,\n\t sCapHeight: metricsForChar(font, 'HIKLEFJMNTZBDPRAGOQSUVWXY', globals).yMax,\n\t usDefaultChar: font.hasChar(' ') ? 32 : 0, // Use space as the default character, if available.\n\t usBreakChar: font.hasChar(' ') ? 32 : 0 // Use space as the break character, if available.\n\t });\n\n\t var hmtxTable = hmtx.make(font.glyphs);\n\t var cmapTable = cmap.make(font.glyphs);\n\n\t var englishFamilyName = font.getEnglishName('fontFamily');\n\t var englishStyleName = font.getEnglishName('fontSubfamily');\n\t var englishFullName = englishFamilyName + ' ' + englishStyleName;\n\t var postScriptName = font.getEnglishName('postScriptName');\n\t if (!postScriptName) {\n\t postScriptName = englishFamilyName.replace(/\\s/g, '') + '-' + englishStyleName;\n\t }\n\n\t var names = {};\n\t for (var n in font.names) {\n\t names[n] = font.names[n];\n\t }\n\n\t if (!names.uniqueID) {\n\t names.uniqueID = {en: font.getEnglishName('manufacturer') + ':' + englishFullName};\n\t }\n\n\t if (!names.postScriptName) {\n\t names.postScriptName = {en: postScriptName};\n\t }\n\n\t if (!names.preferredFamily) {\n\t names.preferredFamily = font.names.fontFamily;\n\t }\n\n\t if (!names.preferredSubfamily) {\n\t names.preferredSubfamily = font.names.fontSubfamily;\n\t }\n\n\t var languageTags = [];\n\t var nameTable = _name.make(names, languageTags);\n\t var ltagTable = (languageTags.length > 0 ? ltag.make(languageTags) : undefined);\n\n\t var postTable = post.make();\n\t var cffTable = cff.make(font.glyphs, {\n\t version: font.getEnglishName('version'),\n\t fullName: englishFullName,\n\t familyName: englishFamilyName,\n\t weightName: englishStyleName,\n\t postScriptName: postScriptName,\n\t unitsPerEm: font.unitsPerEm,\n\t fontBBox: [0, globals.yMin, globals.ascender, globals.advanceWidthMax]\n\t });\n\n\t var metaTable = (font.metas && Object.keys(font.metas).length > 0) ? meta.make(font.metas) : undefined;\n\n\t // The order does not matter because makeSfntTable() will sort them.\n\t var tables = [headTable, hheaTable, maxpTable, os2Table, nameTable, cmapTable, postTable, cffTable, hmtxTable];\n\t if (ltagTable) {\n\t tables.push(ltagTable);\n\t }\n\t // Optional tables\n\t if (font.tables.gsub) {\n\t tables.push(gsub.make(font.tables.gsub));\n\t }\n\t if (metaTable) {\n\t tables.push(metaTable);\n\t }\n\n\t var sfntTable = makeSfntTable(tables);\n\n\t // Compute the font's checkSum and store it in head.checkSumAdjustment.\n\t var bytes = sfntTable.encode();\n\t var checkSum = computeCheckSum(bytes);\n\t var tableFields = sfntTable.fields;\n\t var checkSumAdjusted = false;\n\t for (var i$1 = 0; i$1 < tableFields.length; i$1 += 1) {\n\t if (tableFields[i$1].name === 'head table') {\n\t tableFields[i$1].value.checkSumAdjustment = 0xB1B0AFBA - checkSum;\n\t checkSumAdjusted = true;\n\t break;\n\t }\n\t }\n\n\t if (!checkSumAdjusted) {\n\t throw new Error('Could not find head table with checkSum to adjust.');\n\t }\n\n\t return sfntTable;\n\t}\n\n\tvar sfnt = { make: makeSfntTable, fontToTable: fontToSfntTable, computeCheckSum: computeCheckSum };\n\n\t// The Layout object is the prototype of Substitution objects, and provides\n\n\tfunction searchTag(arr, tag) {\n\t /* jshint bitwise: false */\n\t var imin = 0;\n\t var imax = arr.length - 1;\n\t while (imin <= imax) {\n\t var imid = (imin + imax) >>> 1;\n\t var val = arr[imid].tag;\n\t if (val === tag) {\n\t return imid;\n\t } else if (val < tag) {\n\t imin = imid + 1;\n\t } else { imax = imid - 1; }\n\t }\n\t // Not found: return -1-insertion point\n\t return -imin - 1;\n\t}\n\n\tfunction binSearch(arr, value) {\n\t /* jshint bitwise: false */\n\t var imin = 0;\n\t var imax = arr.length - 1;\n\t while (imin <= imax) {\n\t var imid = (imin + imax) >>> 1;\n\t var val = arr[imid];\n\t if (val === value) {\n\t return imid;\n\t } else if (val < value) {\n\t imin = imid + 1;\n\t } else { imax = imid - 1; }\n\t }\n\t // Not found: return -1-insertion point\n\t return -imin - 1;\n\t}\n\n\t// binary search in a list of ranges (coverage, class definition)\n\tfunction searchRange(ranges, value) {\n\t // jshint bitwise: false\n\t var range;\n\t var imin = 0;\n\t var imax = ranges.length - 1;\n\t while (imin <= imax) {\n\t var imid = (imin + imax) >>> 1;\n\t range = ranges[imid];\n\t var start = range.start;\n\t if (start === value) {\n\t return range;\n\t } else if (start < value) {\n\t imin = imid + 1;\n\t } else { imax = imid - 1; }\n\t }\n\t if (imin > 0) {\n\t range = ranges[imin - 1];\n\t if (value > range.end) { return 0; }\n\t return range;\n\t }\n\t}\n\n\t/**\n\t * @exports opentype.Layout\n\t * @class\n\t */\n\tfunction Layout(font, tableName) {\n\t this.font = font;\n\t this.tableName = tableName;\n\t}\n\n\tLayout.prototype = {\n\n\t /**\n\t * Binary search an object by \"tag\" property\n\t * @instance\n\t * @function searchTag\n\t * @memberof opentype.Layout\n\t * @param {Array} arr\n\t * @param {string} tag\n\t * @return {number}\n\t */\n\t searchTag: searchTag,\n\n\t /**\n\t * Binary search in a list of numbers\n\t * @instance\n\t * @function binSearch\n\t * @memberof opentype.Layout\n\t * @param {Array} arr\n\t * @param {number} value\n\t * @return {number}\n\t */\n\t binSearch: binSearch,\n\n\t /**\n\t * Get or create the Layout table (GSUB, GPOS etc).\n\t * @param {boolean} create - Whether to create a new one.\n\t * @return {Object} The GSUB or GPOS table.\n\t */\n\t getTable: function(create) {\n\t var layout = this.font.tables[this.tableName];\n\t if (!layout && create) {\n\t layout = this.font.tables[this.tableName] = this.createDefaultTable();\n\t }\n\t return layout;\n\t },\n\n\t /**\n\t * Returns all scripts in the substitution table.\n\t * @instance\n\t * @return {Array}\n\t */\n\t getScriptNames: function() {\n\t var layout = this.getTable();\n\t if (!layout) { return []; }\n\t return layout.scripts.map(function(script) {\n\t return script.tag;\n\t });\n\t },\n\n\t /**\n\t * Returns the best bet for a script name.\n\t * Returns 'DFLT' if it exists.\n\t * If not, returns 'latn' if it exists.\n\t * If neither exist, returns undefined.\n\t */\n\t getDefaultScriptName: function() {\n\t var layout = this.getTable();\n\t if (!layout) { return; }\n\t var hasLatn = false;\n\t for (var i = 0; i < layout.scripts.length; i++) {\n\t var name = layout.scripts[i].tag;\n\t if (name === 'DFLT') { return name; }\n\t if (name === 'latn') { hasLatn = true; }\n\t }\n\t if (hasLatn) { return 'latn'; }\n\t },\n\n\t /**\n\t * Returns all LangSysRecords in the given script.\n\t * @instance\n\t * @param {string} [script='DFLT']\n\t * @param {boolean} create - forces the creation of this script table if it doesn't exist.\n\t * @return {Object} An object with tag and script properties.\n\t */\n\t getScriptTable: function(script, create) {\n\t var layout = this.getTable(create);\n\t if (layout) {\n\t script = script || 'DFLT';\n\t var scripts = layout.scripts;\n\t var pos = searchTag(layout.scripts, script);\n\t if (pos >= 0) {\n\t return scripts[pos].script;\n\t } else if (create) {\n\t var scr = {\n\t tag: script,\n\t script: {\n\t defaultLangSys: {reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: []},\n\t langSysRecords: []\n\t }\n\t };\n\t scripts.splice(-1 - pos, 0, scr);\n\t return scr.script;\n\t }\n\t }\n\t },\n\n\t /**\n\t * Returns a language system table\n\t * @instance\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dlft']\n\t * @param {boolean} create - forces the creation of this langSysTable if it doesn't exist.\n\t * @return {Object}\n\t */\n\t getLangSysTable: function(script, language, create) {\n\t var scriptTable = this.getScriptTable(script, create);\n\t if (scriptTable) {\n\t if (!language || language === 'dflt' || language === 'DFLT') {\n\t return scriptTable.defaultLangSys;\n\t }\n\t var pos = searchTag(scriptTable.langSysRecords, language);\n\t if (pos >= 0) {\n\t return scriptTable.langSysRecords[pos].langSys;\n\t } else if (create) {\n\t var langSysRecord = {\n\t tag: language,\n\t langSys: {reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: []}\n\t };\n\t scriptTable.langSysRecords.splice(-1 - pos, 0, langSysRecord);\n\t return langSysRecord.langSys;\n\t }\n\t }\n\t },\n\n\t /**\n\t * Get a specific feature table.\n\t * @instance\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dlft']\n\t * @param {string} feature - One of the codes listed at https://www.microsoft.com/typography/OTSPEC/featurelist.htm\n\t * @param {boolean} create - forces the creation of the feature table if it doesn't exist.\n\t * @return {Object}\n\t */\n\t getFeatureTable: function(script, language, feature, create) {\n\t var langSysTable = this.getLangSysTable(script, language, create);\n\t if (langSysTable) {\n\t var featureRecord;\n\t var featIndexes = langSysTable.featureIndexes;\n\t var allFeatures = this.font.tables[this.tableName].features;\n\t // The FeatureIndex array of indices is in arbitrary order,\n\t // even if allFeatures is sorted alphabetically by feature tag.\n\t for (var i = 0; i < featIndexes.length; i++) {\n\t featureRecord = allFeatures[featIndexes[i]];\n\t if (featureRecord.tag === feature) {\n\t return featureRecord.feature;\n\t }\n\t }\n\t if (create) {\n\t var index = allFeatures.length;\n\t // Automatic ordering of features would require to shift feature indexes in the script list.\n\t check.assert(index === 0 || feature >= allFeatures[index - 1].tag, 'Features must be added in alphabetical order.');\n\t featureRecord = {\n\t tag: feature,\n\t feature: { params: 0, lookupListIndexes: [] }\n\t };\n\t allFeatures.push(featureRecord);\n\t featIndexes.push(index);\n\t return featureRecord.feature;\n\t }\n\t }\n\t },\n\n\t /**\n\t * Get the lookup tables of a given type for a script/language/feature.\n\t * @instance\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dlft']\n\t * @param {string} feature - 4-letter feature code\n\t * @param {number} lookupType - 1 to 9\n\t * @param {boolean} create - forces the creation of the lookup table if it doesn't exist, with no subtables.\n\t * @return {Object[]}\n\t */\n\t getLookupTables: function(script, language, feature, lookupType, create) {\n\t var featureTable = this.getFeatureTable(script, language, feature, create);\n\t var tables = [];\n\t if (featureTable) {\n\t var lookupTable;\n\t var lookupListIndexes = featureTable.lookupListIndexes;\n\t var allLookups = this.font.tables[this.tableName].lookups;\n\t // lookupListIndexes are in no particular order, so use naive search.\n\t for (var i = 0; i < lookupListIndexes.length; i++) {\n\t lookupTable = allLookups[lookupListIndexes[i]];\n\t if (lookupTable.lookupType === lookupType) {\n\t tables.push(lookupTable);\n\t }\n\t }\n\t if (tables.length === 0 && create) {\n\t lookupTable = {\n\t lookupType: lookupType,\n\t lookupFlag: 0,\n\t subtables: [],\n\t markFilteringSet: undefined\n\t };\n\t var index = allLookups.length;\n\t allLookups.push(lookupTable);\n\t lookupListIndexes.push(index);\n\t return [lookupTable];\n\t }\n\t }\n\t return tables;\n\t },\n\n\t /**\n\t * Find a glyph in a class definition table\n\t * https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#class-definition-table\n\t * @param {object} classDefTable - an OpenType Layout class definition table\n\t * @param {number} glyphIndex - the index of the glyph to find\n\t * @returns {number} -1 if not found\n\t */\n\t getGlyphClass: function(classDefTable, glyphIndex) {\n\t switch (classDefTable.format) {\n\t case 1:\n\t if (classDefTable.startGlyph <= glyphIndex && glyphIndex < classDefTable.startGlyph + classDefTable.classes.length) {\n\t return classDefTable.classes[glyphIndex - classDefTable.startGlyph];\n\t }\n\t return 0;\n\t case 2:\n\t var range = searchRange(classDefTable.ranges, glyphIndex);\n\t return range ? range.classId : 0;\n\t }\n\t },\n\n\t /**\n\t * Find a glyph in a coverage table\n\t * https://docs.microsoft.com/en-us/typography/opentype/spec/chapter2#coverage-table\n\t * @param {object} coverageTable - an OpenType Layout coverage table\n\t * @param {number} glyphIndex - the index of the glyph to find\n\t * @returns {number} -1 if not found\n\t */\n\t getCoverageIndex: function(coverageTable, glyphIndex) {\n\t switch (coverageTable.format) {\n\t case 1:\n\t var index = binSearch(coverageTable.glyphs, glyphIndex);\n\t return index >= 0 ? index : -1;\n\t case 2:\n\t var range = searchRange(coverageTable.ranges, glyphIndex);\n\t return range ? range.index + glyphIndex - range.start : -1;\n\t }\n\t },\n\n\t /**\n\t * Returns the list of glyph indexes of a coverage table.\n\t * Format 1: the list is stored raw\n\t * Format 2: compact list as range records.\n\t * @instance\n\t * @param {Object} coverageTable\n\t * @return {Array}\n\t */\n\t expandCoverage: function(coverageTable) {\n\t if (coverageTable.format === 1) {\n\t return coverageTable.glyphs;\n\t } else {\n\t var glyphs = [];\n\t var ranges = coverageTable.ranges;\n\t for (var i = 0; i < ranges.length; i++) {\n\t var range = ranges[i];\n\t var start = range.start;\n\t var end = range.end;\n\t for (var j = start; j <= end; j++) {\n\t glyphs.push(j);\n\t }\n\t }\n\t return glyphs;\n\t }\n\t }\n\n\t};\n\n\t// The Position object provides utility methods to manipulate\n\n\t/**\n\t * @exports opentype.Position\n\t * @class\n\t * @extends opentype.Layout\n\t * @param {opentype.Font}\n\t * @constructor\n\t */\n\tfunction Position(font) {\n\t Layout.call(this, font, 'gpos');\n\t}\n\n\tPosition.prototype = Layout.prototype;\n\n\t/**\n\t * Init some data for faster and easier access later.\n\t */\n\tPosition.prototype.init = function() {\n\t var script = this.getDefaultScriptName();\n\t this.defaultKerningTables = this.getKerningTables(script);\n\t};\n\n\t/**\n\t * Find a glyph pair in a list of lookup tables of type 2 and retrieve the xAdvance kerning value.\n\t *\n\t * @param {integer} leftIndex - left glyph index\n\t * @param {integer} rightIndex - right glyph index\n\t * @returns {integer}\n\t */\n\tPosition.prototype.getKerningValue = function(kerningLookups, leftIndex, rightIndex) {\n\t var this$1 = this;\n\n\t for (var i = 0; i < kerningLookups.length; i++) {\n\t var subtables = kerningLookups[i].subtables;\n\t for (var j = 0; j < subtables.length; j++) {\n\t var subtable = subtables[j];\n\t var covIndex = this$1.getCoverageIndex(subtable.coverage, leftIndex);\n\t if (covIndex < 0) { continue; }\n\t switch (subtable.posFormat) {\n\t case 1:\n\t // Search Pair Adjustment Positioning Format 1\n\t var pairSet = subtable.pairSets[covIndex];\n\t for (var k = 0; k < pairSet.length; k++) {\n\t var pair = pairSet[k];\n\t if (pair.secondGlyph === rightIndex) {\n\t return pair.value1 && pair.value1.xAdvance || 0;\n\t }\n\t }\n\t break; // left glyph found, not right glyph - try next subtable\n\t case 2:\n\t // Search Pair Adjustment Positioning Format 2\n\t var class1 = this$1.getGlyphClass(subtable.classDef1, leftIndex);\n\t var class2 = this$1.getGlyphClass(subtable.classDef2, rightIndex);\n\t var pair$1 = subtable.classRecords[class1][class2];\n\t return pair$1.value1 && pair$1.value1.xAdvance || 0;\n\t }\n\t }\n\t }\n\t return 0;\n\t};\n\n\t/**\n\t * List all kerning lookup tables.\n\t *\n\t * @param {string} [script='DFLT'] - use font.position.getDefaultScriptName() for a better default value\n\t * @param {string} [language='dflt']\n\t * @return {object[]} The list of kerning lookup tables (may be empty), or undefined if there is no GPOS table (and we should use the kern table)\n\t */\n\tPosition.prototype.getKerningTables = function(script, language) {\n\t if (this.font.tables.gpos) {\n\t return this.getLookupTables(script, language, 'kern', 2);\n\t }\n\t};\n\n\t// The Substitution object provides utility methods to manipulate\n\n\t/**\n\t * @exports opentype.Substitution\n\t * @class\n\t * @extends opentype.Layout\n\t * @param {opentype.Font}\n\t * @constructor\n\t */\n\tfunction Substitution(font) {\n\t Layout.call(this, font, 'gsub');\n\t}\n\n\t// Check if 2 arrays of primitives are equal.\n\tfunction arraysEqual(ar1, ar2) {\n\t var n = ar1.length;\n\t if (n !== ar2.length) { return false; }\n\t for (var i = 0; i < n; i++) {\n\t if (ar1[i] !== ar2[i]) { return false; }\n\t }\n\t return true;\n\t}\n\n\t// Find the first subtable of a lookup table in a particular format.\n\tfunction getSubstFormat(lookupTable, format, defaultSubtable) {\n\t var subtables = lookupTable.subtables;\n\t for (var i = 0; i < subtables.length; i++) {\n\t var subtable = subtables[i];\n\t if (subtable.substFormat === format) {\n\t return subtable;\n\t }\n\t }\n\t if (defaultSubtable) {\n\t subtables.push(defaultSubtable);\n\t return defaultSubtable;\n\t }\n\t return undefined;\n\t}\n\n\tSubstitution.prototype = Layout.prototype;\n\n\t/**\n\t * Create a default GSUB table.\n\t * @return {Object} gsub - The GSUB table.\n\t */\n\tSubstitution.prototype.createDefaultTable = function() {\n\t // Generate a default empty GSUB table with just a DFLT script and dflt lang sys.\n\t return {\n\t version: 1,\n\t scripts: [{\n\t tag: 'DFLT',\n\t script: {\n\t defaultLangSys: { reserved: 0, reqFeatureIndex: 0xffff, featureIndexes: [] },\n\t langSysRecords: []\n\t }\n\t }],\n\t features: [],\n\t lookups: []\n\t };\n\t};\n\n\t/**\n\t * List all single substitutions (lookup type 1) for a given script, language, and feature.\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t * @param {string} feature - 4-character feature name ('aalt', 'salt', 'ss01'...)\n\t * @return {Array} substitutions - The list of substitutions.\n\t */\n\tSubstitution.prototype.getSingle = function(feature, script, language) {\n\t var this$1 = this;\n\n\t var substitutions = [];\n\t var lookupTables = this.getLookupTables(script, language, feature, 1);\n\t for (var idx = 0; idx < lookupTables.length; idx++) {\n\t var subtables = lookupTables[idx].subtables;\n\t for (var i = 0; i < subtables.length; i++) {\n\t var subtable = subtables[i];\n\t var glyphs = this$1.expandCoverage(subtable.coverage);\n\t var j = (void 0);\n\t if (subtable.substFormat === 1) {\n\t var delta = subtable.deltaGlyphId;\n\t for (j = 0; j < glyphs.length; j++) {\n\t var glyph = glyphs[j];\n\t substitutions.push({ sub: glyph, by: glyph + delta });\n\t }\n\t } else {\n\t var substitute = subtable.substitute;\n\t for (j = 0; j < glyphs.length; j++) {\n\t substitutions.push({ sub: glyphs[j], by: substitute[j] });\n\t }\n\t }\n\t }\n\t }\n\t return substitutions;\n\t};\n\n\t/**\n\t * List all alternates (lookup type 3) for a given script, language, and feature.\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t * @param {string} feature - 4-character feature name ('aalt', 'salt'...)\n\t * @return {Array} alternates - The list of alternates\n\t */\n\tSubstitution.prototype.getAlternates = function(feature, script, language) {\n\t var this$1 = this;\n\n\t var alternates = [];\n\t var lookupTables = this.getLookupTables(script, language, feature, 3);\n\t for (var idx = 0; idx < lookupTables.length; idx++) {\n\t var subtables = lookupTables[idx].subtables;\n\t for (var i = 0; i < subtables.length; i++) {\n\t var subtable = subtables[i];\n\t var glyphs = this$1.expandCoverage(subtable.coverage);\n\t var alternateSets = subtable.alternateSets;\n\t for (var j = 0; j < glyphs.length; j++) {\n\t alternates.push({ sub: glyphs[j], by: alternateSets[j] });\n\t }\n\t }\n\t }\n\t return alternates;\n\t};\n\n\t/**\n\t * List all ligatures (lookup type 4) for a given script, language, and feature.\n\t * The result is an array of ligature objects like { sub: [ids], by: id }\n\t * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...)\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t * @return {Array} ligatures - The list of ligatures.\n\t */\n\tSubstitution.prototype.getLigatures = function(feature, script, language) {\n\t var this$1 = this;\n\n\t var ligatures = [];\n\t var lookupTables = this.getLookupTables(script, language, feature, 4);\n\t for (var idx = 0; idx < lookupTables.length; idx++) {\n\t var subtables = lookupTables[idx].subtables;\n\t for (var i = 0; i < subtables.length; i++) {\n\t var subtable = subtables[i];\n\t var glyphs = this$1.expandCoverage(subtable.coverage);\n\t var ligatureSets = subtable.ligatureSets;\n\t for (var j = 0; j < glyphs.length; j++) {\n\t var startGlyph = glyphs[j];\n\t var ligSet = ligatureSets[j];\n\t for (var k = 0; k < ligSet.length; k++) {\n\t var lig = ligSet[k];\n\t ligatures.push({\n\t sub: [startGlyph].concat(lig.components),\n\t by: lig.ligGlyph\n\t });\n\t }\n\t }\n\t }\n\t }\n\t return ligatures;\n\t};\n\n\t/**\n\t * Add or modify a single substitution (lookup type 1)\n\t * Format 2, more flexible, is always used.\n\t * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...)\n\t * @param {Object} substitution - { sub: id, delta: number } for format 1 or { sub: id, by: id } for format 2.\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t */\n\tSubstitution.prototype.addSingle = function(feature, substitution, script, language) {\n\t var lookupTable = this.getLookupTables(script, language, feature, 1, true)[0];\n\t var subtable = getSubstFormat(lookupTable, 2, { // lookup type 1 subtable, format 2, coverage format 1\n\t substFormat: 2,\n\t coverage: {format: 1, glyphs: []},\n\t substitute: []\n\t });\n\t check.assert(subtable.coverage.format === 1, 'Ligature: unable to modify coverage table format ' + subtable.coverage.format);\n\t var coverageGlyph = substitution.sub;\n\t var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph);\n\t if (pos < 0) {\n\t pos = -1 - pos;\n\t subtable.coverage.glyphs.splice(pos, 0, coverageGlyph);\n\t subtable.substitute.splice(pos, 0, 0);\n\t }\n\t subtable.substitute[pos] = substitution.by;\n\t};\n\n\t/**\n\t * Add or modify an alternate substitution (lookup type 1)\n\t * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...)\n\t * @param {Object} substitution - { sub: id, by: [ids] }\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t */\n\tSubstitution.prototype.addAlternate = function(feature, substitution, script, language) {\n\t var lookupTable = this.getLookupTables(script, language, feature, 3, true)[0];\n\t var subtable = getSubstFormat(lookupTable, 1, { // lookup type 3 subtable, format 1, coverage format 1\n\t substFormat: 1,\n\t coverage: {format: 1, glyphs: []},\n\t alternateSets: []\n\t });\n\t check.assert(subtable.coverage.format === 1, 'Ligature: unable to modify coverage table format ' + subtable.coverage.format);\n\t var coverageGlyph = substitution.sub;\n\t var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph);\n\t if (pos < 0) {\n\t pos = -1 - pos;\n\t subtable.coverage.glyphs.splice(pos, 0, coverageGlyph);\n\t subtable.alternateSets.splice(pos, 0, 0);\n\t }\n\t subtable.alternateSets[pos] = substitution.by;\n\t};\n\n\t/**\n\t * Add a ligature (lookup type 4)\n\t * Ligatures with more components must be stored ahead of those with fewer components in order to be found\n\t * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...)\n\t * @param {Object} ligature - { sub: [ids], by: id }\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t */\n\tSubstitution.prototype.addLigature = function(feature, ligature, script, language) {\n\t var lookupTable = this.getLookupTables(script, language, feature, 4, true)[0];\n\t var subtable = lookupTable.subtables[0];\n\t if (!subtable) {\n\t subtable = { // lookup type 4 subtable, format 1, coverage format 1\n\t substFormat: 1,\n\t coverage: { format: 1, glyphs: [] },\n\t ligatureSets: []\n\t };\n\t lookupTable.subtables[0] = subtable;\n\t }\n\t check.assert(subtable.coverage.format === 1, 'Ligature: unable to modify coverage table format ' + subtable.coverage.format);\n\t var coverageGlyph = ligature.sub[0];\n\t var ligComponents = ligature.sub.slice(1);\n\t var ligatureTable = {\n\t ligGlyph: ligature.by,\n\t components: ligComponents\n\t };\n\t var pos = this.binSearch(subtable.coverage.glyphs, coverageGlyph);\n\t if (pos >= 0) {\n\t // ligatureSet already exists\n\t var ligatureSet = subtable.ligatureSets[pos];\n\t for (var i = 0; i < ligatureSet.length; i++) {\n\t // If ligature already exists, return.\n\t if (arraysEqual(ligatureSet[i].components, ligComponents)) {\n\t return;\n\t }\n\t }\n\t // ligature does not exist: add it.\n\t ligatureSet.push(ligatureTable);\n\t } else {\n\t // Create a new ligatureSet and add coverage for the first glyph.\n\t pos = -1 - pos;\n\t subtable.coverage.glyphs.splice(pos, 0, coverageGlyph);\n\t subtable.ligatureSets.splice(pos, 0, [ligatureTable]);\n\t }\n\t};\n\n\t/**\n\t * List all feature data for a given script and language.\n\t * @param {string} feature - 4-letter feature name\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t * @return {Array} substitutions - The list of substitutions.\n\t */\n\tSubstitution.prototype.getFeature = function(feature, script, language) {\n\t if (/ss\\d\\d/.test(feature)) {\n\t // ss01 - ss20\n\t return this.getSingle(feature, script, language);\n\t }\n\t switch (feature) {\n\t case 'aalt':\n\t case 'salt':\n\t return this.getSingle(feature, script, language)\n\t .concat(this.getAlternates(feature, script, language));\n\t case 'dlig':\n\t case 'liga':\n\t case 'rlig': return this.getLigatures(feature, script, language);\n\t }\n\t return undefined;\n\t};\n\n\t/**\n\t * Add a substitution to a feature for a given script and language.\n\t * @param {string} feature - 4-letter feature name\n\t * @param {Object} sub - the substitution to add (an object like { sub: id or [ids], by: id or [ids] })\n\t * @param {string} [script='DFLT']\n\t * @param {string} [language='dflt']\n\t */\n\tSubstitution.prototype.add = function(feature, sub, script, language) {\n\t if (/ss\\d\\d/.test(feature)) {\n\t // ss01 - ss20\n\t return this.addSingle(feature, sub, script, language);\n\t }\n\t switch (feature) {\n\t case 'aalt':\n\t case 'salt':\n\t if (typeof sub.by === 'number') {\n\t return this.addSingle(feature, sub, script, language);\n\t }\n\t return this.addAlternate(feature, sub, script, language);\n\t case 'dlig':\n\t case 'liga':\n\t case 'rlig':\n\t return this.addLigature(feature, sub, script, language);\n\t }\n\t return undefined;\n\t};\n\n\tfunction isBrowser() {\n\t return typeof window !== 'undefined';\n\t}\n\n\tfunction nodeBufferToArrayBuffer(buffer) {\n\t var ab = new ArrayBuffer(buffer.length);\n\t var view = new Uint8Array(ab);\n\t for (var i = 0; i < buffer.length; ++i) {\n\t view[i] = buffer[i];\n\t }\n\n\t return ab;\n\t}\n\n\tfunction arrayBufferToNodeBuffer(ab) {\n\t var buffer = new Buffer(ab.byteLength);\n\t var view = new Uint8Array(ab);\n\t for (var i = 0; i < buffer.length; ++i) {\n\t buffer[i] = view[i];\n\t }\n\n\t return buffer;\n\t}\n\n\tfunction checkArgument(expression, message) {\n\t if (!expression) {\n\t throw message;\n\t }\n\t}\n\n\t// The `glyf` table describes the glyphs in TrueType outline format.\n\n\t// Parse the coordinate data for a glyph.\n\tfunction parseGlyphCoordinate(p, flag, previousValue, shortVectorBitMask, sameBitMask) {\n\t var v;\n\t if ((flag & shortVectorBitMask) > 0) {\n\t // The coordinate is 1 byte long.\n\t v = p.parseByte();\n\t // The `same` bit is re-used for short values to signify the sign of the value.\n\t if ((flag & sameBitMask) === 0) {\n\t v = -v;\n\t }\n\n\t v = previousValue + v;\n\t } else {\n\t // The coordinate is 2 bytes long.\n\t // If the `same` bit is set, the coordinate is the same as the previous coordinate.\n\t if ((flag & sameBitMask) > 0) {\n\t v = previousValue;\n\t } else {\n\t // Parse the coordinate as a signed 16-bit delta value.\n\t v = previousValue + p.parseShort();\n\t }\n\t }\n\n\t return v;\n\t}\n\n\t// Parse a TrueType glyph.\n\tfunction parseGlyph(glyph, data, start) {\n\t var p = new parse.Parser(data, start);\n\t glyph.numberOfContours = p.parseShort();\n\t glyph._xMin = p.parseShort();\n\t glyph._yMin = p.parseShort();\n\t glyph._xMax = p.parseShort();\n\t glyph._yMax = p.parseShort();\n\t var flags;\n\t var flag;\n\n\t if (glyph.numberOfContours > 0) {\n\t // This glyph is not a composite.\n\t var endPointIndices = glyph.endPointIndices = [];\n\t for (var i = 0; i < glyph.numberOfContours; i += 1) {\n\t endPointIndices.push(p.parseUShort());\n\t }\n\n\t glyph.instructionLength = p.parseUShort();\n\t glyph.instructions = [];\n\t for (var i$1 = 0; i$1 < glyph.instructionLength; i$1 += 1) {\n\t glyph.instructions.push(p.parseByte());\n\t }\n\n\t var numberOfCoordinates = endPointIndices[endPointIndices.length - 1] + 1;\n\t flags = [];\n\t for (var i$2 = 0; i$2 < numberOfCoordinates; i$2 += 1) {\n\t flag = p.parseByte();\n\t flags.push(flag);\n\t // If bit 3 is set, we repeat this flag n times, where n is the next byte.\n\t if ((flag & 8) > 0) {\n\t var repeatCount = p.parseByte();\n\t for (var j = 0; j < repeatCount; j += 1) {\n\t flags.push(flag);\n\t i$2 += 1;\n\t }\n\t }\n\t }\n\n\t check.argument(flags.length === numberOfCoordinates, 'Bad flags.');\n\n\t if (endPointIndices.length > 0) {\n\t var points = [];\n\t var point;\n\t // X/Y coordinates are relative to the previous point, except for the first point which is relative to 0,0.\n\t if (numberOfCoordinates > 0) {\n\t for (var i$3 = 0; i$3 < numberOfCoordinates; i$3 += 1) {\n\t flag = flags[i$3];\n\t point = {};\n\t point.onCurve = !!(flag & 1);\n\t point.lastPointOfContour = endPointIndices.indexOf(i$3) >= 0;\n\t points.push(point);\n\t }\n\n\t var px = 0;\n\t for (var i$4 = 0; i$4 < numberOfCoordinates; i$4 += 1) {\n\t flag = flags[i$4];\n\t point = points[i$4];\n\t point.x = parseGlyphCoordinate(p, flag, px, 2, 16);\n\t px = point.x;\n\t }\n\n\t var py = 0;\n\t for (var i$5 = 0; i$5 < numberOfCoordinates; i$5 += 1) {\n\t flag = flags[i$5];\n\t point = points[i$5];\n\t point.y = parseGlyphCoordinate(p, flag, py, 4, 32);\n\t py = point.y;\n\t }\n\t }\n\n\t glyph.points = points;\n\t } else {\n\t glyph.points = [];\n\t }\n\t } else if (glyph.numberOfContours === 0) {\n\t glyph.points = [];\n\t } else {\n\t glyph.isComposite = true;\n\t glyph.points = [];\n\t glyph.components = [];\n\t var moreComponents = true;\n\t while (moreComponents) {\n\t flags = p.parseUShort();\n\t var component = {\n\t glyphIndex: p.parseUShort(),\n\t xScale: 1,\n\t scale01: 0,\n\t scale10: 0,\n\t yScale: 1,\n\t dx: 0,\n\t dy: 0\n\t };\n\t if ((flags & 1) > 0) {\n\t // The arguments are words\n\t if ((flags & 2) > 0) {\n\t // values are offset\n\t component.dx = p.parseShort();\n\t component.dy = p.parseShort();\n\t } else {\n\t // values are matched points\n\t component.matchedPoints = [p.parseUShort(), p.parseUShort()];\n\t }\n\n\t } else {\n\t // The arguments are bytes\n\t if ((flags & 2) > 0) {\n\t // values are offset\n\t component.dx = p.parseChar();\n\t component.dy = p.parseChar();\n\t } else {\n\t // values are matched points\n\t component.matchedPoints = [p.parseByte(), p.parseByte()];\n\t }\n\t }\n\n\t if ((flags & 8) > 0) {\n\t // We have a scale\n\t component.xScale = component.yScale = p.parseF2Dot14();\n\t } else if ((flags & 64) > 0) {\n\t // We have an X / Y scale\n\t component.xScale = p.parseF2Dot14();\n\t component.yScale = p.parseF2Dot14();\n\t } else if ((flags & 128) > 0) {\n\t // We have a 2x2 transformation\n\t component.xScale = p.parseF2Dot14();\n\t component.scale01 = p.parseF2Dot14();\n\t component.scale10 = p.parseF2Dot14();\n\t component.yScale = p.parseF2Dot14();\n\t }\n\n\t glyph.components.push(component);\n\t moreComponents = !!(flags & 32);\n\t }\n\t if (flags & 0x100) {\n\t // We have instructions\n\t glyph.instructionLength = p.parseUShort();\n\t glyph.instructions = [];\n\t for (var i$6 = 0; i$6 < glyph.instructionLength; i$6 += 1) {\n\t glyph.instructions.push(p.parseByte());\n\t }\n\t }\n\t }\n\t}\n\n\t// Transform an array of points and return a new array.\n\tfunction transformPoints(points, transform) {\n\t var newPoints = [];\n\t for (var i = 0; i < points.length; i += 1) {\n\t var pt = points[i];\n\t var newPt = {\n\t x: transform.xScale * pt.x + transform.scale01 * pt.y + transform.dx,\n\t y: transform.scale10 * pt.x + transform.yScale * pt.y + transform.dy,\n\t onCurve: pt.onCurve,\n\t lastPointOfContour: pt.lastPointOfContour\n\t };\n\t newPoints.push(newPt);\n\t }\n\n\t return newPoints;\n\t}\n\n\tfunction getContours(points) {\n\t var contours = [];\n\t var currentContour = [];\n\t for (var i = 0; i < points.length; i += 1) {\n\t var pt = points[i];\n\t currentContour.push(pt);\n\t if (pt.lastPointOfContour) {\n\t contours.push(currentContour);\n\t currentContour = [];\n\t }\n\t }\n\n\t check.argument(currentContour.length === 0, 'There are still points left in the current contour.');\n\t return contours;\n\t}\n\n\t// Convert the TrueType glyph outline to a Path.\n\tfunction getPath(points) {\n\t var p = new Path();\n\t if (!points) {\n\t return p;\n\t }\n\n\t var contours = getContours(points);\n\n\t for (var contourIndex = 0; contourIndex < contours.length; ++contourIndex) {\n\t var contour = contours[contourIndex];\n\n\t var prev = null;\n\t var curr = contour[contour.length - 1];\n\t var next = contour[0];\n\n\t if (curr.onCurve) {\n\t p.moveTo(curr.x, curr.y);\n\t } else {\n\t if (next.onCurve) {\n\t p.moveTo(next.x, next.y);\n\t } else {\n\t // If both first and last points are off-curve, start at their middle.\n\t var start = {x: (curr.x + next.x) * 0.5, y: (curr.y + next.y) * 0.5};\n\t p.moveTo(start.x, start.y);\n\t }\n\t }\n\n\t for (var i = 0; i < contour.length; ++i) {\n\t prev = curr;\n\t curr = next;\n\t next = contour[(i + 1) % contour.length];\n\n\t if (curr.onCurve) {\n\t // This is a straight line.\n\t p.lineTo(curr.x, curr.y);\n\t } else {\n\t var prev2 = prev;\n\t var next2 = next;\n\n\t if (!prev.onCurve) {\n\t prev2 = { x: (curr.x + prev.x) * 0.5, y: (curr.y + prev.y) * 0.5 };\n\t }\n\n\t if (!next.onCurve) {\n\t next2 = { x: (curr.x + next.x) * 0.5, y: (curr.y + next.y) * 0.5 };\n\t }\n\n\t p.quadraticCurveTo(curr.x, curr.y, next2.x, next2.y);\n\t }\n\t }\n\n\t p.closePath();\n\t }\n\t return p;\n\t}\n\n\tfunction buildPath(glyphs, glyph) {\n\t if (glyph.isComposite) {\n\t for (var j = 0; j < glyph.components.length; j += 1) {\n\t var component = glyph.components[j];\n\t var componentGlyph = glyphs.get(component.glyphIndex);\n\t // Force the ttfGlyphLoader to parse the glyph.\n\t componentGlyph.getPath();\n\t if (componentGlyph.points) {\n\t var transformedPoints = (void 0);\n\t if (component.matchedPoints === undefined) {\n\t // component positioned by offset\n\t transformedPoints = transformPoints(componentGlyph.points, component);\n\t } else {\n\t // component positioned by matched points\n\t if ((component.matchedPoints[0] > glyph.points.length - 1) ||\n\t (component.matchedPoints[1] > componentGlyph.points.length - 1)) {\n\t throw Error('Matched points out of range in ' + glyph.name);\n\t }\n\t var firstPt = glyph.points[component.matchedPoints[0]];\n\t var secondPt = componentGlyph.points[component.matchedPoints[1]];\n\t var transform = {\n\t xScale: component.xScale, scale01: component.scale01,\n\t scale10: component.scale10, yScale: component.yScale,\n\t dx: 0, dy: 0\n\t };\n\t secondPt = transformPoints([secondPt], transform)[0];\n\t transform.dx = firstPt.x - secondPt.x;\n\t transform.dy = firstPt.y - secondPt.y;\n\t transformedPoints = transformPoints(componentGlyph.points, transform);\n\t }\n\t glyph.points = glyph.points.concat(transformedPoints);\n\t }\n\t }\n\t }\n\n\t return getPath(glyph.points);\n\t}\n\n\t// Parse all the glyphs according to the offsets from the `loca` table.\n\tfunction parseGlyfTable(data, start, loca, font) {\n\t var glyphs = new glyphset.GlyphSet(font);\n\n\t // The last element of the loca table is invalid.\n\t for (var i = 0; i < loca.length - 1; i += 1) {\n\t var offset = loca[i];\n\t var nextOffset = loca[i + 1];\n\t if (offset !== nextOffset) {\n\t glyphs.push(i, glyphset.ttfGlyphLoader(font, i, parseGlyph, data, start + offset, buildPath));\n\t } else {\n\t glyphs.push(i, glyphset.glyphLoader(font, i));\n\t }\n\t }\n\n\t return glyphs;\n\t}\n\n\tvar glyf = { getPath: getPath, parse: parseGlyfTable };\n\n\t/* A TrueType font hinting interpreter.\n\t*\n\t* (c) 2017 Axel Kittenberger\n\t*\n\t* This interpreter has been implemented according to this documentation:\n\t* https://developer.apple.com/fonts/TrueType-Reference-Manual/RM05/Chap5.html\n\t*\n\t* According to the documentation F24DOT6 values are used for pixels.\n\t* That means calculation is 1/64 pixel accurate and uses integer operations.\n\t* However, Javascript has floating point operations by default and only\n\t* those are available. One could make a case to simulate the 1/64 accuracy\n\t* exactly by truncating after every division operation\n\t* (for example with << 0) to get pixel exactly results as other TrueType\n\t* implementations. It may make sense since some fonts are pixel optimized\n\t* by hand using DELTAP instructions. The current implementation doesn't\n\t* and rather uses full floating point precision.\n\t*\n\t* xScale, yScale and rotation is currently ignored.\n\t*\n\t* A few non-trivial instructions are missing as I didn't encounter yet\n\t* a font that used them to test a possible implementation.\n\t*\n\t* Some fonts seem to use undocumented features regarding the twilight zone.\n\t* Only some of them are implemented as they were encountered.\n\t*\n\t* The exports.DEBUG statements are removed on the minified distribution file.\n\t*/\n\n\tvar instructionTable;\n\tvar exec;\n\tvar execGlyph;\n\tvar execComponent;\n\n\t/*\n\t* Creates a hinting object.\n\t*\n\t* There ought to be exactly one\n\t* for each truetype font that is used for hinting.\n\t*/\n\tfunction Hinting(font) {\n\t // the font this hinting object is for\n\t this.font = font;\n\n\t this.getCommands = function (hPoints) {\n\t return glyf.getPath(hPoints).commands;\n\t };\n\n\t // cached states\n\t this._fpgmState =\n\t this._prepState =\n\t undefined;\n\n\t // errorState\n\t // 0 ... all okay\n\t // 1 ... had an error in a glyf,\n\t // continue working but stop spamming\n\t // the console\n\t // 2 ... error at prep, stop hinting at this ppem\n\t // 3 ... error at fpeg, stop hinting for this font at all\n\t this._errorState = 0;\n\t}\n\n\t/*\n\t* Not rounding.\n\t*/\n\tfunction roundOff(v) {\n\t return v;\n\t}\n\n\t/*\n\t* Rounding to grid.\n\t*/\n\tfunction roundToGrid(v) {\n\t //Rounding in TT is supposed to \"symmetrical around zero\"\n\t return Math.sign(v) * Math.round(Math.abs(v));\n\t}\n\n\t/*\n\t* Rounding to double grid.\n\t*/\n\tfunction roundToDoubleGrid(v) {\n\t return Math.sign(v) * Math.round(Math.abs(v * 2)) / 2;\n\t}\n\n\t/*\n\t* Rounding to half grid.\n\t*/\n\tfunction roundToHalfGrid(v) {\n\t return Math.sign(v) * (Math.round(Math.abs(v) + 0.5) - 0.5);\n\t}\n\n\t/*\n\t* Rounding to up to grid.\n\t*/\n\tfunction roundUpToGrid(v) {\n\t return Math.sign(v) * Math.ceil(Math.abs(v));\n\t}\n\n\t/*\n\t* Rounding to down to grid.\n\t*/\n\tfunction roundDownToGrid(v) {\n\t return Math.sign(v) * Math.floor(Math.abs(v));\n\t}\n\n\t/*\n\t* Super rounding.\n\t*/\n\tvar roundSuper = function (v) {\n\t var period = this.srPeriod;\n\t var phase = this.srPhase;\n\t var threshold = this.srThreshold;\n\t var sign = 1;\n\n\t if (v < 0) {\n\t v = -v;\n\t sign = -1;\n\t }\n\n\t v += threshold - phase;\n\n\t v = Math.trunc(v / period) * period;\n\n\t v += phase;\n\n\t // according to http://xgridfit.sourceforge.net/round.html\n\t if (v < 0) { return phase * sign; }\n\n\t return v * sign;\n\t};\n\n\t/*\n\t* Unit vector of x-axis.\n\t*/\n\tvar xUnitVector = {\n\t x: 1,\n\n\t y: 0,\n\n\t axis: 'x',\n\n\t // Gets the projected distance between two points.\n\t // o1/o2 ... if true, respective original position is used.\n\t distance: function (p1, p2, o1, o2) {\n\t return (o1 ? p1.xo : p1.x) - (o2 ? p2.xo : p2.x);\n\t },\n\n\t // Moves point p so the moved position has the same relative\n\t // position to the moved positions of rp1 and rp2 than the\n\t // original positions had.\n\t //\n\t // See APPENDIX on INTERPOLATE at the bottom of this file.\n\t interpolate: function (p, rp1, rp2, pv) {\n\t var do1;\n\t var do2;\n\t var doa1;\n\t var doa2;\n\t var dm1;\n\t var dm2;\n\t var dt;\n\n\t if (!pv || pv === this) {\n\t do1 = p.xo - rp1.xo;\n\t do2 = p.xo - rp2.xo;\n\t dm1 = rp1.x - rp1.xo;\n\t dm2 = rp2.x - rp2.xo;\n\t doa1 = Math.abs(do1);\n\t doa2 = Math.abs(do2);\n\t dt = doa1 + doa2;\n\n\t if (dt === 0) {\n\t p.x = p.xo + (dm1 + dm2) / 2;\n\t return;\n\t }\n\n\t p.x = p.xo + (dm1 * doa2 + dm2 * doa1) / dt;\n\t return;\n\t }\n\n\t do1 = pv.distance(p, rp1, true, true);\n\t do2 = pv.distance(p, rp2, true, true);\n\t dm1 = pv.distance(rp1, rp1, false, true);\n\t dm2 = pv.distance(rp2, rp2, false, true);\n\t doa1 = Math.abs(do1);\n\t doa2 = Math.abs(do2);\n\t dt = doa1 + doa2;\n\n\t if (dt === 0) {\n\t xUnitVector.setRelative(p, p, (dm1 + dm2) / 2, pv, true);\n\t return;\n\t }\n\n\t xUnitVector.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true);\n\t },\n\n\t // Slope of line normal to this\n\t normalSlope: Number.NEGATIVE_INFINITY,\n\n\t // Sets the point 'p' relative to point 'rp'\n\t // by the distance 'd'.\n\t //\n\t // See APPENDIX on SETRELATIVE at the bottom of this file.\n\t //\n\t // p ... point to set\n\t // rp ... reference point\n\t // d ... distance on projection vector\n\t // pv ... projection vector (undefined = this)\n\t // org ... if true, uses the original position of rp as reference.\n\t setRelative: function (p, rp, d, pv, org) {\n\t if (!pv || pv === this) {\n\t p.x = (org ? rp.xo : rp.x) + d;\n\t return;\n\t }\n\n\t var rpx = org ? rp.xo : rp.x;\n\t var rpy = org ? rp.yo : rp.y;\n\t var rpdx = rpx + d * pv.x;\n\t var rpdy = rpy + d * pv.y;\n\n\t p.x = rpdx + (p.y - rpdy) / pv.normalSlope;\n\t },\n\n\t // Slope of vector line.\n\t slope: 0,\n\n\t // Touches the point p.\n\t touch: function (p) {\n\t p.xTouched = true;\n\t },\n\n\t // Tests if a point p is touched.\n\t touched: function (p) {\n\t return p.xTouched;\n\t },\n\n\t // Untouches the point p.\n\t untouch: function (p) {\n\t p.xTouched = false;\n\t }\n\t};\n\n\t/*\n\t* Unit vector of y-axis.\n\t*/\n\tvar yUnitVector = {\n\t x: 0,\n\n\t y: 1,\n\n\t axis: 'y',\n\n\t // Gets the projected distance between two points.\n\t // o1/o2 ... if true, respective original position is used.\n\t distance: function (p1, p2, o1, o2) {\n\t return (o1 ? p1.yo : p1.y) - (o2 ? p2.yo : p2.y);\n\t },\n\n\t // Moves point p so the moved position has the same relative\n\t // position to the moved positions of rp1 and rp2 than the\n\t // original positions had.\n\t //\n\t // See APPENDIX on INTERPOLATE at the bottom of this file.\n\t interpolate: function (p, rp1, rp2, pv) {\n\t var do1;\n\t var do2;\n\t var doa1;\n\t var doa2;\n\t var dm1;\n\t var dm2;\n\t var dt;\n\n\t if (!pv || pv === this) {\n\t do1 = p.yo - rp1.yo;\n\t do2 = p.yo - rp2.yo;\n\t dm1 = rp1.y - rp1.yo;\n\t dm2 = rp2.y - rp2.yo;\n\t doa1 = Math.abs(do1);\n\t doa2 = Math.abs(do2);\n\t dt = doa1 + doa2;\n\n\t if (dt === 0) {\n\t p.y = p.yo + (dm1 + dm2) / 2;\n\t return;\n\t }\n\n\t p.y = p.yo + (dm1 * doa2 + dm2 * doa1) / dt;\n\t return;\n\t }\n\n\t do1 = pv.distance(p, rp1, true, true);\n\t do2 = pv.distance(p, rp2, true, true);\n\t dm1 = pv.distance(rp1, rp1, false, true);\n\t dm2 = pv.distance(rp2, rp2, false, true);\n\t doa1 = Math.abs(do1);\n\t doa2 = Math.abs(do2);\n\t dt = doa1 + doa2;\n\n\t if (dt === 0) {\n\t yUnitVector.setRelative(p, p, (dm1 + dm2) / 2, pv, true);\n\t return;\n\t }\n\n\t yUnitVector.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true);\n\t },\n\n\t // Slope of line normal to this.\n\t normalSlope: 0,\n\n\t // Sets the point 'p' relative to point 'rp'\n\t // by the distance 'd'\n\t //\n\t // See APPENDIX on SETRELATIVE at the bottom of this file.\n\t //\n\t // p ... point to set\n\t // rp ... reference point\n\t // d ... distance on projection vector\n\t // pv ... projection vector (undefined = this)\n\t // org ... if true, uses the original position of rp as reference.\n\t setRelative: function (p, rp, d, pv, org) {\n\t if (!pv || pv === this) {\n\t p.y = (org ? rp.yo : rp.y) + d;\n\t return;\n\t }\n\n\t var rpx = org ? rp.xo : rp.x;\n\t var rpy = org ? rp.yo : rp.y;\n\t var rpdx = rpx + d * pv.x;\n\t var rpdy = rpy + d * pv.y;\n\n\t p.y = rpdy + pv.normalSlope * (p.x - rpdx);\n\t },\n\n\t // Slope of vector line.\n\t slope: Number.POSITIVE_INFINITY,\n\n\t // Touches the point p.\n\t touch: function (p) {\n\t p.yTouched = true;\n\t },\n\n\t // Tests if a point p is touched.\n\t touched: function (p) {\n\t return p.yTouched;\n\t },\n\n\t // Untouches the point p.\n\t untouch: function (p) {\n\t p.yTouched = false;\n\t }\n\t};\n\n\tObject.freeze(xUnitVector);\n\tObject.freeze(yUnitVector);\n\n\t/*\n\t* Creates a unit vector that is not x- or y-axis.\n\t*/\n\tfunction UnitVector(x, y) {\n\t this.x = x;\n\t this.y = y;\n\t this.axis = undefined;\n\t this.slope = y / x;\n\t this.normalSlope = -x / y;\n\t Object.freeze(this);\n\t}\n\n\t/*\n\t* Gets the projected distance between two points.\n\t* o1/o2 ... if true, respective original position is used.\n\t*/\n\tUnitVector.prototype.distance = function(p1, p2, o1, o2) {\n\t return (\n\t this.x * xUnitVector.distance(p1, p2, o1, o2) +\n\t this.y * yUnitVector.distance(p1, p2, o1, o2)\n\t );\n\t};\n\n\t/*\n\t* Moves point p so the moved position has the same relative\n\t* position to the moved positions of rp1 and rp2 than the\n\t* original positions had.\n\t*\n\t* See APPENDIX on INTERPOLATE at the bottom of this file.\n\t*/\n\tUnitVector.prototype.interpolate = function(p, rp1, rp2, pv) {\n\t var dm1;\n\t var dm2;\n\t var do1;\n\t var do2;\n\t var doa1;\n\t var doa2;\n\t var dt;\n\n\t do1 = pv.distance(p, rp1, true, true);\n\t do2 = pv.distance(p, rp2, true, true);\n\t dm1 = pv.distance(rp1, rp1, false, true);\n\t dm2 = pv.distance(rp2, rp2, false, true);\n\t doa1 = Math.abs(do1);\n\t doa2 = Math.abs(do2);\n\t dt = doa1 + doa2;\n\n\t if (dt === 0) {\n\t this.setRelative(p, p, (dm1 + dm2) / 2, pv, true);\n\t return;\n\t }\n\n\t this.setRelative(p, p, (dm1 * doa2 + dm2 * doa1) / dt, pv, true);\n\t};\n\n\t/*\n\t* Sets the point 'p' relative to point 'rp'\n\t* by the distance 'd'\n\t*\n\t* See APPENDIX on SETRELATIVE at the bottom of this file.\n\t*\n\t* p ... point to set\n\t* rp ... reference point\n\t* d ... distance on projection vector\n\t* pv ... projection vector (undefined = this)\n\t* org ... if true, uses the original position of rp as reference.\n\t*/\n\tUnitVector.prototype.setRelative = function(p, rp, d, pv, org) {\n\t pv = pv || this;\n\n\t var rpx = org ? rp.xo : rp.x;\n\t var rpy = org ? rp.yo : rp.y;\n\t var rpdx = rpx + d * pv.x;\n\t var rpdy = rpy + d * pv.y;\n\n\t var pvns = pv.normalSlope;\n\t var fvs = this.slope;\n\n\t var px = p.x;\n\t var py = p.y;\n\n\t p.x = (fvs * px - pvns * rpdx + rpdy - py) / (fvs - pvns);\n\t p.y = fvs * (p.x - px) + py;\n\t};\n\n\t/*\n\t* Touches the point p.\n\t*/\n\tUnitVector.prototype.touch = function(p) {\n\t p.xTouched = true;\n\t p.yTouched = true;\n\t};\n\n\t/*\n\t* Returns a unit vector with x/y coordinates.\n\t*/\n\tfunction getUnitVector(x, y) {\n\t var d = Math.sqrt(x * x + y * y);\n\n\t x /= d;\n\t y /= d;\n\n\t if (x === 1 && y === 0) { return xUnitVector; }\n\t else if (x === 0 && y === 1) { return yUnitVector; }\n\t else { return new UnitVector(x, y); }\n\t}\n\n\t/*\n\t* Creates a point in the hinting engine.\n\t*/\n\tfunction HPoint(\n\t x,\n\t y,\n\t lastPointOfContour,\n\t onCurve\n\t) {\n\t this.x = this.xo = Math.round(x * 64) / 64; // hinted x value and original x-value\n\t this.y = this.yo = Math.round(y * 64) / 64; // hinted y value and original y-value\n\n\t this.lastPointOfContour = lastPointOfContour;\n\t this.onCurve = onCurve;\n\t this.prevPointOnContour = undefined;\n\t this.nextPointOnContour = undefined;\n\t this.xTouched = false;\n\t this.yTouched = false;\n\n\t Object.preventExtensions(this);\n\t}\n\n\t/*\n\t* Returns the next touched point on the contour.\n\t*\n\t* v ... unit vector to test touch axis.\n\t*/\n\tHPoint.prototype.nextTouched = function(v) {\n\t var p = this.nextPointOnContour;\n\n\t while (!v.touched(p) && p !== this) { p = p.nextPointOnContour; }\n\n\t return p;\n\t};\n\n\t/*\n\t* Returns the previous touched point on the contour\n\t*\n\t* v ... unit vector to test touch axis.\n\t*/\n\tHPoint.prototype.prevTouched = function(v) {\n\t var p = this.prevPointOnContour;\n\n\t while (!v.touched(p) && p !== this) { p = p.prevPointOnContour; }\n\n\t return p;\n\t};\n\n\t/*\n\t* The zero point.\n\t*/\n\tvar HPZero = Object.freeze(new HPoint(0, 0));\n\n\t/*\n\t* The default state of the interpreter.\n\t*\n\t* Note: Freezing the defaultState and then deriving from it\n\t* makes the V8 Javascript engine going awkward,\n\t* so this is avoided, albeit the defaultState shouldn't\n\t* ever change.\n\t*/\n\tvar defaultState = {\n\t cvCutIn: 17 / 16, // control value cut in\n\t deltaBase: 9,\n\t deltaShift: 0.125,\n\t loop: 1, // loops some instructions\n\t minDis: 1, // minimum distance\n\t autoFlip: true\n\t};\n\n\t/*\n\t* The current state of the interpreter.\n\t*\n\t* env ... 'fpgm' or 'prep' or 'glyf'\n\t* prog ... the program\n\t*/\n\tfunction State(env, prog) {\n\t this.env = env;\n\t this.stack = [];\n\t this.prog = prog;\n\n\t switch (env) {\n\t case 'glyf' :\n\t this.zp0 = this.zp1 = this.zp2 = 1;\n\t this.rp0 = this.rp1 = this.rp2 = 0;\n\t /* fall through */\n\t case 'prep' :\n\t this.fv = this.pv = this.dpv = xUnitVector;\n\t this.round = roundToGrid;\n\t }\n\t}\n\n\t/*\n\t* Executes a glyph program.\n\t*\n\t* This does the hinting for each glyph.\n\t*\n\t* Returns an array of moved points.\n\t*\n\t* glyph: the glyph to hint\n\t* ppem: the size the glyph is rendered for\n\t*/\n\tHinting.prototype.exec = function(glyph, ppem) {\n\t if (typeof ppem !== 'number') {\n\t throw new Error('Point size is not a number!');\n\t }\n\n\t // Received a fatal error, don't do any hinting anymore.\n\t if (this._errorState > 2) { return; }\n\n\t var font = this.font;\n\t var prepState = this._prepState;\n\n\t if (!prepState || prepState.ppem !== ppem) {\n\t var fpgmState = this._fpgmState;\n\n\t if (!fpgmState) {\n\t // Executes the fpgm state.\n\t // This is used by fonts to define functions.\n\t State.prototype = defaultState;\n\n\t fpgmState =\n\t this._fpgmState =\n\t new State('fpgm', font.tables.fpgm);\n\n\t fpgmState.funcs = [ ];\n\t fpgmState.font = font;\n\n\t if (exports.DEBUG) {\n\t console.log('---EXEC FPGM---');\n\t fpgmState.step = -1;\n\t }\n\n\t try {\n\t exec(fpgmState);\n\t } catch (e) {\n\t console.log('Hinting error in FPGM:' + e);\n\t this._errorState = 3;\n\t return;\n\t }\n\t }\n\n\t // Executes the prep program for this ppem setting.\n\t // This is used by fonts to set cvt values\n\t // depending on to be rendered font size.\n\n\t State.prototype = fpgmState;\n\t prepState =\n\t this._prepState =\n\t new State('prep', font.tables.prep);\n\n\t prepState.ppem = ppem;\n\n\t // Creates a copy of the cvt table\n\t // and scales it to the current ppem setting.\n\t var oCvt = font.tables.cvt;\n\t if (oCvt) {\n\t var cvt = prepState.cvt = new Array(oCvt.length);\n\t var scale = ppem / font.unitsPerEm;\n\t for (var c = 0; c < oCvt.length; c++) {\n\t cvt[c] = oCvt[c] * scale;\n\t }\n\t } else {\n\t prepState.cvt = [];\n\t }\n\n\t if (exports.DEBUG) {\n\t console.log('---EXEC PREP---');\n\t prepState.step = -1;\n\t }\n\n\t try {\n\t exec(prepState);\n\t } catch (e) {\n\t if (this._errorState < 2) {\n\t console.log('Hinting error in PREP:' + e);\n\t }\n\t this._errorState = 2;\n\t }\n\t }\n\n\t if (this._errorState > 1) { return; }\n\n\t try {\n\t return execGlyph(glyph, prepState);\n\t } catch (e) {\n\t if (this._errorState < 1) {\n\t console.log('Hinting error:' + e);\n\t console.log('Note: further hinting errors are silenced');\n\t }\n\t this._errorState = 1;\n\t return undefined;\n\t }\n\t};\n\n\t/*\n\t* Executes the hinting program for a glyph.\n\t*/\n\texecGlyph = function(glyph, prepState) {\n\t // original point positions\n\t var xScale = prepState.ppem / prepState.font.unitsPerEm;\n\t var yScale = xScale;\n\t var components = glyph.components;\n\t var contours;\n\t var gZone;\n\t var state;\n\n\t State.prototype = prepState;\n\t if (!components) {\n\t state = new State('glyf', glyph.instructions);\n\t if (exports.DEBUG) {\n\t console.log('---EXEC GLYPH---');\n\t state.step = -1;\n\t }\n\t execComponent(glyph, state, xScale, yScale);\n\t gZone = state.gZone;\n\t } else {\n\t var font = prepState.font;\n\t gZone = [];\n\t contours = [];\n\t for (var i = 0; i < components.length; i++) {\n\t var c = components[i];\n\t var cg = font.glyphs.get(c.glyphIndex);\n\n\t state = new State('glyf', cg.instructions);\n\n\t if (exports.DEBUG) {\n\t console.log('---EXEC COMP ' + i + '---');\n\t state.step = -1;\n\t }\n\n\t execComponent(cg, state, xScale, yScale);\n\t // appends the computed points to the result array\n\t // post processes the component points\n\t var dx = Math.round(c.dx * xScale);\n\t var dy = Math.round(c.dy * yScale);\n\t var gz = state.gZone;\n\t var cc = state.contours;\n\t for (var pi = 0; pi < gz.length; pi++) {\n\t var p = gz[pi];\n\t p.xTouched = p.yTouched = false;\n\t p.xo = p.x = p.x + dx;\n\t p.yo = p.y = p.y + dy;\n\t }\n\n\t var gLen = gZone.length;\n\t gZone.push.apply(gZone, gz);\n\t for (var j = 0; j < cc.length; j++) {\n\t contours.push(cc[j] + gLen);\n\t }\n\t }\n\n\t if (glyph.instructions && !state.inhibitGridFit) {\n\t // the composite has instructions on its own\n\t state = new State('glyf', glyph.instructions);\n\n\t state.gZone = state.z0 = state.z1 = state.z2 = gZone;\n\n\t state.contours = contours;\n\n\t // note: HPZero cannot be used here, since\n\t // the point might be modified\n\t gZone.push(\n\t new HPoint(0, 0),\n\t new HPoint(Math.round(glyph.advanceWidth * xScale), 0)\n\t );\n\n\t if (exports.DEBUG) {\n\t console.log('---EXEC COMPOSITE---');\n\t state.step = -1;\n\t }\n\n\t exec(state);\n\n\t gZone.length -= 2;\n\t }\n\t }\n\n\t return gZone;\n\t};\n\n\t/*\n\t* Executes the hinting program for a component of a multi-component glyph\n\t* or of the glyph itself for a non-component glyph.\n\t*/\n\texecComponent = function(glyph, state, xScale, yScale)\n\t{\n\t var points = glyph.points || [];\n\t var pLen = points.length;\n\t var gZone = state.gZone = state.z0 = state.z1 = state.z2 = [];\n\t var contours = state.contours = [];\n\n\t // Scales the original points and\n\t // makes copies for the hinted points.\n\t var cp; // current point\n\t for (var i = 0; i < pLen; i++) {\n\t cp = points[i];\n\n\t gZone[i] = new HPoint(\n\t cp.x * xScale,\n\t cp.y * yScale,\n\t cp.lastPointOfContour,\n\t cp.onCurve\n\t );\n\t }\n\n\t // Chain links the contours.\n\t var sp; // start point\n\t var np; // next point\n\n\t for (var i$1 = 0; i$1 < pLen; i$1++) {\n\t cp = gZone[i$1];\n\n\t if (!sp) {\n\t sp = cp;\n\t contours.push(i$1);\n\t }\n\n\t if (cp.lastPointOfContour) {\n\t cp.nextPointOnContour = sp;\n\t sp.prevPointOnContour = cp;\n\t sp = undefined;\n\t } else {\n\t np = gZone[i$1 + 1];\n\t cp.nextPointOnContour = np;\n\t np.prevPointOnContour = cp;\n\t }\n\t }\n\n\t if (state.inhibitGridFit) { return; }\n\n\t if (exports.DEBUG) {\n\t console.log('PROCESSING GLYPH', state.stack);\n\t for (var i$2 = 0; i$2 < pLen; i$2++) {\n\t console.log(i$2, gZone[i$2].x, gZone[i$2].y);\n\t }\n\t }\n\n\t gZone.push(\n\t new HPoint(0, 0),\n\t new HPoint(Math.round(glyph.advanceWidth * xScale), 0)\n\t );\n\n\t exec(state);\n\n\t // Removes the extra points.\n\t gZone.length -= 2;\n\n\t if (exports.DEBUG) {\n\t console.log('FINISHED GLYPH', state.stack);\n\t for (var i$3 = 0; i$3 < pLen; i$3++) {\n\t console.log(i$3, gZone[i$3].x, gZone[i$3].y);\n\t }\n\t }\n\t};\n\n\t/*\n\t* Executes the program loaded in state.\n\t*/\n\texec = function(state) {\n\t var prog = state.prog;\n\n\t if (!prog) { return; }\n\n\t var pLen = prog.length;\n\t var ins;\n\n\t for (state.ip = 0; state.ip < pLen; state.ip++) {\n\t if (exports.DEBUG) { state.step++; }\n\t ins = instructionTable[prog[state.ip]];\n\n\t if (!ins) {\n\t throw new Error(\n\t 'unknown instruction: 0x' +\n\t Number(prog[state.ip]).toString(16)\n\t );\n\t }\n\n\t ins(state);\n\n\t // very extensive debugging for each step\n\t /*\n\t if (exports.DEBUG) {\n\t var da;\n\t if (state.gZone) {\n\t da = [];\n\t for (let i = 0; i < state.gZone.length; i++)\n\t {\n\t da.push(i + ' ' +\n\t state.gZone[i].x * 64 + ' ' +\n\t state.gZone[i].y * 64 + ' ' +\n\t (state.gZone[i].xTouched ? 'x' : '') +\n\t (state.gZone[i].yTouched ? 'y' : '')\n\t );\n\t }\n\t console.log('GZ', da);\n\t }\n\n\t if (state.tZone) {\n\t da = [];\n\t for (let i = 0; i < state.tZone.length; i++) {\n\t da.push(i + ' ' +\n\t state.tZone[i].x * 64 + ' ' +\n\t state.tZone[i].y * 64 + ' ' +\n\t (state.tZone[i].xTouched ? 'x' : '') +\n\t (state.tZone[i].yTouched ? 'y' : '')\n\t );\n\t }\n\t console.log('TZ', da);\n\t }\n\n\t if (state.stack.length > 10) {\n\t console.log(\n\t state.stack.length,\n\t '...', state.stack.slice(state.stack.length - 10)\n\t );\n\t } else {\n\t console.log(state.stack.length, state.stack);\n\t }\n\t }\n\t */\n\t }\n\t};\n\n\t/*\n\t* Initializes the twilight zone.\n\t*\n\t* This is only done if a SZPx instruction\n\t* refers to the twilight zone.\n\t*/\n\tfunction initTZone(state)\n\t{\n\t var tZone = state.tZone = new Array(state.gZone.length);\n\n\t // no idea if this is actually correct...\n\t for (var i = 0; i < tZone.length; i++)\n\t {\n\t tZone[i] = new HPoint(0, 0);\n\t }\n\t}\n\n\t/*\n\t* Skips the instruction pointer ahead over an IF/ELSE block.\n\t* handleElse .. if true breaks on matching ELSE\n\t*/\n\tfunction skip(state, handleElse)\n\t{\n\t var prog = state.prog;\n\t var ip = state.ip;\n\t var nesting = 1;\n\t var ins;\n\n\t do {\n\t ins = prog[++ip];\n\t if (ins === 0x58) // IF\n\t { nesting++; }\n\t else if (ins === 0x59) // EIF\n\t { nesting--; }\n\t else if (ins === 0x40) // NPUSHB\n\t { ip += prog[ip + 1] + 1; }\n\t else if (ins === 0x41) // NPUSHW\n\t { ip += 2 * prog[ip + 1] + 1; }\n\t else if (ins >= 0xB0 && ins <= 0xB7) // PUSHB\n\t { ip += ins - 0xB0 + 1; }\n\t else if (ins >= 0xB8 && ins <= 0xBF) // PUSHW\n\t { ip += (ins - 0xB8 + 1) * 2; }\n\t else if (handleElse && nesting === 1 && ins === 0x1B) // ELSE\n\t { break; }\n\t } while (nesting > 0);\n\n\t state.ip = ip;\n\t}\n\n\t/*----------------------------------------------------------*\n\t* And then a lot of instructions... *\n\t*----------------------------------------------------------*/\n\n\t// SVTCA[a] Set freedom and projection Vectors To Coordinate Axis\n\t// 0x00-0x01\n\tfunction SVTCA(v, state) {\n\t if (exports.DEBUG) { console.log(state.step, 'SVTCA[' + v.axis + ']'); }\n\n\t state.fv = state.pv = state.dpv = v;\n\t}\n\n\t// SPVTCA[a] Set Projection Vector to Coordinate Axis\n\t// 0x02-0x03\n\tfunction SPVTCA(v, state) {\n\t if (exports.DEBUG) { console.log(state.step, 'SPVTCA[' + v.axis + ']'); }\n\n\t state.pv = state.dpv = v;\n\t}\n\n\t// SFVTCA[a] Set Freedom Vector to Coordinate Axis\n\t// 0x04-0x05\n\tfunction SFVTCA(v, state) {\n\t if (exports.DEBUG) { console.log(state.step, 'SFVTCA[' + v.axis + ']'); }\n\n\t state.fv = v;\n\t}\n\n\t// SPVTL[a] Set Projection Vector To Line\n\t// 0x06-0x07\n\tfunction SPVTL(a, state) {\n\t var stack = state.stack;\n\t var p2i = stack.pop();\n\t var p1i = stack.pop();\n\t var p2 = state.z2[p2i];\n\t var p1 = state.z1[p1i];\n\n\t if (exports.DEBUG) { console.log('SPVTL[' + a + ']', p2i, p1i); }\n\n\t var dx;\n\t var dy;\n\n\t if (!a) {\n\t dx = p1.x - p2.x;\n\t dy = p1.y - p2.y;\n\t } else {\n\t dx = p2.y - p1.y;\n\t dy = p1.x - p2.x;\n\t }\n\n\t state.pv = state.dpv = getUnitVector(dx, dy);\n\t}\n\n\t// SFVTL[a] Set Freedom Vector To Line\n\t// 0x08-0x09\n\tfunction SFVTL(a, state) {\n\t var stack = state.stack;\n\t var p2i = stack.pop();\n\t var p1i = stack.pop();\n\t var p2 = state.z2[p2i];\n\t var p1 = state.z1[p1i];\n\n\t if (exports.DEBUG) { console.log('SFVTL[' + a + ']', p2i, p1i); }\n\n\t var dx;\n\t var dy;\n\n\t if (!a) {\n\t dx = p1.x - p2.x;\n\t dy = p1.y - p2.y;\n\t } else {\n\t dx = p2.y - p1.y;\n\t dy = p1.x - p2.x;\n\t }\n\n\t state.fv = getUnitVector(dx, dy);\n\t}\n\n\t// SPVFS[] Set Projection Vector From Stack\n\t// 0x0A\n\tfunction SPVFS(state) {\n\t var stack = state.stack;\n\t var y = stack.pop();\n\t var x = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SPVFS[]', y, x); }\n\n\t state.pv = state.dpv = getUnitVector(x, y);\n\t}\n\n\t// SFVFS[] Set Freedom Vector From Stack\n\t// 0x0B\n\tfunction SFVFS(state) {\n\t var stack = state.stack;\n\t var y = stack.pop();\n\t var x = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SPVFS[]', y, x); }\n\n\t state.fv = getUnitVector(x, y);\n\t}\n\n\t// GPV[] Get Projection Vector\n\t// 0x0C\n\tfunction GPV(state) {\n\t var stack = state.stack;\n\t var pv = state.pv;\n\n\t if (exports.DEBUG) { console.log(state.step, 'GPV[]'); }\n\n\t stack.push(pv.x * 0x4000);\n\t stack.push(pv.y * 0x4000);\n\t}\n\n\t// GFV[] Get Freedom Vector\n\t// 0x0C\n\tfunction GFV(state) {\n\t var stack = state.stack;\n\t var fv = state.fv;\n\n\t if (exports.DEBUG) { console.log(state.step, 'GFV[]'); }\n\n\t stack.push(fv.x * 0x4000);\n\t stack.push(fv.y * 0x4000);\n\t}\n\n\t// SFVTPV[] Set Freedom Vector To Projection Vector\n\t// 0x0E\n\tfunction SFVTPV(state) {\n\t state.fv = state.pv;\n\n\t if (exports.DEBUG) { console.log(state.step, 'SFVTPV[]'); }\n\t}\n\n\t// ISECT[] moves point p to the InterSECTion of two lines\n\t// 0x0F\n\tfunction ISECT(state)\n\t{\n\t var stack = state.stack;\n\t var pa0i = stack.pop();\n\t var pa1i = stack.pop();\n\t var pb0i = stack.pop();\n\t var pb1i = stack.pop();\n\t var pi = stack.pop();\n\t var z0 = state.z0;\n\t var z1 = state.z1;\n\t var pa0 = z0[pa0i];\n\t var pa1 = z0[pa1i];\n\t var pb0 = z1[pb0i];\n\t var pb1 = z1[pb1i];\n\t var p = state.z2[pi];\n\n\t if (exports.DEBUG) { console.log('ISECT[], ', pa0i, pa1i, pb0i, pb1i, pi); }\n\n\t // math from\n\t // en.wikipedia.org/wiki/Line%E2%80%93line_intersection#Given_two_points_on_each_line\n\n\t var x1 = pa0.x;\n\t var y1 = pa0.y;\n\t var x2 = pa1.x;\n\t var y2 = pa1.y;\n\t var x3 = pb0.x;\n\t var y3 = pb0.y;\n\t var x4 = pb1.x;\n\t var y4 = pb1.y;\n\n\t var div = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\n\t var f1 = x1 * y2 - y1 * x2;\n\t var f2 = x3 * y4 - y3 * x4;\n\n\t p.x = (f1 * (x3 - x4) - f2 * (x1 - x2)) / div;\n\t p.y = (f1 * (y3 - y4) - f2 * (y1 - y2)) / div;\n\t}\n\n\t// SRP0[] Set Reference Point 0\n\t// 0x10\n\tfunction SRP0(state) {\n\t state.rp0 = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SRP0[]', state.rp0); }\n\t}\n\n\t// SRP1[] Set Reference Point 1\n\t// 0x11\n\tfunction SRP1(state) {\n\t state.rp1 = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SRP1[]', state.rp1); }\n\t}\n\n\t// SRP1[] Set Reference Point 2\n\t// 0x12\n\tfunction SRP2(state) {\n\t state.rp2 = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SRP2[]', state.rp2); }\n\t}\n\n\t// SZP0[] Set Zone Pointer 0\n\t// 0x13\n\tfunction SZP0(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SZP0[]', n); }\n\n\t state.zp0 = n;\n\n\t switch (n) {\n\t case 0:\n\t if (!state.tZone) { initTZone(state); }\n\t state.z0 = state.tZone;\n\t break;\n\t case 1 :\n\t state.z0 = state.gZone;\n\t break;\n\t default :\n\t throw new Error('Invalid zone pointer');\n\t }\n\t}\n\n\t// SZP1[] Set Zone Pointer 1\n\t// 0x14\n\tfunction SZP1(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SZP1[]', n); }\n\n\t state.zp1 = n;\n\n\t switch (n) {\n\t case 0:\n\t if (!state.tZone) { initTZone(state); }\n\t state.z1 = state.tZone;\n\t break;\n\t case 1 :\n\t state.z1 = state.gZone;\n\t break;\n\t default :\n\t throw new Error('Invalid zone pointer');\n\t }\n\t}\n\n\t// SZP2[] Set Zone Pointer 2\n\t// 0x15\n\tfunction SZP2(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SZP2[]', n); }\n\n\t state.zp2 = n;\n\n\t switch (n) {\n\t case 0:\n\t if (!state.tZone) { initTZone(state); }\n\t state.z2 = state.tZone;\n\t break;\n\t case 1 :\n\t state.z2 = state.gZone;\n\t break;\n\t default :\n\t throw new Error('Invalid zone pointer');\n\t }\n\t}\n\n\t// SZPS[] Set Zone PointerS\n\t// 0x16\n\tfunction SZPS(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SZPS[]', n); }\n\n\t state.zp0 = state.zp1 = state.zp2 = n;\n\n\t switch (n) {\n\t case 0:\n\t if (!state.tZone) { initTZone(state); }\n\t state.z0 = state.z1 = state.z2 = state.tZone;\n\t break;\n\t case 1 :\n\t state.z0 = state.z1 = state.z2 = state.gZone;\n\t break;\n\t default :\n\t throw new Error('Invalid zone pointer');\n\t }\n\t}\n\n\t// SLOOP[] Set LOOP variable\n\t// 0x17\n\tfunction SLOOP(state) {\n\t state.loop = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SLOOP[]', state.loop); }\n\t}\n\n\t// RTG[] Round To Grid\n\t// 0x18\n\tfunction RTG(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'RTG[]'); }\n\n\t state.round = roundToGrid;\n\t}\n\n\t// RTHG[] Round To Half Grid\n\t// 0x19\n\tfunction RTHG(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'RTHG[]'); }\n\n\t state.round = roundToHalfGrid;\n\t}\n\n\t// SMD[] Set Minimum Distance\n\t// 0x1A\n\tfunction SMD(state) {\n\t var d = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SMD[]', d); }\n\n\t state.minDis = d / 0x40;\n\t}\n\n\t// ELSE[] ELSE clause\n\t// 0x1B\n\tfunction ELSE(state) {\n\t // This instruction has been reached by executing a then branch\n\t // so it just skips ahead until matching EIF.\n\t //\n\t // In case the IF was negative the IF[] instruction already\n\t // skipped forward over the ELSE[]\n\n\t if (exports.DEBUG) { console.log(state.step, 'ELSE[]'); }\n\n\t skip(state, false);\n\t}\n\n\t// JMPR[] JuMP Relative\n\t// 0x1C\n\tfunction JMPR(state) {\n\t var o = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'JMPR[]', o); }\n\n\t // A jump by 1 would do nothing.\n\t state.ip += o - 1;\n\t}\n\n\t// SCVTCI[] Set Control Value Table Cut-In\n\t// 0x1D\n\tfunction SCVTCI(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SCVTCI[]', n); }\n\n\t state.cvCutIn = n / 0x40;\n\t}\n\n\t// DUP[] DUPlicate top stack element\n\t// 0x20\n\tfunction DUP(state) {\n\t var stack = state.stack;\n\n\t if (exports.DEBUG) { console.log(state.step, 'DUP[]'); }\n\n\t stack.push(stack[stack.length - 1]);\n\t}\n\n\t// POP[] POP top stack element\n\t// 0x21\n\tfunction POP(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'POP[]'); }\n\n\t state.stack.pop();\n\t}\n\n\t// CLEAR[] CLEAR the stack\n\t// 0x22\n\tfunction CLEAR(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'CLEAR[]'); }\n\n\t state.stack.length = 0;\n\t}\n\n\t// SWAP[] SWAP the top two elements on the stack\n\t// 0x23\n\tfunction SWAP(state) {\n\t var stack = state.stack;\n\n\t var a = stack.pop();\n\t var b = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SWAP[]'); }\n\n\t stack.push(a);\n\t stack.push(b);\n\t}\n\n\t// DEPTH[] DEPTH of the stack\n\t// 0x24\n\tfunction DEPTH(state) {\n\t var stack = state.stack;\n\n\t if (exports.DEBUG) { console.log(state.step, 'DEPTH[]'); }\n\n\t stack.push(stack.length);\n\t}\n\n\t// LOOPCALL[] LOOPCALL function\n\t// 0x2A\n\tfunction LOOPCALL(state) {\n\t var stack = state.stack;\n\t var fn = stack.pop();\n\t var c = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'LOOPCALL[]', fn, c); }\n\n\t // saves callers program\n\t var cip = state.ip;\n\t var cprog = state.prog;\n\n\t state.prog = state.funcs[fn];\n\n\t // executes the function\n\t for (var i = 0; i < c; i++) {\n\t exec(state);\n\n\t if (exports.DEBUG) { console.log(\n\t ++state.step,\n\t i + 1 < c ? 'next loopcall' : 'done loopcall',\n\t i\n\t ); }\n\t }\n\n\t // restores the callers program\n\t state.ip = cip;\n\t state.prog = cprog;\n\t}\n\n\t// CALL[] CALL function\n\t// 0x2B\n\tfunction CALL(state) {\n\t var fn = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'CALL[]', fn); }\n\n\t // saves callers program\n\t var cip = state.ip;\n\t var cprog = state.prog;\n\n\t state.prog = state.funcs[fn];\n\n\t // executes the function\n\t exec(state);\n\n\t // restores the callers program\n\t state.ip = cip;\n\t state.prog = cprog;\n\n\t if (exports.DEBUG) { console.log(++state.step, 'returning from', fn); }\n\t}\n\n\t// CINDEX[] Copy the INDEXed element to the top of the stack\n\t// 0x25\n\tfunction CINDEX(state) {\n\t var stack = state.stack;\n\t var k = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'CINDEX[]', k); }\n\n\t // In case of k == 1, it copies the last element after popping\n\t // thus stack.length - k.\n\t stack.push(stack[stack.length - k]);\n\t}\n\n\t// MINDEX[] Move the INDEXed element to the top of the stack\n\t// 0x26\n\tfunction MINDEX(state) {\n\t var stack = state.stack;\n\t var k = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'MINDEX[]', k); }\n\n\t stack.push(stack.splice(stack.length - k, 1)[0]);\n\t}\n\n\t// FDEF[] Function DEFinition\n\t// 0x2C\n\tfunction FDEF(state) {\n\t if (state.env !== 'fpgm') { throw new Error('FDEF not allowed here'); }\n\t var stack = state.stack;\n\t var prog = state.prog;\n\t var ip = state.ip;\n\n\t var fn = stack.pop();\n\t var ipBegin = ip;\n\n\t if (exports.DEBUG) { console.log(state.step, 'FDEF[]', fn); }\n\n\t while (prog[++ip] !== 0x2D){ }\n\n\t state.ip = ip;\n\t state.funcs[fn] = prog.slice(ipBegin + 1, ip);\n\t}\n\n\t// MDAP[a] Move Direct Absolute Point\n\t// 0x2E-0x2F\n\tfunction MDAP(round, state) {\n\t var pi = state.stack.pop();\n\t var p = state.z0[pi];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\n\t if (exports.DEBUG) { console.log(state.step, 'MDAP[' + round + ']', pi); }\n\n\t var d = pv.distance(p, HPZero);\n\n\t if (round) { d = state.round(d); }\n\n\t fv.setRelative(p, HPZero, d, pv);\n\t fv.touch(p);\n\n\t state.rp0 = state.rp1 = pi;\n\t}\n\n\t// IUP[a] Interpolate Untouched Points through the outline\n\t// 0x30\n\tfunction IUP(v, state) {\n\t var z2 = state.z2;\n\t var pLen = z2.length - 2;\n\t var cp;\n\t var pp;\n\t var np;\n\n\t if (exports.DEBUG) { console.log(state.step, 'IUP[' + v.axis + ']'); }\n\n\t for (var i = 0; i < pLen; i++) {\n\t cp = z2[i]; // current point\n\n\t // if this point has been touched go on\n\t if (v.touched(cp)) { continue; }\n\n\t pp = cp.prevTouched(v);\n\n\t // no point on the contour has been touched?\n\t if (pp === cp) { continue; }\n\n\t np = cp.nextTouched(v);\n\n\t if (pp === np) {\n\t // only one point on the contour has been touched\n\t // so simply moves the point like that\n\n\t v.setRelative(cp, cp, v.distance(pp, pp, false, true), v, true);\n\t }\n\n\t v.interpolate(cp, pp, np, v);\n\t }\n\t}\n\n\t// SHP[] SHift Point using reference point\n\t// 0x32-0x33\n\tfunction SHP(a, state) {\n\t var stack = state.stack;\n\t var rpi = a ? state.rp1 : state.rp2;\n\t var rp = (a ? state.z0 : state.z1)[rpi];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\t var loop = state.loop;\n\t var z2 = state.z2;\n\n\t while (loop--)\n\t {\n\t var pi = stack.pop();\n\t var p = z2[pi];\n\n\t var d = pv.distance(rp, rp, false, true);\n\t fv.setRelative(p, p, d, pv);\n\t fv.touch(p);\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t (state.loop > 1 ?\n\t 'loop ' + (state.loop - loop) + ': ' :\n\t ''\n\t ) +\n\t 'SHP[' + (a ? 'rp1' : 'rp2') + ']', pi\n\t );\n\t }\n\t }\n\n\t state.loop = 1;\n\t}\n\n\t// SHC[] SHift Contour using reference point\n\t// 0x36-0x37\n\tfunction SHC(a, state) {\n\t var stack = state.stack;\n\t var rpi = a ? state.rp1 : state.rp2;\n\t var rp = (a ? state.z0 : state.z1)[rpi];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\t var ci = stack.pop();\n\t var sp = state.z2[state.contours[ci]];\n\t var p = sp;\n\n\t if (exports.DEBUG) { console.log(state.step, 'SHC[' + a + ']', ci); }\n\n\t var d = pv.distance(rp, rp, false, true);\n\n\t do {\n\t if (p !== rp) { fv.setRelative(p, p, d, pv); }\n\t p = p.nextPointOnContour;\n\t } while (p !== sp);\n\t}\n\n\t// SHZ[] SHift Zone using reference point\n\t// 0x36-0x37\n\tfunction SHZ(a, state) {\n\t var stack = state.stack;\n\t var rpi = a ? state.rp1 : state.rp2;\n\t var rp = (a ? state.z0 : state.z1)[rpi];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\n\t var e = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SHZ[' + a + ']', e); }\n\n\t var z;\n\t switch (e) {\n\t case 0 : z = state.tZone; break;\n\t case 1 : z = state.gZone; break;\n\t default : throw new Error('Invalid zone');\n\t }\n\n\t var p;\n\t var d = pv.distance(rp, rp, false, true);\n\t var pLen = z.length - 2;\n\t for (var i = 0; i < pLen; i++)\n\t {\n\t p = z[i];\n\t fv.setRelative(p, p, d, pv);\n\t //if (p !== rp) fv.setRelative(p, p, d, pv);\n\t }\n\t}\n\n\t// SHPIX[] SHift point by a PIXel amount\n\t// 0x38\n\tfunction SHPIX(state) {\n\t var stack = state.stack;\n\t var loop = state.loop;\n\t var fv = state.fv;\n\t var d = stack.pop() / 0x40;\n\t var z2 = state.z2;\n\n\t while (loop--) {\n\t var pi = stack.pop();\n\t var p = z2[pi];\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') +\n\t 'SHPIX[]', pi, d\n\t );\n\t }\n\n\t fv.setRelative(p, p, d);\n\t fv.touch(p);\n\t }\n\n\t state.loop = 1;\n\t}\n\n\t// IP[] Interpolate Point\n\t// 0x39\n\tfunction IP(state) {\n\t var stack = state.stack;\n\t var rp1i = state.rp1;\n\t var rp2i = state.rp2;\n\t var loop = state.loop;\n\t var rp1 = state.z0[rp1i];\n\t var rp2 = state.z1[rp2i];\n\t var fv = state.fv;\n\t var pv = state.dpv;\n\t var z2 = state.z2;\n\n\t while (loop--) {\n\t var pi = stack.pop();\n\t var p = z2[pi];\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') +\n\t 'IP[]', pi, rp1i, '<->', rp2i\n\t );\n\t }\n\n\t fv.interpolate(p, rp1, rp2, pv);\n\n\t fv.touch(p);\n\t }\n\n\t state.loop = 1;\n\t}\n\n\t// MSIRP[a] Move Stack Indirect Relative Point\n\t// 0x3A-0x3B\n\tfunction MSIRP(a, state) {\n\t var stack = state.stack;\n\t var d = stack.pop() / 64;\n\t var pi = stack.pop();\n\t var p = state.z1[pi];\n\t var rp0 = state.z0[state.rp0];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\n\t fv.setRelative(p, rp0, d, pv);\n\t fv.touch(p);\n\n\t if (exports.DEBUG) { console.log(state.step, 'MSIRP[' + a + ']', d, pi); }\n\n\t state.rp1 = state.rp0;\n\t state.rp2 = pi;\n\t if (a) { state.rp0 = pi; }\n\t}\n\n\t// ALIGNRP[] Align to reference point.\n\t// 0x3C\n\tfunction ALIGNRP(state) {\n\t var stack = state.stack;\n\t var rp0i = state.rp0;\n\t var rp0 = state.z0[rp0i];\n\t var loop = state.loop;\n\t var fv = state.fv;\n\t var pv = state.pv;\n\t var z1 = state.z1;\n\n\t while (loop--) {\n\t var pi = stack.pop();\n\t var p = z1[pi];\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t (state.loop > 1 ? 'loop ' + (state.loop - loop) + ': ' : '') +\n\t 'ALIGNRP[]', pi\n\t );\n\t }\n\n\t fv.setRelative(p, rp0, 0, pv);\n\t fv.touch(p);\n\t }\n\n\t state.loop = 1;\n\t}\n\n\t// RTG[] Round To Double Grid\n\t// 0x3D\n\tfunction RTDG(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'RTDG[]'); }\n\n\t state.round = roundToDoubleGrid;\n\t}\n\n\t// MIAP[a] Move Indirect Absolute Point\n\t// 0x3E-0x3F\n\tfunction MIAP(round, state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\t var pi = stack.pop();\n\t var p = state.z0[pi];\n\t var fv = state.fv;\n\t var pv = state.pv;\n\t var cv = state.cvt[n];\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t 'MIAP[' + round + ']',\n\t n, '(', cv, ')', pi\n\t );\n\t }\n\n\t var d = pv.distance(p, HPZero);\n\n\t if (round) {\n\t if (Math.abs(d - cv) < state.cvCutIn) { d = cv; }\n\n\t d = state.round(d);\n\t }\n\n\t fv.setRelative(p, HPZero, d, pv);\n\n\t if (state.zp0 === 0) {\n\t p.xo = p.x;\n\t p.yo = p.y;\n\t }\n\n\t fv.touch(p);\n\n\t state.rp0 = state.rp1 = pi;\n\t}\n\n\t// NPUSB[] PUSH N Bytes\n\t// 0x40\n\tfunction NPUSHB(state) {\n\t var prog = state.prog;\n\t var ip = state.ip;\n\t var stack = state.stack;\n\n\t var n = prog[++ip];\n\n\t if (exports.DEBUG) { console.log(state.step, 'NPUSHB[]', n); }\n\n\t for (var i = 0; i < n; i++) { stack.push(prog[++ip]); }\n\n\t state.ip = ip;\n\t}\n\n\t// NPUSHW[] PUSH N Words\n\t// 0x41\n\tfunction NPUSHW(state) {\n\t var ip = state.ip;\n\t var prog = state.prog;\n\t var stack = state.stack;\n\t var n = prog[++ip];\n\n\t if (exports.DEBUG) { console.log(state.step, 'NPUSHW[]', n); }\n\n\t for (var i = 0; i < n; i++) {\n\t var w = (prog[++ip] << 8) | prog[++ip];\n\t if (w & 0x8000) { w = -((w ^ 0xffff) + 1); }\n\t stack.push(w);\n\t }\n\n\t state.ip = ip;\n\t}\n\n\t// WS[] Write Store\n\t// 0x42\n\tfunction WS(state) {\n\t var stack = state.stack;\n\t var store = state.store;\n\n\t if (!store) { store = state.store = []; }\n\n\t var v = stack.pop();\n\t var l = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'WS', v, l); }\n\n\t store[l] = v;\n\t}\n\n\t// RS[] Read Store\n\t// 0x43\n\tfunction RS(state) {\n\t var stack = state.stack;\n\t var store = state.store;\n\n\t var l = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'RS', l); }\n\n\t var v = (store && store[l]) || 0;\n\n\t stack.push(v);\n\t}\n\n\t// WCVTP[] Write Control Value Table in Pixel units\n\t// 0x44\n\tfunction WCVTP(state) {\n\t var stack = state.stack;\n\n\t var v = stack.pop();\n\t var l = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'WCVTP', v, l); }\n\n\t state.cvt[l] = v / 0x40;\n\t}\n\n\t// RCVT[] Read Control Value Table entry\n\t// 0x45\n\tfunction RCVT(state) {\n\t var stack = state.stack;\n\t var cvte = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'RCVT', cvte); }\n\n\t stack.push(state.cvt[cvte] * 0x40);\n\t}\n\n\t// GC[] Get Coordinate projected onto the projection vector\n\t// 0x46-0x47\n\tfunction GC(a, state) {\n\t var stack = state.stack;\n\t var pi = stack.pop();\n\t var p = state.z2[pi];\n\n\t if (exports.DEBUG) { console.log(state.step, 'GC[' + a + ']', pi); }\n\n\t stack.push(state.dpv.distance(p, HPZero, a, false) * 0x40);\n\t}\n\n\t// MD[a] Measure Distance\n\t// 0x49-0x4A\n\tfunction MD(a, state) {\n\t var stack = state.stack;\n\t var pi2 = stack.pop();\n\t var pi1 = stack.pop();\n\t var p2 = state.z1[pi2];\n\t var p1 = state.z0[pi1];\n\t var d = state.dpv.distance(p1, p2, a, a);\n\n\t if (exports.DEBUG) { console.log(state.step, 'MD[' + a + ']', pi2, pi1, '->', d); }\n\n\t state.stack.push(Math.round(d * 64));\n\t}\n\n\t// MPPEM[] Measure Pixels Per EM\n\t// 0x4B\n\tfunction MPPEM(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'MPPEM[]'); }\n\t state.stack.push(state.ppem);\n\t}\n\n\t// FLIPON[] set the auto FLIP Boolean to ON\n\t// 0x4D\n\tfunction FLIPON(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'FLIPON[]'); }\n\t state.autoFlip = true;\n\t}\n\n\t// LT[] Less Than\n\t// 0x50\n\tfunction LT(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'LT[]', e2, e1); }\n\n\t stack.push(e1 < e2 ? 1 : 0);\n\t}\n\n\t// LTEQ[] Less Than or EQual\n\t// 0x53\n\tfunction LTEQ(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'LTEQ[]', e2, e1); }\n\n\t stack.push(e1 <= e2 ? 1 : 0);\n\t}\n\n\t// GTEQ[] Greater Than\n\t// 0x52\n\tfunction GT(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'GT[]', e2, e1); }\n\n\t stack.push(e1 > e2 ? 1 : 0);\n\t}\n\n\t// GTEQ[] Greater Than or EQual\n\t// 0x53\n\tfunction GTEQ(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'GTEQ[]', e2, e1); }\n\n\t stack.push(e1 >= e2 ? 1 : 0);\n\t}\n\n\t// EQ[] EQual\n\t// 0x54\n\tfunction EQ(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'EQ[]', e2, e1); }\n\n\t stack.push(e2 === e1 ? 1 : 0);\n\t}\n\n\t// NEQ[] Not EQual\n\t// 0x55\n\tfunction NEQ(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'NEQ[]', e2, e1); }\n\n\t stack.push(e2 !== e1 ? 1 : 0);\n\t}\n\n\t// ODD[] ODD\n\t// 0x56\n\tfunction ODD(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'ODD[]', n); }\n\n\t stack.push(Math.trunc(n) % 2 ? 1 : 0);\n\t}\n\n\t// EVEN[] EVEN\n\t// 0x57\n\tfunction EVEN(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'EVEN[]', n); }\n\n\t stack.push(Math.trunc(n) % 2 ? 0 : 1);\n\t}\n\n\t// IF[] IF test\n\t// 0x58\n\tfunction IF(state) {\n\t var test = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'IF[]', test); }\n\n\t // if test is true it just continues\n\t // if not the ip is skipped until matching ELSE or EIF\n\t if (!test) {\n\t skip(state, true);\n\n\t if (exports.DEBUG) { console.log(state.step, 'EIF[]'); }\n\t }\n\t}\n\n\t// EIF[] End IF\n\t// 0x59\n\tfunction EIF(state) {\n\t // this can be reached normally when\n\t // executing an else branch.\n\t // -> just ignore it\n\n\t if (exports.DEBUG) { console.log(state.step, 'EIF[]'); }\n\t}\n\n\t// AND[] logical AND\n\t// 0x5A\n\tfunction AND(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'AND[]', e2, e1); }\n\n\t stack.push(e2 && e1 ? 1 : 0);\n\t}\n\n\t// OR[] logical OR\n\t// 0x5B\n\tfunction OR(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'OR[]', e2, e1); }\n\n\t stack.push(e2 || e1 ? 1 : 0);\n\t}\n\n\t// NOT[] logical NOT\n\t// 0x5C\n\tfunction NOT(state) {\n\t var stack = state.stack;\n\t var e = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'NOT[]', e); }\n\n\t stack.push(e ? 0 : 1);\n\t}\n\n\t// DELTAP1[] DELTA exception P1\n\t// DELTAP2[] DELTA exception P2\n\t// DELTAP3[] DELTA exception P3\n\t// 0x5D, 0x71, 0x72\n\tfunction DELTAP123(b, state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\t var fv = state.fv;\n\t var pv = state.pv;\n\t var ppem = state.ppem;\n\t var base = state.deltaBase + (b - 1) * 16;\n\t var ds = state.deltaShift;\n\t var z0 = state.z0;\n\n\t if (exports.DEBUG) { console.log(state.step, 'DELTAP[' + b + ']', n, stack); }\n\n\t for (var i = 0; i < n; i++) {\n\t var pi = stack.pop();\n\t var arg = stack.pop();\n\t var appem = base + ((arg & 0xF0) >> 4);\n\t if (appem !== ppem) { continue; }\n\n\t var mag = (arg & 0x0F) - 8;\n\t if (mag >= 0) { mag++; }\n\t if (exports.DEBUG) { console.log(state.step, 'DELTAPFIX', pi, 'by', mag * ds); }\n\n\t var p = z0[pi];\n\t fv.setRelative(p, p, mag * ds, pv);\n\t }\n\t}\n\n\t// SDB[] Set Delta Base in the graphics state\n\t// 0x5E\n\tfunction SDB(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SDB[]', n); }\n\n\t state.deltaBase = n;\n\t}\n\n\t// SDS[] Set Delta Shift in the graphics state\n\t// 0x5F\n\tfunction SDS(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SDS[]', n); }\n\n\t state.deltaShift = Math.pow(0.5, n);\n\t}\n\n\t// ADD[] ADD\n\t// 0x60\n\tfunction ADD(state) {\n\t var stack = state.stack;\n\t var n2 = stack.pop();\n\t var n1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'ADD[]', n2, n1); }\n\n\t stack.push(n1 + n2);\n\t}\n\n\t// SUB[] SUB\n\t// 0x61\n\tfunction SUB(state) {\n\t var stack = state.stack;\n\t var n2 = stack.pop();\n\t var n1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SUB[]', n2, n1); }\n\n\t stack.push(n1 - n2);\n\t}\n\n\t// DIV[] DIV\n\t// 0x62\n\tfunction DIV(state) {\n\t var stack = state.stack;\n\t var n2 = stack.pop();\n\t var n1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'DIV[]', n2, n1); }\n\n\t stack.push(n1 * 64 / n2);\n\t}\n\n\t// MUL[] MUL\n\t// 0x63\n\tfunction MUL(state) {\n\t var stack = state.stack;\n\t var n2 = stack.pop();\n\t var n1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'MUL[]', n2, n1); }\n\n\t stack.push(n1 * n2 / 64);\n\t}\n\n\t// ABS[] ABSolute value\n\t// 0x64\n\tfunction ABS(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'ABS[]', n); }\n\n\t stack.push(Math.abs(n));\n\t}\n\n\t// NEG[] NEGate\n\t// 0x65\n\tfunction NEG(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'NEG[]', n); }\n\n\t stack.push(-n);\n\t}\n\n\t// FLOOR[] FLOOR\n\t// 0x66\n\tfunction FLOOR(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'FLOOR[]', n); }\n\n\t stack.push(Math.floor(n / 0x40) * 0x40);\n\t}\n\n\t// CEILING[] CEILING\n\t// 0x67\n\tfunction CEILING(state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'CEILING[]', n); }\n\n\t stack.push(Math.ceil(n / 0x40) * 0x40);\n\t}\n\n\t// ROUND[ab] ROUND value\n\t// 0x68-0x6B\n\tfunction ROUND(dt, state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'ROUND[]'); }\n\n\t stack.push(state.round(n / 0x40) * 0x40);\n\t}\n\n\t// WCVTF[] Write Control Value Table in Funits\n\t// 0x70\n\tfunction WCVTF(state) {\n\t var stack = state.stack;\n\t var v = stack.pop();\n\t var l = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'WCVTF[]', v, l); }\n\n\t state.cvt[l] = v * state.ppem / state.font.unitsPerEm;\n\t}\n\n\t// DELTAC1[] DELTA exception C1\n\t// DELTAC2[] DELTA exception C2\n\t// DELTAC3[] DELTA exception C3\n\t// 0x73, 0x74, 0x75\n\tfunction DELTAC123(b, state) {\n\t var stack = state.stack;\n\t var n = stack.pop();\n\t var ppem = state.ppem;\n\t var base = state.deltaBase + (b - 1) * 16;\n\t var ds = state.deltaShift;\n\n\t if (exports.DEBUG) { console.log(state.step, 'DELTAC[' + b + ']', n, stack); }\n\n\t for (var i = 0; i < n; i++) {\n\t var c = stack.pop();\n\t var arg = stack.pop();\n\t var appem = base + ((arg & 0xF0) >> 4);\n\t if (appem !== ppem) { continue; }\n\n\t var mag = (arg & 0x0F) - 8;\n\t if (mag >= 0) { mag++; }\n\n\t var delta = mag * ds;\n\n\t if (exports.DEBUG) { console.log(state.step, 'DELTACFIX', c, 'by', delta); }\n\n\t state.cvt[c] += delta;\n\t }\n\t}\n\n\t// SROUND[] Super ROUND\n\t// 0x76\n\tfunction SROUND(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'SROUND[]', n); }\n\n\t state.round = roundSuper;\n\n\t var period;\n\n\t switch (n & 0xC0) {\n\t case 0x00:\n\t period = 0.5;\n\t break;\n\t case 0x40:\n\t period = 1;\n\t break;\n\t case 0x80:\n\t period = 2;\n\t break;\n\t default:\n\t throw new Error('invalid SROUND value');\n\t }\n\n\t state.srPeriod = period;\n\n\t switch (n & 0x30) {\n\t case 0x00:\n\t state.srPhase = 0;\n\t break;\n\t case 0x10:\n\t state.srPhase = 0.25 * period;\n\t break;\n\t case 0x20:\n\t state.srPhase = 0.5 * period;\n\t break;\n\t case 0x30:\n\t state.srPhase = 0.75 * period;\n\t break;\n\t default: throw new Error('invalid SROUND value');\n\t }\n\n\t n &= 0x0F;\n\n\t if (n === 0) { state.srThreshold = 0; }\n\t else { state.srThreshold = (n / 8 - 0.5) * period; }\n\t}\n\n\t// S45ROUND[] Super ROUND 45 degrees\n\t// 0x77\n\tfunction S45ROUND(state) {\n\t var n = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'S45ROUND[]', n); }\n\n\t state.round = roundSuper;\n\n\t var period;\n\n\t switch (n & 0xC0) {\n\t case 0x00:\n\t period = Math.sqrt(2) / 2;\n\t break;\n\t case 0x40:\n\t period = Math.sqrt(2);\n\t break;\n\t case 0x80:\n\t period = 2 * Math.sqrt(2);\n\t break;\n\t default:\n\t throw new Error('invalid S45ROUND value');\n\t }\n\n\t state.srPeriod = period;\n\n\t switch (n & 0x30) {\n\t case 0x00:\n\t state.srPhase = 0;\n\t break;\n\t case 0x10:\n\t state.srPhase = 0.25 * period;\n\t break;\n\t case 0x20:\n\t state.srPhase = 0.5 * period;\n\t break;\n\t case 0x30:\n\t state.srPhase = 0.75 * period;\n\t break;\n\t default:\n\t throw new Error('invalid S45ROUND value');\n\t }\n\n\t n &= 0x0F;\n\n\t if (n === 0) { state.srThreshold = 0; }\n\t else { state.srThreshold = (n / 8 - 0.5) * period; }\n\t}\n\n\t// ROFF[] Round Off\n\t// 0x7A\n\tfunction ROFF(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'ROFF[]'); }\n\n\t state.round = roundOff;\n\t}\n\n\t// RUTG[] Round Up To Grid\n\t// 0x7C\n\tfunction RUTG(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'RUTG[]'); }\n\n\t state.round = roundUpToGrid;\n\t}\n\n\t// RDTG[] Round Down To Grid\n\t// 0x7D\n\tfunction RDTG(state) {\n\t if (exports.DEBUG) { console.log(state.step, 'RDTG[]'); }\n\n\t state.round = roundDownToGrid;\n\t}\n\n\t// SCANCTRL[] SCAN conversion ConTRoL\n\t// 0x85\n\tfunction SCANCTRL(state) {\n\t var n = state.stack.pop();\n\n\t // ignored by opentype.js\n\n\t if (exports.DEBUG) { console.log(state.step, 'SCANCTRL[]', n); }\n\t}\n\n\t// SDPVTL[a] Set Dual Projection Vector To Line\n\t// 0x86-0x87\n\tfunction SDPVTL(a, state) {\n\t var stack = state.stack;\n\t var p2i = stack.pop();\n\t var p1i = stack.pop();\n\t var p2 = state.z2[p2i];\n\t var p1 = state.z1[p1i];\n\n\t if (exports.DEBUG) { console.log(state.step, 'SDPVTL[' + a + ']', p2i, p1i); }\n\n\t var dx;\n\t var dy;\n\n\t if (!a) {\n\t dx = p1.x - p2.x;\n\t dy = p1.y - p2.y;\n\t } else {\n\t dx = p2.y - p1.y;\n\t dy = p1.x - p2.x;\n\t }\n\n\t state.dpv = getUnitVector(dx, dy);\n\t}\n\n\t// GETINFO[] GET INFOrmation\n\t// 0x88\n\tfunction GETINFO(state) {\n\t var stack = state.stack;\n\t var sel = stack.pop();\n\t var r = 0;\n\n\t if (exports.DEBUG) { console.log(state.step, 'GETINFO[]', sel); }\n\n\t // v35 as in no subpixel hinting\n\t if (sel & 0x01) { r = 35; }\n\n\t // TODO rotation and stretch currently not supported\n\t // and thus those GETINFO are always 0.\n\n\t // opentype.js is always gray scaling\n\t if (sel & 0x20) { r |= 0x1000; }\n\n\t stack.push(r);\n\t}\n\n\t// ROLL[] ROLL the top three stack elements\n\t// 0x8A\n\tfunction ROLL(state) {\n\t var stack = state.stack;\n\t var a = stack.pop();\n\t var b = stack.pop();\n\t var c = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'ROLL[]'); }\n\n\t stack.push(b);\n\t stack.push(a);\n\t stack.push(c);\n\t}\n\n\t// MAX[] MAXimum of top two stack elements\n\t// 0x8B\n\tfunction MAX(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'MAX[]', e2, e1); }\n\n\t stack.push(Math.max(e1, e2));\n\t}\n\n\t// MIN[] MINimum of top two stack elements\n\t// 0x8C\n\tfunction MIN(state) {\n\t var stack = state.stack;\n\t var e2 = stack.pop();\n\t var e1 = stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'MIN[]', e2, e1); }\n\n\t stack.push(Math.min(e1, e2));\n\t}\n\n\t// SCANTYPE[] SCANTYPE\n\t// 0x8D\n\tfunction SCANTYPE(state) {\n\t var n = state.stack.pop();\n\t // ignored by opentype.js\n\t if (exports.DEBUG) { console.log(state.step, 'SCANTYPE[]', n); }\n\t}\n\n\t// INSTCTRL[] INSTCTRL\n\t// 0x8D\n\tfunction INSTCTRL(state) {\n\t var s = state.stack.pop();\n\t var v = state.stack.pop();\n\n\t if (exports.DEBUG) { console.log(state.step, 'INSTCTRL[]', s, v); }\n\n\t switch (s) {\n\t case 1 : state.inhibitGridFit = !!v; return;\n\t case 2 : state.ignoreCvt = !!v; return;\n\t default: throw new Error('invalid INSTCTRL[] selector');\n\t }\n\t}\n\n\t// PUSHB[abc] PUSH Bytes\n\t// 0xB0-0xB7\n\tfunction PUSHB(n, state) {\n\t var stack = state.stack;\n\t var prog = state.prog;\n\t var ip = state.ip;\n\n\t if (exports.DEBUG) { console.log(state.step, 'PUSHB[' + n + ']'); }\n\n\t for (var i = 0; i < n; i++) { stack.push(prog[++ip]); }\n\n\t state.ip = ip;\n\t}\n\n\t// PUSHW[abc] PUSH Words\n\t// 0xB8-0xBF\n\tfunction PUSHW(n, state) {\n\t var ip = state.ip;\n\t var prog = state.prog;\n\t var stack = state.stack;\n\n\t if (exports.DEBUG) { console.log(state.ip, 'PUSHW[' + n + ']'); }\n\n\t for (var i = 0; i < n; i++) {\n\t var w = (prog[++ip] << 8) | prog[++ip];\n\t if (w & 0x8000) { w = -((w ^ 0xffff) + 1); }\n\t stack.push(w);\n\t }\n\n\t state.ip = ip;\n\t}\n\n\t// MDRP[abcde] Move Direct Relative Point\n\t// 0xD0-0xEF\n\t// (if indirect is 0)\n\t//\n\t// and\n\t//\n\t// MIRP[abcde] Move Indirect Relative Point\n\t// 0xE0-0xFF\n\t// (if indirect is 1)\n\n\tfunction MDRP_MIRP(indirect, setRp0, keepD, ro, dt, state) {\n\t var stack = state.stack;\n\t var cvte = indirect && stack.pop();\n\t var pi = stack.pop();\n\t var rp0i = state.rp0;\n\t var rp = state.z0[rp0i];\n\t var p = state.z1[pi];\n\n\t var md = state.minDis;\n\t var fv = state.fv;\n\t var pv = state.dpv;\n\t var od; // original distance\n\t var d; // moving distance\n\t var sign; // sign of distance\n\t var cv;\n\n\t d = od = pv.distance(p, rp, true, true);\n\t sign = d >= 0 ? 1 : -1; // Math.sign would be 0 in case of 0\n\n\t // TODO consider autoFlip\n\t d = Math.abs(d);\n\n\t if (indirect) {\n\t cv = state.cvt[cvte];\n\n\t if (ro && Math.abs(d - cv) < state.cvCutIn) { d = cv; }\n\t }\n\n\t if (keepD && d < md) { d = md; }\n\n\t if (ro) { d = state.round(d); }\n\n\t fv.setRelative(p, rp, sign * d, pv);\n\t fv.touch(p);\n\n\t if (exports.DEBUG) {\n\t console.log(\n\t state.step,\n\t (indirect ? 'MIRP[' : 'MDRP[') +\n\t (setRp0 ? 'M' : 'm') +\n\t (keepD ? '>' : '_') +\n\t (ro ? 'R' : '_') +\n\t (dt === 0 ? 'Gr' : (dt === 1 ? 'Bl' : (dt === 2 ? 'Wh' : ''))) +\n\t ']',\n\t indirect ?\n\t cvte + '(' + state.cvt[cvte] + ',' + cv + ')' :\n\t '',\n\t pi,\n\t '(d =', od, '->', sign * d, ')'\n\t );\n\t }\n\n\t state.rp1 = state.rp0;\n\t state.rp2 = pi;\n\t if (setRp0) { state.rp0 = pi; }\n\t}\n\n\t/*\n\t* The instruction table.\n\t*/\n\tinstructionTable = [\n\t /* 0x00 */ SVTCA.bind(undefined, yUnitVector),\n\t /* 0x01 */ SVTCA.bind(undefined, xUnitVector),\n\t /* 0x02 */ SPVTCA.bind(undefined, yUnitVector),\n\t /* 0x03 */ SPVTCA.bind(undefined, xUnitVector),\n\t /* 0x04 */ SFVTCA.bind(undefined, yUnitVector),\n\t /* 0x05 */ SFVTCA.bind(undefined, xUnitVector),\n\t /* 0x06 */ SPVTL.bind(undefined, 0),\n\t /* 0x07 */ SPVTL.bind(undefined, 1),\n\t /* 0x08 */ SFVTL.bind(undefined, 0),\n\t /* 0x09 */ SFVTL.bind(undefined, 1),\n\t /* 0x0A */ SPVFS,\n\t /* 0x0B */ SFVFS,\n\t /* 0x0C */ GPV,\n\t /* 0x0D */ GFV,\n\t /* 0x0E */ SFVTPV,\n\t /* 0x0F */ ISECT,\n\t /* 0x10 */ SRP0,\n\t /* 0x11 */ SRP1,\n\t /* 0x12 */ SRP2,\n\t /* 0x13 */ SZP0,\n\t /* 0x14 */ SZP1,\n\t /* 0x15 */ SZP2,\n\t /* 0x16 */ SZPS,\n\t /* 0x17 */ SLOOP,\n\t /* 0x18 */ RTG,\n\t /* 0x19 */ RTHG,\n\t /* 0x1A */ SMD,\n\t /* 0x1B */ ELSE,\n\t /* 0x1C */ JMPR,\n\t /* 0x1D */ SCVTCI,\n\t /* 0x1E */ undefined, // TODO SSWCI\n\t /* 0x1F */ undefined, // TODO SSW\n\t /* 0x20 */ DUP,\n\t /* 0x21 */ POP,\n\t /* 0x22 */ CLEAR,\n\t /* 0x23 */ SWAP,\n\t /* 0x24 */ DEPTH,\n\t /* 0x25 */ CINDEX,\n\t /* 0x26 */ MINDEX,\n\t /* 0x27 */ undefined, // TODO ALIGNPTS\n\t /* 0x28 */ undefined,\n\t /* 0x29 */ undefined, // TODO UTP\n\t /* 0x2A */ LOOPCALL,\n\t /* 0x2B */ CALL,\n\t /* 0x2C */ FDEF,\n\t /* 0x2D */ undefined, // ENDF (eaten by FDEF)\n\t /* 0x2E */ MDAP.bind(undefined, 0),\n\t /* 0x2F */ MDAP.bind(undefined, 1),\n\t /* 0x30 */ IUP.bind(undefined, yUnitVector),\n\t /* 0x31 */ IUP.bind(undefined, xUnitVector),\n\t /* 0x32 */ SHP.bind(undefined, 0),\n\t /* 0x33 */ SHP.bind(undefined, 1),\n\t /* 0x34 */ SHC.bind(undefined, 0),\n\t /* 0x35 */ SHC.bind(undefined, 1),\n\t /* 0x36 */ SHZ.bind(undefined, 0),\n\t /* 0x37 */ SHZ.bind(undefined, 1),\n\t /* 0x38 */ SHPIX,\n\t /* 0x39 */ IP,\n\t /* 0x3A */ MSIRP.bind(undefined, 0),\n\t /* 0x3B */ MSIRP.bind(undefined, 1),\n\t /* 0x3C */ ALIGNRP,\n\t /* 0x3D */ RTDG,\n\t /* 0x3E */ MIAP.bind(undefined, 0),\n\t /* 0x3F */ MIAP.bind(undefined, 1),\n\t /* 0x40 */ NPUSHB,\n\t /* 0x41 */ NPUSHW,\n\t /* 0x42 */ WS,\n\t /* 0x43 */ RS,\n\t /* 0x44 */ WCVTP,\n\t /* 0x45 */ RCVT,\n\t /* 0x46 */ GC.bind(undefined, 0),\n\t /* 0x47 */ GC.bind(undefined, 1),\n\t /* 0x48 */ undefined, // TODO SCFS\n\t /* 0x49 */ MD.bind(undefined, 0),\n\t /* 0x4A */ MD.bind(undefined, 1),\n\t /* 0x4B */ MPPEM,\n\t /* 0x4C */ undefined, // TODO MPS\n\t /* 0x4D */ FLIPON,\n\t /* 0x4E */ undefined, // TODO FLIPOFF\n\t /* 0x4F */ undefined, // TODO DEBUG\n\t /* 0x50 */ LT,\n\t /* 0x51 */ LTEQ,\n\t /* 0x52 */ GT,\n\t /* 0x53 */ GTEQ,\n\t /* 0x54 */ EQ,\n\t /* 0x55 */ NEQ,\n\t /* 0x56 */ ODD,\n\t /* 0x57 */ EVEN,\n\t /* 0x58 */ IF,\n\t /* 0x59 */ EIF,\n\t /* 0x5A */ AND,\n\t /* 0x5B */ OR,\n\t /* 0x5C */ NOT,\n\t /* 0x5D */ DELTAP123.bind(undefined, 1),\n\t /* 0x5E */ SDB,\n\t /* 0x5F */ SDS,\n\t /* 0x60 */ ADD,\n\t /* 0x61 */ SUB,\n\t /* 0x62 */ DIV,\n\t /* 0x63 */ MUL,\n\t /* 0x64 */ ABS,\n\t /* 0x65 */ NEG,\n\t /* 0x66 */ FLOOR,\n\t /* 0x67 */ CEILING,\n\t /* 0x68 */ ROUND.bind(undefined, 0),\n\t /* 0x69 */ ROUND.bind(undefined, 1),\n\t /* 0x6A */ ROUND.bind(undefined, 2),\n\t /* 0x6B */ ROUND.bind(undefined, 3),\n\t /* 0x6C */ undefined, // TODO NROUND[ab]\n\t /* 0x6D */ undefined, // TODO NROUND[ab]\n\t /* 0x6E */ undefined, // TODO NROUND[ab]\n\t /* 0x6F */ undefined, // TODO NROUND[ab]\n\t /* 0x70 */ WCVTF,\n\t /* 0x71 */ DELTAP123.bind(undefined, 2),\n\t /* 0x72 */ DELTAP123.bind(undefined, 3),\n\t /* 0x73 */ DELTAC123.bind(undefined, 1),\n\t /* 0x74 */ DELTAC123.bind(undefined, 2),\n\t /* 0x75 */ DELTAC123.bind(undefined, 3),\n\t /* 0x76 */ SROUND,\n\t /* 0x77 */ S45ROUND,\n\t /* 0x78 */ undefined, // TODO JROT[]\n\t /* 0x79 */ undefined, // TODO JROF[]\n\t /* 0x7A */ ROFF,\n\t /* 0x7B */ undefined,\n\t /* 0x7C */ RUTG,\n\t /* 0x7D */ RDTG,\n\t /* 0x7E */ POP, // actually SANGW, supposed to do only a pop though\n\t /* 0x7F */ POP, // actually AA, supposed to do only a pop though\n\t /* 0x80 */ undefined, // TODO FLIPPT\n\t /* 0x81 */ undefined, // TODO FLIPRGON\n\t /* 0x82 */ undefined, // TODO FLIPRGOFF\n\t /* 0x83 */ undefined,\n\t /* 0x84 */ undefined,\n\t /* 0x85 */ SCANCTRL,\n\t /* 0x86 */ SDPVTL.bind(undefined, 0),\n\t /* 0x87 */ SDPVTL.bind(undefined, 1),\n\t /* 0x88 */ GETINFO,\n\t /* 0x89 */ undefined, // TODO IDEF\n\t /* 0x8A */ ROLL,\n\t /* 0x8B */ MAX,\n\t /* 0x8C */ MIN,\n\t /* 0x8D */ SCANTYPE,\n\t /* 0x8E */ INSTCTRL,\n\t /* 0x8F */ undefined,\n\t /* 0x90 */ undefined,\n\t /* 0x91 */ undefined,\n\t /* 0x92 */ undefined,\n\t /* 0x93 */ undefined,\n\t /* 0x94 */ undefined,\n\t /* 0x95 */ undefined,\n\t /* 0x96 */ undefined,\n\t /* 0x97 */ undefined,\n\t /* 0x98 */ undefined,\n\t /* 0x99 */ undefined,\n\t /* 0x9A */ undefined,\n\t /* 0x9B */ undefined,\n\t /* 0x9C */ undefined,\n\t /* 0x9D */ undefined,\n\t /* 0x9E */ undefined,\n\t /* 0x9F */ undefined,\n\t /* 0xA0 */ undefined,\n\t /* 0xA1 */ undefined,\n\t /* 0xA2 */ undefined,\n\t /* 0xA3 */ undefined,\n\t /* 0xA4 */ undefined,\n\t /* 0xA5 */ undefined,\n\t /* 0xA6 */ undefined,\n\t /* 0xA7 */ undefined,\n\t /* 0xA8 */ undefined,\n\t /* 0xA9 */ undefined,\n\t /* 0xAA */ undefined,\n\t /* 0xAB */ undefined,\n\t /* 0xAC */ undefined,\n\t /* 0xAD */ undefined,\n\t /* 0xAE */ undefined,\n\t /* 0xAF */ undefined,\n\t /* 0xB0 */ PUSHB.bind(undefined, 1),\n\t /* 0xB1 */ PUSHB.bind(undefined, 2),\n\t /* 0xB2 */ PUSHB.bind(undefined, 3),\n\t /* 0xB3 */ PUSHB.bind(undefined, 4),\n\t /* 0xB4 */ PUSHB.bind(undefined, 5),\n\t /* 0xB5 */ PUSHB.bind(undefined, 6),\n\t /* 0xB6 */ PUSHB.bind(undefined, 7),\n\t /* 0xB7 */ PUSHB.bind(undefined, 8),\n\t /* 0xB8 */ PUSHW.bind(undefined, 1),\n\t /* 0xB9 */ PUSHW.bind(undefined, 2),\n\t /* 0xBA */ PUSHW.bind(undefined, 3),\n\t /* 0xBB */ PUSHW.bind(undefined, 4),\n\t /* 0xBC */ PUSHW.bind(undefined, 5),\n\t /* 0xBD */ PUSHW.bind(undefined, 6),\n\t /* 0xBE */ PUSHW.bind(undefined, 7),\n\t /* 0xBF */ PUSHW.bind(undefined, 8),\n\t /* 0xC0 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 0),\n\t /* 0xC1 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 1),\n\t /* 0xC2 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 2),\n\t /* 0xC3 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 0, 3),\n\t /* 0xC4 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 0),\n\t /* 0xC5 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 1),\n\t /* 0xC6 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 2),\n\t /* 0xC7 */ MDRP_MIRP.bind(undefined, 0, 0, 0, 1, 3),\n\t /* 0xC8 */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 0),\n\t /* 0xC9 */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 1),\n\t /* 0xCA */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 2),\n\t /* 0xCB */ MDRP_MIRP.bind(undefined, 0, 0, 1, 0, 3),\n\t /* 0xCC */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 0),\n\t /* 0xCD */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 1),\n\t /* 0xCE */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 2),\n\t /* 0xCF */ MDRP_MIRP.bind(undefined, 0, 0, 1, 1, 3),\n\t /* 0xD0 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 0),\n\t /* 0xD1 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 1),\n\t /* 0xD2 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 2),\n\t /* 0xD3 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 0, 3),\n\t /* 0xD4 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 0),\n\t /* 0xD5 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 1),\n\t /* 0xD6 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 2),\n\t /* 0xD7 */ MDRP_MIRP.bind(undefined, 0, 1, 0, 1, 3),\n\t /* 0xD8 */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 0),\n\t /* 0xD9 */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 1),\n\t /* 0xDA */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 2),\n\t /* 0xDB */ MDRP_MIRP.bind(undefined, 0, 1, 1, 0, 3),\n\t /* 0xDC */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 0),\n\t /* 0xDD */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 1),\n\t /* 0xDE */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 2),\n\t /* 0xDF */ MDRP_MIRP.bind(undefined, 0, 1, 1, 1, 3),\n\t /* 0xE0 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 0),\n\t /* 0xE1 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 1),\n\t /* 0xE2 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 2),\n\t /* 0xE3 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 0, 3),\n\t /* 0xE4 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 0),\n\t /* 0xE5 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 1),\n\t /* 0xE6 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 2),\n\t /* 0xE7 */ MDRP_MIRP.bind(undefined, 1, 0, 0, 1, 3),\n\t /* 0xE8 */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 0),\n\t /* 0xE9 */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 1),\n\t /* 0xEA */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 2),\n\t /* 0xEB */ MDRP_MIRP.bind(undefined, 1, 0, 1, 0, 3),\n\t /* 0xEC */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 0),\n\t /* 0xED */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 1),\n\t /* 0xEE */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 2),\n\t /* 0xEF */ MDRP_MIRP.bind(undefined, 1, 0, 1, 1, 3),\n\t /* 0xF0 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 0),\n\t /* 0xF1 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 1),\n\t /* 0xF2 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 2),\n\t /* 0xF3 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 0, 3),\n\t /* 0xF4 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 0),\n\t /* 0xF5 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 1),\n\t /* 0xF6 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 2),\n\t /* 0xF7 */ MDRP_MIRP.bind(undefined, 1, 1, 0, 1, 3),\n\t /* 0xF8 */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 0),\n\t /* 0xF9 */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 1),\n\t /* 0xFA */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 2),\n\t /* 0xFB */ MDRP_MIRP.bind(undefined, 1, 1, 1, 0, 3),\n\t /* 0xFC */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 0),\n\t /* 0xFD */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 1),\n\t /* 0xFE */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 2),\n\t /* 0xFF */ MDRP_MIRP.bind(undefined, 1, 1, 1, 1, 3)\n\t];\n\n\t/*****************************\n\t Mathematical Considerations\n\t******************************\n\n\tfv ... refers to freedom vector\n\tpv ... refers to projection vector\n\trp ... refers to reference point\n\tp ... refers to to point being operated on\n\td ... refers to distance\n\n\tSETRELATIVE:\n\t============\n\n\tcase freedom vector == x-axis:\n\t------------------------------\n\n\t (pv)\n\t .-'\n\t rpd .-'\n\t .-*\n\t d .-'90°'\n\t .-' '\n\t .-' '\n\t *-' ' b\n\t rp '\n\t '\n\t '\n\t p *----------*-------------- (fv)\n\t pm\n\n\t rpdx = rpx + d * pv.x\n\t rpdy = rpy + d * pv.y\n\n\t equation of line b\n\n\t y - rpdy = pvns * (x- rpdx)\n\n\t y = p.y\n\n\t x = rpdx + ( p.y - rpdy ) / pvns\n\n\n\tcase freedom vector == y-axis:\n\t------------------------------\n\n\t * pm\n\t |\\\n\t | \\\n\t | \\\n\t | \\\n\t | \\\n\t | \\\n\t | \\\n\t | \\\n\t | \\\n\t | \\ b\n\t | \\\n\t | \\\n\t | \\ .-' (pv)\n\t | 90° \\.-'\n\t | .-'* rpd\n\t | .-'\n\t * *-' d\n\t p rp\n\n\t rpdx = rpx + d * pv.x\n\t rpdy = rpy + d * pv.y\n\n\t equation of line b:\n\t pvns ... normal slope to pv\n\n\t y - rpdy = pvns * (x - rpdx)\n\n\t x = p.x\n\n\t y = rpdy + pvns * (p.x - rpdx)\n\n\n\n\tgeneric case:\n\t-------------\n\n\n\t .'(fv)\n\t .'\n\t .* pm\n\t .' !\n\t .' .\n\t .' !\n\t .' . b\n\t .' !\n\t * .\n\t p !\n\t 90° . ... (pv)\n\t ...-*-'''\n\t ...---''' rpd\n\t ...---''' d\n\t *--'''\n\t rp\n\n\t rpdx = rpx + d * pv.x\n\t rpdy = rpy + d * pv.y\n\n\t equation of line b:\n\t pvns... normal slope to pv\n\n\t y - rpdy = pvns * (x - rpdx)\n\n\t equation of freedom vector line:\n\t fvs ... slope of freedom vector (=fy/fx)\n\n\t y - py = fvs * (x - px)\n\n\n\t on pm both equations are true for same x/y\n\n\t y - rpdy = pvns * (x - rpdx)\n\n\t y - py = fvs * (x - px)\n\n\t form to y and set equal:\n\n\t pvns * (x - rpdx) + rpdy = fvs * (x - px) + py\n\n\t expand:\n\n\t pvns * x - pvns * rpdx + rpdy = fvs * x - fvs * px + py\n\n\t switch:\n\n\t fvs * x - fvs * px + py = pvns * x - pvns * rpdx + rpdy\n\n\t solve for x:\n\n\t fvs * x - pvns * x = fvs * px - pvns * rpdx - py + rpdy\n\n\n\n\t fvs * px - pvns * rpdx + rpdy - py\n\t x = -----------------------------------\n\t fvs - pvns\n\n\t and:\n\n\t y = fvs * (x - px) + py\n\n\n\n\tINTERPOLATE:\n\t============\n\n\tExamples of point interpolation.\n\n\tThe weight of the movement of the reference point gets bigger\n\tthe further the other reference point is away, thus the safest\n\toption (that is avoiding 0/0 divisions) is to weight the\n\toriginal distance of the other point by the sum of both distances.\n\n\tIf the sum of both distances is 0, then move the point by the\n\tarithmetic average of the movement of both reference points.\n\n\n\n\n\t (+6)\n\t rp1o *---->*rp1\n\t . . (+12)\n\t . . rp2o *---------->* rp2\n\t . . . .\n\t . . . .\n\t . 10 20 . .\n\t |.........|...................| .\n\t . . .\n\t . . (+8) .\n\t po *------>*p .\n\t . . .\n\t . 12 . 24 .\n\t |...........|.......................|\n\t 36\n\n\n\t-------\n\n\n\n\t (+10)\n\t rp1o *-------->*rp1\n\t . . (-10)\n\t . . rp2 *<---------* rpo2\n\t . . . .\n\t . . . .\n\t . 10 . 30 . .\n\t |.........|.............................|\n\t . .\n\t . (+5) .\n\t po *--->* p .\n\t . . .\n\t . . 20 .\n\t |....|..............|\n\t 5 15\n\n\n\t-------\n\n\n\t (+10)\n\t rp1o *-------->*rp1\n\t . .\n\t . .\n\t rp2o *-------->*rp2\n\n\n\t (+10)\n\t po *-------->* p\n\n\t-------\n\n\n\t (+10)\n\t rp1o *-------->*rp1\n\t . .\n\t . .(+30)\n\t rp2o *---------------------------->*rp2\n\n\n\t (+25)\n\t po *----------------------->* p\n\n\n\n\tvim: set ts=4 sw=4 expandtab:\n\t*****/\n\n\t// The Font object\n\n\t// This code is based on Array.from implementation for strings in https://github.com/mathiasbynens/Array.from\n\tvar arrayFromString = Array.from || (function (s) { return s.match(/[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]?|[^\\uD800-\\uDFFF]|./g) || []; });\n\n\t/**\n\t * @typedef FontOptions\n\t * @type Object\n\t * @property {Boolean} empty - whether to create a new empty font\n\t * @property {string} familyName\n\t * @property {string} styleName\n\t * @property {string=} fullName\n\t * @property {string=} postScriptName\n\t * @property {string=} designer\n\t * @property {string=} designerURL\n\t * @property {string=} manufacturer\n\t * @property {string=} manufacturerURL\n\t * @property {string=} license\n\t * @property {string=} licenseURL\n\t * @property {string=} version\n\t * @property {string=} description\n\t * @property {string=} copyright\n\t * @property {string=} trademark\n\t * @property {Number} unitsPerEm\n\t * @property {Number} ascender\n\t * @property {Number} descender\n\t * @property {Number} createdTimestamp\n\t * @property {string=} weightClass\n\t * @property {string=} widthClass\n\t * @property {string=} fsSelection\n\t */\n\n\t/**\n\t * A Font represents a loaded OpenType font file.\n\t * It contains a set of glyphs and methods to draw text on a drawing context,\n\t * or to get a path representing the text.\n\t * @exports opentype.Font\n\t * @class\n\t * @param {FontOptions}\n\t * @constructor\n\t */\n\tfunction Font(options) {\n\t options = options || {};\n\n\t if (!options.empty) {\n\t // Check that we've provided the minimum set of names.\n\t checkArgument(options.familyName, 'When creating a new Font object, familyName is required.');\n\t checkArgument(options.styleName, 'When creating a new Font object, styleName is required.');\n\t checkArgument(options.unitsPerEm, 'When creating a new Font object, unitsPerEm is required.');\n\t checkArgument(options.ascender, 'When creating a new Font object, ascender is required.');\n\t checkArgument(options.descender, 'When creating a new Font object, descender is required.');\n\t checkArgument(options.descender < 0, 'Descender should be negative (e.g. -512).');\n\n\t // OS X will complain if the names are empty, so we put a single space everywhere by default.\n\t this.names = {\n\t fontFamily: {en: options.familyName || ' '},\n\t fontSubfamily: {en: options.styleName || ' '},\n\t fullName: {en: options.fullName || options.familyName + ' ' + options.styleName},\n\t // postScriptName may not contain any whitespace\n\t postScriptName: {en: options.postScriptName || (options.familyName + options.styleName).replace(/\\s/g, '')},\n\t designer: {en: options.designer || ' '},\n\t designerURL: {en: options.designerURL || ' '},\n\t manufacturer: {en: options.manufacturer || ' '},\n\t manufacturerURL: {en: options.manufacturerURL || ' '},\n\t license: {en: options.license || ' '},\n\t licenseURL: {en: options.licenseURL || ' '},\n\t version: {en: options.version || 'Version 0.1'},\n\t description: {en: options.description || ' '},\n\t copyright: {en: options.copyright || ' '},\n\t trademark: {en: options.trademark || ' '}\n\t };\n\t this.unitsPerEm = options.unitsPerEm || 1000;\n\t this.ascender = options.ascender;\n\t this.descender = options.descender;\n\t this.createdTimestamp = options.createdTimestamp;\n\t this.tables = { os2: {\n\t usWeightClass: options.weightClass || this.usWeightClasses.MEDIUM,\n\t usWidthClass: options.widthClass || this.usWidthClasses.MEDIUM,\n\t fsSelection: options.fsSelection || this.fsSelectionValues.REGULAR\n\t } };\n\t }\n\n\t this.supported = true; // Deprecated: parseBuffer will throw an error if font is not supported.\n\t this.glyphs = new glyphset.GlyphSet(this, options.glyphs || []);\n\t this.encoding = new DefaultEncoding(this);\n\t this.position = new Position(this);\n\t this.substitution = new Substitution(this);\n\t this.tables = this.tables || {};\n\n\t Object.defineProperty(this, 'hinting', {\n\t get: function() {\n\t if (this._hinting) { return this._hinting; }\n\t if (this.outlinesFormat === 'truetype') {\n\t return (this._hinting = new Hinting(this));\n\t }\n\t }\n\t });\n\t}\n\n\t/**\n\t * Check if the font has a glyph for the given character.\n\t * @param {string}\n\t * @return {Boolean}\n\t */\n\tFont.prototype.hasChar = function(c) {\n\t return this.encoding.charToGlyphIndex(c) !== null;\n\t};\n\n\t/**\n\t * Convert the given character to a single glyph index.\n\t * Note that this function assumes that there is a one-to-one mapping between\n\t * the given character and a glyph; for complex scripts this might not be the case.\n\t * @param {string}\n\t * @return {Number}\n\t */\n\tFont.prototype.charToGlyphIndex = function(s) {\n\t return this.encoding.charToGlyphIndex(s);\n\t};\n\n\t/**\n\t * Convert the given character to a single Glyph object.\n\t * Note that this function assumes that there is a one-to-one mapping between\n\t * the given character and a glyph; for complex scripts this might not be the case.\n\t * @param {string}\n\t * @return {opentype.Glyph}\n\t */\n\tFont.prototype.charToGlyph = function(c) {\n\t var glyphIndex = this.charToGlyphIndex(c);\n\t var glyph = this.glyphs.get(glyphIndex);\n\t if (!glyph) {\n\t // .notdef\n\t glyph = this.glyphs.get(0);\n\t }\n\n\t return glyph;\n\t};\n\n\t/**\n\t * Convert the given text to a list of Glyph objects.\n\t * Note that there is no strict one-to-one mapping between characters and\n\t * glyphs, so the list of returned glyphs can be larger or smaller than the\n\t * length of the given string.\n\t * @param {string}\n\t * @param {GlyphRenderOptions} [options]\n\t * @return {opentype.Glyph[]}\n\t */\n\tFont.prototype.stringToGlyphs = function(s, options) {\n\t var this$1 = this;\n\n\t options = options || this.defaultRenderOptions;\n\t // Get glyph indexes\n\t var chars = arrayFromString(s);\n\t var indexes = [];\n\t for (var i = 0; i < chars.length; i += 1) {\n\t var c = chars[i];\n\t indexes.push(this$1.charToGlyphIndex(c));\n\t }\n\t var length = indexes.length;\n\n\t // Apply substitutions on glyph indexes\n\t if (options.features) {\n\t var script = options.script || this.substitution.getDefaultScriptName();\n\t var manyToOne = [];\n\t if (options.features.liga) { manyToOne = manyToOne.concat(this.substitution.getFeature('liga', script, options.language)); }\n\t if (options.features.rlig) { manyToOne = manyToOne.concat(this.substitution.getFeature('rlig', script, options.language)); }\n\t for (var i$1 = 0; i$1 < length; i$1 += 1) {\n\t for (var j = 0; j < manyToOne.length; j++) {\n\t var ligature = manyToOne[j];\n\t var components = ligature.sub;\n\t var compCount = components.length;\n\t var k = 0;\n\t while (k < compCount && components[k] === indexes[i$1 + k]) { k++; }\n\t if (k === compCount) {\n\t indexes.splice(i$1, compCount, ligature.by);\n\t length = length - compCount + 1;\n\t }\n\t }\n\t }\n\t }\n\n\t // convert glyph indexes to glyph objects\n\t var glyphs = new Array(length);\n\t var notdef = this.glyphs.get(0);\n\t for (var i$2 = 0; i$2 < length; i$2 += 1) {\n\t glyphs[i$2] = this$1.glyphs.get(indexes[i$2]) || notdef;\n\t }\n\t return glyphs;\n\t};\n\n\t/**\n\t * @param {string}\n\t * @return {Number}\n\t */\n\tFont.prototype.nameToGlyphIndex = function(name) {\n\t return this.glyphNames.nameToGlyphIndex(name);\n\t};\n\n\t/**\n\t * @param {string}\n\t * @return {opentype.Glyph}\n\t */\n\tFont.prototype.nameToGlyph = function(name) {\n\t var glyphIndex = this.nameToGlyphIndex(name);\n\t var glyph = this.glyphs.get(glyphIndex);\n\t if (!glyph) {\n\t // .notdef\n\t glyph = this.glyphs.get(0);\n\t }\n\n\t return glyph;\n\t};\n\n\t/**\n\t * @param {Number}\n\t * @return {String}\n\t */\n\tFont.prototype.glyphIndexToName = function(gid) {\n\t if (!this.glyphNames.glyphIndexToName) {\n\t return '';\n\t }\n\n\t return this.glyphNames.glyphIndexToName(gid);\n\t};\n\n\t/**\n\t * Retrieve the value of the kerning pair between the left glyph (or its index)\n\t * and the right glyph (or its index). If no kerning pair is found, return 0.\n\t * The kerning value gets added to the advance width when calculating the spacing\n\t * between glyphs.\n\t * For GPOS kerning, this method uses the default script and language, which covers\n\t * most use cases. To have greater control, use font.position.getKerningValue .\n\t * @param {opentype.Glyph} leftGlyph\n\t * @param {opentype.Glyph} rightGlyph\n\t * @return {Number}\n\t */\n\tFont.prototype.getKerningValue = function(leftGlyph, rightGlyph) {\n\t leftGlyph = leftGlyph.index || leftGlyph;\n\t rightGlyph = rightGlyph.index || rightGlyph;\n\t var gposKerning = this.position.defaultKerningTables;\n\t if (gposKerning) {\n\t return this.position.getKerningValue(gposKerning, leftGlyph, rightGlyph);\n\t }\n\t // \"kern\" table\n\t return this.kerningPairs[leftGlyph + ',' + rightGlyph] || 0;\n\t};\n\n\t/**\n\t * @typedef GlyphRenderOptions\n\t * @type Object\n\t * @property {string} [script] - script used to determine which features to apply. By default, 'DFLT' or 'latn' is used.\n\t * See https://www.microsoft.com/typography/otspec/scripttags.htm\n\t * @property {string} [language='dflt'] - language system used to determine which features to apply.\n\t * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx\n\t * @property {boolean} [kerning=true] - whether to include kerning values\n\t * @property {object} [features] - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system.\n\t * See https://www.microsoft.com/typography/otspec/featuretags.htm\n\t */\n\tFont.prototype.defaultRenderOptions = {\n\t kerning: true,\n\t features: {\n\t liga: true,\n\t rlig: true\n\t }\n\t};\n\n\t/**\n\t * Helper function that invokes the given callback for each glyph in the given text.\n\t * The callback gets `(glyph, x, y, fontSize, options)`.* @param {string} text\n\t * @param {string} text - The text to apply.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t * @param {Function} callback\n\t */\n\tFont.prototype.forEachGlyph = function(text, x, y, fontSize, options, callback) {\n\t var this$1 = this;\n\n\t x = x !== undefined ? x : 0;\n\t y = y !== undefined ? y : 0;\n\t fontSize = fontSize !== undefined ? fontSize : 72;\n\t options = options || this.defaultRenderOptions;\n\t var fontScale = 1 / this.unitsPerEm * fontSize;\n\t var glyphs = this.stringToGlyphs(text, options);\n\t var kerningLookups;\n\t if (options.kerning) {\n\t var script = options.script || this.position.getDefaultScriptName();\n\t kerningLookups = this.position.getKerningTables(script, options.language);\n\t }\n\t for (var i = 0; i < glyphs.length; i += 1) {\n\t var glyph = glyphs[i];\n\t callback.call(this$1, glyph, x, y, fontSize, options);\n\t if (glyph.advanceWidth) {\n\t x += glyph.advanceWidth * fontScale;\n\t }\n\n\t if (options.kerning && i < glyphs.length - 1) {\n\t // We should apply position adjustment lookups in a more generic way.\n\t // Here we only use the xAdvance value.\n\t var kerningValue = kerningLookups ?\n\t this$1.position.getKerningValue(kerningLookups, glyph.index, glyphs[i + 1].index) :\n\t this$1.getKerningValue(glyph, glyphs[i + 1]);\n\t x += kerningValue * fontScale;\n\t }\n\n\t if (options.letterSpacing) {\n\t x += options.letterSpacing * fontSize;\n\t } else if (options.tracking) {\n\t x += (options.tracking / 1000) * fontSize;\n\t }\n\t }\n\t return x;\n\t};\n\n\t/**\n\t * Create a Path object that represents the given text.\n\t * @param {string} text - The text to create.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t * @return {opentype.Path}\n\t */\n\tFont.prototype.getPath = function(text, x, y, fontSize, options) {\n\t var fullPath = new Path();\n\t this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) {\n\t var glyphPath = glyph.getPath(gX, gY, gFontSize, options, this);\n\t fullPath.extend(glyphPath);\n\t });\n\t return fullPath;\n\t};\n\n\t/**\n\t * Create an array of Path objects that represent the glyphs of a given text.\n\t * @param {string} text - The text to create.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t * @return {opentype.Path[]}\n\t */\n\tFont.prototype.getPaths = function(text, x, y, fontSize, options) {\n\t var glyphPaths = [];\n\t this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) {\n\t var glyphPath = glyph.getPath(gX, gY, gFontSize, options, this);\n\t glyphPaths.push(glyphPath);\n\t });\n\n\t return glyphPaths;\n\t};\n\n\t/**\n\t * Returns the advance width of a text.\n\t *\n\t * This is something different than Path.getBoundingBox() as for example a\n\t * suffixed whitespace increases the advanceWidth but not the bounding box\n\t * or an overhanging letter like a calligraphic 'f' might have a quite larger\n\t * bounding box than its advance width.\n\t *\n\t * This corresponds to canvas2dContext.measureText(text).width\n\t *\n\t * @param {string} text - The text to create.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t * @return advance width\n\t */\n\tFont.prototype.getAdvanceWidth = function(text, fontSize, options) {\n\t return this.forEachGlyph(text, 0, 0, fontSize, options, function() {});\n\t};\n\n\t/**\n\t * Draw the text on the given drawing context.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {string} text - The text to create.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t */\n\tFont.prototype.draw = function(ctx, text, x, y, fontSize, options) {\n\t this.getPath(text, x, y, fontSize, options).draw(ctx);\n\t};\n\n\t/**\n\t * Draw the points of all glyphs in the text.\n\t * On-curve points will be drawn in blue, off-curve points will be drawn in red.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {string} text - The text to create.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t */\n\tFont.prototype.drawPoints = function(ctx, text, x, y, fontSize, options) {\n\t this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) {\n\t glyph.drawPoints(ctx, gX, gY, gFontSize);\n\t });\n\t};\n\n\t/**\n\t * Draw lines indicating important font measurements for all glyphs in the text.\n\t * Black lines indicate the origin of the coordinate system (point 0,0).\n\t * Blue lines indicate the glyph bounding box.\n\t * Green line indicates the advance width of the glyph.\n\t * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas.\n\t * @param {string} text - The text to create.\n\t * @param {number} [x=0] - Horizontal position of the beginning of the text.\n\t * @param {number} [y=0] - Vertical position of the *baseline* of the text.\n\t * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`.\n\t * @param {GlyphRenderOptions=} options\n\t */\n\tFont.prototype.drawMetrics = function(ctx, text, x, y, fontSize, options) {\n\t this.forEachGlyph(text, x, y, fontSize, options, function(glyph, gX, gY, gFontSize) {\n\t glyph.drawMetrics(ctx, gX, gY, gFontSize);\n\t });\n\t};\n\n\t/**\n\t * @param {string}\n\t * @return {string}\n\t */\n\tFont.prototype.getEnglishName = function(name) {\n\t var translations = this.names[name];\n\t if (translations) {\n\t return translations.en;\n\t }\n\t};\n\n\t/**\n\t * Validate\n\t */\n\tFont.prototype.validate = function() {\n\t var _this = this;\n\n\t function assert(predicate, message) {\n\t }\n\n\t function assertNamePresent(name) {\n\t var englishName = _this.getEnglishName(name);\n\t assert(englishName && englishName.trim().length > 0,\n\t 'No English ' + name + ' specified.');\n\t }\n\n\t // Identification information\n\t assertNamePresent('fontFamily');\n\t assertNamePresent('weightName');\n\t assertNamePresent('manufacturer');\n\t assertNamePresent('copyright');\n\t assertNamePresent('version');\n\n\t // Dimension information\n\t assert(this.unitsPerEm > 0, 'No unitsPerEm specified.');\n\t};\n\n\t/**\n\t * Convert the font object to a SFNT data structure.\n\t * This structure contains all the necessary tables and metadata to create a binary OTF file.\n\t * @return {opentype.Table}\n\t */\n\tFont.prototype.toTables = function() {\n\t return sfnt.fontToTable(this);\n\t};\n\t/**\n\t * @deprecated Font.toBuffer is deprecated. Use Font.toArrayBuffer instead.\n\t */\n\tFont.prototype.toBuffer = function() {\n\t console.warn('Font.toBuffer is deprecated. Use Font.toArrayBuffer instead.');\n\t return this.toArrayBuffer();\n\t};\n\t/**\n\t * Converts a `opentype.Font` into an `ArrayBuffer`\n\t * @return {ArrayBuffer}\n\t */\n\tFont.prototype.toArrayBuffer = function() {\n\t var sfntTable = this.toTables();\n\t var bytes = sfntTable.encode();\n\t var buffer = new ArrayBuffer(bytes.length);\n\t var intArray = new Uint8Array(buffer);\n\t for (var i = 0; i < bytes.length; i++) {\n\t intArray[i] = bytes[i];\n\t }\n\n\t return buffer;\n\t};\n\n\t/**\n\t * Initiate a download of the OpenType font.\n\t */\n\tFont.prototype.download = function(fileName) {\n\t var familyName = this.getEnglishName('fontFamily');\n\t var styleName = this.getEnglishName('fontSubfamily');\n\t fileName = fileName || familyName.replace(/\\s/g, '') + '-' + styleName + '.otf';\n\t var arrayBuffer = this.toArrayBuffer();\n\n\t if (isBrowser()) {\n\t window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;\n\t window.requestFileSystem(window.TEMPORARY, arrayBuffer.byteLength, function(fs) {\n\t fs.root.getFile(fileName, {create: true}, function(fileEntry) {\n\t fileEntry.createWriter(function(writer) {\n\t var dataView = new DataView(arrayBuffer);\n\t var blob = new Blob([dataView], {type: 'font/opentype'});\n\t writer.write(blob);\n\n\t writer.addEventListener('writeend', function() {\n\t // Navigating to the file will download it.\n\t location.href = fileEntry.toURL();\n\t }, false);\n\t });\n\t });\n\t },\n\t function(err) {\n\t throw new Error(err.name + ': ' + err.message);\n\t });\n\t } else {\n\t var fs = _dereq_('fs');\n\t var buffer = arrayBufferToNodeBuffer(arrayBuffer);\n\t fs.writeFileSync(fileName, buffer);\n\t }\n\t};\n\t/**\n\t * @private\n\t */\n\tFont.prototype.fsSelectionValues = {\n\t ITALIC: 0x001, //1\n\t UNDERSCORE: 0x002, //2\n\t NEGATIVE: 0x004, //4\n\t OUTLINED: 0x008, //8\n\t STRIKEOUT: 0x010, //16\n\t BOLD: 0x020, //32\n\t REGULAR: 0x040, //64\n\t USER_TYPO_METRICS: 0x080, //128\n\t WWS: 0x100, //256\n\t OBLIQUE: 0x200 //512\n\t};\n\n\t/**\n\t * @private\n\t */\n\tFont.prototype.usWidthClasses = {\n\t ULTRA_CONDENSED: 1,\n\t EXTRA_CONDENSED: 2,\n\t CONDENSED: 3,\n\t SEMI_CONDENSED: 4,\n\t MEDIUM: 5,\n\t SEMI_EXPANDED: 6,\n\t EXPANDED: 7,\n\t EXTRA_EXPANDED: 8,\n\t ULTRA_EXPANDED: 9\n\t};\n\n\t/**\n\t * @private\n\t */\n\tFont.prototype.usWeightClasses = {\n\t THIN: 100,\n\t EXTRA_LIGHT: 200,\n\t LIGHT: 300,\n\t NORMAL: 400,\n\t MEDIUM: 500,\n\t SEMI_BOLD: 600,\n\t BOLD: 700,\n\t EXTRA_BOLD: 800,\n\t BLACK: 900\n\t};\n\n\t// The `fvar` table stores font variation axes and instances.\n\n\tfunction addName(name, names) {\n\t var nameString = JSON.stringify(name);\n\t var nameID = 256;\n\t for (var nameKey in names) {\n\t var n = parseInt(nameKey);\n\t if (!n || n < 256) {\n\t continue;\n\t }\n\n\t if (JSON.stringify(names[nameKey]) === nameString) {\n\t return n;\n\t }\n\n\t if (nameID <= n) {\n\t nameID = n + 1;\n\t }\n\t }\n\n\t names[nameID] = name;\n\t return nameID;\n\t}\n\n\tfunction makeFvarAxis(n, axis, names) {\n\t var nameID = addName(axis.name, names);\n\t return [\n\t {name: 'tag_' + n, type: 'TAG', value: axis.tag},\n\t {name: 'minValue_' + n, type: 'FIXED', value: axis.minValue << 16},\n\t {name: 'defaultValue_' + n, type: 'FIXED', value: axis.defaultValue << 16},\n\t {name: 'maxValue_' + n, type: 'FIXED', value: axis.maxValue << 16},\n\t {name: 'flags_' + n, type: 'USHORT', value: 0},\n\t {name: 'nameID_' + n, type: 'USHORT', value: nameID}\n\t ];\n\t}\n\n\tfunction parseFvarAxis(data, start, names) {\n\t var axis = {};\n\t var p = new parse.Parser(data, start);\n\t axis.tag = p.parseTag();\n\t axis.minValue = p.parseFixed();\n\t axis.defaultValue = p.parseFixed();\n\t axis.maxValue = p.parseFixed();\n\t p.skip('uShort', 1); // reserved for flags; no values defined\n\t axis.name = names[p.parseUShort()] || {};\n\t return axis;\n\t}\n\n\tfunction makeFvarInstance(n, inst, axes, names) {\n\t var nameID = addName(inst.name, names);\n\t var fields = [\n\t {name: 'nameID_' + n, type: 'USHORT', value: nameID},\n\t {name: 'flags_' + n, type: 'USHORT', value: 0}\n\t ];\n\n\t for (var i = 0; i < axes.length; ++i) {\n\t var axisTag = axes[i].tag;\n\t fields.push({\n\t name: 'axis_' + n + ' ' + axisTag,\n\t type: 'FIXED',\n\t value: inst.coordinates[axisTag] << 16\n\t });\n\t }\n\n\t return fields;\n\t}\n\n\tfunction parseFvarInstance(data, start, axes, names) {\n\t var inst = {};\n\t var p = new parse.Parser(data, start);\n\t inst.name = names[p.parseUShort()] || {};\n\t p.skip('uShort', 1); // reserved for flags; no values defined\n\n\t inst.coordinates = {};\n\t for (var i = 0; i < axes.length; ++i) {\n\t inst.coordinates[axes[i].tag] = p.parseFixed();\n\t }\n\n\t return inst;\n\t}\n\n\tfunction makeFvarTable(fvar, names) {\n\t var result = new table.Table('fvar', [\n\t {name: 'version', type: 'ULONG', value: 0x10000},\n\t {name: 'offsetToData', type: 'USHORT', value: 0},\n\t {name: 'countSizePairs', type: 'USHORT', value: 2},\n\t {name: 'axisCount', type: 'USHORT', value: fvar.axes.length},\n\t {name: 'axisSize', type: 'USHORT', value: 20},\n\t {name: 'instanceCount', type: 'USHORT', value: fvar.instances.length},\n\t {name: 'instanceSize', type: 'USHORT', value: 4 + fvar.axes.length * 4}\n\t ]);\n\t result.offsetToData = result.sizeOf();\n\n\t for (var i = 0; i < fvar.axes.length; i++) {\n\t result.fields = result.fields.concat(makeFvarAxis(i, fvar.axes[i], names));\n\t }\n\n\t for (var j = 0; j < fvar.instances.length; j++) {\n\t result.fields = result.fields.concat(makeFvarInstance(j, fvar.instances[j], fvar.axes, names));\n\t }\n\n\t return result;\n\t}\n\n\tfunction parseFvarTable(data, start, names) {\n\t var p = new parse.Parser(data, start);\n\t var tableVersion = p.parseULong();\n\t check.argument(tableVersion === 0x00010000, 'Unsupported fvar table version.');\n\t var offsetToData = p.parseOffset16();\n\t // Skip countSizePairs.\n\t p.skip('uShort', 1);\n\t var axisCount = p.parseUShort();\n\t var axisSize = p.parseUShort();\n\t var instanceCount = p.parseUShort();\n\t var instanceSize = p.parseUShort();\n\n\t var axes = [];\n\t for (var i = 0; i < axisCount; i++) {\n\t axes.push(parseFvarAxis(data, start + offsetToData + i * axisSize, names));\n\t }\n\n\t var instances = [];\n\t var instanceStart = start + offsetToData + axisCount * axisSize;\n\t for (var j = 0; j < instanceCount; j++) {\n\t instances.push(parseFvarInstance(data, instanceStart + j * instanceSize, axes, names));\n\t }\n\n\t return {axes: axes, instances: instances};\n\t}\n\n\tvar fvar = { make: makeFvarTable, parse: parseFvarTable };\n\n\t// The `GPOS` table contains kerning pairs, among other things.\n\n\tvar subtableParsers$1 = new Array(10); // subtableParsers[0] is unused\n\n\t// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#lookup-type-1-single-adjustment-positioning-subtable\n\t// this = Parser instance\n\tsubtableParsers$1[1] = function parseLookup1() {\n\t var start = this.offset + this.relativeOffset;\n\t var posformat = this.parseUShort();\n\t if (posformat === 1) {\n\t return {\n\t posFormat: 1,\n\t coverage: this.parsePointer(Parser.coverage),\n\t value: this.parseValueRecord()\n\t };\n\t } else if (posformat === 2) {\n\t return {\n\t posFormat: 2,\n\t coverage: this.parsePointer(Parser.coverage),\n\t values: this.parseValueRecordList()\n\t };\n\t }\n\t check.assert(false, '0x' + start.toString(16) + ': GPOS lookup type 1 format must be 1 or 2.');\n\t};\n\n\t// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#lookup-type-2-pair-adjustment-positioning-subtable\n\tsubtableParsers$1[2] = function parseLookup2() {\n\t var start = this.offset + this.relativeOffset;\n\t var posFormat = this.parseUShort();\n\t check.assert(posFormat === 1 || posFormat === 2, '0x' + start.toString(16) + ': GPOS lookup type 2 format must be 1 or 2.');\n\t var coverage = this.parsePointer(Parser.coverage);\n\t var valueFormat1 = this.parseUShort();\n\t var valueFormat2 = this.parseUShort();\n\t if (posFormat === 1) {\n\t // Adjustments for Glyph Pairs\n\t return {\n\t posFormat: posFormat,\n\t coverage: coverage,\n\t valueFormat1: valueFormat1,\n\t valueFormat2: valueFormat2,\n\t pairSets: this.parseList(Parser.pointer(Parser.list(function() {\n\t return { // pairValueRecord\n\t secondGlyph: this.parseUShort(),\n\t value1: this.parseValueRecord(valueFormat1),\n\t value2: this.parseValueRecord(valueFormat2)\n\t };\n\t })))\n\t };\n\t } else if (posFormat === 2) {\n\t var classDef1 = this.parsePointer(Parser.classDef);\n\t var classDef2 = this.parsePointer(Parser.classDef);\n\t var class1Count = this.parseUShort();\n\t var class2Count = this.parseUShort();\n\t return {\n\t // Class Pair Adjustment\n\t posFormat: posFormat,\n\t coverage: coverage,\n\t valueFormat1: valueFormat1,\n\t valueFormat2: valueFormat2,\n\t classDef1: classDef1,\n\t classDef2: classDef2,\n\t class1Count: class1Count,\n\t class2Count: class2Count,\n\t classRecords: this.parseList(class1Count, Parser.list(class2Count, function() {\n\t return {\n\t value1: this.parseValueRecord(valueFormat1),\n\t value2: this.parseValueRecord(valueFormat2)\n\t };\n\t }))\n\t };\n\t }\n\t};\n\n\tsubtableParsers$1[3] = function parseLookup3() { return { error: 'GPOS Lookup 3 not supported' }; };\n\tsubtableParsers$1[4] = function parseLookup4() { return { error: 'GPOS Lookup 4 not supported' }; };\n\tsubtableParsers$1[5] = function parseLookup5() { return { error: 'GPOS Lookup 5 not supported' }; };\n\tsubtableParsers$1[6] = function parseLookup6() { return { error: 'GPOS Lookup 6 not supported' }; };\n\tsubtableParsers$1[7] = function parseLookup7() { return { error: 'GPOS Lookup 7 not supported' }; };\n\tsubtableParsers$1[8] = function parseLookup8() { return { error: 'GPOS Lookup 8 not supported' }; };\n\tsubtableParsers$1[9] = function parseLookup9() { return { error: 'GPOS Lookup 9 not supported' }; };\n\n\t// https://docs.microsoft.com/en-us/typography/opentype/spec/gpos\n\tfunction parseGposTable(data, start) {\n\t start = start || 0;\n\t var p = new Parser(data, start);\n\t var tableVersion = p.parseVersion(1);\n\t check.argument(tableVersion === 1 || tableVersion === 1.1, 'Unsupported GPOS table version ' + tableVersion);\n\n\t if (tableVersion === 1) {\n\t return {\n\t version: tableVersion,\n\t scripts: p.parseScriptList(),\n\t features: p.parseFeatureList(),\n\t lookups: p.parseLookupList(subtableParsers$1)\n\t };\n\t } else {\n\t return {\n\t version: tableVersion,\n\t scripts: p.parseScriptList(),\n\t features: p.parseFeatureList(),\n\t lookups: p.parseLookupList(subtableParsers$1),\n\t variations: p.parseFeatureVariationsList()\n\t };\n\t }\n\n\t}\n\n\t// GPOS Writing //////////////////////////////////////////////\n\t// NOT SUPPORTED\n\tvar subtableMakers$1 = new Array(10);\n\n\tfunction makeGposTable(gpos) {\n\t return new table.Table('GPOS', [\n\t {name: 'version', type: 'ULONG', value: 0x10000},\n\t {name: 'scripts', type: 'TABLE', value: new table.ScriptList(gpos.scripts)},\n\t {name: 'features', type: 'TABLE', value: new table.FeatureList(gpos.features)},\n\t {name: 'lookups', type: 'TABLE', value: new table.LookupList(gpos.lookups, subtableMakers$1)}\n\t ]);\n\t}\n\n\tvar gpos = { parse: parseGposTable, make: makeGposTable };\n\n\t// The `kern` table contains kerning pairs.\n\n\tfunction parseWindowsKernTable(p) {\n\t var pairs = {};\n\t // Skip nTables.\n\t p.skip('uShort');\n\t var subtableVersion = p.parseUShort();\n\t check.argument(subtableVersion === 0, 'Unsupported kern sub-table version.');\n\t // Skip subtableLength, subtableCoverage\n\t p.skip('uShort', 2);\n\t var nPairs = p.parseUShort();\n\t // Skip searchRange, entrySelector, rangeShift.\n\t p.skip('uShort', 3);\n\t for (var i = 0; i < nPairs; i += 1) {\n\t var leftIndex = p.parseUShort();\n\t var rightIndex = p.parseUShort();\n\t var value = p.parseShort();\n\t pairs[leftIndex + ',' + rightIndex] = value;\n\t }\n\t return pairs;\n\t}\n\n\tfunction parseMacKernTable(p) {\n\t var pairs = {};\n\t // The Mac kern table stores the version as a fixed (32 bits) but we only loaded the first 16 bits.\n\t // Skip the rest.\n\t p.skip('uShort');\n\t var nTables = p.parseULong();\n\t //check.argument(nTables === 1, 'Only 1 subtable is supported (got ' + nTables + ').');\n\t if (nTables > 1) {\n\t console.warn('Only the first kern subtable is supported.');\n\t }\n\t p.skip('uLong');\n\t var coverage = p.parseUShort();\n\t var subtableVersion = coverage & 0xFF;\n\t p.skip('uShort');\n\t if (subtableVersion === 0) {\n\t var nPairs = p.parseUShort();\n\t // Skip searchRange, entrySelector, rangeShift.\n\t p.skip('uShort', 3);\n\t for (var i = 0; i < nPairs; i += 1) {\n\t var leftIndex = p.parseUShort();\n\t var rightIndex = p.parseUShort();\n\t var value = p.parseShort();\n\t pairs[leftIndex + ',' + rightIndex] = value;\n\t }\n\t }\n\t return pairs;\n\t}\n\n\t// Parse the `kern` table which contains kerning pairs.\n\tfunction parseKernTable(data, start) {\n\t var p = new parse.Parser(data, start);\n\t var tableVersion = p.parseUShort();\n\t if (tableVersion === 0) {\n\t return parseWindowsKernTable(p);\n\t } else if (tableVersion === 1) {\n\t return parseMacKernTable(p);\n\t } else {\n\t throw new Error('Unsupported kern table version (' + tableVersion + ').');\n\t }\n\t}\n\n\tvar kern = { parse: parseKernTable };\n\n\t// The `loca` table stores the offsets to the locations of the glyphs in the font.\n\n\t// Parse the `loca` table. This table stores the offsets to the locations of the glyphs in the font,\n\t// relative to the beginning of the glyphData table.\n\t// The number of glyphs stored in the `loca` table is specified in the `maxp` table (under numGlyphs)\n\t// The loca table has two versions: a short version where offsets are stored as uShorts, and a long\n\t// version where offsets are stored as uLongs. The `head` table specifies which version to use\n\t// (under indexToLocFormat).\n\tfunction parseLocaTable(data, start, numGlyphs, shortVersion) {\n\t var p = new parse.Parser(data, start);\n\t var parseFn = shortVersion ? p.parseUShort : p.parseULong;\n\t // There is an extra entry after the last index element to compute the length of the last glyph.\n\t // That's why we use numGlyphs + 1.\n\t var glyphOffsets = [];\n\t for (var i = 0; i < numGlyphs + 1; i += 1) {\n\t var glyphOffset = parseFn.call(p);\n\t if (shortVersion) {\n\t // The short table version stores the actual offset divided by 2.\n\t glyphOffset *= 2;\n\t }\n\n\t glyphOffsets.push(glyphOffset);\n\t }\n\n\t return glyphOffsets;\n\t}\n\n\tvar loca = { parse: parseLocaTable };\n\n\t// opentype.js\n\n\t/**\n\t * The opentype library.\n\t * @namespace opentype\n\t */\n\n\t// File loaders /////////////////////////////////////////////////////////\n\t/**\n\t * Loads a font from a file. The callback throws an error message as the first parameter if it fails\n\t * and the font as an ArrayBuffer in the second parameter if it succeeds.\n\t * @param {string} path - The path of the file\n\t * @param {Function} callback - The function to call when the font load completes\n\t */\n\tfunction loadFromFile(path, callback) {\n\t var fs = _dereq_('fs');\n\t fs.readFile(path, function(err, buffer) {\n\t if (err) {\n\t return callback(err.message);\n\t }\n\n\t callback(null, nodeBufferToArrayBuffer(buffer));\n\t });\n\t}\n\t/**\n\t * Loads a font from a URL. The callback throws an error message as the first parameter if it fails\n\t * and the font as an ArrayBuffer in the second parameter if it succeeds.\n\t * @param {string} url - The URL of the font file.\n\t * @param {Function} callback - The function to call when the font load completes\n\t */\n\tfunction loadFromUrl(url, callback) {\n\t var request = new XMLHttpRequest();\n\t request.open('get', url, true);\n\t request.responseType = 'arraybuffer';\n\t request.onload = function() {\n\t if (request.response) {\n\t return callback(null, request.response);\n\t } else {\n\t return callback('Font could not be loaded: ' + request.statusText);\n\t }\n\t };\n\n\t request.onerror = function () {\n\t callback('Font could not be loaded');\n\t };\n\n\t request.send();\n\t}\n\n\t// Table Directory Entries //////////////////////////////////////////////\n\t/**\n\t * Parses OpenType table entries.\n\t * @param {DataView}\n\t * @param {Number}\n\t * @return {Object[]}\n\t */\n\tfunction parseOpenTypeTableEntries(data, numTables) {\n\t var tableEntries = [];\n\t var p = 12;\n\t for (var i = 0; i < numTables; i += 1) {\n\t var tag = parse.getTag(data, p);\n\t var checksum = parse.getULong(data, p + 4);\n\t var offset = parse.getULong(data, p + 8);\n\t var length = parse.getULong(data, p + 12);\n\t tableEntries.push({tag: tag, checksum: checksum, offset: offset, length: length, compression: false});\n\t p += 16;\n\t }\n\n\t return tableEntries;\n\t}\n\n\t/**\n\t * Parses WOFF table entries.\n\t * @param {DataView}\n\t * @param {Number}\n\t * @return {Object[]}\n\t */\n\tfunction parseWOFFTableEntries(data, numTables) {\n\t var tableEntries = [];\n\t var p = 44; // offset to the first table directory entry.\n\t for (var i = 0; i < numTables; i += 1) {\n\t var tag = parse.getTag(data, p);\n\t var offset = parse.getULong(data, p + 4);\n\t var compLength = parse.getULong(data, p + 8);\n\t var origLength = parse.getULong(data, p + 12);\n\t var compression = (void 0);\n\t if (compLength < origLength) {\n\t compression = 'WOFF';\n\t } else {\n\t compression = false;\n\t }\n\n\t tableEntries.push({tag: tag, offset: offset, compression: compression,\n\t compressedLength: compLength, length: origLength});\n\t p += 20;\n\t }\n\n\t return tableEntries;\n\t}\n\n\t/**\n\t * @typedef TableData\n\t * @type Object\n\t * @property {DataView} data - The DataView\n\t * @property {number} offset - The data offset.\n\t */\n\n\t/**\n\t * @param {DataView}\n\t * @param {Object}\n\t * @return {TableData}\n\t */\n\tfunction uncompressTable(data, tableEntry) {\n\t if (tableEntry.compression === 'WOFF') {\n\t var inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2);\n\t var outBuffer = new Uint8Array(tableEntry.length);\n\t tinyInflate(inBuffer, outBuffer);\n\t if (outBuffer.byteLength !== tableEntry.length) {\n\t throw new Error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\\'t match recorded length');\n\t }\n\n\t var view = new DataView(outBuffer.buffer, 0);\n\t return {data: view, offset: 0};\n\t } else {\n\t return {data: data, offset: tableEntry.offset};\n\t }\n\t}\n\n\t// Public API ///////////////////////////////////////////////////////////\n\n\t/**\n\t * Parse the OpenType file data (as an ArrayBuffer) and return a Font object.\n\t * Throws an error if the font could not be parsed.\n\t * @param {ArrayBuffer}\n\t * @return {opentype.Font}\n\t */\n\tfunction parseBuffer(buffer) {\n\t var indexToLocFormat;\n\t var ltagTable;\n\n\t // Since the constructor can also be called to create new fonts from scratch, we indicate this\n\t // should be an empty font that we'll fill with our own data.\n\t var font = new Font({empty: true});\n\n\t // OpenType fonts use big endian byte ordering.\n\t // We can't rely on typed array view types, because they operate with the endianness of the host computer.\n\t // Instead we use DataViews where we can specify endianness.\n\t var data = new DataView(buffer, 0);\n\t var numTables;\n\t var tableEntries = [];\n\t var signature = parse.getTag(data, 0);\n\t if (signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') {\n\t font.outlinesFormat = 'truetype';\n\t numTables = parse.getUShort(data, 4);\n\t tableEntries = parseOpenTypeTableEntries(data, numTables);\n\t } else if (signature === 'OTTO') {\n\t font.outlinesFormat = 'cff';\n\t numTables = parse.getUShort(data, 4);\n\t tableEntries = parseOpenTypeTableEntries(data, numTables);\n\t } else if (signature === 'wOFF') {\n\t var flavor = parse.getTag(data, 4);\n\t if (flavor === String.fromCharCode(0, 1, 0, 0)) {\n\t font.outlinesFormat = 'truetype';\n\t } else if (flavor === 'OTTO') {\n\t font.outlinesFormat = 'cff';\n\t } else {\n\t throw new Error('Unsupported OpenType flavor ' + signature);\n\t }\n\n\t numTables = parse.getUShort(data, 12);\n\t tableEntries = parseWOFFTableEntries(data, numTables);\n\t } else {\n\t throw new Error('Unsupported OpenType signature ' + signature);\n\t }\n\n\t var cffTableEntry;\n\t var fvarTableEntry;\n\t var glyfTableEntry;\n\t var gposTableEntry;\n\t var gsubTableEntry;\n\t var hmtxTableEntry;\n\t var kernTableEntry;\n\t var locaTableEntry;\n\t var nameTableEntry;\n\t var metaTableEntry;\n\t var p;\n\n\t for (var i = 0; i < numTables; i += 1) {\n\t var tableEntry = tableEntries[i];\n\t var table = (void 0);\n\t switch (tableEntry.tag) {\n\t case 'cmap':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.cmap = cmap.parse(table.data, table.offset);\n\t font.encoding = new CmapEncoding(font.tables.cmap);\n\t break;\n\t case 'cvt ' :\n\t table = uncompressTable(data, tableEntry);\n\t p = new parse.Parser(table.data, table.offset);\n\t font.tables.cvt = p.parseShortList(tableEntry.length / 2);\n\t break;\n\t case 'fvar':\n\t fvarTableEntry = tableEntry;\n\t break;\n\t case 'fpgm' :\n\t table = uncompressTable(data, tableEntry);\n\t p = new parse.Parser(table.data, table.offset);\n\t font.tables.fpgm = p.parseByteList(tableEntry.length);\n\t break;\n\t case 'head':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.head = head.parse(table.data, table.offset);\n\t font.unitsPerEm = font.tables.head.unitsPerEm;\n\t indexToLocFormat = font.tables.head.indexToLocFormat;\n\t break;\n\t case 'hhea':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.hhea = hhea.parse(table.data, table.offset);\n\t font.ascender = font.tables.hhea.ascender;\n\t font.descender = font.tables.hhea.descender;\n\t font.numberOfHMetrics = font.tables.hhea.numberOfHMetrics;\n\t break;\n\t case 'hmtx':\n\t hmtxTableEntry = tableEntry;\n\t break;\n\t case 'ltag':\n\t table = uncompressTable(data, tableEntry);\n\t ltagTable = ltag.parse(table.data, table.offset);\n\t break;\n\t case 'maxp':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.maxp = maxp.parse(table.data, table.offset);\n\t font.numGlyphs = font.tables.maxp.numGlyphs;\n\t break;\n\t case 'name':\n\t nameTableEntry = tableEntry;\n\t break;\n\t case 'OS/2':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.os2 = os2.parse(table.data, table.offset);\n\t break;\n\t case 'post':\n\t table = uncompressTable(data, tableEntry);\n\t font.tables.post = post.parse(table.data, table.offset);\n\t font.glyphNames = new GlyphNames(font.tables.post);\n\t break;\n\t case 'prep' :\n\t table = uncompressTable(data, tableEntry);\n\t p = new parse.Parser(table.data, table.offset);\n\t font.tables.prep = p.parseByteList(tableEntry.length);\n\t break;\n\t case 'glyf':\n\t glyfTableEntry = tableEntry;\n\t break;\n\t case 'loca':\n\t locaTableEntry = tableEntry;\n\t break;\n\t case 'CFF ':\n\t cffTableEntry = tableEntry;\n\t break;\n\t case 'kern':\n\t kernTableEntry = tableEntry;\n\t break;\n\t case 'GPOS':\n\t gposTableEntry = tableEntry;\n\t break;\n\t case 'GSUB':\n\t gsubTableEntry = tableEntry;\n\t break;\n\t case 'meta':\n\t metaTableEntry = tableEntry;\n\t break;\n\t }\n\t }\n\n\t var nameTable = uncompressTable(data, nameTableEntry);\n\t font.tables.name = _name.parse(nameTable.data, nameTable.offset, ltagTable);\n\t font.names = font.tables.name;\n\n\t if (glyfTableEntry && locaTableEntry) {\n\t var shortVersion = indexToLocFormat === 0;\n\t var locaTable = uncompressTable(data, locaTableEntry);\n\t var locaOffsets = loca.parse(locaTable.data, locaTable.offset, font.numGlyphs, shortVersion);\n\t var glyfTable = uncompressTable(data, glyfTableEntry);\n\t font.glyphs = glyf.parse(glyfTable.data, glyfTable.offset, locaOffsets, font);\n\t } else if (cffTableEntry) {\n\t var cffTable = uncompressTable(data, cffTableEntry);\n\t cff.parse(cffTable.data, cffTable.offset, font);\n\t } else {\n\t throw new Error('Font doesn\\'t contain TrueType or CFF outlines.');\n\t }\n\n\t var hmtxTable = uncompressTable(data, hmtxTableEntry);\n\t hmtx.parse(hmtxTable.data, hmtxTable.offset, font.numberOfHMetrics, font.numGlyphs, font.glyphs);\n\t addGlyphNames(font);\n\n\t if (kernTableEntry) {\n\t var kernTable = uncompressTable(data, kernTableEntry);\n\t font.kerningPairs = kern.parse(kernTable.data, kernTable.offset);\n\t } else {\n\t font.kerningPairs = {};\n\t }\n\n\t if (gposTableEntry) {\n\t var gposTable = uncompressTable(data, gposTableEntry);\n\t font.tables.gpos = gpos.parse(gposTable.data, gposTable.offset);\n\t font.position.init();\n\t }\n\n\t if (gsubTableEntry) {\n\t var gsubTable = uncompressTable(data, gsubTableEntry);\n\t font.tables.gsub = gsub.parse(gsubTable.data, gsubTable.offset);\n\t }\n\n\t if (fvarTableEntry) {\n\t var fvarTable = uncompressTable(data, fvarTableEntry);\n\t font.tables.fvar = fvar.parse(fvarTable.data, fvarTable.offset, font.names);\n\t }\n\n\t if (metaTableEntry) {\n\t var metaTable = uncompressTable(data, metaTableEntry);\n\t font.tables.meta = meta.parse(metaTable.data, metaTable.offset);\n\t font.metas = font.tables.meta;\n\t }\n\n\t return font;\n\t}\n\n\t/**\n\t * Asynchronously load the font from a URL or a filesystem. When done, call the callback\n\t * with two arguments `(err, font)`. The `err` will be null on success,\n\t * the `font` is a Font object.\n\t * We use the node.js callback convention so that\n\t * opentype.js can integrate with frameworks like async.js.\n\t * @alias opentype.load\n\t * @param {string} url - The URL of the font to load.\n\t * @param {Function} callback - The callback.\n\t */\n\tfunction load(url, callback) {\n\t var isNode$$1 = typeof window === 'undefined';\n\t var loadFn = isNode$$1 ? loadFromFile : loadFromUrl;\n\t loadFn(url, function(err, arrayBuffer) {\n\t if (err) {\n\t return callback(err);\n\t }\n\t var font;\n\t try {\n\t font = parseBuffer(arrayBuffer);\n\t } catch (e) {\n\t return callback(e, null);\n\t }\n\t return callback(null, font);\n\t });\n\t}\n\n\t/**\n\t * Synchronously load the font from a URL or file.\n\t * When done, returns the font object or throws an error.\n\t * @alias opentype.loadSync\n\t * @param {string} url - The URL of the font to load.\n\t * @return {opentype.Font}\n\t */\n\tfunction loadSync(url) {\n\t var fs = _dereq_('fs');\n\t var buffer = fs.readFileSync(url);\n\t return parseBuffer(nodeBufferToArrayBuffer(buffer));\n\t}\n\n\texports.Font = Font;\n\texports.Glyph = Glyph;\n\texports.Path = Path;\n\texports.BoundingBox = BoundingBox;\n\texports._parse = parse;\n\texports.parse = parseBuffer;\n\texports.load = load;\n\texports.loadSync = loadSync;\n\n\tObject.defineProperty(exports, '__esModule', { value: true });\n\n})));\n\n\n}).call(this,_dereq_(\"buffer\").Buffer)\n},{\"buffer\":4,\"fs\":3}],11:[function(_dereq_,module,exports){\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n},{}],12:[function(_dereq_,module,exports){\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n},{}],13:[function(_dereq_,module,exports){\n'use strict';\n\n// core\nvar p5 = _dereq_('./core/main');\n_dereq_('./core/constants');\n_dereq_('./core/environment');\n_dereq_('./core/error_helpers');\n_dereq_('./core/helpers');\n_dereq_('./core/legacy');\n_dereq_('./core/p5.Element');\n_dereq_('./core/p5.Graphics');\n_dereq_('./core/p5.Renderer');\n_dereq_('./core/p5.Renderer2D');\n_dereq_('./core/rendering');\n_dereq_('./core/shim');\n_dereq_('./core/structure');\n_dereq_('./core/transform');\n_dereq_('./core/shape/2d_primitives');\n_dereq_('./core/shape/attributes');\n_dereq_('./core/shape/curves');\n_dereq_('./core/shape/vertex');\n\n// color\n_dereq_('./color/color_conversion');\n_dereq_('./color/creating_reading');\n_dereq_('./color/p5.Color');\n_dereq_('./color/setting');\n\n// data\n_dereq_('./data/p5.TypedDict');\n\n// events\n_dereq_('./events/acceleration');\n_dereq_('./events/keyboard');\n_dereq_('./events/mouse');\n_dereq_('./events/touch');\n\n// image\n_dereq_('./image/filters');\n_dereq_('./image/image');\n_dereq_('./image/loading_displaying');\n_dereq_('./image/p5.Image');\n_dereq_('./image/pixels');\n\n// io\n_dereq_('./io/files');\n_dereq_('./io/p5.Table');\n_dereq_('./io/p5.TableRow');\n_dereq_('./io/p5.XML');\n\n// math\n_dereq_('./math/calculation');\n_dereq_('./math/math');\n_dereq_('./math/noise');\n_dereq_('./math/p5.Vector');\n_dereq_('./math/random');\n_dereq_('./math/trigonometry');\n\n// typography\n_dereq_('./typography/attributes');\n_dereq_('./typography/loading_displaying');\n_dereq_('./typography/p5.Font');\n\n// utilities\n_dereq_('./utilities/array_functions');\n_dereq_('./utilities/conversion');\n_dereq_('./utilities/string_functions');\n_dereq_('./utilities/time_date');\n\n// webgl\n_dereq_('./webgl/3d_primitives');\n_dereq_('./webgl/interaction');\n_dereq_('./webgl/light');\n_dereq_('./webgl/loading');\n_dereq_('./webgl/material');\n_dereq_('./webgl/p5.Camera');\n_dereq_('./webgl/p5.Geometry');\n_dereq_('./webgl/p5.Matrix');\n_dereq_('./webgl/p5.RendererGL.Immediate');\n_dereq_('./webgl/p5.RendererGL');\n_dereq_('./webgl/p5.RendererGL.Retained');\n_dereq_('./webgl/p5.Shader');\n_dereq_('./webgl/p5.Texture');\n_dereq_('./webgl/text');\n\n_dereq_('./core/init');\n\nmodule.exports = p5;\n\n},{\"./color/color_conversion\":14,\"./color/creating_reading\":15,\"./color/p5.Color\":16,\"./color/setting\":17,\"./core/constants\":18,\"./core/environment\":19,\"./core/error_helpers\":20,\"./core/helpers\":21,\"./core/init\":22,\"./core/legacy\":23,\"./core/main\":24,\"./core/p5.Element\":25,\"./core/p5.Graphics\":26,\"./core/p5.Renderer\":27,\"./core/p5.Renderer2D\":28,\"./core/rendering\":29,\"./core/shape/2d_primitives\":30,\"./core/shape/attributes\":31,\"./core/shape/curves\":32,\"./core/shape/vertex\":33,\"./core/shim\":34,\"./core/structure\":35,\"./core/transform\":36,\"./data/p5.TypedDict\":37,\"./events/acceleration\":38,\"./events/keyboard\":39,\"./events/mouse\":40,\"./events/touch\":41,\"./image/filters\":42,\"./image/image\":43,\"./image/loading_displaying\":44,\"./image/p5.Image\":45,\"./image/pixels\":46,\"./io/files\":47,\"./io/p5.Table\":48,\"./io/p5.TableRow\":49,\"./io/p5.XML\":50,\"./math/calculation\":51,\"./math/math\":52,\"./math/noise\":53,\"./math/p5.Vector\":54,\"./math/random\":55,\"./math/trigonometry\":56,\"./typography/attributes\":57,\"./typography/loading_displaying\":58,\"./typography/p5.Font\":59,\"./utilities/array_functions\":60,\"./utilities/conversion\":61,\"./utilities/string_functions\":62,\"./utilities/time_date\":63,\"./webgl/3d_primitives\":64,\"./webgl/interaction\":65,\"./webgl/light\":66,\"./webgl/loading\":67,\"./webgl/material\":68,\"./webgl/p5.Camera\":69,\"./webgl/p5.Geometry\":70,\"./webgl/p5.Matrix\":71,\"./webgl/p5.RendererGL\":74,\"./webgl/p5.RendererGL.Immediate\":72,\"./webgl/p5.RendererGL.Retained\":73,\"./webgl/p5.Shader\":75,\"./webgl/p5.Texture\":76,\"./webgl/text\":77}],14:[function(_dereq_,module,exports){\n/**\n * @module Color\n * @submodule Color Conversion\n * @for p5\n * @requires core\n */\n\n'use strict';\n\n/**\n * Conversions adapted from .\n *\n * In these functions, hue is always in the range [0, 1], just like all other\n * components are in the range [0, 1]. 'Brightness' and 'value' are used\n * interchangeably.\n */\n\nvar p5 = _dereq_('../core/main');\np5.ColorConversion = {};\n\n/**\n * Convert an HSBA array to HSLA.\n */\np5.ColorConversion._hsbaToHSLA = function(hsba) {\n var hue = hsba[0];\n var sat = hsba[1];\n var val = hsba[2];\n\n // Calculate lightness.\n var li = (2 - sat) * val / 2;\n\n // Convert saturation.\n if (li !== 0) {\n if (li === 1) {\n sat = 0;\n } else if (li < 0.5) {\n sat = sat / (2 - sat);\n } else {\n sat = sat * val / (2 - li * 2);\n }\n }\n\n // Hue and alpha stay the same.\n return [hue, sat, li, hsba[3]];\n};\n\n/**\n * Convert an HSBA array to RGBA.\n */\np5.ColorConversion._hsbaToRGBA = function(hsba) {\n var hue = hsba[0] * 6; // We will split hue into 6 sectors.\n var sat = hsba[1];\n var val = hsba[2];\n\n var RGBA = [];\n\n if (sat === 0) {\n RGBA = [val, val, val, hsba[3]]; // Return early if grayscale.\n } else {\n var sector = Math.floor(hue);\n var tint1 = val * (1 - sat);\n var tint2 = val * (1 - sat * (hue - sector));\n var tint3 = val * (1 - sat * (1 + sector - hue));\n var red, green, blue;\n if (sector === 1) {\n // Yellow to green.\n red = tint2;\n green = val;\n blue = tint1;\n } else if (sector === 2) {\n // Green to cyan.\n red = tint1;\n green = val;\n blue = tint3;\n } else if (sector === 3) {\n // Cyan to blue.\n red = tint1;\n green = tint2;\n blue = val;\n } else if (sector === 4) {\n // Blue to magenta.\n red = tint3;\n green = tint1;\n blue = val;\n } else if (sector === 5) {\n // Magenta to red.\n red = val;\n green = tint1;\n blue = tint2;\n } else {\n // Red to yellow (sector could be 0 or 6).\n red = val;\n green = tint3;\n blue = tint1;\n }\n RGBA = [red, green, blue, hsba[3]];\n }\n\n return RGBA;\n};\n\n/**\n * Convert an HSLA array to HSBA.\n */\np5.ColorConversion._hslaToHSBA = function(hsla) {\n var hue = hsla[0];\n var sat = hsla[1];\n var li = hsla[2];\n\n // Calculate brightness.\n var val;\n if (li < 0.5) {\n val = (1 + sat) * li;\n } else {\n val = li + sat - li * sat;\n }\n\n // Convert saturation.\n sat = 2 * (val - li) / val;\n\n // Hue and alpha stay the same.\n return [hue, sat, val, hsla[3]];\n};\n\n/**\n * Convert an HSLA array to RGBA.\n *\n * We need to change basis from HSLA to something that can be more easily be\n * projected onto RGBA. We will choose hue and brightness as our first two\n * components, and pick a convenient third one ('zest') so that we don't need\n * to calculate formal HSBA saturation.\n */\np5.ColorConversion._hslaToRGBA = function(hsla) {\n var hue = hsla[0] * 6; // We will split hue into 6 sectors.\n var sat = hsla[1];\n var li = hsla[2];\n\n var RGBA = [];\n\n if (sat === 0) {\n RGBA = [li, li, li, hsla[3]]; // Return early if grayscale.\n } else {\n // Calculate brightness.\n var val;\n if (li < 0.5) {\n val = (1 + sat) * li;\n } else {\n val = li + sat - li * sat;\n }\n\n // Define zest.\n var zest = 2 * li - val;\n\n // Implement projection (project onto green by default).\n var hzvToRGB = function(hue, zest, val) {\n if (hue < 0) {\n // Hue must wrap to allow projection onto red and blue.\n hue += 6;\n } else if (hue >= 6) {\n hue -= 6;\n }\n if (hue < 1) {\n // Red to yellow (increasing green).\n return zest + (val - zest) * hue;\n } else if (hue < 3) {\n // Yellow to cyan (greatest green).\n return val;\n } else if (hue < 4) {\n // Cyan to blue (decreasing green).\n return zest + (val - zest) * (4 - hue);\n } else {\n // Blue to red (least green).\n return zest;\n }\n };\n\n // Perform projections, offsetting hue as necessary.\n RGBA = [\n hzvToRGB(hue + 2, zest, val),\n hzvToRGB(hue, zest, val),\n hzvToRGB(hue - 2, zest, val),\n hsla[3]\n ];\n }\n\n return RGBA;\n};\n\n/**\n * Convert an RGBA array to HSBA.\n */\np5.ColorConversion._rgbaToHSBA = function(rgba) {\n var red = rgba[0];\n var green = rgba[1];\n var blue = rgba[2];\n\n var val = Math.max(red, green, blue);\n var chroma = val - Math.min(red, green, blue);\n\n var hue, sat;\n if (chroma === 0) {\n // Return early if grayscale.\n hue = 0;\n sat = 0;\n } else {\n sat = chroma / val;\n if (red === val) {\n // Magenta to yellow.\n hue = (green - blue) / chroma;\n } else if (green === val) {\n // Yellow to cyan.\n hue = 2 + (blue - red) / chroma;\n } else if (blue === val) {\n // Cyan to magenta.\n hue = 4 + (red - green) / chroma;\n }\n if (hue < 0) {\n // Confine hue to the interval [0, 1).\n hue += 6;\n } else if (hue >= 6) {\n hue -= 6;\n }\n }\n\n return [hue / 6, sat, val, rgba[3]];\n};\n\n/**\n * Convert an RGBA array to HSLA.\n */\np5.ColorConversion._rgbaToHSLA = function(rgba) {\n var red = rgba[0];\n var green = rgba[1];\n var blue = rgba[2];\n\n var val = Math.max(red, green, blue);\n var min = Math.min(red, green, blue);\n var li = val + min; // We will halve this later.\n var chroma = val - min;\n\n var hue, sat;\n if (chroma === 0) {\n // Return early if grayscale.\n hue = 0;\n sat = 0;\n } else {\n if (li < 1) {\n sat = chroma / li;\n } else {\n sat = chroma / (2 - li);\n }\n if (red === val) {\n // Magenta to yellow.\n hue = (green - blue) / chroma;\n } else if (green === val) {\n // Yellow to cyan.\n hue = 2 + (blue - red) / chroma;\n } else if (blue === val) {\n // Cyan to magenta.\n hue = 4 + (red - green) / chroma;\n }\n if (hue < 0) {\n // Confine hue to the interval [0, 1).\n hue += 6;\n } else if (hue >= 6) {\n hue -= 6;\n }\n }\n\n return [hue / 6, sat, li / 2, rgba[3]];\n};\n\nmodule.exports = p5.ColorConversion;\n\n},{\"../core/main\":24}],15:[function(_dereq_,module,exports){\n/**\n * @module Color\n * @submodule Creating & Reading\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n_dereq_('./p5.Color');\n_dereq_('../core/error_helpers');\n\n/**\n * Extracts the alpha value from a color or pixel array.\n *\n * @method alpha\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the alpha value\n * @example\n * \n * \n * noStroke();\n * let c = color(0, 126, 255, 102);\n * fill(c);\n * rect(15, 15, 35, 70);\n * let value = alpha(c); // Sets 'value' to 102\n * fill(value);\n * rect(50, 15, 35, 70);\n * \n * \n *\n * @alt\n * Left half of canvas light blue and right half light charcoal grey.\n * Left half of canvas light purple and right half a royal blue.\n * Left half of canvas salmon pink and the right half white.\n * Yellow rect in middle right of canvas, with 55 pixel width and height.\n * Yellow ellipse in top left canvas, black ellipse in bottom right,both 80x80.\n * Bright fuchsia rect in middle of canvas, 60 pixel width and height.\n * Two bright green rects on opposite sides of the canvas, both 45x80.\n * Four blue rects in each corner of the canvas, each are 35x35.\n * Bright sea green rect on left and darker rect on right of canvas, both 45x80.\n * Dark green rect on left and light green rect on right of canvas, both 45x80.\n * Dark blue rect on left and light teal rect on right of canvas, both 45x80.\n * blue rect on left and green on right, both with black outlines & 35x60.\n * salmon pink rect on left and black on right, both 35x60.\n * 4 rects, tan, brown, brownish purple and purple, with white outlines & 20x60.\n * light pastel green rect on left and dark grey rect on right, both 35x60.\n * yellow rect on left and red rect on right, both with black outlines & 35x60.\n * grey canvas\n * deep pink rect on left and grey rect on right, both 35x60.\n */\np5.prototype.alpha = function(c) {\n p5._validateParameters('alpha', arguments);\n return this.color(c)._getAlpha();\n};\n\n/**\n * Extracts the blue value from a color or pixel array.\n *\n * @method blue\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the blue value\n * @example\n * \n * \n * let c = color(175, 100, 220); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let blueValue = blue(c); // Get blue in 'c'\n * print(blueValue); // Prints \"220.0\"\n * fill(0, 0, blueValue); // Use 'blueValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n * \n * \n *\n * @alt\n * Left half of canvas light purple and right half a royal blue.\n *\n */\np5.prototype.blue = function(c) {\n p5._validateParameters('blue', arguments);\n return this.color(c)._getBlue();\n};\n\n/**\n * Extracts the HSB brightness value from a color or pixel array.\n *\n * @method brightness\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the brightness value\n * @example\n * \n * \n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = brightness(c); // Sets 'value' to 255\n * fill(value);\n * rect(50, 20, 35, 60);\n * \n * \n * \n * \n * noStroke();\n * colorMode(HSB, 255);\n * let c = color('hsb(60, 100%, 50%)');\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = brightness(c); // A 'value' of 50% is 127.5\n * fill(value);\n * rect(50, 20, 35, 60);\n * \n * \n *\n * @alt\n * Left half of canvas salmon pink and the right half white.\n * Left half of canvas yellow at half brightness and the right gray .\n *\n */\np5.prototype.brightness = function(c) {\n p5._validateParameters('brightness', arguments);\n return this.color(c)._getBrightness();\n};\n\n/**\n * Creates colors for storing in variables of the color datatype. The\n * parameters are interpreted as RGB or HSB values depending on the\n * current colorMode(). The default mode is RGB values from 0 to 255\n * and, therefore, the function call color(255, 204, 0) will return a\n * bright yellow color.\n * \n * Note that if only one value is provided to color(), it will be interpreted\n * as a grayscale value. Add a second value, and it will be used for alpha\n * transparency. When three values are specified, they are interpreted as\n * either RGB or HSB values. Adding a fourth value applies alpha\n * transparency.\n * \n * If a single string argument is provided, RGB, RGBA and Hex CSS color\n * strings and all named color strings are supported. In this case, an alpha\n * number value as a second argument is not supported, the RGBA form should be\n * used.\n *\n * @method color\n * @param {Number} gray number specifying value between white\n * and black.\n * @param {Number} [alpha] alpha value relative to current color range\n * (default is 0-255)\n * @return {p5.Color} resulting color\n *\n * @example\n * \n * \n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * rect(30, 20, 55, 55); // Draw rectangle\n * \n * \n *\n * \n * \n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * ellipse(25, 25, 80, 80); // Draw left circle\n *\n * // Using only one value with color()\n * // generates a grayscale value.\n * c = color(65); // Update 'c' with grayscale value\n * fill(c); // Use updated 'c' as fill color\n * ellipse(75, 75, 80, 80); // Draw right circle\n * \n * \n *\n * \n * \n * // Named SVG & CSS colors may be used,\n * let c = color('magenta');\n * fill(c); // Use 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * rect(20, 20, 60, 60); // Draw rectangle\n * \n * \n *\n * \n * \n * // as can hex color codes:\n * noStroke(); // Don't draw a stroke around shapes\n * let c = color('#0f0');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('#00ff00');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n * \n * \n *\n * \n * \n * // RGB and RGBA color strings are also supported:\n * // these all set to the same color (solid blue)\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('rgb(0,0,255)');\n * fill(c); // Use 'c' as fill color\n * rect(10, 10, 35, 35); // Draw rectangle\n *\n * c = color('rgb(0%, 0%, 100%)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 35, 35); // Draw rectangle\n *\n * c = color('rgba(0, 0, 255, 1)');\n * fill(c); // Use updated 'c' as fill color\n * rect(10, 55, 35, 35); // Draw rectangle\n *\n * c = color('rgba(0%, 0%, 100%, 1)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 55, 35, 35); // Draw rectangle\n * \n * \n *\n * \n * \n * // HSL color is also supported and can be specified\n * // by value\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('hsl(160, 100%, 50%)');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('hsla(160, 100%, 50%, 0.5)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n * \n * \n *\n * \n * \n * // HSB color is also supported and can be specified\n * // by value\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('hsb(160, 100%, 50%)');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('hsba(160, 100%, 50%, 0.5)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n * \n * \n *\n * \n * \n * let c; // Declare color 'c'\n * noStroke(); // Don't draw a stroke around shapes\n *\n * // If no colorMode is specified, then the\n * // default of RGB with scale of 0-255 is used.\n * c = color(50, 55, 100); // Create a color for 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(0, 10, 45, 80); // Draw left rect\n *\n * colorMode(HSB, 100); // Use HSB with scale of 0-100\n * c = color(50, 55, 100); // Update 'c' with new color\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw right rect\n * \n * \n *\n * @alt\n * Yellow rect in middle right of canvas, with 55 pixel width and height.\n * Yellow ellipse in top left of canvas, black ellipse in bottom right,both 80x80.\n * Bright fuchsia rect in middle of canvas, 60 pixel width and height.\n * Two bright green rects on opposite sides of the canvas, both 45x80.\n * Four blue rects in each corner of the canvas, each are 35x35.\n * Bright sea green rect on left and darker rect on right of canvas, both 45x80.\n * Dark green rect on left and lighter green rect on right of canvas, both 45x80.\n * Dark blue rect on left and light teal rect on right of canvas, both 45x80.\n *\n */\n/**\n * @method color\n * @param {Number} v1 red or hue value relative to\n * the current color range\n * @param {Number} v2 green or saturation value\n * relative to the current color range\n * @param {Number} v3 blue or brightness value\n * relative to the current color range\n * @param {Number} [alpha]\n * @return {p5.Color}\n */\n\n/**\n * @method color\n * @param {String} value a color string\n * @return {p5.Color}\n */\n/**\n * @method color\n * @param {Number[]} values an array containing the red,green,blue &\n * and alpha components of the color\n * @return {p5.Color}\n */\n/**\n * @method color\n * @param {p5.Color} color\n * @return {p5.Color}\n */\n\np5.prototype.color = function() {\n p5._validateParameters('color', arguments);\n if (arguments[0] instanceof p5.Color) {\n return arguments[0]; // Do nothing if argument is already a color object.\n }\n\n var args = arguments[0] instanceof Array ? arguments[0] : arguments;\n return new p5.Color(this, args);\n};\n\n/**\n * Extracts the green value from a color or pixel array.\n *\n * @method green\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the green value\n * @example\n * \n * \n * let c = color(20, 75, 200); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let greenValue = green(c); // Get green in 'c'\n * print(greenValue); // Print \"75.0\"\n * fill(0, greenValue, 0); // Use 'greenValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n * \n * \n *\n * @alt\n * blue rect on left and green on right, both with black outlines & 35x60.\n *\n */\n\np5.prototype.green = function(c) {\n p5._validateParameters('green', arguments);\n return this.color(c)._getGreen();\n};\n\n/**\n * Extracts the hue value from a color or pixel array.\n *\n * Hue exists in both HSB and HSL. This function will return the\n * HSB-normalized hue when supplied with an HSB color object (or when supplied\n * with a pixel array while the color mode is HSB), but will default to the\n * HSL-normalized hue otherwise. (The values will only be different if the\n * maximum hue setting for each system is different.)\n *\n * @method hue\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the hue\n * @example\n * \n * \n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = hue(c); // Sets 'value' to \"0\"\n * fill(value);\n * rect(50, 20, 35, 60);\n * \n * \n *\n * @alt\n * salmon pink rect on left and black on right, both 35x60.\n *\n */\n\np5.prototype.hue = function(c) {\n p5._validateParameters('hue', arguments);\n return this.color(c)._getHue();\n};\n\n/**\n * Blends two colors to find a third color somewhere between them. The amt\n * parameter is the amount to interpolate between the two values where 0.0\n * equal to the first color, 0.1 is very near the first color, 0.5 is halfway\n * in between, etc. An amount below 0 will be treated as 0. Likewise, amounts\n * above 1 will be capped at 1. This is different from the behavior of lerp(),\n * but necessary because otherwise numbers outside the range will produce\n * strange and unexpected colors.\n * \n * The way that colours are interpolated depends on the current color mode.\n *\n * @method lerpColor\n * @param {p5.Color} c1 interpolate from this color\n * @param {p5.Color} c2 interpolate to this color\n * @param {Number} amt number between 0 and 1\n * @return {p5.Color} interpolated color\n * @example\n * \n * \n * colorMode(RGB);\n * stroke(255);\n * background(51);\n * let from = color(218, 165, 32);\n * let to = color(72, 61, 139);\n * colorMode(RGB); // Try changing to HSB.\n * let interA = lerpColor(from, to, 0.33);\n * let interB = lerpColor(from, to, 0.66);\n * fill(from);\n * rect(10, 20, 20, 60);\n * fill(interA);\n * rect(30, 20, 20, 60);\n * fill(interB);\n * rect(50, 20, 20, 60);\n * fill(to);\n * rect(70, 20, 20, 60);\n * \n * \n *\n * @alt\n * 4 rects one tan, brown, brownish purple, purple, with white outlines & 20x60\n *\n */\n\np5.prototype.lerpColor = function(c1, c2, amt) {\n p5._validateParameters('lerpColor', arguments);\n var mode = this._colorMode;\n var maxes = this._colorMaxes;\n var l0, l1, l2, l3;\n var fromArray, toArray;\n\n if (mode === constants.RGB) {\n fromArray = c1.levels.map(function(level) {\n return level / 255;\n });\n toArray = c2.levels.map(function(level) {\n return level / 255;\n });\n } else if (mode === constants.HSB) {\n c1._getBrightness(); // Cache hsba so it definitely exists.\n c2._getBrightness();\n fromArray = c1.hsba;\n toArray = c2.hsba;\n } else if (mode === constants.HSL) {\n c1._getLightness(); // Cache hsla so it definitely exists.\n c2._getLightness();\n fromArray = c1.hsla;\n toArray = c2.hsla;\n } else {\n throw new Error(mode + 'cannot be used for interpolation.');\n }\n\n // Prevent extrapolation.\n amt = Math.max(Math.min(amt, 1), 0);\n\n // Define lerp here itself if user isn't using math module.\n // Maintains the definition as found in math/calculation.js\n if (typeof this.lerp === 'undefined') {\n this.lerp = function(start, stop, amt) {\n return amt * (stop - start) + start;\n };\n }\n\n // Perform interpolation.\n l0 = this.lerp(fromArray[0], toArray[0], amt);\n l1 = this.lerp(fromArray[1], toArray[1], amt);\n l2 = this.lerp(fromArray[2], toArray[2], amt);\n l3 = this.lerp(fromArray[3], toArray[3], amt);\n\n // Scale components.\n l0 *= maxes[mode][0];\n l1 *= maxes[mode][1];\n l2 *= maxes[mode][2];\n l3 *= maxes[mode][3];\n\n return this.color(l0, l1, l2, l3);\n};\n\n/**\n * Extracts the HSL lightness value from a color or pixel array.\n *\n * @method lightness\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the lightness\n * @example\n * \n * \n * noStroke();\n * colorMode(HSL);\n * let c = color(156, 100, 50, 1);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = lightness(c); // Sets 'value' to 50\n * fill(value);\n * rect(50, 20, 35, 60);\n * \n * \n *\n * @alt\n * light pastel green rect on left and dark grey rect on right, both 35x60.\n *\n */\np5.prototype.lightness = function(c) {\n p5._validateParameters('lightness', arguments);\n return this.color(c)._getLightness();\n};\n\n/**\n * Extracts the red value from a color or pixel array.\n *\n * @method red\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the red value\n * @example\n * \n * \n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let redValue = red(c); // Get red in 'c'\n * print(redValue); // Print \"255.0\"\n * fill(redValue, 0, 0); // Use 'redValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n * \n * \n *\n * \n * \n * colorMode(RGB, 255); // Sets the range for red, green, and blue to 255\n * let c = color(127, 255, 0);\n * colorMode(RGB, 1); // Sets the range for red, green, and blue to 1\n * let myColor = red(c);\n * print(myColor); // 0.4980392156862745\n * \n * \n *\n * @alt\n * yellow rect on left and red rect on right, both with black outlines and 35x60.\n * grey canvas\n */\np5.prototype.red = function(c) {\n p5._validateParameters('red', arguments);\n return this.color(c)._getRed();\n};\n\n/**\n * Extracts the saturation value from a color or pixel array.\n *\n * Saturation is scaled differently in HSB and HSL. This function will return\n * the HSB saturation when supplied with an HSB color object (or when supplied\n * with a pixel array while the color mode is HSB), but will default to the\n * HSL saturation otherwise.\n *\n * @method saturation\n * @param {p5.Color|Number[]|String} color p5.Color object, color components,\n * or CSS color\n * @return {Number} the saturation value\n * @example\n * \n * \n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = saturation(c); // Sets 'value' to 126\n * fill(value);\n * rect(50, 20, 35, 60);\n * \n * \n *\n * @alt\n *deep pink rect on left and grey rect on right, both 35x60.\n *\n */\n\np5.prototype.saturation = function(c) {\n p5._validateParameters('saturation', arguments);\n return this.color(c)._getSaturation();\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/error_helpers\":20,\"../core/main\":24,\"./p5.Color\":16}],16:[function(_dereq_,module,exports){\n/**\n * @module Color\n * @submodule Creating & Reading\n * @for p5\n * @requires core\n * @requires constants\n * @requires color_conversion\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\nvar color_conversion = _dereq_('./color_conversion');\n\n/**\n * Each color stores the color mode and level maxes that applied at the\n * time of its construction. These are used to interpret the input arguments\n * (at construction and later for that instance of color) and to format the\n * output e.g. when saturation() is requested.\n *\n * Internally we store an array representing the ideal RGBA values in floating\n * point form, normalized from 0 to 1. From this we calculate the closest\n * screen color (RGBA levels from 0 to 255) and expose this to the renderer.\n *\n * We also cache normalized, floating point components of the color in various\n * representations as they are calculated. This is done to prevent repeating a\n * conversion that has already been performed.\n *\n * @class p5.Color\n */\np5.Color = function(pInst, vals) {\n // Record color mode and maxes at time of construction.\n this._storeModeAndMaxes(pInst._colorMode, pInst._colorMaxes);\n\n // Calculate normalized RGBA values.\n if (\n this.mode !== constants.RGB &&\n this.mode !== constants.HSL &&\n this.mode !== constants.HSB\n ) {\n throw new Error(this.mode + ' is an invalid colorMode.');\n } else {\n this._array = p5.Color._parseInputs.apply(this, vals);\n }\n\n // Expose closest screen color.\n this._calculateLevels();\n return this;\n};\n\n/**\n * This function returns the color formatted as a string. This can be useful\n * for debugging, or for using p5.js with other libraries.\n * @method toString\n * @param {String} [format] How the color string will be formatted.\n * Leaving this empty formats the string as rgba(r, g, b, a).\n * '#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\n * 'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\n * 'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\n * 'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.\n * @return {String} the formatted string\n * @example\n * \n * \n * let myColor;\n * function setup() {\n * createCanvas(200, 200);\n * stroke(255);\n * myColor = color(100, 100, 250);\n * fill(myColor);\n * }\n *\n * function draw() {\n * rotate(HALF_PI);\n * text(myColor.toString(), 0, -5);\n * text(myColor.toString('#rrggbb'), 0, -30);\n * text(myColor.toString('rgba%'), 0, -55);\n * }\n * \n * \n *\n * @alt\n * canvas with text representation of color\n */\np5.Color.prototype.toString = function(format) {\n var a = this.levels;\n var f = this._array;\n var alpha = f[3]; // String representation uses normalized alpha\n\n switch (format) {\n case '#rrggbb':\n return '#'.concat(\n a[0] < 16 ? '0'.concat(a[0].toString(16)) : a[0].toString(16),\n a[1] < 16 ? '0'.concat(a[1].toString(16)) : a[1].toString(16),\n a[2] < 16 ? '0'.concat(a[2].toString(16)) : a[2].toString(16)\n );\n\n case '#rrggbbaa':\n return '#'.concat(\n a[0] < 16 ? '0'.concat(a[0].toString(16)) : a[0].toString(16),\n a[1] < 16 ? '0'.concat(a[1].toString(16)) : a[1].toString(16),\n a[2] < 16 ? '0'.concat(a[2].toString(16)) : a[2].toString(16),\n a[3] < 16 ? '0'.concat(a[2].toString(16)) : a[3].toString(16)\n );\n\n case '#rgb':\n return '#'.concat(\n Math.round(f[0] * 15).toString(16),\n Math.round(f[1] * 15).toString(16),\n Math.round(f[2] * 15).toString(16)\n );\n\n case '#rgba':\n return '#'.concat(\n Math.round(f[0] * 15).toString(16),\n Math.round(f[1] * 15).toString(16),\n Math.round(f[2] * 15).toString(16),\n Math.round(f[3] * 15).toString(16)\n );\n\n case 'rgb':\n return 'rgb('.concat(a[0], ', ', a[1], ', ', a[2], ')');\n\n case 'rgb%':\n return 'rgb('.concat(\n (100 * f[0]).toPrecision(3),\n '%, ',\n (100 * f[1]).toPrecision(3),\n '%, ',\n (100 * f[2]).toPrecision(3),\n '%)'\n );\n\n case 'rgba%':\n return 'rgba('.concat(\n (100 * f[0]).toPrecision(3),\n '%, ',\n (100 * f[1]).toPrecision(3),\n '%, ',\n (100 * f[2]).toPrecision(3),\n '%, ',\n (100 * f[3]).toPrecision(3),\n '%)'\n );\n\n case 'hsb':\n case 'hsv':\n if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);\n return 'hsb('.concat(\n this.hsba[0] * this.maxes[constants.HSB][0],\n ', ',\n this.hsba[1] * this.maxes[constants.HSB][1],\n ', ',\n this.hsba[2] * this.maxes[constants.HSB][2],\n ')'\n );\n\n case 'hsb%':\n case 'hsv%':\n if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);\n return 'hsb('.concat(\n (100 * this.hsba[0]).toPrecision(3),\n '%, ',\n (100 * this.hsba[1]).toPrecision(3),\n '%, ',\n (100 * this.hsba[2]).toPrecision(3),\n '%)'\n );\n\n case 'hsba':\n case 'hsva':\n if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);\n return 'hsba('.concat(\n this.hsba[0] * this.maxes[constants.HSB][0],\n ', ',\n this.hsba[1] * this.maxes[constants.HSB][1],\n ', ',\n this.hsba[2] * this.maxes[constants.HSB][2],\n ', ',\n alpha,\n ')'\n );\n\n case 'hsba%':\n case 'hsva%':\n if (!this.hsba) this.hsba = color_conversion._rgbaToHSBA(this._array);\n return 'hsba('.concat(\n (100 * this.hsba[0]).toPrecision(3),\n '%, ',\n (100 * this.hsba[1]).toPrecision(3),\n '%, ',\n (100 * this.hsba[2]).toPrecision(3),\n '%, ',\n (100 * alpha).toPrecision(3),\n '%)'\n );\n\n case 'hsl':\n if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);\n return 'hsl('.concat(\n this.hsla[0] * this.maxes[constants.HSL][0],\n ', ',\n this.hsla[1] * this.maxes[constants.HSL][1],\n ', ',\n this.hsla[2] * this.maxes[constants.HSL][2],\n ')'\n );\n\n case 'hsl%':\n if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);\n return 'hsl('.concat(\n (100 * this.hsla[0]).toPrecision(3),\n '%, ',\n (100 * this.hsla[1]).toPrecision(3),\n '%, ',\n (100 * this.hsla[2]).toPrecision(3),\n '%)'\n );\n\n case 'hsla':\n if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);\n return 'hsla('.concat(\n this.hsla[0] * this.maxes[constants.HSL][0],\n ', ',\n this.hsla[1] * this.maxes[constants.HSL][1],\n ', ',\n this.hsla[2] * this.maxes[constants.HSL][2],\n ', ',\n alpha,\n ')'\n );\n\n case 'hsla%':\n if (!this.hsla) this.hsla = color_conversion._rgbaToHSLA(this._array);\n return 'hsl('.concat(\n (100 * this.hsla[0]).toPrecision(3),\n '%, ',\n (100 * this.hsla[1]).toPrecision(3),\n '%, ',\n (100 * this.hsla[2]).toPrecision(3),\n '%, ',\n (100 * alpha).toPrecision(3),\n '%)'\n );\n\n case 'rgba':\n default:\n return 'rgba('.concat(a[0], ',', a[1], ',', a[2], ',', alpha, ')');\n }\n};\n\n/**\n * @method setRed\n * @param {Number} red the new red value\n * @example\n * \n * \n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setRed(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n * \n * \n *\n * @alt\n * canvas with gradually changing background color\n */\np5.Color.prototype.setRed = function(new_red) {\n this._array[0] = new_red / this.maxes[constants.RGB][0];\n this._calculateLevels();\n};\n\n/**\n * @method setGreen\n * @param {Number} green the new green value\n * @example\n * \n * \n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n * \n * \n *\n * @alt\n * canvas with gradually changing background color\n **/\np5.Color.prototype.setGreen = function(new_green) {\n this._array[1] = new_green / this.maxes[constants.RGB][1];\n this._calculateLevels();\n};\n\n/**\n * @method setBlue\n * @param {Number} blue the new blue value\n * @example\n * \n * \n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n * \n * \n *\n * @alt\n * canvas with gradually changing background color\n **/\np5.Color.prototype.setBlue = function(new_blue) {\n this._array[2] = new_blue / this.maxes[constants.RGB][2];\n this._calculateLevels();\n};\n\n/**\n * @method setAlpha\n * @param {Number} alpha the new alpha value\n * @example\n * \n * \n * let squareColor;\n *\n * function setup() {\n * ellipseMode(CORNERS);\n * strokeWeight(4);\n * squareColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * background(255);\n *\n * noFill();\n * stroke(0);\n * ellipse(10, 10, width - 10, height - 10);\n *\n * squareColor.setAlpha(128 + 128 * sin(millis() / 1000));\n * fill(squareColor);\n * noStroke();\n * rect(13, 13, width - 26, height - 26);\n * }\n * \n * \n *\n * @alt\n * circle behind a square with gradually changing opacity\n **/\np5.Color.prototype.setAlpha = function(new_alpha) {\n this._array[3] = new_alpha / this.maxes[this.mode][3];\n this._calculateLevels();\n};\n\n// calculates and stores the closest screen levels\np5.Color.prototype._calculateLevels = function() {\n var array = this._array;\n // (loop backwards for performance)\n var levels = (this.levels = new Array(array.length));\n for (var i = array.length - 1; i >= 0; --i) {\n levels[i] = Math.round(array[i] * 255);\n }\n};\n\np5.Color.prototype._getAlpha = function() {\n return this._array[3] * this.maxes[this.mode][3];\n};\n\n// stores the color mode and maxes in this instance of Color\n// for later use (by _parseInputs())\np5.Color.prototype._storeModeAndMaxes = function(new_mode, new_maxes) {\n this.mode = new_mode;\n this.maxes = new_maxes;\n};\n\np5.Color.prototype._getMode = function() {\n return this.mode;\n};\n\np5.Color.prototype._getMaxes = function() {\n return this.maxes;\n};\n\np5.Color.prototype._getBlue = function() {\n return this._array[2] * this.maxes[constants.RGB][2];\n};\n\np5.Color.prototype._getBrightness = function() {\n if (!this.hsba) {\n this.hsba = color_conversion._rgbaToHSBA(this._array);\n }\n return this.hsba[2] * this.maxes[constants.HSB][2];\n};\n\np5.Color.prototype._getGreen = function() {\n return this._array[1] * this.maxes[constants.RGB][1];\n};\n\n/**\n * Hue is the same in HSB and HSL, but the maximum value may be different.\n * This function will return the HSB-normalized saturation when supplied with\n * an HSB color object, but will default to the HSL-normalized saturation\n * otherwise.\n */\np5.Color.prototype._getHue = function() {\n if (this.mode === constants.HSB) {\n if (!this.hsba) {\n this.hsba = color_conversion._rgbaToHSBA(this._array);\n }\n return this.hsba[0] * this.maxes[constants.HSB][0];\n } else {\n if (!this.hsla) {\n this.hsla = color_conversion._rgbaToHSLA(this._array);\n }\n return this.hsla[0] * this.maxes[constants.HSL][0];\n }\n};\n\np5.Color.prototype._getLightness = function() {\n if (!this.hsla) {\n this.hsla = color_conversion._rgbaToHSLA(this._array);\n }\n return this.hsla[2] * this.maxes[constants.HSL][2];\n};\n\np5.Color.prototype._getRed = function() {\n return this._array[0] * this.maxes[constants.RGB][0];\n};\n\n/**\n * Saturation is scaled differently in HSB and HSL. This function will return\n * the HSB saturation when supplied with an HSB color object, but will default\n * to the HSL saturation otherwise.\n */\np5.Color.prototype._getSaturation = function() {\n if (this.mode === constants.HSB) {\n if (!this.hsba) {\n this.hsba = color_conversion._rgbaToHSBA(this._array);\n }\n return this.hsba[1] * this.maxes[constants.HSB][1];\n } else {\n if (!this.hsla) {\n this.hsla = color_conversion._rgbaToHSLA(this._array);\n }\n return this.hsla[1] * this.maxes[constants.HSL][1];\n }\n};\n\n/**\n * CSS named colors.\n */\nvar namedColors = {\n aliceblue: '#f0f8ff',\n antiquewhite: '#faebd7',\n aqua: '#00ffff',\n aquamarine: '#7fffd4',\n azure: '#f0ffff',\n beige: '#f5f5dc',\n bisque: '#ffe4c4',\n black: '#000000',\n blanchedalmond: '#ffebcd',\n blue: '#0000ff',\n blueviolet: '#8a2be2',\n brown: '#a52a2a',\n burlywood: '#deb887',\n cadetblue: '#5f9ea0',\n chartreuse: '#7fff00',\n chocolate: '#d2691e',\n coral: '#ff7f50',\n cornflowerblue: '#6495ed',\n cornsilk: '#fff8dc',\n crimson: '#dc143c',\n cyan: '#00ffff',\n darkblue: '#00008b',\n darkcyan: '#008b8b',\n darkgoldenrod: '#b8860b',\n darkgray: '#a9a9a9',\n darkgreen: '#006400',\n darkgrey: '#a9a9a9',\n darkkhaki: '#bdb76b',\n darkmagenta: '#8b008b',\n darkolivegreen: '#556b2f',\n darkorange: '#ff8c00',\n darkorchid: '#9932cc',\n darkred: '#8b0000',\n darksalmon: '#e9967a',\n darkseagreen: '#8fbc8f',\n darkslateblue: '#483d8b',\n darkslategray: '#2f4f4f',\n darkslategrey: '#2f4f4f',\n darkturquoise: '#00ced1',\n darkviolet: '#9400d3',\n deeppink: '#ff1493',\n deepskyblue: '#00bfff',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1e90ff',\n firebrick: '#b22222',\n floralwhite: '#fffaf0',\n forestgreen: '#228b22',\n fuchsia: '#ff00ff',\n gainsboro: '#dcdcdc',\n ghostwhite: '#f8f8ff',\n gold: '#ffd700',\n goldenrod: '#daa520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#adff2f',\n grey: '#808080',\n honeydew: '#f0fff0',\n hotpink: '#ff69b4',\n indianred: '#cd5c5c',\n indigo: '#4b0082',\n ivory: '#fffff0',\n khaki: '#f0e68c',\n lavender: '#e6e6fa',\n lavenderblush: '#fff0f5',\n lawngreen: '#7cfc00',\n lemonchiffon: '#fffacd',\n lightblue: '#add8e6',\n lightcoral: '#f08080',\n lightcyan: '#e0ffff',\n lightgoldenrodyellow: '#fafad2',\n lightgray: '#d3d3d3',\n lightgreen: '#90ee90',\n lightgrey: '#d3d3d3',\n lightpink: '#ffb6c1',\n lightsalmon: '#ffa07a',\n lightseagreen: '#20b2aa',\n lightskyblue: '#87cefa',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#b0c4de',\n lightyellow: '#ffffe0',\n lime: '#00ff00',\n limegreen: '#32cd32',\n linen: '#faf0e6',\n magenta: '#ff00ff',\n maroon: '#800000',\n mediumaquamarine: '#66cdaa',\n mediumblue: '#0000cd',\n mediumorchid: '#ba55d3',\n mediumpurple: '#9370db',\n mediumseagreen: '#3cb371',\n mediumslateblue: '#7b68ee',\n mediumspringgreen: '#00fa9a',\n mediumturquoise: '#48d1cc',\n mediumvioletred: '#c71585',\n midnightblue: '#191970',\n mintcream: '#f5fffa',\n mistyrose: '#ffe4e1',\n moccasin: '#ffe4b5',\n navajowhite: '#ffdead',\n navy: '#000080',\n oldlace: '#fdf5e6',\n olive: '#808000',\n olivedrab: '#6b8e23',\n orange: '#ffa500',\n orangered: '#ff4500',\n orchid: '#da70d6',\n palegoldenrod: '#eee8aa',\n palegreen: '#98fb98',\n paleturquoise: '#afeeee',\n palevioletred: '#db7093',\n papayawhip: '#ffefd5',\n peachpuff: '#ffdab9',\n peru: '#cd853f',\n pink: '#ffc0cb',\n plum: '#dda0dd',\n powderblue: '#b0e0e6',\n purple: '#800080',\n red: '#ff0000',\n rosybrown: '#bc8f8f',\n royalblue: '#4169e1',\n saddlebrown: '#8b4513',\n salmon: '#fa8072',\n sandybrown: '#f4a460',\n seagreen: '#2e8b57',\n seashell: '#fff5ee',\n sienna: '#a0522d',\n silver: '#c0c0c0',\n skyblue: '#87ceeb',\n slateblue: '#6a5acd',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#fffafa',\n springgreen: '#00ff7f',\n steelblue: '#4682b4',\n tan: '#d2b48c',\n teal: '#008080',\n thistle: '#d8bfd8',\n tomato: '#ff6347',\n turquoise: '#40e0d0',\n violet: '#ee82ee',\n wheat: '#f5deb3',\n white: '#ffffff',\n whitesmoke: '#f5f5f5',\n yellow: '#ffff00',\n yellowgreen: '#9acd32'\n};\n\n/**\n * These regular expressions are used to build up the patterns for matching\n * viable CSS color strings: fragmenting the regexes in this way increases the\n * legibility and comprehensibility of the code.\n *\n * Note that RGB values of .9 are not parsed by IE, but are supported here for\n * color string consistency.\n */\nvar WHITESPACE = /\\s*/; // Match zero or more whitespace characters.\nvar INTEGER = /(\\d{1,3})/; // Match integers: 79, 255, etc.\nvar DECIMAL = /((?:\\d+(?:\\.\\d+)?)|(?:\\.\\d+))/; // Match 129.6, 79, .9, etc.\nvar PERCENT = new RegExp(DECIMAL.source + '%'); // Match 12.9%, 79%, .9%, etc.\n\n/**\n * Full color string patterns. The capture groups are necessary.\n */\nvar colorPatterns = {\n // Match colors in format #XXX, e.g. #416.\n HEX3: /^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,\n\n // Match colors in format #XXXX, e.g. #5123.\n HEX4: /^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,\n\n // Match colors in format #XXXXXX, e.g. #b4d455.\n HEX6: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,\n\n // Match colors in format #XXXXXXXX, e.g. #b4d45535.\n HEX8: /^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,\n\n // Match colors in format rgb(R, G, B), e.g. rgb(255, 0, 128).\n RGB: new RegExp(\n [\n '^rgb\\\\(',\n INTEGER.source,\n ',',\n INTEGER.source,\n ',',\n INTEGER.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format rgb(R%, G%, B%), e.g. rgb(100%, 0%, 28.9%).\n RGB_PERCENT: new RegExp(\n [\n '^rgb\\\\(',\n PERCENT.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format rgb(R, G, B, A), e.g. rgb(255, 0, 128, 0.25).\n RGBA: new RegExp(\n [\n '^rgba\\\\(',\n INTEGER.source,\n ',',\n INTEGER.source,\n ',',\n INTEGER.source,\n ',',\n DECIMAL.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format rgb(R%, G%, B%, A), e.g. rgb(100%, 0%, 28.9%, 0.5).\n RGBA_PERCENT: new RegExp(\n [\n '^rgba\\\\(',\n PERCENT.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n ',',\n DECIMAL.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format hsla(H, S%, L%), e.g. hsl(100, 40%, 28.9%).\n HSL: new RegExp(\n [\n '^hsl\\\\(',\n INTEGER.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format hsla(H, S%, L%, A), e.g. hsla(100, 40%, 28.9%, 0.5).\n HSLA: new RegExp(\n [\n '^hsla\\\\(',\n INTEGER.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n ',',\n DECIMAL.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format hsb(H, S%, B%), e.g. hsb(100, 40%, 28.9%).\n HSB: new RegExp(\n [\n '^hsb\\\\(',\n INTEGER.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n ),\n\n // Match colors in format hsba(H, S%, B%, A), e.g. hsba(100, 40%, 28.9%, 0.5).\n HSBA: new RegExp(\n [\n '^hsba\\\\(',\n INTEGER.source,\n ',',\n PERCENT.source,\n ',',\n PERCENT.source,\n ',',\n DECIMAL.source,\n '\\\\)$'\n ].join(WHITESPACE.source),\n 'i'\n )\n};\n\n/**\n * For a number of different inputs, returns a color formatted as [r, g, b, a]\n * arrays, with each component normalized between 0 and 1.\n *\n * @private\n * @param {Array} [...args] An 'array-like' object that represents a list of\n * arguments\n * @return {Number[]} a color formatted as [r, g, b, a]\n * Example:\n * input ==> output\n * g ==> [g, g, g, 255]\n * g,a ==> [g, g, g, a]\n * r, g, b ==> [r, g, b, 255]\n * r, g, b, a ==> [r, g, b, a]\n * [g] ==> [g, g, g, 255]\n * [g, a] ==> [g, g, g, a]\n * [r, g, b] ==> [r, g, b, 255]\n * [r, g, b, a] ==> [r, g, b, a]\n * @example\n * \n * \n * // todo\n * \n * \n *\n * @alt\n * //todo\n *\n */\np5.Color._parseInputs = function(r, g, b, a) {\n var numArgs = arguments.length;\n var mode = this.mode;\n var maxes = this.maxes[mode];\n var results = [];\n var i;\n\n if (numArgs >= 3) {\n // Argument is a list of component values.\n\n results[0] = r / maxes[0];\n results[1] = g / maxes[1];\n results[2] = b / maxes[2];\n\n // Alpha may be undefined, so default it to 100%.\n if (typeof a === 'number') {\n results[3] = a / maxes[3];\n } else {\n results[3] = 1;\n }\n\n // Constrain components to the range [0,1].\n // (loop backwards for performance)\n for (i = results.length - 1; i >= 0; --i) {\n var result = results[i];\n if (result < 0) {\n results[i] = 0;\n } else if (result > 1) {\n results[i] = 1;\n }\n }\n\n // Convert to RGBA and return.\n if (mode === constants.HSL) {\n return color_conversion._hslaToRGBA(results);\n } else if (mode === constants.HSB) {\n return color_conversion._hsbaToRGBA(results);\n } else {\n return results;\n }\n } else if (numArgs === 1 && typeof r === 'string') {\n var str = r.trim().toLowerCase();\n\n // Return if string is a named colour.\n if (namedColors[str]) {\n return p5.Color._parseInputs.call(this, namedColors[str]);\n }\n\n // Try RGBA pattern matching.\n if (colorPatterns.HEX3.test(str)) {\n // #rgb\n results = colorPatterns.HEX3.exec(str)\n .slice(1)\n .map(function(color) {\n return parseInt(color + color, 16) / 255;\n });\n results[3] = 1;\n return results;\n } else if (colorPatterns.HEX6.test(str)) {\n // #rrggbb\n results = colorPatterns.HEX6.exec(str)\n .slice(1)\n .map(function(color) {\n return parseInt(color, 16) / 255;\n });\n results[3] = 1;\n return results;\n } else if (colorPatterns.HEX4.test(str)) {\n // #rgba\n results = colorPatterns.HEX4.exec(str)\n .slice(1)\n .map(function(color) {\n return parseInt(color + color, 16) / 255;\n });\n return results;\n } else if (colorPatterns.HEX8.test(str)) {\n // #rrggbbaa\n results = colorPatterns.HEX8.exec(str)\n .slice(1)\n .map(function(color) {\n return parseInt(color, 16) / 255;\n });\n return results;\n } else if (colorPatterns.RGB.test(str)) {\n // rgb(R,G,B)\n results = colorPatterns.RGB.exec(str)\n .slice(1)\n .map(function(color) {\n return color / 255;\n });\n results[3] = 1;\n return results;\n } else if (colorPatterns.RGB_PERCENT.test(str)) {\n // rgb(R%,G%,B%)\n results = colorPatterns.RGB_PERCENT.exec(str)\n .slice(1)\n .map(function(color) {\n return parseFloat(color) / 100;\n });\n results[3] = 1;\n return results;\n } else if (colorPatterns.RGBA.test(str)) {\n // rgba(R,G,B,A)\n results = colorPatterns.RGBA.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 3) {\n return parseFloat(color);\n }\n return color / 255;\n });\n return results;\n } else if (colorPatterns.RGBA_PERCENT.test(str)) {\n // rgba(R%,G%,B%,A%)\n results = colorPatterns.RGBA_PERCENT.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 3) {\n return parseFloat(color);\n }\n return parseFloat(color) / 100;\n });\n return results;\n }\n\n // Try HSLA pattern matching.\n if (colorPatterns.HSL.test(str)) {\n // hsl(H,S,L)\n results = colorPatterns.HSL.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 0) {\n return parseInt(color, 10) / 360;\n }\n return parseInt(color, 10) / 100;\n });\n results[3] = 1;\n } else if (colorPatterns.HSLA.test(str)) {\n // hsla(H,S,L,A)\n results = colorPatterns.HSLA.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 0) {\n return parseInt(color, 10) / 360;\n } else if (idx === 3) {\n return parseFloat(color);\n }\n return parseInt(color, 10) / 100;\n });\n }\n results = results.map(function(value) {\n return Math.max(Math.min(value, 1), 0);\n });\n if (results.length) {\n return color_conversion._hslaToRGBA(results);\n }\n\n // Try HSBA pattern matching.\n if (colorPatterns.HSB.test(str)) {\n // hsb(H,S,B)\n results = colorPatterns.HSB.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 0) {\n return parseInt(color, 10) / 360;\n }\n return parseInt(color, 10) / 100;\n });\n results[3] = 1;\n } else if (colorPatterns.HSBA.test(str)) {\n // hsba(H,S,B,A)\n results = colorPatterns.HSBA.exec(str)\n .slice(1)\n .map(function(color, idx) {\n if (idx === 0) {\n return parseInt(color, 10) / 360;\n } else if (idx === 3) {\n return parseFloat(color);\n }\n return parseInt(color, 10) / 100;\n });\n }\n\n if (results.length) {\n // (loop backwards for performance)\n for (i = results.length - 1; i >= 0; --i) {\n results[i] = Math.max(Math.min(results[i], 1), 0);\n }\n\n return color_conversion._hsbaToRGBA(results);\n }\n\n // Input did not match any CSS color pattern: default to white.\n results = [1, 1, 1, 1];\n } else if ((numArgs === 1 || numArgs === 2) && typeof r === 'number') {\n // 'Grayscale' mode.\n\n /**\n * For HSB and HSL, interpret the gray level as a brightness/lightness\n * value (they are equivalent when chroma is zero). For RGB, normalize the\n * gray level according to the blue maximum.\n */\n results[0] = r / maxes[2];\n results[1] = r / maxes[2];\n results[2] = r / maxes[2];\n\n // Alpha may be undefined, so default it to 100%.\n if (typeof g === 'number') {\n results[3] = g / maxes[3];\n } else {\n results[3] = 1;\n }\n\n // Constrain components to the range [0,1].\n results = results.map(function(value) {\n return Math.max(Math.min(value, 1), 0);\n });\n } else {\n throw new Error(arguments + 'is not a valid color representation.');\n }\n\n return results;\n};\n\nmodule.exports = p5.Color;\n\n},{\"../core/constants\":18,\"../core/main\":24,\"./color_conversion\":14}],17:[function(_dereq_,module,exports){\n/**\n * @module Color\n * @submodule Setting\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n_dereq_('./p5.Color');\n\n/**\n * The background() function sets the color used for the background of the\n * p5.js canvas. The default background is transparent. This function is\n * typically used within draw() to clear the display window at the beginning\n * of each frame, but it can be used inside setup() to set the background on\n * the first frame of animation or if the background need only be set once.\n * \n * The color is either specified in terms of the RGB, HSB, or HSL color\n * depending on the current colorMode. (The default color space is RGB, with\n * each value in the range from 0 to 255). The alpha range by default is also 0 to 255.\n * \n * If a single string argument is provided, RGB, RGBA and Hex CSS color strings\n * and all named color strings are supported. In this case, an alpha number\n * value as a second argument is not supported, the RGBA form should be used.\n * \n * A p5.Color object can also be provided to set the background color.\n * \n * A p5.Image can also be provided to set the background image.\n *\n * @method background\n * @param {p5.Color} color any value created by the color() function\n * @chainable\n *\n * @example\n * \n * \n * // Grayscale integer value\n * background(51);\n * \n * \n *\n * \n * \n * // R, G & B integer values\n * background(255, 204, 0);\n * \n * \n *\n * \n * \n * // H, S & B integer values\n * colorMode(HSB);\n * background(255, 204, 100);\n * \n * \n *\n * \n * \n * // Named SVG/CSS color string\n * background('red');\n * \n * \n *\n * \n * \n * // three-digit hexadecimal RGB notation\n * background('#fae');\n * \n * \n *\n * \n * \n * // six-digit hexadecimal RGB notation\n * background('#222222');\n * \n * \n *\n * \n * \n * // integer RGB notation\n * background('rgb(0,255,0)');\n * \n * \n *\n * \n * \n * // integer RGBA notation\n * background('rgba(0,255,0, 0.25)');\n * \n * \n *\n * \n * \n * // percentage RGB notation\n * background('rgb(100%,0%,10%)');\n * \n * \n *\n * \n * \n * // percentage RGBA notation\n * background('rgba(100%,0%,100%,0.5)');\n * \n * \n *\n * \n * \n * // p5 Color object\n * background(color(0, 0, 255));\n * \n * \n *\n * @alt\n * canvas with darkest charcoal grey background.\n * canvas with yellow background.\n * canvas with royal blue background.\n * canvas with red background.\n * canvas with pink background.\n * canvas with black background.\n * canvas with bright green background.\n * canvas with soft green background.\n * canvas with red background.\n * canvas with light purple background.\n * canvas with blue background.\n */\n\n/**\n * @method background\n * @param {String} colorstring color string, possible formats include: integer\n * rgb() or rgba(), percentage rgb() or rgba(),\n * 3-digit hex, 6-digit hex\n * @param {Number} [a] opacity of the background relative to current\n * color range (default is 0-255)\n * @chainable\n */\n\n/**\n * @method background\n * @param {Number} gray specifies a value between white and black\n * @param {Number} [a]\n * @chainable\n */\n\n/**\n * @method background\n * @param {Number} v1 red or hue value (depending on the current color\n * mode)\n * @param {Number} v2 green or saturation value (depending on the current\n * color mode)\n * @param {Number} v3 blue or brightness value (depending on the current\n * color mode)\n * @param {Number} [a]\n * @chainable\n */\n\n/**\n * @method background\n * @param {Number[]} values an array containing the red, green, blue\n * and alpha components of the color\n * @chainable\n */\n\n/**\n * @method background\n * @param {p5.Image} image image created with loadImage() or createImage(),\n * to set as background\n * (must be same size as the sketch window)\n * @param {Number} [a]\n * @chainable\n */\n\np5.prototype.background = function() {\n this._renderer.background.apply(this._renderer, arguments);\n return this;\n};\n\n/**\n * Clears the pixels within a buffer. This function only clears the canvas.\n * It will not clear objects created by createX() methods such as\n * createVideo() or createDiv().\n * Unlike the main graphics context, pixels in additional graphics areas created\n * with createGraphics() can be entirely\n * or partially transparent. This function clears everything to make all of\n * the pixels 100% transparent.\n *\n * @method clear\n * @chainable\n * @example\n * \n * \n * // Clear the screen on mouse press.\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * ellipse(mouseX, mouseY, 20, 20);\n * }\n *\n * function mousePressed() {\n * clear();\n * }\n * \n * \n *\n * @alt\n * 20x20 white ellipses are continually drawn at mouse x and y coordinates.\n *\n */\n\np5.prototype.clear = function() {\n this._renderer.clear();\n return this;\n};\n\n/**\n * colorMode() changes the way p5.js interprets color data. By default, the\n * parameters for fill(), stroke(), background(), and color() are defined by\n * values between 0 and 255 using the RGB color model. This is equivalent to\n * setting colorMode(RGB, 255). Setting colorMode(HSB) lets you use the HSB\n * system instead. By default, this is colorMode(HSB, 360, 100, 100, 1). You\n * can also use HSL.\n * \n * Note: existing color objects remember the mode that they were created in,\n * so you can change modes as you like without affecting their appearance.\n *\n *\n * @method colorMode\n * @param {Constant} mode either RGB, HSB or HSL, corresponding to\n * Red/Green/Blue and Hue/Saturation/Brightness\n * (or Lightness)\n * @param {Number} [max] range for all values\n * @chainable\n *\n * @example\n * \n * \n * noStroke();\n * colorMode(RGB, 100);\n * for (let i = 0; i < 100; i++) {\n * for (let j = 0; j < 100; j++) {\n * stroke(i, j, 0);\n * point(i, j);\n * }\n * }\n * \n * \n *\n * \n * \n * noStroke();\n * colorMode(HSB, 100);\n * for (let i = 0; i < 100; i++) {\n * for (let j = 0; j < 100; j++) {\n * stroke(i, j, 100);\n * point(i, j);\n * }\n * }\n * \n * \n *\n * \n * \n * colorMode(RGB, 255);\n * let c = color(127, 255, 0);\n *\n * colorMode(RGB, 1);\n * let myColor = c._getRed();\n * text(myColor, 10, 10, 80, 80);\n * \n * \n *\n * \n * \n * noFill();\n * colorMode(RGB, 255, 255, 255, 1);\n * background(255);\n *\n * strokeWeight(4);\n * stroke(255, 0, 10, 0.3);\n * ellipse(40, 40, 50, 50);\n * ellipse(50, 50, 40, 40);\n * \n * \n *\n * @alt\n *Green to red gradient from bottom L to top R. shading originates from top left.\n *Rainbow gradient from left to right. Brightness increasing to white at top.\n *unknown image.\n *50x50 ellipse at middle L & 40x40 ellipse at center. Translucent pink outlines.\n *\n */\n/**\n * @method colorMode\n * @param {Constant} mode\n * @param {Number} max1 range for the red or hue depending on the\n * current color mode\n * @param {Number} max2 range for the green or saturation depending\n * on the current color mode\n * @param {Number} max3 range for the blue or brightness/lightness\n * depending on the current color mode\n * @param {Number} [maxA] range for the alpha\n * @chainable\n */\np5.prototype.colorMode = function(mode, max1, max2, max3, maxA) {\n p5._validateParameters('colorMode', arguments);\n if (\n mode === constants.RGB ||\n mode === constants.HSB ||\n mode === constants.HSL\n ) {\n // Set color mode.\n this._colorMode = mode;\n\n // Set color maxes.\n var maxes = this._colorMaxes[mode];\n if (arguments.length === 2) {\n maxes[0] = max1; // Red\n maxes[1] = max1; // Green\n maxes[2] = max1; // Blue\n maxes[3] = max1; // Alpha\n } else if (arguments.length === 4) {\n maxes[0] = max1; // Red\n maxes[1] = max2; // Green\n maxes[2] = max3; // Blue\n } else if (arguments.length === 5) {\n maxes[0] = max1; // Red\n maxes[1] = max2; // Green\n maxes[2] = max3; // Blue\n maxes[3] = maxA; // Alpha\n }\n }\n\n return this;\n};\n\n/**\n * Sets the color used to fill shapes. For example, if you run\n * fill(204, 102, 0), all subsequent shapes will be filled with orange. This\n * color is either specified in terms of the RGB or HSB color depending on\n * the current colorMode(). (The default color space is RGB, with each value\n * in the range from 0 to 255). The alpha range by default is also 0 to 255.\n * \n * If a single string argument is provided, RGB, RGBA and Hex CSS color strings\n * and all named color strings are supported. In this case, an alpha number\n * value as a second argument is not supported, the RGBA form should be used.\n * \n * A p5 Color object can also be provided to set the fill color.\n *\n * @method fill\n * @param {Number} v1 red or hue value relative to\n * the current color range\n * @param {Number} v2 green or saturation value\n * relative to the current color range\n * @param {Number} v3 blue or brightness value\n * relative to the current color range\n * @param {Number} [alpha]\n * @chainable\n * @example\n * \n * \n * // Grayscale integer value\n * fill(51);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // R, G & B integer values\n * fill(255, 204, 0);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // H, S & B integer values\n * colorMode(HSB);\n * fill(255, 204, 100);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // Named SVG/CSS color string\n * fill('red');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // three-digit hexadecimal RGB notation\n * fill('#fae');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // six-digit hexadecimal RGB notation\n * fill('#222222');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // integer RGB notation\n * fill('rgb(0,255,0)');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // integer RGBA notation\n * fill('rgba(0,255,0, 0.25)');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // percentage RGB notation\n * fill('rgb(100%,0%,10%)');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // percentage RGBA notation\n * fill('rgba(100%,0%,100%,0.5)');\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // p5 Color object\n * fill(color(0, 0, 255));\n * rect(20, 20, 60, 60);\n * \n * \n * @alt\n * 60x60 dark charcoal grey rect with black outline in center of canvas.\n * 60x60 yellow rect with black outline in center of canvas.\n * 60x60 royal blue rect with black outline in center of canvas.\n * 60x60 red rect with black outline in center of canvas.\n * 60x60 pink rect with black outline in center of canvas.\n * 60x60 black rect with black outline in center of canvas.\n * 60x60 light green rect with black outline in center of canvas.\n * 60x60 soft green rect with black outline in center of canvas.\n * 60x60 red rect with black outline in center of canvas.\n * 60x60 dark fuchsia rect with black outline in center of canvas.\n * 60x60 blue rect with black outline in center of canvas.\n */\n\n/**\n * @method fill\n * @param {String} value a color string\n * @chainable\n */\n\n/**\n * @method fill\n * @param {Number} gray a gray value\n * @param {Number} [alpha]\n * @chainable\n */\n\n/**\n * @method fill\n * @param {Number[]} values an array containing the red,green,blue &\n * and alpha components of the color\n * @chainable\n */\n\n/**\n * @method fill\n * @param {p5.Color} color the fill color\n * @chainable\n */\np5.prototype.fill = function() {\n this._renderer._setProperty('_fillSet', true);\n this._renderer._setProperty('_doFill', true);\n this._renderer.fill.apply(this._renderer, arguments);\n return this;\n};\n\n/**\n * Disables filling geometry. If both noStroke() and noFill() are called,\n * nothing will be drawn to the screen.\n *\n * @method noFill\n * @chainable\n * @example\n * \n * \n * rect(15, 10, 55, 55);\n * noFill();\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noFill();\n * stroke(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(45, 45, 45);\n * }\n * \n * \n *\n * @alt\n * white rect top middle and noFill rect center. Both 60x60 with black outlines.\n * black canvas with purple cube wireframe spinning\n */\np5.prototype.noFill = function() {\n this._renderer._setProperty('_doFill', false);\n return this;\n};\n\n/**\n * Disables drawing the stroke (outline). If both noStroke() and noFill()\n * are called, nothing will be drawn to the screen.\n *\n * @method noStroke\n * @chainable\n * @example\n * \n * \n * noStroke();\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * fill(240, 150, 150);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(45, 45, 45);\n * }\n * \n * \n *\n * @alt\n * 60x60 white rect at center. no outline.\n * black canvas with pink cube spinning\n */\np5.prototype.noStroke = function() {\n this._renderer._setProperty('_doStroke', false);\n return this;\n};\n\n/**\n * Sets the color used to draw lines and borders around shapes. This color\n * is either specified in terms of the RGB or HSB color depending on the\n * current colorMode() (the default color space is RGB, with each value in\n * the range from 0 to 255). The alpha range by default is also 0 to 255.\n * \n * If a single string argument is provided, RGB, RGBA and Hex CSS color\n * strings and all named color strings are supported. In this case, an alpha\n * number value as a second argument is not supported, the RGBA form should be\n * used.\n * \n * A p5 Color object can also be provided to set the stroke color.\n *\n *\n * @method stroke\n * @param {Number} v1 red or hue value relative to\n * the current color range\n * @param {Number} v2 green or saturation value\n * relative to the current color range\n * @param {Number} v3 blue or brightness value\n * relative to the current color range\n * @param {Number} [alpha]\n * @chainable\n *\n * @example\n * \n * \n * // Grayscale integer value\n * strokeWeight(4);\n * stroke(51);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // R, G & B integer values\n * stroke(255, 204, 0);\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // H, S & B integer values\n * colorMode(HSB);\n * strokeWeight(4);\n * stroke(255, 204, 100);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // Named SVG/CSS color string\n * stroke('red');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // three-digit hexadecimal RGB notation\n * stroke('#fae');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // six-digit hexadecimal RGB notation\n * stroke('#222222');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // integer RGB notation\n * stroke('rgb(0,255,0)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // integer RGBA notation\n * stroke('rgba(0,255,0,0.25)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // percentage RGB notation\n * stroke('rgb(100%,0%,10%)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // percentage RGBA notation\n * stroke('rgba(100%,0%,100%,0.5)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * \n * \n * // p5 Color object\n * stroke(color(0, 0, 255));\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n * \n * \n *\n * @alt\n * 60x60 white rect at center. Dark charcoal grey outline.\n * 60x60 white rect at center. Yellow outline.\n * 60x60 white rect at center. Royal blue outline.\n * 60x60 white rect at center. Red outline.\n * 60x60 white rect at center. Pink outline.\n * 60x60 white rect at center. Black outline.\n * 60x60 white rect at center. Bright green outline.\n * 60x60 white rect at center. Soft green outline.\n * 60x60 white rect at center. Red outline.\n * 60x60 white rect at center. Dark fuchsia outline.\n * 60x60 white rect at center. Blue outline.\n */\n\n/**\n * @method stroke\n * @param {String} value a color string\n * @chainable\n */\n\n/**\n * @method stroke\n * @param {Number} gray a gray value\n * @param {Number} [alpha]\n * @chainable\n */\n\n/**\n * @method stroke\n * @param {Number[]} values an array containing the red,green,blue &\n * and alpha components of the color\n * @chainable\n */\n\n/**\n * @method stroke\n * @param {p5.Color} color the stroke color\n * @chainable\n */\n\np5.prototype.stroke = function() {\n this._renderer._setProperty('_strokeSet', true);\n this._renderer._setProperty('_doStroke', true);\n this._renderer.stroke.apply(this._renderer, arguments);\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24,\"./p5.Color\":16}],18:[function(_dereq_,module,exports){\n/**\n * @module Constants\n * @submodule Constants\n * @for p5\n */\n\n'use strict';\n\nvar PI = Math.PI;\n\nmodule.exports = {\n // GRAPHICS RENDERER\n /**\n * @property {String} P2D\n * @final\n */\n P2D: 'p2d',\n /**\n * @property {String} WEBGL\n * @final\n */\n WEBGL: 'webgl',\n\n // ENVIRONMENT\n /**\n * @property {String} ARROW\n * @final\n */\n ARROW: 'default',\n /**\n * @property {String} CROSS\n * @final\n */\n CROSS: 'crosshair',\n /**\n * @property {String} HAND\n * @final\n */\n HAND: 'pointer',\n /**\n * @property {String} MOVE\n * @final\n */\n MOVE: 'move',\n /**\n * @property {String} TEXT\n * @final\n */\n TEXT: 'text',\n /**\n * @property {String} WAIT\n * @final\n */\n WAIT: 'wait',\n\n // TRIGONOMETRY\n\n /**\n * HALF_PI is a mathematical constant with the value\n * 1.57079632679489661923. It is half the ratio of the\n * circumference of a circle to its diameter. It is useful in\n * combination with the trigonometric functions sin() and cos().\n *\n * @property {Number} HALF_PI\n * @final\n *\n * @example\n * \n * arc(50, 50, 80, 80, 0, HALF_PI);\n * \n *\n * @alt\n * 80x80 white quarter-circle with curve toward bottom right of canvas.\n *\n */\n HALF_PI: PI / 2,\n /**\n * PI is a mathematical constant with the value\n * 3.14159265358979323846. It is the ratio of the circumference\n * of a circle to its diameter. It is useful in combination with\n * the trigonometric functions sin() and cos().\n *\n * @property {Number} PI\n * @final\n *\n * @example\n * \n * arc(50, 50, 80, 80, 0, PI);\n * \n *\n * @alt\n * white half-circle with curve toward bottom of canvas.\n *\n */\n PI: PI,\n /**\n * QUARTER_PI is a mathematical constant with the value 0.7853982.\n * It is one quarter the ratio of the circumference of a circle to\n * its diameter. It is useful in combination with the trigonometric\n * functions sin() and cos().\n *\n * @property {Number} QUARTER_PI\n * @final\n *\n * @example\n * \n * arc(50, 50, 80, 80, 0, QUARTER_PI);\n * \n *\n * @alt\n * white eighth-circle rotated about 40 degrees with curve bottom right canvas.\n *\n */\n QUARTER_PI: PI / 4,\n /**\n * TAU is an alias for TWO_PI, a mathematical constant with the\n * value 6.28318530717958647693. It is twice the ratio of the\n * circumference of a circle to its diameter. It is useful in\n * combination with the trigonometric functions sin() and cos().\n *\n * @property {Number} TAU\n * @final\n *\n * @example\n * \n * arc(50, 50, 80, 80, 0, TAU);\n * \n *\n * @alt\n * 80x80 white ellipse shape in center of canvas.\n *\n */\n TAU: PI * 2,\n /**\n * TWO_PI is a mathematical constant with the value\n * 6.28318530717958647693. It is twice the ratio of the\n * circumference of a circle to its diameter. It is useful in\n * combination with the trigonometric functions sin() and cos().\n *\n * @property {Number} TWO_PI\n * @final\n *\n * @example\n * \n * arc(50, 50, 80, 80, 0, TWO_PI);\n * \n *\n * @alt\n * 80x80 white ellipse shape in center of canvas.\n *\n */\n TWO_PI: PI * 2,\n /**\n * Constant to be used with angleMode() function, to set the mode which\n * p5.js interprates and calculates angles (either DEGREES or RADIANS).\n * @property {String} DEGREES\n * @final\n *\n * @example\n * \n * function setup() {\n * angleMode(DEGREES);\n * }\n * \n */\n DEGREES: 'degrees',\n /**\n * Constant to be used with angleMode() function, to set the mode which\n * p5.js interprates and calculates angles (either RADIANS or DEGREES).\n * @property {String} RADIANS\n * @final\n *\n * @example\n * \n * function setup() {\n * angleMode(RADIANS);\n * }\n * \n */\n RADIANS: 'radians',\n DEG_TO_RAD: PI / 180.0,\n RAD_TO_DEG: 180.0 / PI,\n\n // SHAPE\n /**\n * @property {String} CORNER\n * @final\n */\n CORNER: 'corner',\n /**\n * @property {String} CORNERS\n * @final\n */\n CORNERS: 'corners',\n /**\n * @property {String} RADIUS\n * @final\n */\n RADIUS: 'radius',\n /**\n * @property {String} RIGHT\n * @final\n */\n RIGHT: 'right',\n /**\n * @property {String} LEFT\n * @final\n */\n LEFT: 'left',\n /**\n * @property {String} CENTER\n * @final\n */\n CENTER: 'center',\n /**\n * @property {String} TOP\n * @final\n */\n TOP: 'top',\n /**\n * @property {String} BOTTOM\n * @final\n */\n BOTTOM: 'bottom',\n /**\n * @property {String} BASELINE\n * @final\n * @default alphabetic\n */\n BASELINE: 'alphabetic',\n /**\n * @property {Number} POINTS\n * @final\n * @default 0x0000\n */\n POINTS: 0x0000,\n /**\n * @property {Number} LINES\n * @final\n * @default 0x0001\n */\n LINES: 0x0001,\n /**\n * @property {Number} LINE_STRIP\n * @final\n * @default 0x0003\n */\n LINE_STRIP: 0x0003,\n /**\n * @property {Number} LINE_LOOP\n * @final\n * @default 0x0002\n */\n LINE_LOOP: 0x0002,\n /**\n * @property {Number} TRIANGLES\n * @final\n * @default 0x0004\n */\n TRIANGLES: 0x0004,\n /**\n * @property {Number} TRIANGLE_FAN\n * @final\n * @default 0x0006\n */\n TRIANGLE_FAN: 0x0006,\n /**\n * @property {Number} TRIANGLE_STRIP\n * @final\n * @default 0x0005\n */\n TRIANGLE_STRIP: 0x0005,\n /**\n * @property {String} QUADS\n * @final\n */\n QUADS: 'quads',\n /**\n * @property {String} QUAD_STRIP\n * @final\n * @default quad_strip\n */\n QUAD_STRIP: 'quad_strip',\n /**\n * @property {String} CLOSE\n * @final\n */\n CLOSE: 'close',\n /**\n * @property {String} OPEN\n * @final\n */\n OPEN: 'open',\n /**\n * @property {String} CHORD\n * @final\n */\n CHORD: 'chord',\n /**\n * @property {String} PIE\n * @final\n */\n PIE: 'pie',\n /**\n * @property {String} PROJECT\n * @final\n * @default square\n */\n PROJECT: 'square', // PEND: careful this is counterintuitive\n /**\n * @property {String} SQUARE\n * @final\n * @default butt\n */\n SQUARE: 'butt',\n /**\n * @property {String} ROUND\n * @final\n */\n ROUND: 'round',\n /**\n * @property {String} BEVEL\n * @final\n */\n BEVEL: 'bevel',\n /**\n * @property {String} MITER\n * @final\n */\n MITER: 'miter',\n\n // COLOR\n /**\n * @property {String} RGB\n * @final\n */\n RGB: 'rgb',\n /**\n * @property {String} HSB\n * @final\n */\n HSB: 'hsb',\n /**\n * @property {String} HSL\n * @final\n */\n HSL: 'hsl',\n\n // DOM EXTENSION\n /**\n * AUTO allows us to automatically set the width or height of an element (but not both),\n * based on the current height and width of the element. Only one parameter can\n * be passed to the size function as AUTO, at a time.\n *\n * @property {String} AUTO\n * @final\n */\n AUTO: 'auto',\n\n // INPUT\n ALT: 18,\n BACKSPACE: 8,\n CONTROL: 17,\n DELETE: 46,\n DOWN_ARROW: 40,\n ENTER: 13,\n ESCAPE: 27,\n LEFT_ARROW: 37,\n OPTION: 18,\n RETURN: 13,\n RIGHT_ARROW: 39,\n SHIFT: 16,\n TAB: 9,\n UP_ARROW: 38,\n\n // RENDERING\n /**\n * @property {String} BLEND\n * @final\n * @default source-over\n */\n BLEND: 'source-over',\n /**\n * @property {String} ADD\n * @final\n * @default lighter\n */\n ADD: 'lighter',\n //ADD: 'add', //\n //SUBTRACT: 'subtract', //\n /**\n * @property {String} DARKEST\n * @final\n */\n DARKEST: 'darken',\n /**\n * @property {String} LIGHTEST\n * @final\n * @default lighten\n */\n LIGHTEST: 'lighten',\n /**\n * @property {String} DIFFERENCE\n * @final\n */\n DIFFERENCE: 'difference',\n /**\n * @property {String} SUBTRACT\n * @final\n */\n SUBTRACT: 'subtract',\n /**\n * @property {String} EXCLUSION\n * @final\n */\n EXCLUSION: 'exclusion',\n /**\n * @property {String} MULTIPLY\n * @final\n */\n MULTIPLY: 'multiply',\n /**\n * @property {String} SCREEN\n * @final\n */\n SCREEN: 'screen',\n /**\n * @property {String} REPLACE\n * @final\n * @default copy\n */\n REPLACE: 'copy',\n /**\n * @property {String} OVERLAY\n * @final\n */\n OVERLAY: 'overlay',\n /**\n * @property {String} HARD_LIGHT\n * @final\n */\n HARD_LIGHT: 'hard-light',\n /**\n * @property {String} SOFT_LIGHT\n * @final\n */\n SOFT_LIGHT: 'soft-light',\n /**\n * @property {String} DODGE\n * @final\n * @default color-dodge\n */\n DODGE: 'color-dodge',\n /**\n * @property {String} BURN\n * @final\n * @default color-burn\n */\n BURN: 'color-burn',\n\n // FILTERS\n /**\n * @property {String} THRESHOLD\n * @final\n */\n THRESHOLD: 'threshold',\n /**\n * @property {String} GRAY\n * @final\n */\n GRAY: 'gray',\n /**\n * @property {String} OPAQUE\n * @final\n */\n OPAQUE: 'opaque',\n /**\n * @property {String} INVERT\n * @final\n */\n INVERT: 'invert',\n /**\n * @property {String} POSTERIZE\n * @final\n */\n POSTERIZE: 'posterize',\n /**\n * @property {String} DILATE\n * @final\n */\n DILATE: 'dilate',\n /**\n * @property {String} ERODE\n * @final\n */\n ERODE: 'erode',\n /**\n * @property {String} BLUR\n * @final\n */\n BLUR: 'blur',\n\n // TYPOGRAPHY\n /**\n * @property {String} NORMAL\n * @final\n */\n NORMAL: 'normal',\n /**\n * @property {String} ITALIC\n * @final\n */\n ITALIC: 'italic',\n /**\n * @property {String} BOLD\n * @final\n */\n BOLD: 'bold',\n /**\n * @property {String} BOLDITALIC\n * @final\n */\n BOLDITALIC: 'bold italic',\n\n // TYPOGRAPHY-INTERNAL\n _DEFAULT_TEXT_FILL: '#000000',\n _DEFAULT_LEADMULT: 1.25,\n _CTX_MIDDLE: 'middle',\n\n // VERTICES\n LINEAR: 'linear',\n QUADRATIC: 'quadratic',\n BEZIER: 'bezier',\n CURVE: 'curve',\n\n // WEBGL DRAWMODES\n STROKE: 'stroke',\n FILL: 'fill',\n TEXTURE: 'texture',\n IMMEDIATE: 'immediate',\n\n // WEBGL TEXTURE MODE\n // NORMAL already exists for typography\n /**\n * @property {String} IMAGE\n * @final\n */\n IMAGE: 'image',\n\n // WEBGL TEXTURE WRAP AND FILTERING\n // LINEAR already exists above\n NEAREST: 'nearest',\n REPEAT: 'repeat',\n CLAMP: 'clamp',\n MIRROR: 'mirror',\n\n // DEVICE-ORIENTATION\n /**\n * @property {String} LANDSCAPE\n * @final\n */\n LANDSCAPE: 'landscape',\n /**\n * @property {String} PORTRAIT\n * @final\n */\n PORTRAIT: 'portrait',\n\n // DEFAULTS\n _DEFAULT_STROKE: '#000000',\n _DEFAULT_FILL: '#FFFFFF',\n\n /**\n * @property {String} GRID\n * @final\n */\n GRID: 'grid',\n\n /**\n * @property {String} AXES\n * @final\n */\n AXES: 'axes'\n};\n\n},{}],19:[function(_dereq_,module,exports){\n/**\n * @module Environment\n * @submodule Environment\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar C = _dereq_('./constants');\n\nvar standardCursors = [C.ARROW, C.CROSS, C.HAND, C.MOVE, C.TEXT, C.WAIT];\n\np5.prototype._frameRate = 0;\np5.prototype._lastFrameTime = window.performance.now();\np5.prototype._targetFrameRate = 60;\n\nvar _windowPrint = window.print;\n\n/**\n * The print() function writes to the console area of your browser.\n * This function is often helpful for looking at the data a program is\n * producing. This function creates a new line of text for each call to\n * the function. Individual elements can be\n * separated with quotes (\"\") and joined with the addition operator (+).\n *\n * Note that calling print() without any arguments invokes the window.print()\n * function which opens the browser's print dialog. To print a blank line\n * to console you can write print('\\n').\n *\n * @method print\n * @param {Any} contents any combination of Number, String, Object, Boolean,\n * Array to print\n * @example\n * \n * let x = 10;\n * print('The value of x is ' + x);\n * // prints \"The value of x is 10\"\n * \n * @alt\n * default grey canvas\n */\np5.prototype.print = function() {\n if (!arguments.length) {\n _windowPrint();\n } else {\n console.log.apply(console, arguments);\n }\n};\n\n/**\n * The system variable frameCount contains the number of frames that have\n * been displayed since the program started. Inside setup() the value is 0,\n * after the first iteration of draw it is 1, etc.\n *\n * @property {Integer} frameCount\n * @readOnly\n * @example\n * \n * function setup() {\n * frameRate(30);\n * textSize(30);\n * textAlign(CENTER);\n * }\n *\n * function draw() {\n * background(200);\n * text(frameCount, width / 2, height / 2);\n * }\n\n *\n * @alt\n * numbers rapidly counting upward with frame count set to 30.\n *\n */\np5.prototype.frameCount = 0;\n\n/**\n * Confirms if the window a p5.js program is in is \"focused,\" meaning that\n * the sketch will accept mouse or keyboard input. This variable is\n * \"true\" if the window is focused and \"false\" if not.\n *\n * @property {Boolean} focused\n * @readOnly\n * @example\n * \n * // To demonstrate, put two windows side by side.\n * // Click on the window that the p5 sketch isn't in!\n * function draw() {\n * background(200);\n * noStroke();\n * fill(0, 200, 0);\n * ellipse(25, 25, 50, 50);\n *\n * if (!focused) {\n // or \"if (focused === false)\"\n * stroke(200, 0, 0);\n * line(0, 0, 100, 100);\n * line(100, 0, 0, 100);\n * }\n * }\n * \n *\n * @alt\n * green 50x50 ellipse at top left. Red X covers canvas when page focus changes\n *\n */\np5.prototype.focused = document.hasFocus();\n\n/**\n * Sets the cursor to a predefined symbol or an image, or makes it visible\n * if already hidden. If you are trying to set an image as the cursor, the\n * recommended size is 16x16 or 32x32 pixels. The values for parameters x and y\n * must be less than the dimensions of the image.\n *\n * @method cursor\n * @param {String|Constant} type Built-In: either ARROW, CROSS, HAND, MOVE, TEXT and WAIT\n * Native CSS properties: 'grab', 'progress', 'cell' etc.\n * External: path for cursor's images\n * (Allowed File extensions: .cur, .gif, .jpg, .jpeg, .png)\n * For more information on Native CSS cursors and url visit:\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\n * @param {Number} [x] the horizontal active spot of the cursor (must be less than 32)\n * @param {Number} [y] the vertical active spot of the cursor (must be less than 32)\n * @example\n * \n * // Move the mouse across the quadrants\n * // to see the cursor change\n * function draw() {\n * line(width / 2, 0, width / 2, height);\n * line(0, height / 2, width, height / 2);\n * if (mouseX < 50 && mouseY < 50) {\n * cursor(CROSS);\n * } else if (mouseX > 50 && mouseY < 50) {\n * cursor('progress');\n * } else if (mouseX > 50 && mouseY > 50) {\n * cursor('https://s3.amazonaws.com/mupublicdata/cursor.cur');\n * } else {\n * cursor('grab');\n * }\n * }\n * \n *\n * @alt\n * canvas is divided into four quadrants. cursor on first is a cross, second is a progress,\n * third is a custom cursor using path to the cursor and fourth is a grab.\n *\n */\np5.prototype.cursor = function(type, x, y) {\n var cursor = 'auto';\n var canvas = this._curElement.elt;\n if (standardCursors.indexOf(type) > -1) {\n // Standard css cursor\n cursor = type;\n } else if (typeof type === 'string') {\n var coords = '';\n if (x && y && (typeof x === 'number' && typeof y === 'number')) {\n // Note that x and y values must be unit-less positive integers < 32\n // https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\n coords = x + ' ' + y;\n }\n if (\n type.substring(0, 7) === 'http://' ||\n type.substring(0, 8) === 'https://'\n ) {\n // Image (absolute url)\n cursor = 'url(' + type + ') ' + coords + ', auto';\n } else if (/\\.(cur|jpg|jpeg|gif|png|CUR|JPG|JPEG|GIF|PNG)$/.test(type)) {\n // Image file (relative path) - Separated for performance reasons\n cursor = 'url(' + type + ') ' + coords + ', auto';\n } else {\n // Any valid string for the css cursor property\n cursor = type;\n }\n }\n canvas.style.cursor = cursor;\n};\n\n/**\n * Specifies the number of frames to be displayed every second. For example,\n * the function call frameRate(30) will attempt to refresh 30 times a second.\n * If the processor is not fast enough to maintain the specified rate, the\n * frame rate will not be achieved. Setting the frame rate within setup() is\n * recommended. The default frame rate is based on the frame rate of the display\n * (here also called \"refresh rate\"), which is set to 60 frames per second on most\n * computers. A frame rate of 24 frames per second (usual for movies) or above\n * will be enough for smooth animations\n * This is the same as setFrameRate(val).\n * \n * Calling frameRate() with no arguments returns the current framerate. The\n * draw function must run at least once before it will return a value. This\n * is the same as getFrameRate().\n * \n * Calling frameRate() with arguments that are not of the type numbers\n * or are non positive also returns current framerate.\n *\n * @method frameRate\n * @param {Number} fps number of frames to be displayed every second\n * @chainable\n *\n * @example\n *\n * \n * let rectX = 0;\n * let fr = 30; //starting FPS\n * let clr;\n *\n * function setup() {\n * background(200);\n * frameRate(fr); // Attempt to refresh at starting FPS\n * clr = color(255, 0, 0);\n * }\n *\n * function draw() {\n * background(200);\n * rectX = rectX += 1; // Move Rectangle\n *\n * if (rectX >= width) {\n // If you go off screen.\n * if (fr === 30) {\n * clr = color(0, 0, 255);\n * fr = 10;\n * frameRate(fr); // make frameRate 10 FPS\n * } else {\n * clr = color(255, 0, 0);\n * fr = 30;\n * frameRate(fr); // make frameRate 30 FPS\n * }\n * rectX = 0;\n * }\n * fill(clr);\n * rect(rectX, 40, 20, 20);\n * }\n * \n *\n * @alt\n * blue rect moves left to right, followed by red rect moving faster. Loops.\n *\n */\n/**\n * @method frameRate\n * @return {Number} current frameRate\n */\np5.prototype.frameRate = function(fps) {\n p5._validateParameters('frameRate', arguments);\n if (typeof fps !== 'number' || fps < 0) {\n return this._frameRate;\n } else {\n this._setProperty('_targetFrameRate', fps);\n return this;\n }\n};\n/**\n * Returns the current framerate.\n *\n * @private\n * @return {Number} current frameRate\n */\np5.prototype.getFrameRate = function() {\n return this.frameRate();\n};\n\n/**\n * Specifies the number of frames to be displayed every second. For example,\n * the function call frameRate(30) will attempt to refresh 30 times a second.\n * If the processor is not fast enough to maintain the specified rate, the\n * frame rate will not be achieved. Setting the frame rate within setup() is\n * recommended. The default rate is 60 frames per second.\n *\n * Calling frameRate() with no arguments returns the current framerate.\n *\n * @private\n * @param {Number} [fps] number of frames to be displayed every second\n */\np5.prototype.setFrameRate = function(fps) {\n return this.frameRate(fps);\n};\n\n/**\n * Hides the cursor from view.\n *\n * @method noCursor\n * @example\n * \n * function setup() {\n * noCursor();\n * }\n *\n * function draw() {\n * background(200);\n * ellipse(mouseX, mouseY, 10, 10);\n * }\n * \n *\n *\n * @alt\n * cursor becomes 10x 10 white ellipse the moves with mouse x and y.\n *\n */\np5.prototype.noCursor = function() {\n this._curElement.elt.style.cursor = 'none';\n};\n\n/**\n * System variable that stores the width of the screen display according to The\n * default pixelDensity. This is used to run a\n * full-screen program on any display size. To return actual screen size,\n * multiply this by pixelDensity.\n *\n * @property {Number} displayWidth\n * @readOnly\n * @example\n * \n * createCanvas(displayWidth, displayHeight);\n * \n *\n * @alt\n * cursor becomes 10x 10 white ellipse the moves with mouse x and y.\n *\n */\np5.prototype.displayWidth = screen.width;\n\n/**\n * System variable that stores the height of the screen display according to The\n * default pixelDensity. This is used to run a\n * full-screen program on any display size. To return actual screen size,\n * multiply this by pixelDensity.\n *\n * @property {Number} displayHeight\n * @readOnly\n * @example\n * \n * createCanvas(displayWidth, displayHeight);\n * \n *\n * @alt\n * no display.\n *\n */\np5.prototype.displayHeight = screen.height;\n\n/**\n * System variable that stores the width of the inner window, it maps to\n * window.innerWidth.\n *\n * @property {Number} windowWidth\n * @readOnly\n * @example\n * \n * createCanvas(windowWidth, windowHeight);\n * \n *\n * @alt\n * no display.\n *\n */\np5.prototype.windowWidth = getWindowWidth();\n/**\n * System variable that stores the height of the inner window, it maps to\n * window.innerHeight.\n *\n * @property {Number} windowHeight\n * @readOnly\n * @example\n * \n * createCanvas(windowWidth, windowHeight);\n * \n *@alt\n * no display.\n *\n */\np5.prototype.windowHeight = getWindowHeight();\n\n/**\n * The windowResized() function is called once every time the browser window\n * is resized. This is a good place to resize the canvas or do any other\n * adjustments to accommodate the new window size.\n *\n * @method windowResized\n * @example\n * \n * function setup() {\n * createCanvas(windowWidth, windowHeight);\n * }\n *\n * function draw() {\n * background(0, 100, 200);\n * }\n *\n * function windowResized() {\n * resizeCanvas(windowWidth, windowHeight);\n * }\n * \n * @alt\n * no display.\n */\np5.prototype._onresize = function(e) {\n this._setProperty('windowWidth', getWindowWidth());\n this._setProperty('windowHeight', getWindowHeight());\n var context = this._isGlobal ? window : this;\n var executeDefault;\n if (typeof context.windowResized === 'function') {\n executeDefault = context.windowResized(e);\n if (executeDefault !== undefined && !executeDefault) {\n e.preventDefault();\n }\n }\n};\n\nfunction getWindowWidth() {\n return (\n window.innerWidth ||\n (document.documentElement && document.documentElement.clientWidth) ||\n (document.body && document.body.clientWidth) ||\n 0\n );\n}\n\nfunction getWindowHeight() {\n return (\n window.innerHeight ||\n (document.documentElement && document.documentElement.clientHeight) ||\n (document.body && document.body.clientHeight) ||\n 0\n );\n}\n\n/**\n * System variable that stores the width of the drawing canvas. This value\n * is set by the first parameter of the createCanvas() function.\n * For example, the function call createCanvas(320, 240) sets the width\n * variable to the value 320. The value of width defaults to 100 if\n * createCanvas() is not used in a program.\n *\n * @property {Number} width\n * @readOnly\n */\np5.prototype.width = 0;\n\n/**\n * System variable that stores the height of the drawing canvas. This value\n * is set by the second parameter of the createCanvas() function. For\n * example, the function call createCanvas(320, 240) sets the height\n * variable to the value 240. The value of height defaults to 100 if\n * createCanvas() is not used in a program.\n *\n * @property {Number} height\n * @readOnly\n */\np5.prototype.height = 0;\n\n/**\n * If argument is given, sets the sketch to fullscreen or not based on the\n * value of the argument. If no argument is given, returns the current\n * fullscreen state. Note that due to browser restrictions this can only\n * be called on user input, for example, on mouse press like the example\n * below.\n *\n * @method fullscreen\n * @param {Boolean} [val] whether the sketch should be in fullscreen mode\n * or not\n * @return {Boolean} current fullscreen state\n * @example\n * \n * \n * // Clicking in the box toggles fullscreen on and off.\n * function setup() {\n * background(200);\n * }\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n * let fs = fullscreen();\n * fullscreen(!fs);\n * }\n * }\n * \n * \n *\n * @alt\n * no display.\n *\n */\np5.prototype.fullscreen = function(val) {\n p5._validateParameters('fullscreen', arguments);\n // no arguments, return fullscreen or not\n if (typeof val === 'undefined') {\n return (\n document.fullscreenElement ||\n document.webkitFullscreenElement ||\n document.mozFullScreenElement ||\n document.msFullscreenElement\n );\n } else {\n // otherwise set to fullscreen or not\n if (val) {\n launchFullscreen(document.documentElement);\n } else {\n exitFullscreen();\n }\n }\n};\n\n/**\n * Sets the pixel scaling for high pixel density displays. By default\n * pixel density is set to match display density, call pixelDensity(1)\n * to turn this off. Calling pixelDensity() with no arguments returns\n * the current pixel density of the sketch.\n *\n * @method pixelDensity\n * @param {Number} val whether or how much the sketch should scale\n * @chainable\n * @example\n * \n * \n * function setup() {\n * pixelDensity(1);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * pixelDensity(3.0);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n * \n * \n *\n * @alt\n * fuzzy 50x50 white ellipse with black outline in center of canvas.\n * sharp 50x50 white ellipse with black outline in center of canvas.\n */\n/**\n * @method pixelDensity\n * @returns {Number} current pixel density of the sketch\n */\np5.prototype.pixelDensity = function(val) {\n p5._validateParameters('pixelDensity', arguments);\n var returnValue;\n if (typeof val === 'number') {\n if (val !== this._pixelDensity) {\n this._pixelDensity = val;\n this._pixelsDirty = true;\n }\n returnValue = this;\n this.resizeCanvas(this.width, this.height, true); // as a side effect, it will clear the canvas\n } else {\n returnValue = this._pixelDensity;\n }\n return returnValue;\n};\n\n/**\n * Returns the pixel density of the current display the sketch is running on.\n *\n * @method displayDensity\n * @returns {Number} current pixel density of the display\n * @example\n * \n * \n * function setup() {\n * let density = displayDensity();\n * pixelDensity(density);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n * \n * \n *\n * @alt\n * 50x50 white ellipse with black outline in center of canvas.\n */\np5.prototype.displayDensity = function() {\n return window.devicePixelRatio;\n};\n\nfunction launchFullscreen(element) {\n var enabled =\n document.fullscreenEnabled ||\n document.webkitFullscreenEnabled ||\n document.mozFullScreenEnabled ||\n document.msFullscreenEnabled;\n if (!enabled) {\n throw new Error('Fullscreen not enabled in this browser.');\n }\n if (element.requestFullscreen) {\n element.requestFullscreen();\n } else if (element.mozRequestFullScreen) {\n element.mozRequestFullScreen();\n } else if (element.webkitRequestFullscreen) {\n element.webkitRequestFullscreen();\n } else if (element.msRequestFullscreen) {\n element.msRequestFullscreen();\n }\n}\n\nfunction exitFullscreen() {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n}\n\n/**\n * Gets the current URL.\n * @method getURL\n * @return {String} url\n * @example\n * \n * \n * let url;\n * let x = 100;\n *\n * function setup() {\n * fill(0);\n * noStroke();\n * url = getURL();\n * }\n *\n * function draw() {\n * background(200);\n * text(url, x, height / 2);\n * x--;\n * }\n * \n * \n *\n * @alt\n * current url (http://p5js.org/reference/#/p5/getURL) moves right to left.\n *\n */\np5.prototype.getURL = function() {\n return location.href;\n};\n/**\n * Gets the current URL path as an array.\n * @method getURLPath\n * @return {String[]} path components\n * @example\n * \n * function setup() {\n * let urlPath = getURLPath();\n * for (let i = 0; i < urlPath.length; i++) {\n * text(urlPath[i], 10, i * 20 + 20);\n * }\n * }\n * \n *\n * @alt\n *no display\n *\n */\np5.prototype.getURLPath = function() {\n return location.pathname.split('/').filter(function(v) {\n return v !== '';\n });\n};\n/**\n * Gets the current URL params as an Object.\n * @method getURLParams\n * @return {Object} URL params\n * @example\n * \n * \n * // Example: http://p5js.org?year=2014&month=May&day=15\n *\n * function setup() {\n * let params = getURLParams();\n * text(params.day, 10, 20);\n * text(params.month, 10, 40);\n * text(params.year, 10, 60);\n * }\n * \n * \n * @alt\n * no display.\n *\n */\np5.prototype.getURLParams = function() {\n var re = /[?&]([^&=]+)(?:[&=])([^&=]+)/gim;\n var m;\n var v = {};\n while ((m = re.exec(location.search)) != null) {\n if (m.index === re.lastIndex) {\n re.lastIndex++;\n }\n v[m[1]] = m[2];\n }\n return v;\n};\n\nmodule.exports = p5;\n\n},{\"./constants\":18,\"./main\":24}],20:[function(_dereq_,module,exports){\n/**\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar constants = _dereq_('./constants');\n\n// p5.js blue, p5.js orange, auto dark green; fallback p5.js darkened magenta\n// See testColors below for all the color codes and names\nvar typeColors = ['#2D7BB6', '#EE9900', '#4DB200', '#C83C00'];\n\nif (typeof IS_MINIFIED !== 'undefined') {\n p5._validateParameters = p5._friendlyFileLoadError = p5._friendlyError = function() {};\n} else {\n var doFriendlyWelcome = false; // TEMP until we get it all working LM\n // for parameter validation\n var dataDoc = _dereq_('../../docs/reference/data.json');\n var arrDoc = JSON.parse(JSON.stringify(dataDoc));\n\n // -- Borrowed from jQuery 1.11.3 --\n var class2type = {};\n var toString = class2type.toString;\n var names = [\n 'Boolean',\n 'Number',\n 'String',\n 'Function',\n 'Array',\n 'Date',\n 'RegExp',\n 'Object',\n 'Error'\n ];\n for (var n = 0; n < names.length; n++) {\n class2type['[object ' + names[n] + ']'] = names[n].toLowerCase();\n }\n var getType = function(obj) {\n if (obj == null) {\n return obj + '';\n }\n return typeof obj === 'object' || typeof obj === 'function'\n ? class2type[toString.call(obj)] || 'object'\n : typeof obj;\n };\n\n // -- End borrow --\n\n var friendlyWelcome = function() {\n // p5.js brand - magenta: #ED225D\n //var astrixBgColor = 'transparent';\n //var astrixTxtColor = '#ED225D';\n //var welcomeBgColor = '#ED225D';\n //var welcomeTextColor = 'white';\n console.log(\n ' _ \\n' +\n ' /\\\\| |/\\\\ \\n' +\n \" \\\\ ` ' / \\n\" +\n ' / , . \\\\ \\n' +\n ' \\\\/|_|\\\\/ ' +\n '\\n\\n> p5.js says: Welcome! ' +\n 'This is your friendly debugger. ' +\n 'To turn me off switch to using “p5.min.js”.'\n );\n };\n\n /**\n * Prints out a fancy, colorful message to the console log\n *\n * @method report\n * @private\n * @param {String} message the words to be said\n * @param {String} func the name of the function to link\n * @param {Number|String} color CSS color string or error type\n *\n * @return console logs\n */\n var report = function(message, func, color) {\n if (doFriendlyWelcome) {\n friendlyWelcome();\n doFriendlyWelcome = false;\n }\n if ('undefined' === getType(color)) {\n color = '#B40033'; // dark magenta\n } else if (getType(color) === 'number') {\n // Type to color\n color = typeColors[color];\n }\n if (func === 'loadX') {\n console.log('> p5.js says: ' + message);\n } else if (func.substring(0, 4) === 'load') {\n console.log(\n '> p5.js says: ' +\n message +\n '[https://github.com/processing/p5.js/wiki/Local-server]'\n );\n } else {\n console.log(\n '> p5.js says: ' +\n message +\n ' [http://p5js.org/reference/#p5/' +\n func +\n ']'\n );\n }\n };\n\n var errorCases = {\n '0': {\n fileType: 'image',\n method: 'loadImage',\n message: ' hosting the image online,'\n },\n '1': {\n fileType: 'XML file',\n method: 'loadXML'\n },\n '2': {\n fileType: 'table file',\n method: 'loadTable'\n },\n '3': {\n fileType: 'text file',\n method: 'loadStrings'\n },\n '4': {\n fileType: 'font',\n method: 'loadFont',\n message: ' hosting the font online,'\n },\n '5': {\n fileType: 'json',\n method: 'loadJSON'\n },\n '6': {\n fileType: 'file',\n method: 'loadBytes'\n },\n '7': {\n method: 'loadX',\n message:\n \"In case your large file isn't fetched successfully,\" +\n 'we recommend splitting the file into smaller segments and fetching those.'\n }\n };\n\n /**\n * This is called internally if there is a error during file loading.\n *\n * @method _friendlyFileLoadError\n * @private\n * @param {Number} errorType\n * @param {String} filePath\n */\n p5._friendlyFileLoadError = function(errorType, filePath) {\n var errorInfo = errorCases[errorType];\n var message;\n if (errorType === 7) {\n message = errorInfo.message;\n } else {\n message =\n 'It looks like there was a problem' +\n ' loading your ' +\n errorInfo.fileType +\n '.' +\n ' Try checking if the file path [' +\n filePath +\n '] is correct,' +\n (errorInfo.message || '') +\n ' or running a local server.';\n }\n report(message, errorInfo.method, 3);\n };\n\n /**\n * This is a generic method that can be called from anywhere in the p5\n * library to alert users to a common error.\n *\n * @method _friendlyError\n * @private\n * @param {Number} message message to be printed\n * @param {String} method name of method\n */\n p5._friendlyError = function(message, method) {\n report(message, method);\n };\n\n var docCache = {};\n var builtinTypes = [\n 'null',\n 'number',\n 'string',\n 'boolean',\n 'constant',\n 'function',\n 'any',\n 'integer'\n ];\n\n // validateParameters() helper functions:\n // lookupParamDoc() for querying data.json\n var lookupParamDoc = function(func) {\n // look for the docs in the `data.json` datastructure\n\n var ichDot = func.lastIndexOf('.');\n var funcName = func.substr(ichDot + 1);\n var funcClass = func.substr(0, ichDot) || 'p5';\n\n var queryResult;\n var classitems = arrDoc.classitems;\n for (var ici = 0; ici < classitems.length; ici++) {\n var x = classitems[ici];\n if (x.name === funcName && x.class === funcClass) {\n queryResult = x;\n break;\n }\n }\n\n // different JSON structure for funct with multi-format\n var overloads = [];\n if (queryResult.hasOwnProperty('overloads')) {\n // add all the overloads\n for (var i = 0; i < queryResult.overloads.length; i++) {\n overloads.push({ formats: queryResult.overloads[i].params });\n }\n } else {\n // no overloads, just add the main method definition\n overloads.push({ formats: queryResult.params || [] });\n }\n\n // parse the parameter types for each overload\n var mapConstants = {};\n var maxParams = 0;\n overloads.forEach(function(overload) {\n var formats = overload.formats;\n\n // keep a record of the maximum number of arguments\n // this method requires.\n if (maxParams < formats.length) {\n maxParams = formats.length;\n }\n\n // calculate the minimum number of arguments\n // this overload requires.\n var minParams = formats.length;\n while (minParams > 0 && formats[minParams - 1].optional) {\n minParams--;\n }\n overload.minParams = minParams;\n\n // loop through each parameter position, and parse its types\n formats.forEach(function(format) {\n // split this parameter's types\n format.types = format.type.split('|').map(function ct(type) {\n // array\n if (type.substr(type.length - 2, 2) === '[]') {\n return {\n name: type,\n array: ct(type.substr(0, type.length - 2))\n };\n }\n\n var lowerType = type.toLowerCase();\n\n // contant\n if (lowerType === 'constant') {\n var constant;\n if (mapConstants.hasOwnProperty(format.name)) {\n constant = mapConstants[format.name];\n } else {\n // parse possible constant values from description\n var myRe = /either\\s+(?:[A-Z0-9_]+\\s*,?\\s*(?:or)?\\s*)+/g;\n var values = {};\n var names = [];\n\n constant = mapConstants[format.name] = {\n values: values,\n names: names\n };\n\n var myArray = myRe.exec(format.description);\n if (func === 'endShape' && format.name === 'mode') {\n values[constants.CLOSE] = true;\n names.push('CLOSE');\n } else {\n var match = myArray[0];\n var reConst = /[A-Z0-9_]+/g;\n var matchConst;\n while ((matchConst = reConst.exec(match)) !== null) {\n var name = matchConst[0];\n if (constants.hasOwnProperty(name)) {\n values[constants[name]] = true;\n names.push(name);\n }\n }\n }\n }\n return {\n name: type,\n builtin: lowerType,\n names: constant.names,\n values: constant.values\n };\n }\n\n // function\n if (lowerType.substr(0, 'function'.length) === 'function') {\n lowerType = 'function';\n }\n // builtin\n if (builtinTypes.indexOf(lowerType) >= 0) {\n return { name: type, builtin: lowerType };\n }\n\n // find type's prototype\n var t = window;\n var typeParts = type.split('.');\n\n // special-case 'p5' since it may be non-global\n if (typeParts[0] === 'p5') {\n t = p5;\n typeParts.shift();\n }\n\n typeParts.forEach(function(p) {\n t = t && t[p];\n });\n if (t) {\n return { name: type, prototype: t };\n }\n\n return { name: type, type: lowerType };\n });\n });\n });\n return {\n overloads: overloads,\n maxParams: maxParams\n };\n };\n\n var isNumber = function(param) {\n switch (typeof param) {\n case 'number':\n return true;\n case 'string':\n return !isNaN(param);\n default:\n return false;\n }\n };\n\n var testParamType = function(param, type) {\n var isArray = param instanceof Array;\n var matches = true;\n if (type.array && isArray) {\n for (var i = 0; i < param.length; i++) {\n var error = testParamType(param[i], type.array);\n if (error) return error / 2; // half error for elements\n }\n } else if (type.prototype) {\n matches = param instanceof type.prototype;\n } else if (type.builtin) {\n switch (type.builtin) {\n case 'number':\n matches = isNumber(param);\n break;\n case 'integer':\n matches = isNumber(param) && Number(param) === Math.floor(param);\n break;\n case 'boolean':\n case 'any':\n matches = true;\n break;\n case 'array':\n matches = isArray;\n break;\n case 'string':\n matches = /*typeof param === 'number' ||*/ typeof param === 'string';\n break;\n case 'constant':\n matches = type.values.hasOwnProperty(param);\n break;\n case 'function':\n matches = param instanceof Function;\n break;\n case 'null':\n matches = param === null;\n break;\n }\n } else {\n matches = typeof param === type.t;\n }\n return matches ? 0 : 1;\n };\n\n // testType() for non-object type parameter validation\n var testParamTypes = function(param, types) {\n var minScore = 9999;\n for (var i = 0; minScore > 0 && i < types.length; i++) {\n var score = testParamType(param, types[i]);\n if (minScore > score) minScore = score;\n }\n return minScore;\n };\n\n // generate a score (higher is worse) for applying these args to\n // this overload.\n var scoreOverload = function(args, argCount, overload, minScore) {\n var score = 0;\n var formats = overload.formats;\n var minParams = overload.minParams;\n\n // check for too few/many args\n // the score is double number of extra/missing args\n if (argCount < minParams) {\n score = (minParams - argCount) * 2;\n } else if (argCount > formats.length) {\n score = (argCount - formats.length) * 2;\n }\n\n // loop through the formats, adding up the error score for each arg.\n // quit early if the score gets higher than the previous best overload.\n for (var p = 0; score <= minScore && p < formats.length; p++) {\n var arg = args[p];\n var format = formats[p];\n // '== null' checks for 'null' and typeof 'undefined'\n if (arg == null) {\n // handle non-optional and non-trailing undefined args\n if (!format.optional || p < minParams || p < argCount) {\n score += 1;\n }\n } else {\n score += testParamTypes(arg, format.types);\n }\n }\n return score;\n };\n\n // gets a list of errors for this overload\n var getOverloadErrors = function(args, argCount, overload) {\n var formats = overload.formats;\n var minParams = overload.minParams;\n\n // check for too few/many args\n if (argCount < minParams) {\n return [\n {\n type: 'TOO_FEW_ARGUMENTS',\n argCount: argCount,\n minParams: minParams\n }\n ];\n } else if (argCount > formats.length) {\n return [\n {\n type: 'TOO_MANY_ARGUMENTS',\n argCount: argCount,\n maxParams: formats.length\n }\n ];\n }\n\n var errorArray = [];\n for (var p = 0; p < formats.length; p++) {\n var arg = args[p];\n var format = formats[p];\n // '== null' checks for 'null' and typeof 'undefined'\n if (arg == null) {\n // handle non-optional and non-trailing undefined args\n if (!format.optional || p < minParams || p < argCount) {\n errorArray.push({\n type: 'EMPTY_VAR',\n position: p,\n format: format\n });\n }\n } else if (testParamTypes(arg, format.types) > 0) {\n errorArray.push({\n type: 'WRONG_TYPE',\n position: p,\n format: format,\n arg: arg\n });\n }\n }\n\n return errorArray;\n };\n\n // a custom error type, used by the mocha\n // tests when expecting validation errors\n p5.ValidationError = (function(name) {\n var err = function(message, func) {\n this.message = message;\n this.func = func;\n if ('captureStackTrace' in Error) Error.captureStackTrace(this, err);\n else this.stack = new Error().stack;\n };\n err.prototype = Object.create(Error.prototype);\n err.prototype.name = name;\n err.prototype.constructor = err;\n return err;\n })('ValidationError');\n\n // function for generating console.log() msg\n p5._friendlyParamError = function(errorObj, func) {\n var message;\n\n function formatType() {\n var format = errorObj.format;\n return format.types\n .map(function(type) {\n return type.names ? type.names.join('|') : type.name;\n })\n .join('|');\n }\n\n switch (errorObj.type) {\n case 'EMPTY_VAR':\n message =\n func +\n '() was expecting ' +\n formatType() +\n ' for parameter #' +\n errorObj.position +\n ' (zero-based index), received an empty variable instead.' +\n ' If not intentional, this is often a problem with scope:' +\n ' [https://p5js.org/examples/data-variable-scope.html]';\n break;\n case 'WRONG_TYPE':\n var arg = errorObj.arg;\n var argType =\n arg instanceof Array\n ? 'array'\n : arg === null ? 'null' : arg.name || typeof arg;\n message =\n func +\n '() was expecting ' +\n formatType() +\n ' for parameter #' +\n errorObj.position +\n ' (zero-based index), received ' +\n argType +\n ' instead';\n break;\n case 'TOO_FEW_ARGUMENTS':\n message =\n func +\n '() was expecting at least ' +\n errorObj.minParams +\n ' arguments, but received only ' +\n errorObj.argCount;\n break;\n case 'TOO_MANY_ARGUMENTS':\n message =\n func +\n '() was expecting no more than ' +\n errorObj.maxParams +\n ' arguments, but received ' +\n errorObj.argCount;\n break;\n }\n\n if (message) {\n if (p5._throwValidationErrors) {\n throw new p5.ValidationError(message);\n }\n\n try {\n var re = /Function\\.validateParameters.*[\\r\\n].*[\\r\\n].*\\(([^)]*)/;\n var location = re.exec(new Error().stack)[1];\n if (location) {\n message += ' at ' + location;\n }\n } catch (err) {}\n\n report(message + '.', func, 3);\n }\n };\n\n /**\n * Validates parameters\n * param {String} func the name of the function\n * param {Array} args user input arguments\n *\n * example:\n * var a;\n * ellipse(10,10,a,5);\n * console ouput:\n * \"It looks like ellipse received an empty variable in spot #2.\"\n *\n * example:\n * ellipse(10,\"foo\",5,5);\n * console output:\n * \"ellipse was expecting a number for parameter #1,\n * received \"foo\" instead.\"\n */\n p5._validateParameters = function validateParameters(func, args) {\n if (p5.disableFriendlyErrors) {\n return; // skip FES\n }\n\n // lookup the docs in the 'data.json' file\n var docs = docCache[func] || (docCache[func] = lookupParamDoc(func));\n var overloads = docs.overloads;\n\n // ignore any trailing `undefined` arguments\n var argCount = args.length;\n // '== null' checks for 'null' and typeof 'undefined'\n while (argCount > 0 && args[argCount - 1] == null) argCount--;\n\n // find the overload with the best score\n var minScore = 99999;\n var minOverload;\n for (var i = 0; i < overloads.length; i++) {\n var score = scoreOverload(args, argCount, overloads[i], minScore);\n if (score === 0) {\n return; // done!\n } else if (minScore > score) {\n // this score is better that what we have so far...\n minScore = score;\n minOverload = i;\n }\n }\n\n // this should _always_ be true here...\n if (minScore > 0) {\n // get the errors for the best overload\n var errorArray = getOverloadErrors(\n args,\n argCount,\n overloads[minOverload]\n );\n\n // generate err msg\n for (var n = 0; n < errorArray.length; n++) {\n p5._friendlyParamError(errorArray[n], func);\n }\n }\n };\n\n /**\n * Prints out all the colors in the color pallete with white text.\n * For color blindness testing.\n */\n /* function testColors() {\n var str = 'A box of biscuits, a box of mixed biscuits and a biscuit mixer';\n report(str, 'print', '#ED225D'); // p5.js magenta\n report(str, 'print', '#2D7BB6'); // p5.js blue\n report(str, 'print', '#EE9900'); // p5.js orange\n report(str, 'print', '#A67F59'); // p5.js light brown\n report(str, 'print', '#704F21'); // p5.js gold\n report(str, 'print', '#1CC581'); // auto cyan\n report(str, 'print', '#FF6625'); // auto orange\n report(str, 'print', '#79EB22'); // auto green\n report(str, 'print', '#B40033'); // p5.js darkened magenta\n report(str, 'print', '#084B7F'); // p5.js darkened blue\n report(str, 'print', '#945F00'); // p5.js darkened orange\n report(str, 'print', '#6B441D'); // p5.js darkened brown\n report(str, 'print', '#2E1B00'); // p5.js darkened gold\n report(str, 'print', '#008851'); // auto dark cyan\n report(str, 'print', '#C83C00'); // auto dark orange\n report(str, 'print', '#4DB200'); // auto dark green\n } */\n\n p5.prototype._validateParameters = p5.validateParameters;\n}\n\n// This is a lazily-defined list of p5 symbols that may be\n// misused by beginners at top-level code, outside of setup/draw. We'd like\n// to detect these errors and help the user by suggesting they move them\n// into setup/draw.\n//\n// For more details, see https://github.com/processing/p5.js/issues/1121.\nvar misusedAtTopLevelCode = null;\nvar FAQ_URL =\n 'https://github.com/processing/p5.js/wiki/p5.js-overview' +\n '#why-cant-i-assign-variables-using-p5-functions-and-' +\n 'variables-before-setup';\n\nvar defineMisusedAtTopLevelCode = function() {\n var uniqueNamesFound = {};\n\n var getSymbols = function(obj) {\n return Object.getOwnPropertyNames(obj)\n .filter(function(name) {\n if (name[0] === '_') {\n return false;\n }\n if (name in uniqueNamesFound) {\n return false;\n }\n\n uniqueNamesFound[name] = true;\n\n return true;\n })\n .map(function(name) {\n var type;\n\n if (typeof obj[name] === 'function') {\n type = 'function';\n } else if (name === name.toUpperCase()) {\n type = 'constant';\n } else {\n type = 'variable';\n }\n\n return { name: name, type: type };\n });\n };\n\n misusedAtTopLevelCode = [].concat(\n getSymbols(p5.prototype),\n // At present, p5 only adds its constants to p5.prototype during\n // construction, which may not have happened at the time a\n // ReferenceError is thrown, so we'll manually add them to our list.\n getSymbols(_dereq_('./constants'))\n );\n\n // This will ultimately ensure that we report the most specific error\n // possible to the user, e.g. advising them about HALF_PI instead of PI\n // when their code misuses the former.\n misusedAtTopLevelCode.sort(function(a, b) {\n return b.name.length - a.name.length;\n });\n};\n\nvar helpForMisusedAtTopLevelCode = function(e, log) {\n if (!log) {\n log = console.log.bind(console);\n }\n\n if (!misusedAtTopLevelCode) {\n defineMisusedAtTopLevelCode();\n }\n\n // If we find that we're logging lots of false positives, we can\n // uncomment the following code to avoid displaying anything if the\n // user's code isn't likely to be using p5's global mode. (Note that\n // setup/draw are more likely to be defined due to JS function hoisting.)\n //\n //if (!('setup' in window || 'draw' in window)) {\n // return;\n //}\n\n misusedAtTopLevelCode.some(function(symbol) {\n // Note that while just checking for the occurrence of the\n // symbol name in the error message could result in false positives,\n // a more rigorous test is difficult because different browsers\n // log different messages, and the format of those messages may\n // change over time.\n //\n // For example, if the user uses 'PI' in their code, it may result\n // in any one of the following messages:\n //\n // * 'PI' is undefined (Microsoft Edge)\n // * ReferenceError: PI is undefined (Firefox)\n // * Uncaught ReferenceError: PI is not defined (Chrome)\n\n if (e.message && e.message.match('\\\\W?' + symbol.name + '\\\\W') !== null) {\n log(\n \"Did you just try to use p5.js's \" +\n symbol.name +\n (symbol.type === 'function' ? '() ' : ' ') +\n symbol.type +\n '? If so, you may want to ' +\n \"move it into your sketch's setup() function.\\n\\n\" +\n 'For more details, see: ' +\n FAQ_URL\n );\n return true;\n }\n });\n};\n\n// Exposing this primarily for unit testing.\np5.prototype._helpForMisusedAtTopLevelCode = helpForMisusedAtTopLevelCode;\n\nif (document.readyState !== 'complete') {\n window.addEventListener('error', helpForMisusedAtTopLevelCode, false);\n\n // Our job is only to catch ReferenceErrors that are thrown when\n // global (non-instance mode) p5 APIs are used at the top-level\n // scope of a file, so we'll unbind our error listener now to make\n // sure we don't log false positives later.\n window.addEventListener('load', function() {\n window.removeEventListener('error', helpForMisusedAtTopLevelCode, false);\n });\n}\n\nmodule.exports = p5;\n\n},{\"../../docs/reference/data.json\":1,\"./constants\":18,\"./main\":24}],21:[function(_dereq_,module,exports){\n/**\n * @requires constants\n */\n\n'use strict';\n\nvar constants = _dereq_('./constants');\n\nmodule.exports = {\n modeAdjust: function(a, b, c, d, mode) {\n if (mode === constants.CORNER) {\n return { x: a, y: b, w: c, h: d };\n } else if (mode === constants.CORNERS) {\n return { x: a, y: b, w: c - a, h: d - b };\n } else if (mode === constants.RADIUS) {\n return { x: a - c, y: b - d, w: 2 * c, h: 2 * d };\n } else if (mode === constants.CENTER) {\n return { x: a - c * 0.5, y: b - d * 0.5, w: c, h: d };\n }\n }\n};\n\n},{\"./constants\":18}],22:[function(_dereq_,module,exports){\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * _globalInit\n *\n * TODO: ???\n * if sketch is on window\n * assume \"global\" mode\n * and instantiate p5 automatically\n * otherwise do nothing\n *\n * @private\n * @return {Undefined}\n */\nvar _globalInit = function() {\n if (!window.mocha) {\n // If there is a setup or draw function on the window\n // then instantiate p5 in \"global\" mode\n if (\n ((window.setup && typeof window.setup === 'function') ||\n (window.draw && typeof window.draw === 'function')) &&\n !p5.instance\n ) {\n new p5();\n }\n }\n};\n\n// TODO: ???\n\n// if the page is ready, initialize p5 immediately\nif (document.readyState === 'complete') {\n _globalInit();\n // if the page is still loading, add an event listener\n // and initialize p5 as soon as it finishes loading\n} else {\n window.addEventListener('load', _globalInit, false);\n}\n\n},{\"../core/main\":24}],23:[function(_dereq_,module,exports){\n/**\n * @for p5\n * @requires core\n * These are functions that are part of the Processing API but are not part of\n * the p5.js API. In some cases they have a new name, in others, they are\n * removed completely. Not all unsupported Processing functions are listed here\n * but we try to include ones that a user coming from Processing might likely\n * call.\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\n\np5.prototype.pushStyle = function() {\n throw new Error('pushStyle() not used, see push()');\n};\n\np5.prototype.popStyle = function() {\n throw new Error('popStyle() not used, see pop()');\n};\n\np5.prototype.popMatrix = function() {\n throw new Error('popMatrix() not used, see pop()');\n};\n\np5.prototype.printMatrix = function() {\n throw new Error(\n 'printMatrix() is not implemented in p5.js, ' +\n 'refer to [https://simonsarris.com/a-transformation-class-for-canvas-to-keep-track-of-the-transformation-matrix/] ' +\n 'to add your own implementation.'\n );\n};\n\np5.prototype.pushMatrix = function() {\n throw new Error('pushMatrix() not used, see push()');\n};\n\nmodule.exports = p5;\n\n},{\"./main\":24}],24:[function(_dereq_,module,exports){\n/**\n * @module Structure\n * @submodule Structure\n * @for p5\n * @requires constants\n */\n\n'use strict';\n\n_dereq_('./shim');\n\n// Core needs the PVariables object\nvar constants = _dereq_('./constants');\n\n/**\n * This is the p5 instance constructor.\n *\n * A p5 instance holds all the properties and methods related to\n * a p5 sketch. It expects an incoming sketch closure and it can also\n * take an optional node parameter for attaching the generated p5 canvas\n * to a node. The sketch closure takes the newly created p5 instance as\n * its sole argument and may optionally set preload(), setup(), and/or\n * draw() properties on it for running a sketch.\n *\n * A p5 sketch can run in \"global\" or \"instance\" mode:\n * \"global\" - all properties and methods are attached to the window\n * \"instance\" - all properties and methods are bound to this p5 object\n *\n * @class p5\n * @constructor\n * @param {function} sketch a closure that can set optional preload(),\n * setup(), and/or draw() properties on the\n * given p5 instance\n * @param {HTMLElement|Boolean} [node] element to attach canvas to, if a\n * boolean is passed in use it as sync\n * @param {Boolean} [sync] start synchronously (optional)\n * @return {p5} a p5 instance\n */\nvar p5 = function(sketch, node, sync) {\n if (typeof node === 'boolean' && typeof sync === 'undefined') {\n sync = node;\n node = undefined;\n }\n\n //////////////////////////////////////////////\n // PUBLIC p5 PROPERTIES AND METHODS\n //////////////////////////////////////////////\n\n /**\n * Called directly before setup(), the preload() function is used to handle\n * asynchronous loading of external files in a blocking way. If a preload\n * function is defined, setup() will wait until any load calls within have\n * finished. Nothing besides load calls (loadImage, loadJSON, loadFont,\n * loadStrings, etc.) should be inside the preload function. If asynchronous\n * loading is preferred, the load methods can instead be called in setup()\n * or anywhere else with the use of a callback parameter.\n * \n * By default the text \"loading...\" will be displayed. To make your own\n * loading page, include an HTML element with id \"p5_loading\" in your\n * page. More information here.\n *\n * @method preload\n * @example\n * \n * let img;\n * let c;\n * function preload() {\n * // preload() runs once\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * // setup() waits until preload() is done\n * img.loadPixels();\n * // get color of middle pixel\n * c = img.get(img.width / 2, img.height / 2);\n * }\n *\n * function draw() {\n * background(c);\n * image(img, 25, 25, 50, 50);\n * }\n * \n *\n * @alt\n * nothing displayed\n *\n */\n\n /**\n * The setup() function is called once when the program starts. It's used to\n * define initial environment properties such as screen size and background\n * color and to load media such as images and fonts as the program starts.\n * There can only be one setup() function for each program and it shouldn't\n * be called again after its initial execution.\n * \n * Note: Variables declared within setup() are not accessible within other\n * functions, including draw().\n *\n * @method setup\n * @example\n * \n * let a = 0;\n *\n * function setup() {\n * background(0);\n * noStroke();\n * fill(102);\n * }\n *\n * function draw() {\n * rect(a++ % width, 10, 2, 80);\n * }\n * \n *\n * @alt\n * nothing displayed\n *\n */\n\n /**\n * Called directly after setup(), the draw() function continuously executes\n * the lines of code contained inside its block until the program is stopped\n * or noLoop() is called. Note if noLoop() is called in setup(), draw() will\n * still be executed once before stopping. draw() is called automatically and\n * should never be called explicitly.\n * \n * It should always be controlled with noLoop(), redraw() and loop(). After\n * noLoop() stops the code in draw() from executing, redraw() causes the\n * code inside draw() to execute once, and loop() will cause the code\n * inside draw() to resume executing continuously.\n * \n * The number of times draw() executes in each second may be controlled with\n * the frameRate() function.\n * \n * There can only be one draw() function for each sketch, and draw() must\n * exist if you want the code to run continuously, or to process events such\n * as mousePressed(). Sometimes, you might have an empty call to draw() in\n * your program, as shown in the above example.\n * \n * It is important to note that the drawing coordinate system will be reset\n * at the beginning of each draw() call. If any transformations are performed\n * within draw() (ex: scale, rotate, translate), their effects will be\n * undone at the beginning of draw(), so transformations will not accumulate\n * over time. On the other hand, styling applied (ex: fill, stroke, etc) will\n * remain in effect.\n *\n * @method draw\n * @example\n * \n * let yPos = 0;\n * function setup() {\n * // setup() runs once\n * frameRate(30);\n * }\n * function draw() {\n * // draw() loops forever, until stopped\n * background(204);\n * yPos = yPos - 1;\n * if (yPos < 0) {\n * yPos = height;\n * }\n * line(0, yPos, width, yPos);\n * }\n * \n *\n * @alt\n * nothing displayed\n *\n */\n\n //////////////////////////////////////////////\n // PRIVATE p5 PROPERTIES AND METHODS\n //////////////////////////////////////////////\n\n this._setupDone = false;\n // for handling hidpi\n this._pixelDensity = Math.ceil(window.devicePixelRatio) || 1;\n this._userNode = node;\n this._curElement = null;\n this._elements = [];\n this._glAttributes = null;\n this._requestAnimId = 0;\n this._preloadCount = 0;\n this._isGlobal = false;\n this._loop = true;\n this._initializeInstanceVariables();\n this._defaultCanvasSize = {\n width: 100,\n height: 100\n };\n this._events = {\n // keep track of user-events for unregistering later\n mousemove: null,\n mousedown: null,\n mouseup: null,\n dragend: null,\n dragover: null,\n click: null,\n dblclick: null,\n mouseover: null,\n mouseout: null,\n keydown: null,\n keyup: null,\n keypress: null,\n touchstart: null,\n touchmove: null,\n touchend: null,\n resize: null,\n blur: null\n };\n\n this._events.wheel = null;\n this._loadingScreenId = 'p5_loading';\n\n // Allows methods to be registered on an instance that\n // are instance-specific.\n this._registeredMethods = {};\n var methods = Object.getOwnPropertyNames(p5.prototype._registeredMethods);\n for (var i = 0; i < methods.length; i++) {\n var prop = methods[i];\n this._registeredMethods[prop] = p5.prototype._registeredMethods[\n prop\n ].slice();\n }\n\n if (window.DeviceOrientationEvent) {\n this._events.deviceorientation = null;\n }\n if (window.DeviceMotionEvent && !window._isNodeWebkit) {\n this._events.devicemotion = null;\n }\n\n this._start = function() {\n // Find node if id given\n if (this._userNode) {\n if (typeof this._userNode === 'string') {\n this._userNode = document.getElementById(this._userNode);\n }\n }\n\n var context = this._isGlobal ? window : this;\n var userPreload = context.preload;\n if (userPreload) {\n // Setup loading screen\n // Set loading screen into dom if not present\n // Otherwise displays and removes user provided loading screen\n var loadingScreen = document.getElementById(this._loadingScreenId);\n if (!loadingScreen) {\n loadingScreen = document.createElement('div');\n loadingScreen.innerHTML = 'Loading...';\n loadingScreen.style.position = 'absolute';\n loadingScreen.id = this._loadingScreenId;\n var node = this._userNode || document.body;\n node.appendChild(loadingScreen);\n }\n var methods = this._preloadMethods;\n for (var method in methods) {\n // default to p5 if no object defined\n methods[method] = methods[method] || p5;\n var obj = methods[method];\n //it's p5, check if it's global or instance\n if (obj === p5.prototype || obj === p5) {\n if (this._isGlobal) {\n window[method] = this._wrapPreload(this, method);\n }\n obj = this;\n }\n this._registeredPreloadMethods[method] = obj[method];\n obj[method] = this._wrapPreload(obj, method);\n }\n\n userPreload();\n this._runIfPreloadsAreDone();\n } else {\n this._setup();\n this._draw();\n }\n }.bind(this);\n\n this._runIfPreloadsAreDone = function() {\n var context = this._isGlobal ? window : this;\n if (context._preloadCount === 0) {\n var loadingScreen = document.getElementById(context._loadingScreenId);\n if (loadingScreen) {\n loadingScreen.parentNode.removeChild(loadingScreen);\n }\n context._setup();\n context._draw();\n }\n };\n\n this._decrementPreload = function() {\n var context = this._isGlobal ? window : this;\n if (typeof context.preload === 'function') {\n context._setProperty('_preloadCount', context._preloadCount - 1);\n context._runIfPreloadsAreDone();\n }\n };\n\n this._wrapPreload = function(obj, fnName) {\n return function() {\n //increment counter\n this._incrementPreload();\n //call original function\n return this._registeredPreloadMethods[fnName].apply(obj, arguments);\n }.bind(this);\n };\n\n this._incrementPreload = function() {\n var context = this._isGlobal ? window : this;\n context._setProperty('_preloadCount', context._preloadCount + 1);\n };\n\n this._setup = function() {\n // Always create a default canvas.\n // Later on if the user calls createCanvas, this default one\n // will be replaced\n this.createCanvas(\n this._defaultCanvasSize.width,\n this._defaultCanvasSize.height,\n 'p2d'\n );\n\n // return preload functions to their normal vals if switched by preload\n var context = this._isGlobal ? window : this;\n if (typeof context.preload === 'function') {\n for (var f in this._preloadMethods) {\n context[f] = this._preloadMethods[f][f];\n if (context[f] && this) {\n context[f] = context[f].bind(this);\n }\n }\n }\n\n // Short-circuit on this, in case someone used the library in \"global\"\n // mode earlier\n if (typeof context.setup === 'function') {\n context.setup();\n }\n\n // unhide any hidden canvases that were created\n var canvases = document.getElementsByTagName('canvas');\n for (var i = 0; i < canvases.length; i++) {\n var k = canvases[i];\n if (k.dataset.hidden === 'true') {\n k.style.visibility = '';\n delete k.dataset.hidden;\n }\n }\n this._setupDone = true;\n }.bind(this);\n\n this._draw = function() {\n var now = window.performance.now();\n var time_since_last = now - this._lastFrameTime;\n var target_time_between_frames = 1000 / this._targetFrameRate;\n\n // only draw if we really need to; don't overextend the browser.\n // draw if we're within 5ms of when our next frame should paint\n // (this will prevent us from giving up opportunities to draw\n // again when it's really about time for us to do so). fixes an\n // issue where the frameRate is too low if our refresh loop isn't\n // in sync with the browser. note that we have to draw once even\n // if looping is off, so we bypass the time delay if that\n // is the case.\n var epsilon = 5;\n if (\n !this._loop ||\n time_since_last >= target_time_between_frames - epsilon\n ) {\n //mandatory update values(matrixs and stack)\n\n this.redraw();\n this._frameRate = 1000.0 / (now - this._lastFrameTime);\n this._lastFrameTime = now;\n\n // If the user is actually using mouse module, then update\n // coordinates, otherwise skip. We can test this by simply\n // checking if any of the mouse functions are available or not.\n // NOTE : This reflects only in complete build or modular build.\n if (typeof this._updateMouseCoords !== 'undefined') {\n this._updateMouseCoords();\n }\n }\n\n // get notified the next time the browser gives us\n // an opportunity to draw.\n if (this._loop) {\n this._requestAnimId = window.requestAnimationFrame(this._draw);\n }\n }.bind(this);\n\n this._setProperty = function(prop, value) {\n this[prop] = value;\n if (this._isGlobal) {\n window[prop] = value;\n }\n }.bind(this);\n\n /**\n * Removes the entire p5 sketch. This will remove the canvas and any\n * elements created by p5.js. It will also stop the draw loop and unbind\n * any properties or methods from the window global scope. It will\n * leave a variable p5 in case you wanted to create a new p5 sketch.\n * If you like, you can set p5 = null to erase it. While all functions and\n * variables and objects created by the p5 library will be removed, any\n * other global variables created by your code will remain.\n *\n * @method remove\n * @example\n * \n * function draw() {\n * ellipse(50, 50, 10, 10);\n * }\n *\n * function mousePressed() {\n * remove(); // remove whole sketch on mouse press\n * }\n * \n *\n * @alt\n * nothing displayed\n *\n */\n this.remove = function() {\n var loadingScreen = document.getElementById(this._loadingScreenId);\n if (loadingScreen) {\n loadingScreen.parentNode.removeChild(loadingScreen);\n // Add 1 to preload counter to prevent the sketch ever executing setup()\n this._incrementPreload();\n }\n if (this._curElement) {\n // stop draw\n this._loop = false;\n if (this._requestAnimId) {\n window.cancelAnimationFrame(this._requestAnimId);\n }\n\n // unregister events sketch-wide\n for (var ev in this._events) {\n window.removeEventListener(ev, this._events[ev]);\n }\n\n // remove DOM elements created by p5, and listeners\n for (var i = 0; i < this._elements.length; i++) {\n var e = this._elements[i];\n if (e.elt.parentNode) {\n e.elt.parentNode.removeChild(e.elt);\n }\n for (var elt_ev in e._events) {\n e.elt.removeEventListener(elt_ev, e._events[elt_ev]);\n }\n }\n\n // call any registered remove functions\n var self = this;\n this._registeredMethods.remove.forEach(function(f) {\n if (typeof f !== 'undefined') {\n f.call(self);\n }\n });\n }\n // remove window bound properties and methods\n if (this._isGlobal) {\n for (var p in p5.prototype) {\n try {\n delete window[p];\n } catch (x) {\n window[p] = undefined;\n }\n }\n for (var p2 in this) {\n if (this.hasOwnProperty(p2)) {\n try {\n delete window[p2];\n } catch (x) {\n window[p2] = undefined;\n }\n }\n }\n p5.instance = null;\n }\n }.bind(this);\n\n // call any registered init functions\n this._registeredMethods.init.forEach(function(f) {\n if (typeof f !== 'undefined') {\n f.call(this);\n }\n }, this);\n\n var friendlyBindGlobal = this._createFriendlyGlobalFunctionBinder();\n\n // If the user has created a global setup or draw function,\n // assume \"global\" mode and make everything global (i.e. on the window)\n if (!sketch) {\n this._isGlobal = true;\n p5.instance = this;\n // Loop through methods on the prototype and attach them to the window\n for (var p in p5.prototype) {\n if (typeof p5.prototype[p] === 'function') {\n var ev = p.substring(2);\n if (!this._events.hasOwnProperty(ev)) {\n if (Math.hasOwnProperty(p) && Math[p] === p5.prototype[p]) {\n // Multiple p5 methods are just native Math functions. These can be\n // called without any binding.\n friendlyBindGlobal(p, p5.prototype[p]);\n } else {\n friendlyBindGlobal(p, p5.prototype[p].bind(this));\n }\n }\n } else {\n friendlyBindGlobal(p, p5.prototype[p]);\n }\n }\n // Attach its properties to the window\n for (var p2 in this) {\n if (this.hasOwnProperty(p2)) {\n friendlyBindGlobal(p2, this[p2]);\n }\n }\n } else {\n // Else, the user has passed in a sketch closure that may set\n // user-provided 'setup', 'draw', etc. properties on this instance of p5\n sketch(this);\n }\n\n // Bind events to window (not using container div bc key events don't work)\n\n for (var e in this._events) {\n var f = this['_on' + e];\n if (f) {\n var m = f.bind(this);\n window.addEventListener(e, m, { passive: false });\n this._events[e] = m;\n }\n }\n\n var focusHandler = function() {\n this._setProperty('focused', true);\n }.bind(this);\n var blurHandler = function() {\n this._setProperty('focused', false);\n }.bind(this);\n window.addEventListener('focus', focusHandler);\n window.addEventListener('blur', blurHandler);\n this.registerMethod('remove', function() {\n window.removeEventListener('focus', focusHandler);\n window.removeEventListener('blur', blurHandler);\n });\n\n if (sync) {\n this._start();\n } else {\n if (document.readyState === 'complete') {\n this._start();\n } else {\n window.addEventListener('load', this._start.bind(this), false);\n }\n }\n};\n\np5.prototype._initializeInstanceVariables = function() {\n this._styles = [];\n\n this._bezierDetail = 20;\n this._curveDetail = 20;\n\n this._colorMode = constants.RGB;\n this._colorMaxes = {\n rgb: [255, 255, 255, 255],\n hsb: [360, 100, 100, 1],\n hsl: [360, 100, 100, 1]\n };\n\n this._pixelsDirty = true;\n\n this._downKeys = {}; //Holds the key codes of currently pressed keys\n};\n\n// This is a pointer to our global mode p5 instance, if we're in\n// global mode.\np5.instance = null;\n\n/**\n * Allows for the friendly error system (FES) to be turned off when creating a sketch,\n * which can give a significant boost to performance when needed.\n * See \n * disabling the friendly error system.\n *\n * @property {Boolean} disableFriendlyErrors\n * @example\n * \n * p5.disableFriendlyErrors = true;\n *\n * function setup() {\n * createCanvas(100, 50);\n * }\n * \n */\np5.disableFriendlyErrors = false;\n\n// attach constants to p5 prototype\nfor (var k in constants) {\n p5.prototype[k] = constants[k];\n}\n\n// functions that cause preload to wait\n// more can be added by using registerPreloadMethod(func)\np5.prototype._preloadMethods = {\n loadJSON: p5.prototype,\n loadImage: p5.prototype,\n loadStrings: p5.prototype,\n loadXML: p5.prototype,\n loadBytes: p5.prototype,\n loadTable: p5.prototype,\n loadFont: p5.prototype,\n loadModel: p5.prototype,\n loadShader: p5.prototype\n};\n\np5.prototype._registeredMethods = { init: [], pre: [], post: [], remove: [] };\n\np5.prototype._registeredPreloadMethods = {};\n\np5.prototype.registerPreloadMethod = function(fnString, obj) {\n // obj = obj || p5.prototype;\n if (!p5.prototype._preloadMethods.hasOwnProperty(fnString)) {\n p5.prototype._preloadMethods[fnString] = obj;\n }\n};\n\np5.prototype.registerMethod = function(name, m) {\n var target = this || p5.prototype;\n if (!target._registeredMethods.hasOwnProperty(name)) {\n target._registeredMethods[name] = [];\n }\n target._registeredMethods[name].push(m);\n};\n\n// create a function which provides a standardized process for binding\n// globals; this is implemented as a factory primarily so that there's a\n// way to redefine what \"global\" means for the binding function so it\n// can be used in scenarios like unit testing where the window object\n// might not exist\np5.prototype._createFriendlyGlobalFunctionBinder = function(options) {\n options = options || {};\n\n var globalObject = options.globalObject || window;\n var log = options.log || console.log.bind(console);\n var propsToForciblyOverwrite = {\n // p5.print actually always overwrites an existing global function,\n // albeit one that is very unlikely to be used:\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/print\n print: true\n };\n\n return function(prop, value) {\n if (\n !p5.disableFriendlyErrors &&\n typeof IS_MINIFIED === 'undefined' &&\n typeof value === 'function' &&\n !(prop in p5.prototype._preloadMethods)\n ) {\n try {\n // Because p5 has so many common function names, it's likely\n // that users may accidentally overwrite global p5 functions with\n // their own variables. Let's allow this but log a warning to\n // help users who may be doing this unintentionally.\n //\n // For more information, see:\n //\n // https://github.com/processing/p5.js/issues/1317\n\n if (prop in globalObject && !(prop in propsToForciblyOverwrite)) {\n throw new Error('global \"' + prop + '\" already exists');\n }\n\n // It's possible that this might throw an error because there\n // are a lot of edge-cases in which `Object.defineProperty` might\n // not succeed; since this functionality is only intended to\n // help beginners anyways, we'll just catch such an exception\n // if it occurs, and fall back to legacy behavior.\n Object.defineProperty(globalObject, prop, {\n configurable: true,\n enumerable: true,\n get: function() {\n return value;\n },\n set: function(newValue) {\n Object.defineProperty(globalObject, prop, {\n configurable: true,\n enumerable: true,\n value: newValue,\n writable: true\n });\n log(\n 'You just changed the value of \"' +\n prop +\n '\", which was ' +\n \"a p5 function. This could cause problems later if you're \" +\n 'not careful.'\n );\n }\n });\n } catch (e) {\n log(\n 'p5 had problems creating the global function \"' +\n prop +\n '\", ' +\n 'possibly because your code is already using that name as ' +\n 'a variable. You may want to rename your variable to something ' +\n 'else.'\n );\n globalObject[prop] = value;\n }\n } else {\n globalObject[prop] = value;\n }\n };\n};\n\nmodule.exports = p5;\n\n},{\"./constants\":18,\"./shim\":34}],25:[function(_dereq_,module,exports){\n/**\n * @module DOM\n * @submodule DOM\n * @for p5.Element\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\n\n/**\n * Base class for all elements added to a sketch, including canvas,\n * graphics buffers, and other HTML elements. Methods in blue are\n * included in the core functionality, methods in brown are added\n * with the p5.dom\n * library.\n * It is not called directly, but p5.Element\n * objects are created by calling createCanvas, createGraphics,\n * or in the p5.dom library, createDiv, createImg, createInput, etc.\n *\n * @class p5.Element\n * @param {String} elt DOM node that is wrapped\n * @param {p5} [pInst] pointer to p5 instance\n */\np5.Element = function(elt, pInst) {\n /**\n * Underlying HTML element. All normal HTML methods can be called on this.\n * @example\n * \n * \n * function setup() {\n * let c = createCanvas(50, 50);\n * c.elt.style.border = '5px solid red';\n * }\n *\n * function draw() {\n * background(220);\n * }\n * \n * \n *\n * @property elt\n * @readOnly\n */\n this.elt = elt;\n this._pInst = this._pixelsState = pInst;\n this._events = {};\n this.width = this.elt.offsetWidth;\n this.height = this.elt.offsetHeight;\n};\n\n/**\n *\n * Attaches the element to the parent specified. A way of setting\n * the container for the element. Accepts either a string ID, DOM\n * node, or p5.Element. If no arguments given, parent node is returned.\n * For more ways to position the canvas, see the\n * \n * positioning the canvas wiki page.\n *\n * All above examples except for the first one require the inclusion of\n * the p5.dom library in your index.html. See the\n * using a library\n * section for information on how to include this library.\n *\n * @method parent\n * @param {String|p5.Element|Object} parent the ID, DOM node, or p5.Element\n * of desired parent element\n * @chainable\n *\n * @example\n * \n * // in the html file:\n * // <div id=\"myContainer\"></div>\n *\n * // in the js file:\n * let cnv = createCanvas(100, 100);\n * cnv.parent('myContainer');\n * \n * \n * let div0 = createDiv('this is the parent');\n * let div1 = createDiv('this is the child');\n * div1.parent(div0); // use p5.Element\n * \n * \n * let div0 = createDiv('this is the parent');\n * div0.id('apples');\n * let div1 = createDiv('this is the child');\n * div1.parent('apples'); // use id\n * \n * \n * let elt = document.getElementById('myParentDiv');\n * let div1 = createDiv('this is the child');\n * div1.parent(elt); // use element from page\n * \n *\n * @alt\n * no display.\n */\n/**\n * @method parent\n * @return {p5.Element}\n *\n */\np5.Element.prototype.parent = function(p) {\n if (typeof p === 'undefined') {\n return this.elt.parentNode;\n }\n\n if (typeof p === 'string') {\n if (p[0] === '#') {\n p = p.substring(1);\n }\n p = document.getElementById(p);\n } else if (p instanceof p5.Element) {\n p = p.elt;\n }\n p.appendChild(this.elt);\n return this;\n};\n\n/**\n *\n * Sets the ID of the element. If no ID argument is passed in, it instead\n * returns the current ID of the element.\n * Note that only one element can have a particular id in a page.\n * The .class() function can be used\n * to identify multiple elements with the same class name.\n *\n * @method id\n * @param {String} id ID of the element\n * @chainable\n *\n * @example\n * \n * function setup() {\n * let cnv = createCanvas(100, 100);\n * // Assigns a CSS selector ID to\n * // the canvas element.\n * cnv.id('mycanvas');\n * }\n * \n *\n * @alt\n * no display.\n */\n/**\n * @method id\n * @return {String} the id of the element\n */\np5.Element.prototype.id = function(id) {\n if (typeof id === 'undefined') {\n return this.elt.id;\n }\n\n this.elt.id = id;\n this.width = this.elt.offsetWidth;\n this.height = this.elt.offsetHeight;\n return this;\n};\n\n/**\n *\n * Adds given class to the element. If no class argument is passed in, it\n * instead returns a string containing the current class(es) of the element.\n *\n * @method class\n * @param {String} class class to add\n * @chainable\n *\n * @example\n * \n * function setup() {\n * let cnv = createCanvas(100, 100);\n * // Assigns a CSS selector class 'small'\n * // to the canvas element.\n * cnv.class('small');\n * }\n * \n *\n * @alt\n * no display.\n */\n/**\n * @method class\n * @return {String} the class of the element\n */\np5.Element.prototype.class = function(c) {\n if (typeof c === 'undefined') {\n return this.elt.className;\n }\n\n this.elt.className = c;\n return this;\n};\n\n/**\n * The .mousePressed() function is called once after every time a\n * mouse button is pressed over the element.\n * Some mobile browsers may also trigger this event on a touch screen,\n * if the user performs a quick tap.\n * This can be used to attach element specific event listeners.\n *\n * @method mousePressed\n * @param {Function|Boolean} fxn function to be fired when mouse is\n * pressed over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mousePressed(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any click anywhere\n * function mousePressed() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mousePressed = function(fxn) {\n // Prepend the mouse property setters to the event-listener.\n // This is required so that mouseButton is set correctly prior to calling the callback (fxn).\n // For details, see https://github.com/processing/p5.js/issues/3087.\n var eventPrependedFxn = function(event) {\n this._pInst._setProperty('mouseIsPressed', true);\n this._pInst._setMouseButton(event);\n // Pass along the return-value of the callback:\n return fxn.call(this);\n };\n // Pass along the event-prepended form of the callback.\n p5.Element._adjustListener('mousedown', eventPrependedFxn, this);\n return this;\n};\n\n/**\n * The .doubleClicked() function is called once after every time a\n * mouse button is pressed twice over the element. This can be used to\n * attach element and action specific event listeners.\n *\n * @method doubleClicked\n * @param {Function|Boolean} fxn function to be fired when mouse is\n * double clicked over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @return {p5.Element}\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.doubleClicked(changeGray); // attach listener for\n * // canvas double click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any double click anywhere\n * function doubleClicked() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is double clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.doubleClicked = function(fxn) {\n p5.Element._adjustListener('dblclick', fxn, this);\n return this;\n};\n\n/**\n * The .mouseWheel() function is called once after every time a\n * mouse wheel is scrolled over the element. This can be used to\n * attach element specific event listeners.\n * \n * The function accepts a callback function as argument which will be executed\n * when the `wheel` event is triggered on the element, the callback function is\n * passed one argument `event`. The `event.deltaY` property returns negative\n * values if the mouse wheel is rotated up or away from the user and positive\n * in the other direction. The `event.deltaX` does the same as `event.deltaY`\n * except it reads the horizontal wheel scroll of the mouse wheel.\n * \n * On OS X with \"natural\" scrolling enabled, the `event.deltaY` values are\n * reversed.\n *\n * @method mouseWheel\n * @param {Function|Boolean} fxn function to be fired when mouse is\n * scrolled over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseWheel(changeSize); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with mousewheel movement\n * // anywhere on screen\n * function mouseWheel() {\n * g = g + 10;\n * }\n *\n * // this function fires with mousewheel movement\n * // over canvas only\n * function changeSize(event) {\n * if (event.deltaY > 0) {\n * d = d + 10;\n * } else {\n * d = d - 10;\n * }\n * }\n * \n *\n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseWheel = function(fxn) {\n p5.Element._adjustListener('wheel', fxn, this);\n return this;\n};\n\n/**\n * The .mouseReleased() function is called once after every time a\n * mouse button is released over the element.\n * Some mobile browsers may also trigger this event on a touch screen,\n * if the user performs a quick tap.\n * This can be used to attach element specific event listeners.\n *\n * @method mouseReleased\n * @param {Function|Boolean} fxn function to be fired when mouse is\n * released over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseReleased(changeGray); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires after the mouse has been\n * // released\n * function mouseReleased() {\n * d = d + 10;\n * }\n *\n * // this function fires after the mouse has been\n * // released while on canvas\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseReleased = function(fxn) {\n p5.Element._adjustListener('mouseup', fxn, this);\n return this;\n};\n\n/**\n * The .mouseClicked() function is called once after a mouse button is\n * pressed and released over the element.\n * Some mobile browsers may also trigger this event on a touch screen,\n * if the user performs a quick tap.\n * This can be used to attach element specific event listeners.\n *\n * @method mouseClicked\n * @param {Function|Boolean} fxn function to be fired when mouse is\n * clicked over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * \n * let cnv;\n * let d;\n * let g;\n *\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseClicked(changeGray); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires after the mouse has been\n * // clicked anywhere\n * function mouseClicked() {\n * d = d + 10;\n * }\n *\n * // this function fires after the mouse has been\n * // clicked on canvas\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseClicked = function(fxn) {\n p5.Element._adjustListener('click', fxn, this);\n return this;\n};\n\n/**\n * The .mouseMoved() function is called once every time a\n * mouse moves over the element. This can be used to attach an\n * element specific event listener.\n *\n * @method mouseMoved\n * @param {Function|Boolean} fxn function to be fired when a mouse moves\n * over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d = 30;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseMoved(changeSize); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * fill(200);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires when mouse moves anywhere on\n * // page\n * function mouseMoved() {\n * g = g + 5;\n * if (g > 255) {\n * g = 0;\n * }\n * }\n *\n * // this function fires when mouse moves over canvas\n * function changeSize() {\n * d = d + 2;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n * \n *\n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseMoved = function(fxn) {\n p5.Element._adjustListener('mousemove', fxn, this);\n return this;\n};\n\n/**\n * The .mouseOver() function is called once after every time a\n * mouse moves onto the element. This can be used to attach an\n * element specific event listener.\n *\n * @method mouseOver\n * @param {Function|Boolean} fxn function to be fired when a mouse moves\n * onto the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseOver(changeGray);\n * d = 10;\n * }\n *\n * function draw() {\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * function changeGray() {\n * d = d + 10;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n * \n *\n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseOver = function(fxn) {\n p5.Element._adjustListener('mouseover', fxn, this);\n return this;\n};\n\n/**\n * The .mouseOut() function is called once after every time a\n * mouse moves off the element. This can be used to attach an\n * element specific event listener.\n *\n * @method mouseOut\n * @param {Function|Boolean} fxn function to be fired when a mouse\n * moves off of an element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseOut(changeGray);\n * d = 10;\n * }\n *\n * function draw() {\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * function changeGray() {\n * d = d + 10;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.mouseOut = function(fxn) {\n p5.Element._adjustListener('mouseout', fxn, this);\n return this;\n};\n\n/**\n * The .touchStarted() function is called once after every time a touch is\n * registered. This can be used to attach element specific event listeners.\n *\n * @method touchStarted\n * @param {Function|Boolean} fxn function to be fired when a touch\n * starts over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchStarted(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any touch anywhere\n * function touchStarted() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.touchStarted = function(fxn) {\n p5.Element._adjustListener('touchstart', fxn, this);\n return this;\n};\n\n/**\n * The .touchMoved() function is called once after every time a touch move is\n * registered. This can be used to attach element specific event listeners.\n *\n * @method touchMoved\n * @param {Function|Boolean} fxn function to be fired when a touch moves over\n * the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchMoved(changeGray); // attach listener for\n * // canvas click only\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.touchMoved = function(fxn) {\n p5.Element._adjustListener('touchmove', fxn, this);\n return this;\n};\n\n/**\n * The .touchEnded() function is called once after every time a touch is\n * registered. This can be used to attach element specific event listeners.\n *\n * @method touchEnded\n * @param {Function|Boolean} fxn function to be fired when a touch ends\n * over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchEnded(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any touch anywhere\n * function touchEnded() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n * \n *\n *\n * @alt\n * no display.\n *\n */\np5.Element.prototype.touchEnded = function(fxn) {\n p5.Element._adjustListener('touchend', fxn, this);\n return this;\n};\n\n/**\n * The .dragOver() function is called once after every time a\n * file is dragged over the element. This can be used to attach an\n * element specific event listener.\n *\n * @method dragOver\n * @param {Function|Boolean} fxn function to be fired when a file is\n * dragged over the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * // To test this sketch, simply drag a\n * // file over the canvas\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(200);\n * textAlign(CENTER);\n * text('Drag file', width / 2, height / 2);\n * c.dragOver(dragOverCallback);\n * }\n *\n * // This function will be called whenever\n * // a file is dragged over the canvas\n * function dragOverCallback() {\n * background(240);\n * text('Dragged over', width / 2, height / 2);\n * }\n * \n * @alt\n * nothing displayed\n */\np5.Element.prototype.dragOver = function(fxn) {\n p5.Element._adjustListener('dragover', fxn, this);\n return this;\n};\n\n/**\n * The .dragLeave() function is called once after every time a\n * dragged file leaves the element area. This can be used to attach an\n * element specific event listener.\n *\n * @method dragLeave\n * @param {Function|Boolean} fxn function to be fired when a file is\n * dragged off the element.\n * if `false` is passed instead, the previously\n * firing function will no longer fire.\n * @chainable\n * @example\n * \n * // To test this sketch, simply drag a file\n * // over and then out of the canvas area\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(200);\n * textAlign(CENTER);\n * text('Drag file', width / 2, height / 2);\n * c.dragLeave(dragLeaveCallback);\n * }\n *\n * // This function will be called whenever\n * // a file is dragged out of the canvas\n * function dragLeaveCallback() {\n * background(240);\n * text('Dragged off', width / 2, height / 2);\n * }\n * \n * @alt\n * nothing displayed\n */\np5.Element.prototype.dragLeave = function(fxn) {\n p5.Element._adjustListener('dragleave', fxn, this);\n return this;\n};\n\n// General handler for event attaching and detaching\np5.Element._adjustListener = function(ev, fxn, ctx) {\n if (fxn === false) {\n p5.Element._detachListener(ev, ctx);\n } else {\n p5.Element._attachListener(ev, fxn, ctx);\n }\n return this;\n};\n\np5.Element._attachListener = function(ev, fxn, ctx) {\n // detach the old listener if there was one\n if (ctx._events[ev]) {\n p5.Element._detachListener(ev, ctx);\n }\n var f = fxn.bind(ctx);\n ctx.elt.addEventListener(ev, f, false);\n ctx._events[ev] = f;\n};\n\np5.Element._detachListener = function(ev, ctx) {\n var f = ctx._events[ev];\n ctx.elt.removeEventListener(ev, f, false);\n ctx._events[ev] = null;\n};\n\n/**\n * Helper fxn for sharing pixel methods\n *\n */\np5.Element.prototype._setProperty = function(prop, value) {\n this[prop] = value;\n};\n\nmodule.exports = p5.Element;\n\n},{\"./main\":24}],26:[function(_dereq_,module,exports){\n/**\n * @module Rendering\n * @submodule Rendering\n * @for p5\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar constants = _dereq_('./constants');\n\n/**\n * Thin wrapper around a renderer, to be used for creating a\n * graphics buffer object. Use this class if you need\n * to draw into an off-screen graphics buffer. The two parameters define the\n * width and height in pixels. The fields and methods for this class are\n * extensive, but mirror the normal drawing API for p5.\n *\n * @class p5.Graphics\n * @extends p5.Element\n * @param {Number} w width\n * @param {Number} h height\n * @param {Constant} renderer the renderer to use, either P2D or WEBGL\n * @param {p5} [pInst] pointer to p5 instance\n */\np5.Graphics = function(w, h, renderer, pInst) {\n var r = renderer || constants.P2D;\n\n this.canvas = document.createElement('canvas');\n var node = pInst._userNode || document.body;\n node.appendChild(this.canvas);\n\n p5.Element.call(this, this.canvas, pInst);\n\n // bind methods and props of p5 to the new object\n for (var p in p5.prototype) {\n if (!this[p]) {\n if (typeof p5.prototype[p] === 'function') {\n this[p] = p5.prototype[p].bind(this);\n } else {\n this[p] = p5.prototype[p];\n }\n }\n }\n\n p5.prototype._initializeInstanceVariables.apply(this);\n this.width = w;\n this.height = h;\n this._pixelDensity = pInst._pixelDensity;\n\n if (r === constants.WEBGL) {\n this._renderer = new p5.RendererGL(this.canvas, this, false);\n } else {\n this._renderer = new p5.Renderer2D(this.canvas, this, false);\n }\n pInst._elements.push(this);\n\n this._renderer.resize(w, h);\n this._renderer._applyDefaults();\n return this;\n};\n\np5.Graphics.prototype = Object.create(p5.Element.prototype);\n\n/**\n * Resets certain values such as those modified by functions in the Transform category\n * and in the Lights category that are not automatically reset\n * with graphics buffer objects. Calling this in draw() will copy the behavior\n * of the standard canvas.\n *\n * @method reset\n * @example\n *\n * \n * let pg;\n * function setup() {\n * createCanvas(100, 100);\n * background(0);\n * pg = createGraphics(50, 100);\n * pg.fill(0);\n * frameRate(5);\n * }\n * function draw() {\n * image(pg, width / 2, 0);\n * pg.background(255);\n * // p5.Graphics object behave a bit differently in some cases\n * // The normal canvas on the left resets the translate\n * // with every loop through draw()\n * // the graphics object on the right doesn't automatically reset\n * // so translate() is additive and it moves down the screen\n * rect(0, 0, width / 2, 5);\n * pg.rect(0, 0, width / 2, 5);\n * translate(0, 5, 0);\n * pg.translate(0, 5, 0);\n * }\n * function mouseClicked() {\n * // if you click you will see that\n * // reset() resets the translate back to the initial state\n * // of the Graphics object\n * pg.reset();\n * }\n * \n *\n * @alt\n * A white line on a black background stays still on the top-left half.\n * A black line animates from top to bottom on a white background on the right half.\n * When clicked, the black line starts back over at the top.\n *\n */\np5.Graphics.prototype.reset = function() {\n this._renderer.resetMatrix();\n if (this._renderer.isP3D) {\n this._renderer._update();\n }\n};\n\n/**\n * Removes a Graphics object from the page and frees any resources\n * associated with it.\n *\n * @method remove\n *\n * @example\n * \n * let bg;\n * function setup() {\n * bg = createCanvas(100, 100);\n * bg.background(0);\n * image(bg, 0, 0);\n * bg.remove();\n * }\n * \n *\n * \n * let bg;\n * function setup() {\n * pixelDensity(1);\n * createCanvas(100, 100);\n * stroke(255);\n * fill(0);\n *\n * // create and draw the background image\n * bg = createGraphics(100, 100);\n * bg.background(200);\n * bg.ellipse(50, 50, 80, 80);\n * }\n * function draw() {\n * let t = millis() / 1000;\n * // draw the background\n * if (bg) {\n * image(bg, frameCount % 100, 0);\n * image(bg, frameCount % 100 - 100, 0);\n * }\n * // draw the foreground\n * let p = p5.Vector.fromAngle(t, 35).add(50, 50);\n * ellipse(p.x, p.y, 30);\n * }\n * function mouseClicked() {\n * // remove the background\n * if (bg) {\n * bg.remove();\n * bg = null;\n * }\n * }\n * \n *\n * @alt\n * no image\n * a multi-colored circle moving back and forth over a scrolling background.\n *\n */\np5.Graphics.prototype.remove = function() {\n if (this.elt.parentNode) {\n this.elt.parentNode.removeChild(this.elt);\n }\n var idx = this._pInst._elements.indexOf(this);\n if (idx !== -1) {\n this._pInst._elements.splice(idx, 1);\n }\n for (var elt_ev in this._events) {\n this.elt.removeEventListener(elt_ev, this._events[elt_ev]);\n }\n};\n\nmodule.exports = p5.Graphics;\n\n},{\"./constants\":18,\"./main\":24}],27:[function(_dereq_,module,exports){\n/**\n * @module Rendering\n * @submodule Rendering\n * @for p5\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Main graphics and rendering context, as well as the base API\n * implementation for p5.js \"core\". To be used as the superclass for\n * Renderer2D and Renderer3D classes, respecitvely.\n *\n * @class p5.Renderer\n * @constructor\n * @extends p5.Element\n * @param {String} elt DOM node that is wrapped\n * @param {p5} [pInst] pointer to p5 instance\n * @param {Boolean} [isMainCanvas] whether we're using it as main canvas\n */\np5.Renderer = function(elt, pInst, isMainCanvas) {\n p5.Element.call(this, elt, pInst);\n this.canvas = elt;\n this._pixelsState = pInst;\n if (isMainCanvas) {\n this._isMainCanvas = true;\n // for pixel method sharing with pimage\n this._pInst._setProperty('_curElement', this);\n this._pInst._setProperty('canvas', this.canvas);\n this._pInst._setProperty('width', this.width);\n this._pInst._setProperty('height', this.height);\n } else {\n // hide if offscreen buffer by default\n this.canvas.style.display = 'none';\n this._styles = []; // non-main elt styles stored in p5.Renderer\n }\n\n this._textSize = 12;\n this._textLeading = 15;\n this._textFont = 'sans-serif';\n this._textStyle = constants.NORMAL;\n this._textAscent = null;\n this._textDescent = null;\n this._textAlign = constants.LEFT;\n this._textBaseline = constants.BASELINE;\n\n this._rectMode = constants.CORNER;\n this._ellipseMode = constants.CENTER;\n this._curveTightness = 0;\n this._imageMode = constants.CORNER;\n\n this._tint = null;\n this._doStroke = true;\n this._doFill = true;\n this._strokeSet = false;\n this._fillSet = false;\n};\n\np5.Renderer.prototype = Object.create(p5.Element.prototype);\n\n// the renderer should return a 'style' object that it wishes to\n// store on the push stack.\np5.Renderer.prototype.push = function() {\n return {\n properties: {\n _doStroke: this._doStroke,\n _strokeSet: this._strokeSet,\n _doFill: this._doFill,\n _fillSet: this._fillSet,\n _tint: this._tint,\n _imageMode: this._imageMode,\n _rectMode: this._rectMode,\n _ellipseMode: this._ellipseMode,\n _textFont: this._textFont,\n _textLeading: this._textLeading,\n _textSize: this._textSize,\n _textAlign: this._textAlign,\n _textBaseline: this._textBaseline,\n _textStyle: this._textStyle\n }\n };\n};\n\n// a pop() operation is in progress\n// the renderer is passed the 'style' object that it returned\n// from its push() method.\np5.Renderer.prototype.pop = function(style) {\n if (style.properties) {\n // copy the style properties back into the renderer\n Object.assign(this, style.properties);\n }\n};\n\n/**\n * Resize our canvas element.\n */\np5.Renderer.prototype.resize = function(w, h) {\n this.width = w;\n this.height = h;\n this.elt.width = w * this._pInst._pixelDensity;\n this.elt.height = h * this._pInst._pixelDensity;\n this.elt.style.width = w + 'px';\n this.elt.style.height = h + 'px';\n if (this._isMainCanvas) {\n this._pInst._setProperty('width', this.width);\n this._pInst._setProperty('height', this.height);\n }\n};\n\np5.Renderer.prototype.get = function(x, y, w, h) {\n var pixelsState = this._pixelsState;\n var pd = pixelsState._pixelDensity;\n var canvas = this.canvas;\n\n if (typeof x === 'undefined' && typeof y === 'undefined') {\n // get()\n x = y = 0;\n w = pixelsState.width;\n h = pixelsState.height;\n } else {\n x *= pd;\n y *= pd;\n\n if (typeof w === 'undefined' && typeof h === 'undefined') {\n // get(x,y)\n if (x < 0 || y < 0 || x >= canvas.width || y >= canvas.height) {\n return [0, 0, 0, 0];\n }\n\n return this._getPixel(x, y);\n }\n // get(x,y,w,h)\n }\n\n var region = new p5.Image(w, h);\n region.canvas\n .getContext('2d')\n .drawImage(canvas, x, y, w * pd, h * pd, 0, 0, w, h);\n\n return region;\n};\n\np5.Renderer.prototype.textLeading = function(l) {\n if (typeof l === 'number') {\n this._setProperty('_textLeading', l);\n return this._pInst;\n }\n\n return this._textLeading;\n};\n\np5.Renderer.prototype.textSize = function(s) {\n if (typeof s === 'number') {\n this._setProperty('_textSize', s);\n this._setProperty('_textLeading', s * constants._DEFAULT_LEADMULT);\n return this._applyTextProperties();\n }\n\n return this._textSize;\n};\n\np5.Renderer.prototype.textStyle = function(s) {\n if (s) {\n if (\n s === constants.NORMAL ||\n s === constants.ITALIC ||\n s === constants.BOLD ||\n s === constants.BOLDITALIC\n ) {\n this._setProperty('_textStyle', s);\n }\n\n return this._applyTextProperties();\n }\n\n return this._textStyle;\n};\n\np5.Renderer.prototype.textAscent = function() {\n if (this._textAscent === null) {\n this._updateTextMetrics();\n }\n return this._textAscent;\n};\n\np5.Renderer.prototype.textDescent = function() {\n if (this._textDescent === null) {\n this._updateTextMetrics();\n }\n return this._textDescent;\n};\n\np5.Renderer.prototype.textAlign = function(h, v) {\n if (typeof h !== 'undefined') {\n this._setProperty('_textAlign', h);\n\n if (typeof v !== 'undefined') {\n this._setProperty('_textBaseline', v);\n }\n\n return this._applyTextProperties();\n } else {\n return {\n horizontal: this._textAlign,\n vertical: this._textBaseline\n };\n }\n};\n\np5.Renderer.prototype.text = function(str, x, y, maxWidth, maxHeight) {\n var p = this._pInst,\n cars,\n n,\n ii,\n jj,\n line,\n testLine,\n testWidth,\n words,\n totalHeight,\n finalMaxHeight = Number.MAX_VALUE;\n\n if (!(this._doFill || this._doStroke)) {\n return;\n }\n\n if (typeof str === 'undefined') {\n return;\n } else if (typeof str !== 'string') {\n str = str.toString();\n }\n\n str = str.replace(/(\\t)/g, ' ');\n cars = str.split('\\n');\n\n if (typeof maxWidth !== 'undefined') {\n totalHeight = 0;\n for (ii = 0; ii < cars.length; ii++) {\n line = '';\n words = cars[ii].split(' ');\n for (n = 0; n < words.length; n++) {\n testLine = line + words[n] + ' ';\n testWidth = this.textWidth(testLine);\n if (testWidth > maxWidth) {\n line = words[n] + ' ';\n totalHeight += p.textLeading();\n } else {\n line = testLine;\n }\n }\n }\n\n if (this._rectMode === constants.CENTER) {\n x -= maxWidth / 2;\n y -= maxHeight / 2;\n }\n\n switch (this._textAlign) {\n case constants.CENTER:\n x += maxWidth / 2;\n break;\n case constants.RIGHT:\n x += maxWidth;\n break;\n }\n\n var baselineHacked = false;\n if (typeof maxHeight !== 'undefined') {\n switch (this._textBaseline) {\n case constants.BOTTOM:\n y += maxHeight - totalHeight;\n break;\n case constants.CENTER:\n y += (maxHeight - totalHeight) / 2;\n break;\n case constants.BASELINE:\n baselineHacked = true;\n this._textBaseline = constants.TOP;\n break;\n }\n\n // remember the max-allowed y-position for any line (fix to #928)\n finalMaxHeight = y + maxHeight - p.textAscent();\n }\n\n for (ii = 0; ii < cars.length; ii++) {\n line = '';\n words = cars[ii].split(' ');\n for (n = 0; n < words.length; n++) {\n testLine = line + words[n] + ' ';\n testWidth = this.textWidth(testLine);\n if (testWidth > maxWidth && line.length > 0) {\n this._renderText(p, line, x, y, finalMaxHeight);\n line = words[n] + ' ';\n y += p.textLeading();\n } else {\n line = testLine;\n }\n }\n\n this._renderText(p, line, x, y, finalMaxHeight);\n y += p.textLeading();\n\n if (baselineHacked) {\n this._textBaseline = constants.BASELINE;\n }\n }\n } else {\n // Offset to account for vertically centering multiple lines of text - no\n // need to adjust anything for vertical align top or baseline\n var offset = 0,\n vAlign = p.textAlign().vertical;\n if (vAlign === constants.CENTER) {\n offset = (cars.length - 1) * p.textLeading() / 2;\n } else if (vAlign === constants.BOTTOM) {\n offset = (cars.length - 1) * p.textLeading();\n }\n\n for (jj = 0; jj < cars.length; jj++) {\n this._renderText(p, cars[jj], x, y - offset, finalMaxHeight);\n y += p.textLeading();\n }\n }\n\n return p;\n};\n\np5.Renderer.prototype._applyDefaults = function() {\n return this;\n};\n\n/**\n * Helper fxn to check font type (system or otf)\n */\np5.Renderer.prototype._isOpenType = function(f) {\n f = f || this._textFont;\n return typeof f === 'object' && f.font && f.font.supported;\n};\n\np5.Renderer.prototype._updateTextMetrics = function() {\n if (this._isOpenType()) {\n this._setProperty('_textAscent', this._textFont._textAscent());\n this._setProperty('_textDescent', this._textFont._textDescent());\n return this;\n }\n\n // Adapted from http://stackoverflow.com/a/25355178\n var text = document.createElement('span');\n text.style.fontFamily = this._textFont;\n text.style.fontSize = this._textSize + 'px';\n text.innerHTML = 'ABCjgq|';\n\n var block = document.createElement('div');\n block.style.display = 'inline-block';\n block.style.width = '1px';\n block.style.height = '0px';\n\n var container = document.createElement('div');\n container.appendChild(text);\n container.appendChild(block);\n\n container.style.height = '0px';\n container.style.overflow = 'hidden';\n document.body.appendChild(container);\n\n block.style.verticalAlign = 'baseline';\n var blockOffset = calculateOffset(block);\n var textOffset = calculateOffset(text);\n var ascent = blockOffset[1] - textOffset[1];\n\n block.style.verticalAlign = 'bottom';\n blockOffset = calculateOffset(block);\n textOffset = calculateOffset(text);\n var height = blockOffset[1] - textOffset[1];\n var descent = height - ascent;\n\n document.body.removeChild(container);\n\n this._setProperty('_textAscent', ascent);\n this._setProperty('_textDescent', descent);\n\n return this;\n};\n\n/**\n * Helper fxn to measure ascent and descent.\n * Adapted from http://stackoverflow.com/a/25355178\n */\nfunction calculateOffset(object) {\n var currentLeft = 0,\n currentTop = 0;\n if (object.offsetParent) {\n do {\n currentLeft += object.offsetLeft;\n currentTop += object.offsetTop;\n } while ((object = object.offsetParent));\n } else {\n currentLeft += object.offsetLeft;\n currentTop += object.offsetTop;\n }\n return [currentLeft, currentTop];\n}\n\nmodule.exports = p5.Renderer;\n\n},{\"../core/constants\":18,\"./main\":24}],28:[function(_dereq_,module,exports){\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar constants = _dereq_('./constants');\nvar filters = _dereq_('../image/filters');\n\n_dereq_('./p5.Renderer');\n\n/**\n * p5.Renderer2D\n * The 2D graphics canvas renderer class.\n * extends p5.Renderer\n */\nvar styleEmpty = 'rgba(0,0,0,0)';\n// var alphaThreshold = 0.00125; // minimum visible\n\np5.Renderer2D = function(elt, pInst, isMainCanvas) {\n p5.Renderer.call(this, elt, pInst, isMainCanvas);\n this.drawingContext = this.canvas.getContext('2d');\n this._pInst._setProperty('drawingContext', this.drawingContext);\n return this;\n};\n\np5.Renderer2D.prototype = Object.create(p5.Renderer.prototype);\n\np5.Renderer2D.prototype._applyDefaults = function() {\n this._cachedFillStyle = this._cachedStrokeStyle = undefined;\n this._setFill(constants._DEFAULT_FILL);\n this._setStroke(constants._DEFAULT_STROKE);\n this.drawingContext.lineCap = constants.ROUND;\n this.drawingContext.font = 'normal 12px sans-serif';\n};\n\np5.Renderer2D.prototype.resize = function(w, h) {\n p5.Renderer.prototype.resize.call(this, w, h);\n this.drawingContext.scale(\n this._pInst._pixelDensity,\n this._pInst._pixelDensity\n );\n};\n\n//////////////////////////////////////////////\n// COLOR | Setting\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.background = function() {\n this.drawingContext.save();\n this.resetMatrix();\n\n if (arguments[0] instanceof p5.Image) {\n this._pInst.image(arguments[0], 0, 0, this.width, this.height);\n } else {\n var curFill = this._getFill();\n // create background rect\n var color = this._pInst.color.apply(this._pInst, arguments);\n var newFill = color.toString();\n this._setFill(newFill);\n this.drawingContext.fillRect(0, 0, this.width, this.height);\n // reset fill\n this._setFill(curFill);\n }\n this.drawingContext.restore();\n\n this._pixelsState._pixelsDirty = true;\n};\n\np5.Renderer2D.prototype.clear = function() {\n this.drawingContext.save();\n this.resetMatrix();\n this.drawingContext.clearRect(0, 0, this.width, this.height);\n this.drawingContext.restore();\n\n this._pixelsState._pixelsDirty = true;\n};\n\np5.Renderer2D.prototype.fill = function() {\n var color = this._pInst.color.apply(this._pInst, arguments);\n this._setFill(color.toString());\n};\n\np5.Renderer2D.prototype.stroke = function() {\n var color = this._pInst.color.apply(this._pInst, arguments);\n this._setStroke(color.toString());\n};\n\n//////////////////////////////////////////////\n// IMAGE | Loading & Displaying\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.image = function(\n img,\n sx,\n sy,\n sWidth,\n sHeight,\n dx,\n dy,\n dWidth,\n dHeight\n) {\n var cnv;\n try {\n if (this._tint) {\n if (p5.MediaElement && img instanceof p5.MediaElement) {\n img.loadPixels();\n }\n if (img.canvas) {\n cnv = this._getTintedImageCanvas(img);\n }\n }\n if (!cnv) {\n cnv = img.canvas || img.elt;\n }\n var s = 1;\n if (img.width && img.width > 0) {\n s = cnv.width / img.width;\n }\n this.drawingContext.drawImage(\n cnv,\n s * sx,\n s * sy,\n s * sWidth,\n s * sHeight,\n dx,\n dy,\n dWidth,\n dHeight\n );\n } catch (e) {\n if (e.name !== 'NS_ERROR_NOT_AVAILABLE') {\n throw e;\n }\n }\n\n this._pixelsState._pixelsDirty = true;\n};\n\np5.Renderer2D.prototype._getTintedImageCanvas = function(img) {\n if (!img.canvas) {\n return img;\n }\n var pixels = filters._toPixels(img.canvas);\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = img.canvas.width;\n tmpCanvas.height = img.canvas.height;\n var tmpCtx = tmpCanvas.getContext('2d');\n var id = tmpCtx.createImageData(img.canvas.width, img.canvas.height);\n var newPixels = id.data;\n for (var i = 0; i < pixels.length; i += 4) {\n var r = pixels[i];\n var g = pixels[i + 1];\n var b = pixels[i + 2];\n var a = pixels[i + 3];\n newPixels[i] = r * this._tint[0] / 255;\n newPixels[i + 1] = g * this._tint[1] / 255;\n newPixels[i + 2] = b * this._tint[2] / 255;\n newPixels[i + 3] = a * this._tint[3] / 255;\n }\n tmpCtx.putImageData(id, 0, 0);\n return tmpCanvas;\n};\n\n//////////////////////////////////////////////\n// IMAGE | Pixels\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.blendMode = function(mode) {\n if (mode === constants.SUBTRACT) {\n console.warn('blendMode(SUBTRACT) only works in WEBGL mode.');\n } else if (\n mode === constants.BLEND ||\n mode === constants.DARKEST ||\n mode === constants.LIGHTEST ||\n mode === constants.DIFFERENCE ||\n mode === constants.MULTIPLY ||\n mode === constants.EXCLUSION ||\n mode === constants.SCREEN ||\n mode === constants.REPLACE ||\n mode === constants.OVERLAY ||\n mode === constants.HARD_LIGHT ||\n mode === constants.SOFT_LIGHT ||\n mode === constants.DODGE ||\n mode === constants.BURN ||\n mode === constants.ADD\n ) {\n this.drawingContext.globalCompositeOperation = mode;\n } else {\n throw new Error('Mode ' + mode + ' not recognized.');\n }\n};\n\np5.Renderer2D.prototype.blend = function() {\n var currBlend = this.drawingContext.globalCompositeOperation;\n var blendMode = arguments[arguments.length - 1];\n\n var copyArgs = Array.prototype.slice.call(arguments, 0, arguments.length - 1);\n\n this.drawingContext.globalCompositeOperation = blendMode;\n if (this._pInst) {\n this._pInst.copy.apply(this._pInst, copyArgs);\n } else {\n this.copy.apply(this, copyArgs);\n }\n this.drawingContext.globalCompositeOperation = currBlend;\n};\n\np5.Renderer2D.prototype.copy = function() {\n var srcImage, sx, sy, sw, sh, dx, dy, dw, dh;\n if (arguments.length === 9) {\n srcImage = arguments[0];\n sx = arguments[1];\n sy = arguments[2];\n sw = arguments[3];\n sh = arguments[4];\n dx = arguments[5];\n dy = arguments[6];\n dw = arguments[7];\n dh = arguments[8];\n } else if (arguments.length === 8) {\n srcImage = this._pInst;\n sx = arguments[0];\n sy = arguments[1];\n sw = arguments[2];\n sh = arguments[3];\n dx = arguments[4];\n dy = arguments[5];\n dw = arguments[6];\n dh = arguments[7];\n } else {\n throw new Error('Signature not supported');\n }\n p5.Renderer2D._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);\n\n this._pixelsState._pixelsDirty = true;\n};\n\np5.Renderer2D._copyHelper = function(\n dstImage,\n srcImage,\n sx,\n sy,\n sw,\n sh,\n dx,\n dy,\n dw,\n dh\n) {\n srcImage.loadPixels();\n var s = srcImage.canvas.width / srcImage.width;\n dstImage.drawingContext.drawImage(\n srcImage.canvas,\n s * sx,\n s * sy,\n s * sw,\n s * sh,\n dx,\n dy,\n dw,\n dh\n );\n};\n\n// p5.Renderer2D.prototype.get = p5.Renderer.prototype.get;\n// .get() is not overridden\n\n// x,y are canvas-relative (pre-scaled by _pixelDensity)\np5.Renderer2D.prototype._getPixel = function(x, y) {\n var pixelsState = this._pixelsState;\n var imageData, index;\n if (pixelsState._pixelsDirty) {\n imageData = this.drawingContext.getImageData(x, y, 1, 1).data;\n index = 0;\n } else {\n imageData = pixelsState.pixels;\n index = (Math.floor(x) + Math.floor(y) * this.canvas.width) * 4;\n }\n return [\n imageData[index + 0],\n imageData[index + 1],\n imageData[index + 2],\n imageData[index + 3]\n ];\n};\n\np5.Renderer2D.prototype.loadPixels = function() {\n var pixelsState = this._pixelsState; // if called by p5.Image\n if (!pixelsState._pixelsDirty) return;\n pixelsState._pixelsDirty = false;\n\n var pd = pixelsState._pixelDensity;\n var w = this.width * pd;\n var h = this.height * pd;\n var imageData = this.drawingContext.getImageData(0, 0, w, h);\n // @todo this should actually set pixels per object, so diff buffers can\n // have diff pixel arrays.\n pixelsState._setProperty('imageData', imageData);\n pixelsState._setProperty('pixels', imageData.data);\n};\n\np5.Renderer2D.prototype.set = function(x, y, imgOrCol) {\n // round down to get integer numbers\n x = Math.floor(x);\n y = Math.floor(y);\n var pixelsState = this._pixelsState;\n if (imgOrCol instanceof p5.Image) {\n this.drawingContext.save();\n this.drawingContext.setTransform(1, 0, 0, 1, 0, 0);\n this.drawingContext.scale(\n pixelsState._pixelDensity,\n pixelsState._pixelDensity\n );\n this.drawingContext.drawImage(imgOrCol.canvas, x, y);\n this.drawingContext.restore();\n pixelsState._pixelsDirty = true;\n } else {\n var r = 0,\n g = 0,\n b = 0,\n a = 0;\n var idx =\n 4 *\n (y *\n pixelsState._pixelDensity *\n (this.width * pixelsState._pixelDensity) +\n x * pixelsState._pixelDensity);\n if (!pixelsState.imageData || pixelsState._pixelsDirty) {\n pixelsState.loadPixels.call(pixelsState);\n }\n if (typeof imgOrCol === 'number') {\n if (idx < pixelsState.pixels.length) {\n r = imgOrCol;\n g = imgOrCol;\n b = imgOrCol;\n a = 255;\n //this.updatePixels.call(this);\n }\n } else if (imgOrCol instanceof Array) {\n if (imgOrCol.length < 4) {\n throw new Error('pixel array must be of the form [R, G, B, A]');\n }\n if (idx < pixelsState.pixels.length) {\n r = imgOrCol[0];\n g = imgOrCol[1];\n b = imgOrCol[2];\n a = imgOrCol[3];\n //this.updatePixels.call(this);\n }\n } else if (imgOrCol instanceof p5.Color) {\n if (idx < pixelsState.pixels.length) {\n r = imgOrCol.levels[0];\n g = imgOrCol.levels[1];\n b = imgOrCol.levels[2];\n a = imgOrCol.levels[3];\n //this.updatePixels.call(this);\n }\n }\n // loop over pixelDensity * pixelDensity\n for (var i = 0; i < pixelsState._pixelDensity; i++) {\n for (var j = 0; j < pixelsState._pixelDensity; j++) {\n // loop over\n idx =\n 4 *\n ((y * pixelsState._pixelDensity + j) *\n this.width *\n pixelsState._pixelDensity +\n (x * pixelsState._pixelDensity + i));\n pixelsState.pixels[idx] = r;\n pixelsState.pixels[idx + 1] = g;\n pixelsState.pixels[idx + 2] = b;\n pixelsState.pixels[idx + 3] = a;\n }\n }\n }\n};\n\np5.Renderer2D.prototype.updatePixels = function(x, y, w, h) {\n var pixelsState = this._pixelsState;\n var pd = pixelsState._pixelDensity;\n if (\n x === undefined &&\n y === undefined &&\n w === undefined &&\n h === undefined\n ) {\n x = 0;\n y = 0;\n w = this.width;\n h = this.height;\n }\n w *= pd;\n h *= pd;\n\n this.drawingContext.putImageData(pixelsState.imageData, x, y, 0, 0, w, h);\n\n if (x !== 0 || y !== 0 || w !== this.width || h !== this.height) {\n pixelsState._pixelsDirty = true;\n }\n};\n\n//////////////////////////////////////////////\n// SHAPE | 2D Primitives\n//////////////////////////////////////////////\n\n/**\n * Generate a cubic Bezier representing an arc on the unit circle of total\n * angle `size` radians, beginning `start` radians above the x-axis. Up to\n * four of these curves are combined to make a full arc.\n *\n * See www.joecridge.me/bezier.pdf for an explanation of the method.\n */\np5.Renderer2D.prototype._acuteArcToBezier = function _acuteArcToBezier(\n start,\n size\n) {\n // Evaluate constants.\n var alpha = size / 2.0,\n cos_alpha = Math.cos(alpha),\n sin_alpha = Math.sin(alpha),\n cot_alpha = 1.0 / Math.tan(alpha),\n phi = start + alpha, // This is how far the arc needs to be rotated.\n cos_phi = Math.cos(phi),\n sin_phi = Math.sin(phi),\n lambda = (4.0 - cos_alpha) / 3.0,\n mu = sin_alpha + (cos_alpha - lambda) * cot_alpha;\n\n // Return rotated waypoints.\n return {\n ax: Math.cos(start).toFixed(7),\n ay: Math.sin(start).toFixed(7),\n bx: (lambda * cos_phi + mu * sin_phi).toFixed(7),\n by: (lambda * sin_phi - mu * cos_phi).toFixed(7),\n cx: (lambda * cos_phi - mu * sin_phi).toFixed(7),\n cy: (lambda * sin_phi + mu * cos_phi).toFixed(7),\n dx: Math.cos(start + size).toFixed(7),\n dy: Math.sin(start + size).toFixed(7)\n };\n};\n\n/*\n * This function requires that:\n *\n * 0 <= start < TWO_PI\n *\n * start <= stop < start + TWO_PI\n */\np5.Renderer2D.prototype.arc = function(x, y, w, h, start, stop, mode) {\n var ctx = this.drawingContext;\n var rx = w / 2.0;\n var ry = h / 2.0;\n var epsilon = 0.00001; // Smallest visible angle on displays up to 4K.\n var arcToDraw = 0;\n var curves = [];\n\n x += rx;\n y += ry;\n\n // Create curves\n while (stop - start >= epsilon) {\n arcToDraw = Math.min(stop - start, constants.HALF_PI);\n curves.push(this._acuteArcToBezier(start, arcToDraw));\n start += arcToDraw;\n }\n\n // Fill curves\n if (this._doFill) {\n ctx.beginPath();\n curves.forEach(function(curve, index) {\n if (index === 0) {\n ctx.moveTo(x + curve.ax * rx, y + curve.ay * ry);\n }\n // prettier-ignore\n ctx.bezierCurveTo(x + curve.bx * rx, y + curve.by * ry,\n x + curve.cx * rx, y + curve.cy * ry,\n x + curve.dx * rx, y + curve.dy * ry);\n });\n if (mode === constants.PIE || mode == null) {\n ctx.lineTo(x, y);\n }\n ctx.closePath();\n ctx.fill();\n this._pixelsState._pixelsDirty = true;\n }\n\n // Stroke curves\n if (this._doStroke) {\n ctx.beginPath();\n curves.forEach(function(curve, index) {\n if (index === 0) {\n ctx.moveTo(x + curve.ax * rx, y + curve.ay * ry);\n }\n // prettier-ignore\n ctx.bezierCurveTo(x + curve.bx * rx, y + curve.by * ry,\n x + curve.cx * rx, y + curve.cy * ry,\n x + curve.dx * rx, y + curve.dy * ry);\n });\n if (mode === constants.PIE) {\n ctx.lineTo(x, y);\n ctx.closePath();\n } else if (mode === constants.CHORD) {\n ctx.closePath();\n }\n ctx.stroke();\n this._pixelsState._pixelsDirty = true;\n }\n return this;\n};\n\np5.Renderer2D.prototype.ellipse = function(args) {\n var ctx = this.drawingContext;\n var doFill = this._doFill,\n doStroke = this._doStroke;\n var x = args[0],\n y = args[1],\n w = args[2],\n h = args[3];\n if (doFill && !doStroke) {\n if (this._getFill() === styleEmpty) {\n return this;\n }\n } else if (!doFill && doStroke) {\n if (this._getStroke() === styleEmpty) {\n return this;\n }\n }\n var kappa = 0.5522847498,\n ox = w / 2 * kappa, // control point offset horizontal\n oy = h / 2 * kappa, // control point offset vertical\n xe = x + w, // x-end\n ye = y + h, // y-end\n xm = x + w / 2, // x-middle\n ym = y + h / 2; // y-middle\n ctx.beginPath();\n ctx.moveTo(x, ym);\n ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);\n ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);\n ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);\n ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);\n ctx.closePath();\n if (doFill) {\n ctx.fill();\n this._pixelsState._pixelsDirty = true;\n }\n if (doStroke) {\n ctx.stroke();\n this._pixelsState._pixelsDirty = true;\n }\n};\n\np5.Renderer2D.prototype.line = function(x1, y1, x2, y2) {\n var ctx = this.drawingContext;\n if (!this._doStroke) {\n return this;\n } else if (this._getStroke() === styleEmpty) {\n return this;\n }\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.stroke();\n this._pixelsState._pixelsDirty = true;\n return this;\n};\n\np5.Renderer2D.prototype.point = function(x, y) {\n var ctx = this.drawingContext;\n if (!this._doStroke) {\n return this;\n } else if (this._getStroke() === styleEmpty) {\n return this;\n }\n var s = this._getStroke();\n var f = this._getFill();\n x = Math.round(x);\n y = Math.round(y);\n // swapping fill color to stroke and back after for correct point rendering\n this._setFill(s);\n if (ctx.lineWidth > 1) {\n ctx.beginPath();\n ctx.arc(x, y, ctx.lineWidth / 2, 0, constants.TWO_PI, false);\n ctx.fill();\n } else {\n ctx.fillRect(x, y, 1, 1);\n }\n this._setFill(f);\n this._pixelsState._pixelsDirty = true;\n};\n\np5.Renderer2D.prototype.quad = function(x1, y1, x2, y2, x3, y3, x4, y4) {\n var ctx = this.drawingContext;\n var doFill = this._doFill,\n doStroke = this._doStroke;\n if (doFill && !doStroke) {\n if (this._getFill() === styleEmpty) {\n return this;\n }\n } else if (!doFill && doStroke) {\n if (this._getStroke() === styleEmpty) {\n return this;\n }\n }\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x3, y3);\n ctx.lineTo(x4, y4);\n ctx.closePath();\n if (doFill) {\n ctx.fill();\n }\n if (doStroke) {\n ctx.stroke();\n }\n this._pixelsState._pixelsDirty = true;\n return this;\n};\n\np5.Renderer2D.prototype.rect = function(args) {\n var x = args[0],\n y = args[1],\n w = args[2],\n h = args[3],\n tl = args[4],\n tr = args[5],\n br = args[6],\n bl = args[7];\n var ctx = this.drawingContext;\n var doFill = this._doFill,\n doStroke = this._doStroke;\n if (doFill && !doStroke) {\n if (this._getFill() === styleEmpty) {\n return this;\n }\n } else if (!doFill && doStroke) {\n if (this._getStroke() === styleEmpty) {\n return this;\n }\n }\n ctx.beginPath();\n\n if (typeof tl === 'undefined') {\n // No rounded corners\n ctx.rect(x, y, w, h);\n } else {\n // At least one rounded corner\n // Set defaults when not specified\n if (typeof tr === 'undefined') {\n tr = tl;\n }\n if (typeof br === 'undefined') {\n br = tr;\n }\n if (typeof bl === 'undefined') {\n bl = br;\n }\n\n var hw = w / 2;\n var hh = h / 2;\n\n // Clip radii\n if (w < 2 * tl) {\n tl = hw;\n }\n if (h < 2 * tl) {\n tl = hh;\n }\n if (w < 2 * tr) {\n tr = hw;\n }\n if (h < 2 * tr) {\n tr = hh;\n }\n if (w < 2 * br) {\n br = hw;\n }\n if (h < 2 * br) {\n br = hh;\n }\n if (w < 2 * bl) {\n bl = hw;\n }\n if (h < 2 * bl) {\n bl = hh;\n }\n\n // Draw shape\n ctx.beginPath();\n ctx.moveTo(x + tl, y);\n ctx.arcTo(x + w, y, x + w, y + h, tr);\n ctx.arcTo(x + w, y + h, x, y + h, br);\n ctx.arcTo(x, y + h, x, y, bl);\n ctx.arcTo(x, y, x + w, y, tl);\n ctx.closePath();\n }\n if (this._doFill) {\n ctx.fill();\n }\n if (this._doStroke) {\n ctx.stroke();\n }\n this._pixelsState._pixelsDirty = true;\n return this;\n};\n\np5.Renderer2D.prototype.triangle = function(args) {\n var ctx = this.drawingContext;\n var doFill = this._doFill,\n doStroke = this._doStroke;\n var x1 = args[0],\n y1 = args[1];\n var x2 = args[2],\n y2 = args[3];\n var x3 = args[4],\n y3 = args[5];\n if (doFill && !doStroke) {\n if (this._getFill() === styleEmpty) {\n return this;\n }\n } else if (!doFill && doStroke) {\n if (this._getStroke() === styleEmpty) {\n return this;\n }\n }\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.lineTo(x3, y3);\n ctx.closePath();\n if (doFill) {\n ctx.fill();\n this._pixelsState._pixelsDirty = true;\n }\n if (doStroke) {\n ctx.stroke();\n this._pixelsState._pixelsDirty = true;\n }\n};\n\np5.Renderer2D.prototype.endShape = function(\n mode,\n vertices,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n) {\n if (vertices.length === 0) {\n return this;\n }\n if (!this._doStroke && !this._doFill) {\n return this;\n }\n var closeShape = mode === constants.CLOSE;\n var v;\n if (closeShape && !isContour) {\n vertices.push(vertices[0]);\n }\n var i, j;\n var numVerts = vertices.length;\n if (isCurve && (shapeKind === constants.POLYGON || shapeKind === null)) {\n if (numVerts > 3) {\n var b = [],\n s = 1 - this._curveTightness;\n this.drawingContext.beginPath();\n this.drawingContext.moveTo(vertices[1][0], vertices[1][1]);\n for (i = 1; i + 2 < numVerts; i++) {\n v = vertices[i];\n b[0] = [v[0], v[1]];\n b[1] = [\n v[0] + (s * vertices[i + 1][0] - s * vertices[i - 1][0]) / 6,\n v[1] + (s * vertices[i + 1][1] - s * vertices[i - 1][1]) / 6\n ];\n b[2] = [\n vertices[i + 1][0] +\n (s * vertices[i][0] - s * vertices[i + 2][0]) / 6,\n vertices[i + 1][1] + (s * vertices[i][1] - s * vertices[i + 2][1]) / 6\n ];\n b[3] = [vertices[i + 1][0], vertices[i + 1][1]];\n this.drawingContext.bezierCurveTo(\n b[1][0],\n b[1][1],\n b[2][0],\n b[2][1],\n b[3][0],\n b[3][1]\n );\n }\n if (closeShape) {\n this.drawingContext.lineTo(vertices[i + 1][0], vertices[i + 1][1]);\n }\n this._doFillStrokeClose(closeShape);\n }\n } else if (\n isBezier &&\n (shapeKind === constants.POLYGON || shapeKind === null)\n ) {\n this.drawingContext.beginPath();\n for (i = 0; i < numVerts; i++) {\n if (vertices[i].isVert) {\n if (vertices[i].moveTo) {\n this.drawingContext.moveTo(vertices[i][0], vertices[i][1]);\n } else {\n this.drawingContext.lineTo(vertices[i][0], vertices[i][1]);\n }\n } else {\n this.drawingContext.bezierCurveTo(\n vertices[i][0],\n vertices[i][1],\n vertices[i][2],\n vertices[i][3],\n vertices[i][4],\n vertices[i][5]\n );\n }\n }\n this._doFillStrokeClose(closeShape);\n } else if (\n isQuadratic &&\n (shapeKind === constants.POLYGON || shapeKind === null)\n ) {\n this.drawingContext.beginPath();\n for (i = 0; i < numVerts; i++) {\n if (vertices[i].isVert) {\n if (vertices[i].moveTo) {\n this.drawingContext.moveTo(vertices[i][0], vertices[i][1]);\n } else {\n this.drawingContext.lineTo(vertices[i][0], vertices[i][1]);\n }\n } else {\n this.drawingContext.quadraticCurveTo(\n vertices[i][0],\n vertices[i][1],\n vertices[i][2],\n vertices[i][3]\n );\n }\n }\n this._doFillStrokeClose(closeShape);\n } else {\n if (shapeKind === constants.POINTS) {\n for (i = 0; i < numVerts; i++) {\n v = vertices[i];\n if (this._doStroke) {\n this._pInst.stroke(v[6]);\n }\n this._pInst.point(v[0], v[1]);\n }\n } else if (shapeKind === constants.LINES) {\n for (i = 0; i + 1 < numVerts; i += 2) {\n v = vertices[i];\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 1][6]);\n }\n this._pInst.line(v[0], v[1], vertices[i + 1][0], vertices[i + 1][1]);\n }\n } else if (shapeKind === constants.TRIANGLES) {\n for (i = 0; i + 2 < numVerts; i += 3) {\n v = vertices[i];\n this.drawingContext.beginPath();\n this.drawingContext.moveTo(v[0], v[1]);\n this.drawingContext.lineTo(vertices[i + 1][0], vertices[i + 1][1]);\n this.drawingContext.lineTo(vertices[i + 2][0], vertices[i + 2][1]);\n this.drawingContext.closePath();\n if (this._doFill) {\n this._pInst.fill(vertices[i + 2][5]);\n this.drawingContext.fill();\n }\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 2][6]);\n this.drawingContext.stroke();\n }\n }\n } else if (shapeKind === constants.TRIANGLE_STRIP) {\n for (i = 0; i + 1 < numVerts; i++) {\n v = vertices[i];\n this.drawingContext.beginPath();\n this.drawingContext.moveTo(vertices[i + 1][0], vertices[i + 1][1]);\n this.drawingContext.lineTo(v[0], v[1]);\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 1][6]);\n }\n if (this._doFill) {\n this._pInst.fill(vertices[i + 1][5]);\n }\n if (i + 2 < numVerts) {\n this.drawingContext.lineTo(vertices[i + 2][0], vertices[i + 2][1]);\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 2][6]);\n }\n if (this._doFill) {\n this._pInst.fill(vertices[i + 2][5]);\n }\n }\n this._doFillStrokeClose(closeShape);\n }\n } else if (shapeKind === constants.TRIANGLE_FAN) {\n if (numVerts > 2) {\n // For performance reasons, try to batch as many of the\n // fill and stroke calls as possible.\n this.drawingContext.beginPath();\n for (i = 2; i < numVerts; i++) {\n v = vertices[i];\n this.drawingContext.moveTo(vertices[0][0], vertices[0][1]);\n this.drawingContext.lineTo(vertices[i - 1][0], vertices[i - 1][1]);\n this.drawingContext.lineTo(v[0], v[1]);\n this.drawingContext.lineTo(vertices[0][0], vertices[0][1]);\n // If the next colour is going to be different, stroke / fill now\n if (i < numVerts - 1) {\n if (\n (this._doFill && v[5] !== vertices[i + 1][5]) ||\n (this._doStroke && v[6] !== vertices[i + 1][6])\n ) {\n if (this._doFill) {\n this._pInst.fill(v[5]);\n this.drawingContext.fill();\n this._pInst.fill(vertices[i + 1][5]);\n }\n if (this._doStroke) {\n this._pInst.stroke(v[6]);\n this.drawingContext.stroke();\n this._pInst.stroke(vertices[i + 1][6]);\n }\n this.drawingContext.closePath();\n this.drawingContext.beginPath(); // Begin the next one\n }\n }\n }\n this._doFillStrokeClose(closeShape);\n }\n } else if (shapeKind === constants.QUADS) {\n for (i = 0; i + 3 < numVerts; i += 4) {\n v = vertices[i];\n this.drawingContext.beginPath();\n this.drawingContext.moveTo(v[0], v[1]);\n for (j = 1; j < 4; j++) {\n this.drawingContext.lineTo(vertices[i + j][0], vertices[i + j][1]);\n }\n this.drawingContext.lineTo(v[0], v[1]);\n if (this._doFill) {\n this._pInst.fill(vertices[i + 3][5]);\n }\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 3][6]);\n }\n this._doFillStrokeClose(closeShape);\n }\n } else if (shapeKind === constants.QUAD_STRIP) {\n if (numVerts > 3) {\n for (i = 0; i + 1 < numVerts; i += 2) {\n v = vertices[i];\n this.drawingContext.beginPath();\n if (i + 3 < numVerts) {\n this.drawingContext.moveTo(vertices[i + 2][0], vertices[i + 2][1]);\n this.drawingContext.lineTo(v[0], v[1]);\n this.drawingContext.lineTo(vertices[i + 1][0], vertices[i + 1][1]);\n this.drawingContext.lineTo(vertices[i + 3][0], vertices[i + 3][1]);\n if (this._doFill) {\n this._pInst.fill(vertices[i + 3][5]);\n }\n if (this._doStroke) {\n this._pInst.stroke(vertices[i + 3][6]);\n }\n } else {\n this.drawingContext.moveTo(v[0], v[1]);\n this.drawingContext.lineTo(vertices[i + 1][0], vertices[i + 1][1]);\n }\n this._doFillStrokeClose(closeShape);\n }\n }\n } else {\n this.drawingContext.beginPath();\n this.drawingContext.moveTo(vertices[0][0], vertices[0][1]);\n for (i = 1; i < numVerts; i++) {\n v = vertices[i];\n if (v.isVert) {\n if (v.moveTo) {\n this.drawingContext.moveTo(v[0], v[1]);\n } else {\n this.drawingContext.lineTo(v[0], v[1]);\n }\n }\n }\n this._doFillStrokeClose(closeShape);\n }\n }\n isCurve = false;\n isBezier = false;\n isQuadratic = false;\n isContour = false;\n if (closeShape) {\n vertices.pop();\n }\n\n this._pixelsState._pixelsDirty = true;\n return this;\n};\n//////////////////////////////////////////////\n// SHAPE | Attributes\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.strokeCap = function(cap) {\n if (\n cap === constants.ROUND ||\n cap === constants.SQUARE ||\n cap === constants.PROJECT\n ) {\n this.drawingContext.lineCap = cap;\n }\n return this;\n};\n\np5.Renderer2D.prototype.strokeJoin = function(join) {\n if (\n join === constants.ROUND ||\n join === constants.BEVEL ||\n join === constants.MITER\n ) {\n this.drawingContext.lineJoin = join;\n }\n return this;\n};\n\np5.Renderer2D.prototype.strokeWeight = function(w) {\n if (typeof w === 'undefined' || w === 0) {\n // hack because lineWidth 0 doesn't work\n this.drawingContext.lineWidth = 0.0001;\n } else {\n this.drawingContext.lineWidth = w;\n }\n return this;\n};\n\np5.Renderer2D.prototype._getFill = function() {\n if (!this._cachedFillStyle) {\n this._cachedFillStyle = this.drawingContext.fillStyle;\n }\n return this._cachedFillStyle;\n};\n\np5.Renderer2D.prototype._setFill = function(fillStyle) {\n if (fillStyle !== this._cachedFillStyle) {\n this.drawingContext.fillStyle = fillStyle;\n this._cachedFillStyle = fillStyle;\n }\n};\n\np5.Renderer2D.prototype._getStroke = function() {\n if (!this._cachedStrokeStyle) {\n this._cachedStrokeStyle = this.drawingContext.strokeStyle;\n }\n return this._cachedStrokeStyle;\n};\n\np5.Renderer2D.prototype._setStroke = function(strokeStyle) {\n if (strokeStyle !== this._cachedStrokeStyle) {\n this.drawingContext.strokeStyle = strokeStyle;\n this._cachedStrokeStyle = strokeStyle;\n }\n};\n\n//////////////////////////////////////////////\n// SHAPE | Curves\n//////////////////////////////////////////////\np5.Renderer2D.prototype.bezier = function(x1, y1, x2, y2, x3, y3, x4, y4) {\n this._pInst.beginShape();\n this._pInst.vertex(x1, y1);\n this._pInst.bezierVertex(x2, y2, x3, y3, x4, y4);\n this._pInst.endShape();\n return this;\n};\n\np5.Renderer2D.prototype.curve = function(x1, y1, x2, y2, x3, y3, x4, y4) {\n this._pInst.beginShape();\n this._pInst.curveVertex(x1, y1);\n this._pInst.curveVertex(x2, y2);\n this._pInst.curveVertex(x3, y3);\n this._pInst.curveVertex(x4, y4);\n this._pInst.endShape();\n return this;\n};\n\n//////////////////////////////////////////////\n// SHAPE | Vertex\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype._doFillStrokeClose = function(closeShape) {\n if (closeShape) {\n this.drawingContext.closePath();\n }\n if (this._doFill) {\n this.drawingContext.fill();\n }\n if (this._doStroke) {\n this.drawingContext.stroke();\n }\n\n this._pixelsState._pixelsDirty = true;\n};\n\n//////////////////////////////////////////////\n// TRANSFORM\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.applyMatrix = function(a, b, c, d, e, f) {\n this.drawingContext.transform(a, b, c, d, e, f);\n};\n\np5.Renderer2D.prototype.resetMatrix = function() {\n this.drawingContext.setTransform(1, 0, 0, 1, 0, 0);\n this.drawingContext.scale(\n this._pInst._pixelDensity,\n this._pInst._pixelDensity\n );\n return this;\n};\n\np5.Renderer2D.prototype.rotate = function(rad) {\n this.drawingContext.rotate(rad);\n};\n\np5.Renderer2D.prototype.scale = function(x, y) {\n this.drawingContext.scale(x, y);\n return this;\n};\n\np5.Renderer2D.prototype.translate = function(x, y) {\n // support passing a vector as the 1st parameter\n if (x instanceof p5.Vector) {\n y = x.y;\n x = x.x;\n }\n this.drawingContext.translate(x, y);\n return this;\n};\n\n//////////////////////////////////////////////\n// TYPOGRAPHY\n//\n//////////////////////////////////////////////\n\np5.Renderer2D.prototype.text = function(str, x, y, maxWidth, maxHeight) {\n var baselineHacked;\n\n // baselineHacked: (HACK)\n // A temporary fix to conform to Processing's implementation\n // of BASELINE vertical alignment in a bounding box\n\n if (typeof maxWidth !== 'undefined' && typeof maxHeight !== 'undefined') {\n if (this.drawingContext.textBaseline === constants.BASELINE) {\n baselineHacked = true;\n this.drawingContext.textBaseline = constants.TOP;\n }\n }\n\n var p = p5.Renderer.prototype.text.apply(this, arguments);\n\n if (baselineHacked) {\n this.drawingContext.textBaseline = constants.BASELINE;\n }\n\n return p;\n};\n\np5.Renderer2D.prototype._renderText = function(p, line, x, y, maxY) {\n if (y >= maxY) {\n return; // don't render lines beyond our maxY position\n }\n\n p.push(); // fix to #803\n\n if (!this._isOpenType()) {\n // a system/browser font\n\n // no stroke unless specified by user\n if (this._doStroke && this._strokeSet) {\n this.drawingContext.strokeText(line, x, y);\n }\n\n if (this._doFill) {\n // if fill hasn't been set by user, use default text fill\n if (!this._fillSet) {\n this._setFill(constants._DEFAULT_TEXT_FILL);\n }\n\n this.drawingContext.fillText(line, x, y);\n }\n } else {\n // an opentype font, let it handle the rendering\n\n this._textFont._renderPath(line, x, y, { renderer: this });\n }\n\n p.pop();\n\n this._pixelsState._pixelsDirty = true;\n return p;\n};\n\np5.Renderer2D.prototype.textWidth = function(s) {\n if (this._isOpenType()) {\n return this._textFont._textWidth(s, this._textSize);\n }\n\n return this.drawingContext.measureText(s).width;\n};\n\np5.Renderer2D.prototype._applyTextProperties = function() {\n var font,\n p = this._pInst;\n\n this._setProperty('_textAscent', null);\n this._setProperty('_textDescent', null);\n\n font = this._textFont;\n\n if (this._isOpenType()) {\n font = this._textFont.font.familyName;\n this._setProperty('_textStyle', this._textFont.font.styleName);\n }\n\n this.drawingContext.font =\n (this._textStyle || 'normal') +\n ' ' +\n (this._textSize || 12) +\n 'px ' +\n (font || 'sans-serif');\n\n this.drawingContext.textAlign = this._textAlign;\n if (this._textBaseline === constants.CENTER) {\n this.drawingContext.textBaseline = constants._CTX_MIDDLE;\n } else {\n this.drawingContext.textBaseline = this._textBaseline;\n }\n\n return p;\n};\n\n//////////////////////////////////////////////\n// STRUCTURE\n//////////////////////////////////////////////\n\n// a push() operation is in progress.\n// the renderer should return a 'style' object that it wishes to\n// store on the push stack.\n// derived renderers should call the base class' push() method\n// to fetch the base style object.\np5.Renderer2D.prototype.push = function() {\n this.drawingContext.save();\n\n // get the base renderer style\n return p5.Renderer.prototype.push.apply(this);\n};\n\n// a pop() operation is in progress\n// the renderer is passed the 'style' object that it returned\n// from its push() method.\n// derived renderers should pass this object to their base\n// class' pop method\np5.Renderer2D.prototype.pop = function(style) {\n this.drawingContext.restore();\n // Re-cache the fill / stroke state\n this._cachedFillStyle = this.drawingContext.fillStyle;\n this._cachedStrokeStyle = this.drawingContext.strokeStyle;\n\n p5.Renderer.prototype.pop.call(this, style);\n};\n\nmodule.exports = p5.Renderer2D;\n\n},{\"../image/filters\":42,\"./constants\":18,\"./main\":24,\"./p5.Renderer\":27}],29:[function(_dereq_,module,exports){\n/**\n * @module Rendering\n * @submodule Rendering\n * @for p5\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\nvar constants = _dereq_('./constants');\n_dereq_('./p5.Graphics');\n_dereq_('./p5.Renderer2D');\n_dereq_('../webgl/p5.RendererGL');\nvar defaultId = 'defaultCanvas0'; // this gets set again in createCanvas\nvar defaultClass = 'p5Canvas';\n\n/**\n * Creates a canvas element in the document, and sets the dimensions of it\n * in pixels. This method should be called only once at the start of setup.\n * Calling createCanvas more than once in a sketch will result in very\n * unpredictable behavior. If you want more than one drawing canvas\n * you could use createGraphics (hidden by default but it can be shown).\n * \n * The system variables width and height are set by the parameters passed\n * to this function. If createCanvas() is not used, the window will be\n * given a default size of 100x100 pixels.\n * \n * For more ways to position the canvas, see the\n * \n * positioning the canvas wiki page.\n *\n * @method createCanvas\n * @param {Number} w width of the canvas\n * @param {Number} h height of the canvas\n * @param {Constant} [renderer] either P2D or WEBGL\n * @return {p5.Renderer}\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 50);\n * background(153);\n * line(0, 0, width, height);\n * }\n * \n * \n *\n * @alt\n * Black line extending from top-left of canvas to bottom right.\n *\n */\n\np5.prototype.createCanvas = function(w, h, renderer) {\n p5._validateParameters('createCanvas', arguments);\n //optional: renderer, otherwise defaults to p2d\n var r = renderer || constants.P2D;\n var c;\n\n if (r === constants.WEBGL) {\n c = document.getElementById(defaultId);\n if (c) {\n //if defaultCanvas already exists\n c.parentNode.removeChild(c); //replace the existing defaultCanvas\n var thisRenderer = this._renderer;\n this._elements = this._elements.filter(function(e) {\n return e !== thisRenderer;\n });\n }\n c = document.createElement('canvas');\n c.id = defaultId;\n c.classList.add(defaultClass);\n } else {\n if (!this._defaultGraphicsCreated) {\n c = document.createElement('canvas');\n var i = 0;\n while (document.getElementById('defaultCanvas' + i)) {\n i++;\n }\n defaultId = 'defaultCanvas' + i;\n c.id = defaultId;\n c.classList.add(defaultClass);\n } else {\n // resize the default canvas if new one is created\n c = this.canvas;\n }\n }\n\n // set to invisible if still in setup (to prevent flashing with manipulate)\n if (!this._setupDone) {\n c.dataset.hidden = true; // tag to show later\n c.style.visibility = 'hidden';\n }\n\n if (this._userNode) {\n // user input node case\n this._userNode.appendChild(c);\n } else {\n document.body.appendChild(c);\n }\n\n // Init our graphics renderer\n //webgl mode\n if (r === constants.WEBGL) {\n this._setProperty('_renderer', new p5.RendererGL(c, this, true));\n this._elements.push(this._renderer);\n } else {\n //P2D mode\n if (!this._defaultGraphicsCreated) {\n this._setProperty('_renderer', new p5.Renderer2D(c, this, true));\n this._defaultGraphicsCreated = true;\n this._elements.push(this._renderer);\n }\n }\n this._renderer.resize(w, h);\n this._renderer._applyDefaults();\n return this._renderer;\n};\n\n/**\n * Resizes the canvas to given width and height. The canvas will be cleared\n * and draw will be called immediately, allowing the sketch to re-render itself\n * in the resized canvas.\n * @method resizeCanvas\n * @param {Number} w width of the canvas\n * @param {Number} h height of the canvas\n * @param {Boolean} [noRedraw] don't redraw the canvas immediately\n * @example\n * \n * function setup() {\n * createCanvas(windowWidth, windowHeight);\n * }\n *\n * function draw() {\n * background(0, 100, 200);\n * }\n *\n * function windowResized() {\n * resizeCanvas(windowWidth, windowHeight);\n * }\n * \n *\n * @alt\n * No image displayed.\n *\n */\np5.prototype.resizeCanvas = function(w, h, noRedraw) {\n p5._validateParameters('resizeCanvas', arguments);\n if (this._renderer) {\n // save canvas properties\n var props = {};\n for (var key in this.drawingContext) {\n var val = this.drawingContext[key];\n if (typeof val !== 'object' && typeof val !== 'function') {\n props[key] = val;\n }\n }\n this._renderer.resize(w, h);\n this.width = w;\n this.height = h;\n // reset canvas properties\n for (var savedKey in props) {\n try {\n this.drawingContext[savedKey] = props[savedKey];\n } catch (err) {\n // ignore read-only property errors\n }\n }\n if (!noRedraw) {\n this.redraw();\n }\n }\n};\n\n/**\n * Removes the default canvas for a p5 sketch that doesn't\n * require a canvas\n * @method noCanvas\n * @example\n * \n * \n * function setup() {\n * noCanvas();\n * }\n * \n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.noCanvas = function() {\n if (this.canvas) {\n this.canvas.parentNode.removeChild(this.canvas);\n }\n};\n\n/**\n * Creates and returns a new p5.Renderer object. Use this class if you need\n * to draw into an off-screen graphics buffer. The two parameters define the\n * width and height in pixels.\n *\n * @method createGraphics\n * @param {Number} w width of the offscreen graphics buffer\n * @param {Number} h height of the offscreen graphics buffer\n * @param {Constant} [renderer] either P2D or WEBGL\n * undefined defaults to p2d\n * @return {p5.Graphics} offscreen graphics buffer\n * @example\n * \n * \n * let pg;\n * function setup() {\n * createCanvas(100, 100);\n * pg = createGraphics(100, 100);\n * }\n * function draw() {\n * background(200);\n * pg.background(100);\n * pg.noStroke();\n * pg.ellipse(pg.width / 2, pg.height / 2, 50, 50);\n * image(pg, 50, 50);\n * image(pg, 0, 0, 50, 50);\n * }\n * \n * \n *\n * @alt\n * 4 grey squares alternating light and dark grey. White quarter circle mid-left.\n *\n */\np5.prototype.createGraphics = function(w, h, renderer) {\n p5._validateParameters('createGraphics', arguments);\n return new p5.Graphics(w, h, renderer, this);\n};\n\n/**\n * Blends the pixels in the display window according to the defined mode.\n * There is a choice of the following modes to blend the source pixels (A)\n * with the ones of pixels already in the display window (B):\n * \n * BLEND - linear interpolation of colours: C =\n * A\\*factor + B. This is the default blending mode.\n * ADD - sum of A and B\n * DARKEST - only the darkest colour succeeds: C =\n * min(A\\*factor, B).\n * LIGHTEST - only the lightest colour succeeds: C =\n * max(A\\*factor, B).\n * DIFFERENCE - subtract colors from underlying image.\n * EXCLUSION - similar to DIFFERENCE, but less\n * extreme.\n * MULTIPLY - multiply the colors, result will always be\n * darker.\n * SCREEN - opposite multiply, uses inverse values of the\n * colors.\n * REPLACE - the pixels entirely replace the others and\n * don't utilize alpha (transparency) values.\n * OVERLAY - mix of MULTIPLY and SCREEN\n * . Multiplies dark values, and screens light values. (2D)\n * HARD_LIGHT - SCREEN when greater than 50%\n * gray, MULTIPLY when lower. (2D)\n * SOFT_LIGHT - mix of DARKEST and\n * LIGHTEST. Works like OVERLAY, but not as harsh. (2D)\n * \n * DODGE - lightens light tones and increases contrast,\n * ignores darks. (2D)\n * BURN - darker areas are applied, increasing contrast,\n * ignores lights. (2D)\n * SUBTRACT - remainder of A and B (3D)\n * \n * \n * (2D) indicates that this blend mode only works in the 2D renderer.\n * (3D) indicates that this blend mode only works in the WEBGL renderer.\n *\n *\n * @method blendMode\n * @param {Constant} mode blend mode to set for canvas.\n * either BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\n * EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n * SOFT_LIGHT, DODGE, BURN, ADD, or SUBTRACT\n * @example\n * \n * \n * blendMode(LIGHTEST);\n * strokeWeight(30);\n * stroke(80, 150, 255);\n * line(25, 25, 75, 75);\n * stroke(255, 50, 50);\n * line(75, 25, 25, 75);\n * \n * \n * \n * \n * blendMode(MULTIPLY);\n * strokeWeight(30);\n * stroke(80, 150, 255);\n * line(25, 25, 75, 75);\n * stroke(255, 50, 50);\n * line(75, 25, 25, 75);\n * \n * \n * @alt\n * translucent image thick red & blue diagonal rounded lines intersecting center\n * Thick red & blue diagonal rounded lines intersecting center. dark at overlap\n *\n */\np5.prototype.blendMode = function(mode) {\n p5._validateParameters('blendMode', arguments);\n if (mode === constants.NORMAL) {\n // Warning added 3/26/19, can be deleted in future (1.0 release?)\n console.warn(\n 'NORMAL has been deprecated for use in blendMode. defaulting to BLEND instead.'\n );\n mode = constants.BLEND;\n }\n this._renderer.blendMode(mode);\n};\n\nmodule.exports = p5;\n\n},{\"../webgl/p5.RendererGL\":74,\"./constants\":18,\"./main\":24,\"./p5.Graphics\":26,\"./p5.Renderer2D\":28}],30:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule 2D Primitives\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../main');\nvar constants = _dereq_('../constants');\nvar canvas = _dereq_('../helpers');\n_dereq_('../error_helpers');\n\n/**\n * This function does 3 things:\n *\n * 1. Bounds the desired start/stop angles for an arc (in radians) so that:\n *\n * 0 <= start < TWO_PI ; start <= stop < start + TWO_PI\n *\n * This means that the arc rendering functions don't have to be concerned\n * with what happens if stop is smaller than start, or if the arc 'goes\n * round more than once', etc.: they can just start at start and increase\n * until stop and the correct arc will be drawn.\n *\n * 2. Optionally adjusts the angles within each quadrant to counter the naive\n * scaling of the underlying ellipse up from the unit circle. Without\n * this, the angles become arbitrary when width != height: 45 degrees\n * might be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on\n * a 'tall' ellipse.\n *\n * 3. Flags up when start and stop correspond to the same place on the\n * underlying ellipse. This is useful if you want to do something special\n * there (like rendering a whole ellipse instead).\n */\np5.prototype._normalizeArcAngles = function(\n start,\n stop,\n width,\n height,\n correctForScaling\n) {\n var epsilon = 0.00001; // Smallest visible angle on displays up to 4K.\n var separation;\n\n // The order of the steps is important here: each one builds upon the\n // adjustments made in the steps that precede it.\n\n // Constrain both start and stop to [0,TWO_PI).\n start = start - constants.TWO_PI * Math.floor(start / constants.TWO_PI);\n stop = stop - constants.TWO_PI * Math.floor(stop / constants.TWO_PI);\n\n // Get the angular separation between the requested start and stop points.\n //\n // Technically this separation only matches what gets drawn if\n // correctForScaling is enabled. We could add a more complicated calculation\n // for when the scaling is uncorrected (in which case the drawn points could\n // end up pushed together or pulled apart quite dramatically relative to what\n // was requested), but it would make things more opaque for little practical\n // benefit.\n //\n // (If you do disable correctForScaling and find that correspondToSamePoint\n // is set too aggressively, the easiest thing to do is probably to just make\n // epsilon smaller...)\n separation = Math.min(\n Math.abs(start - stop),\n constants.TWO_PI - Math.abs(start - stop)\n );\n\n // Optionally adjust the angles to counter linear scaling.\n if (correctForScaling) {\n if (start <= constants.HALF_PI) {\n start = Math.atan(width / height * Math.tan(start));\n } else if (start > constants.HALF_PI && start <= 3 * constants.HALF_PI) {\n start = Math.atan(width / height * Math.tan(start)) + constants.PI;\n } else {\n start = Math.atan(width / height * Math.tan(start)) + constants.TWO_PI;\n }\n if (stop <= constants.HALF_PI) {\n stop = Math.atan(width / height * Math.tan(stop));\n } else if (stop > constants.HALF_PI && stop <= 3 * constants.HALF_PI) {\n stop = Math.atan(width / height * Math.tan(stop)) + constants.PI;\n } else {\n stop = Math.atan(width / height * Math.tan(stop)) + constants.TWO_PI;\n }\n }\n\n // Ensure that start <= stop < start + TWO_PI.\n if (start > stop) {\n stop += constants.TWO_PI;\n }\n\n return {\n start: start,\n stop: stop,\n correspondToSamePoint: separation < epsilon\n };\n};\n\n/**\n * Draw an arc to the screen. If called with only x, y, w, h, start, and\n * stop, the arc will be drawn and filled as an open pie segment. If a mode parameter is provided, the arc\n * will be filled like an open semi-circle (OPEN) , a closed semi-circle (CHORD), or as a closed pie segment (PIE). The\n * origin may be changed with the ellipseMode() function.\n * The arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.\n * Adding or subtracting TWO_PI to either angle does not change where they fall.\n * If both start and stop fall at the same place, a full ellipse will be drawn.\n *\n * @method arc\n * @param {Number} x x-coordinate of the arc's ellipse\n * @param {Number} y y-coordinate of the arc's ellipse\n * @param {Number} w width of the arc's ellipse by default\n * @param {Number} h height of the arc's ellipse by default\n * @param {Number} start angle to start the arc, specified in radians\n * @param {Number} stop angle to stop the arc, specified in radians\n * @param {Constant} [mode] optional parameter to determine the way of drawing\n * the arc. either CHORD, PIE or OPEN\n * @param {Number} [detail] optional parameter for WebGL mode only. This is to\n * specify the number of vertices that makes up the\n * perimeter of the arc. Default value is 25.\n *\n * @chainable\n * @example\n * \n * \n * arc(50, 55, 50, 50, 0, HALF_PI);\n * noFill();\n * arc(50, 55, 60, 60, HALF_PI, PI);\n * arc(50, 55, 70, 70, PI, PI + QUARTER_PI);\n * arc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\n * \n * \n *\n * \n * \n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI);\n * \n * \n *\n * \n * \n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\n * \n * \n *\n * \n * \n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\n * \n * \n *\n * \n * \n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\n * \n * \n *\n * @alt\n *shattered outline of an ellipse with a quarter of a white circle bottom-right.\n *white ellipse with top right quarter missing.\n *white ellipse with black outline with top right missing.\n *white ellipse with top right missing with black outline around shape.\n *white ellipse with top right quarter missing with black outline around the shape.\n *\n */\np5.prototype.arc = function(x, y, w, h, start, stop, mode, detail) {\n p5._validateParameters('arc', arguments);\n\n // if the current stroke and fill settings wouldn't result in something\n // visible, exit immediately\n if (!this._renderer._doStroke && !this._renderer._doFill) {\n return this;\n }\n\n start = this._toRadians(start);\n stop = this._toRadians(stop);\n\n // p5 supports negative width and heights for ellipses\n w = Math.abs(w);\n h = Math.abs(h);\n\n var vals = canvas.modeAdjust(x, y, w, h, this._renderer._ellipseMode);\n var angles = this._normalizeArcAngles(start, stop, vals.w, vals.h, true);\n\n if (angles.correspondToSamePoint) {\n // If the arc starts and ends at (near enough) the same place, we choose to\n // draw an ellipse instead. This is preferable to faking an ellipse (by\n // making stop ever-so-slightly less than start + TWO_PI) because the ends\n // join up to each other rather than at a vertex at the centre (leaving\n // an unwanted spike in the stroke/fill).\n this._renderer.ellipse([vals.x, vals.y, vals.w, vals.h, detail]);\n } else {\n this._renderer.arc(\n vals.x,\n vals.y,\n vals.w,\n vals.h,\n angles.start, // [0, TWO_PI)\n angles.stop, // [start, start + TWO_PI)\n mode,\n detail\n );\n }\n\n return this;\n};\n\n/**\n * Draws an ellipse (oval) to the screen. An ellipse with equal width and\n * height is a circle. By default, the first two parameters set the location,\n * and the third and fourth parameters set the shape's width and height. If\n * no height is specified, the value of width is used for both the width and\n * height. If a negative height or width is specified, the absolute value is taken.\n * The origin may be changed with the ellipseMode() function.\n *\n * @method ellipse\n * @param {Number} x x-coordinate of the ellipse.\n * @param {Number} y y-coordinate of the ellipse.\n * @param {Number} w width of the ellipse.\n * @param {Number} [h] height of the ellipse.\n * @chainable\n * @example\n * \n * \n * ellipse(56, 46, 55, 55);\n * \n * \n *\n * @alt\n *white ellipse with black outline in middle-right of canvas that is 55x55.\n *\n */\n/**\n * @method ellipse\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n * @param {Integer} detail number of radial sectors to draw (for WebGL mode)\n */\np5.prototype.ellipse = function(x, y, w, h, detailX) {\n p5._validateParameters('ellipse', arguments);\n\n // if the current stroke and fill settings wouldn't result in something\n // visible, exit immediately\n if (!this._renderer._doStroke && !this._renderer._doFill) {\n return this;\n }\n\n // p5 supports negative width and heights for rects\n if (w < 0) {\n w = Math.abs(w);\n }\n\n if (typeof h === 'undefined') {\n // Duplicate 3rd argument if only 3 given.\n h = w;\n } else if (h < 0) {\n h = Math.abs(h);\n }\n\n var vals = canvas.modeAdjust(x, y, w, h, this._renderer._ellipseMode);\n this._renderer.ellipse([vals.x, vals.y, vals.w, vals.h, detailX]);\n\n return this;\n};\n\n/**\n * Draws a circle to the screen. A circle is a simple closed shape.\n * It is the set of all points in a plane that are at a given distance from a given point, the centre.\n * This function is a special case of the ellipse() function, where the width and height of the ellipse are the same.\n * Height and width of the ellipse correspond to the diameter of the circle.\n * By default, the first two parameters set the location of the centre of the circle, the third sets the diameter of the circle.\n *\n * @method circle\n * @param {Number} x x-coordinate of the centre of the circle.\n * @param {Number} y y-coordinate of the centre of the circle.\n * @param {Number} d diameter of the circle.\n * @chainable\n * @example\n * \n * \n * // Draw a circle at location (30, 30) with a diameter of 20.\n * circle(30, 30, 20);\n * \n * \n *\n * @alt\n * white circle with black outline in mid of canvas that is 55x55.\n */\np5.prototype.circle = function() {\n var args = Array.prototype.slice.call(arguments, 0, 2);\n args.push(arguments[2]);\n args.push(arguments[2]);\n return this.ellipse.apply(this, args);\n};\n\n/**\n * Draws a line (a direct path between two points) to the screen. The version\n * of line() with four parameters draws the line in 2D. To color a line, use\n * the stroke() function. A line cannot be filled, therefore the fill()\n * function will not affect the color of a line. 2D lines are drawn with a\n * width of one pixel by default, but this can be changed with the\n * strokeWeight() function.\n *\n * @method line\n * @param {Number} x1 the x-coordinate of the first point\n * @param {Number} y1 the y-coordinate of the first point\n * @param {Number} x2 the x-coordinate of the second point\n * @param {Number} y2 the y-coordinate of the second point\n * @chainable\n * @example\n * \n * \n * line(30, 20, 85, 75);\n * \n * \n *\n * \n * \n * line(30, 20, 85, 20);\n * stroke(126);\n * line(85, 20, 85, 75);\n * stroke(255);\n * line(85, 75, 30, 75);\n * \n * \n *\n * @alt\n *line 78 pixels long running from mid-top to bottom-right of canvas.\n *3 lines of various stroke sizes. Form top, bottom and right sides of a square.\n *\n */\n/**\n * @method line\n * @param {Number} x1\n * @param {Number} y1\n * @param {Number} z1 the z-coordinate of the first point\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 the z-coordinate of the second point\n * @chainable\n */\np5.prototype.line = function() {\n p5._validateParameters('line', arguments);\n\n if (this._renderer._doStroke) {\n this._renderer.line.apply(this._renderer, arguments);\n }\n\n return this;\n};\n\n/**\n * Draws a point, a coordinate in space at the dimension of one pixel.\n * The first parameter is the horizontal value for the point, the second\n * value is the vertical value for the point. The color of the point is\n * determined by the current stroke.\n *\n * @method point\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @param {Number} [z] the z-coordinate (for WebGL mode)\n * @chainable\n * @example\n * \n * \n * point(30, 20);\n * point(85, 20);\n * point(85, 75);\n * point(30, 75);\n * \n * \n *\n * @alt\n *4 points centered in the middle-right of the canvas.\n *\n */\np5.prototype.point = function() {\n p5._validateParameters('point', arguments);\n\n if (this._renderer._doStroke) {\n this._renderer.point.apply(this._renderer, arguments);\n }\n\n return this;\n};\n\n/**\n * Draw a quad. A quad is a quadrilateral, a four sided polygon. It is\n * similar to a rectangle, but the angles between its edges are not\n * constrained to ninety degrees. The first pair of parameters (x1,y1)\n * sets the first vertex and the subsequent pairs should proceed\n * clockwise or counter-clockwise around the defined shape.\n * z-arguments only work when quad() is used in WEBGL mode.\n *\n *\n * @method quad\n * @param {Number} x1 the x-coordinate of the first point\n * @param {Number} y1 the y-coordinate of the first point\n * @param {Number} x2 the x-coordinate of the second point\n * @param {Number} y2 the y-coordinate of the second point\n * @param {Number} x3 the x-coordinate of the third point\n * @param {Number} y3 the y-coordinate of the third point\n * @param {Number} x4 the x-coordinate of the fourth point\n * @param {Number} y4 the y-coordinate of the fourth point\n * @chainable\n * @example\n * \n * \n * quad(38, 31, 86, 20, 69, 63, 30, 76);\n * \n * \n *\n * @alt\n *irregular white quadrilateral shape with black outline mid-right of canvas.\n *\n */\n/**\n * @method quad\n * @param {Number} x1\n * @param {Number} y1\n * @param {Number} z1 the z-coordinate of the first point\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 the z-coordinate of the second point\n * @param {Number} x3\n * @param {Number} y3\n * @param {Number} z3 the z-coordinate of the third point\n * @param {Number} x4\n * @param {Number} y4\n * @param {Number} z4 the z-coordinate of the fourth point\n * @chainable\n */\np5.prototype.quad = function() {\n p5._validateParameters('quad', arguments);\n\n if (this._renderer._doStroke || this._renderer._doFill) {\n if (this._renderer.isP3D && arguments.length !== 12) {\n // if 3D and we weren't passed 12 args, assume Z is 0\n // prettier-ignore\n this._renderer.quad.call(\n this._renderer,\n arguments[0], arguments[1], 0,\n arguments[2], arguments[3], 0,\n arguments[4], arguments[5], 0,\n arguments[6], arguments[7], 0);\n } else {\n this._renderer.quad.apply(this._renderer, arguments);\n }\n }\n\n return this;\n};\n\n/**\n * Draws a rectangle to the screen. A rectangle is a four-sided shape with\n * every angle at ninety degrees. By default, the first two parameters set\n * the location of the upper-left corner, the third sets the width, and the\n * fourth sets the height. The way these parameters are interpreted, however,\n * may be changed with the rectMode() function.\n * \n * The fifth, sixth, seventh and eighth parameters, if specified,\n * determine corner radius for the top-left, top-right, lower-right and\n * lower-left corners, respectively. An omitted corner radius parameter is set\n * to the value of the previously specified radius value in the parameter list.\n *\n * @method rect\n * @param {Number} x x-coordinate of the rectangle.\n * @param {Number} y y-coordinate of the rectangle.\n * @param {Number} w width of the rectangle.\n * @param {Number} h height of the rectangle.\n * @param {Number} [tl] optional radius of top-left corner.\n * @param {Number} [tr] optional radius of top-right corner.\n * @param {Number} [br] optional radius of bottom-right corner.\n * @param {Number} [bl] optional radius of bottom-left corner.\n * @chainable\n * @example\n * \n * \n * // Draw a rectangle at location (30, 20) with a width and height of 55.\n * rect(30, 20, 55, 55);\n * \n * \n *\n * \n * \n * // Draw a rectangle with rounded corners, each having a radius of 20.\n * rect(30, 20, 55, 55, 20);\n * \n * \n *\n * \n * \n * // Draw a rectangle with rounded corners having the following radii:\n * // top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\n * rect(30, 20, 55, 55, 20, 15, 10, 5);\n * \n * \n *\n * @alt\n * 55x55 white rect with black outline in mid-right of canvas.\n * 55x55 white rect with black outline and rounded edges in mid-right of canvas.\n * 55x55 white rect with black outline and rounded edges of different radii.\n */\n/**\n * @method rect\n * @param {Number} x\n * @param {Number} y\n * @param {Number} w\n * @param {Number} h\n * @param {Integer} [detailX] number of segments in the x-direction (for WebGL mode)\n * @param {Integer} [detailY] number of segments in the y-direction (for WebGL mode)\n * @chainable\n */\np5.prototype.rect = function() {\n p5._validateParameters('rect', arguments);\n\n if (this._renderer._doStroke || this._renderer._doFill) {\n var vals = canvas.modeAdjust(\n arguments[0],\n arguments[1],\n arguments[2],\n arguments[3],\n this._renderer._rectMode\n );\n var args = [vals.x, vals.y, vals.w, vals.h];\n // append the additional arguments (either cornder radii, or\n // segment details) to the argument list\n for (var i = 4; i < arguments.length; i++) {\n args[i] = arguments[i];\n }\n this._renderer.rect(args);\n }\n\n return this;\n};\n\n/**\n * Draws a square to the screen. A square is a four-sided shape with\n * every angle at ninety degrees, and equal side size.\n * This function is a special case of the rect() function, where the width and height are the same, and the parameter is called \"s\" for side size.\n * By default, the first two parameters set the location of the upper-left corner, the third sets the side size of the square.\n * The way these parameters are interpreted, however,\n * may be changed with the rectMode() function.\n * \n * The fourth, fifth, sixth and seventh parameters, if specified,\n * determine corner radius for the top-left, top-right, lower-right and\n * lower-left corners, respectively. An omitted corner radius parameter is set\n * to the value of the previously specified radius value in the parameter list.\n *\n * @method square\n * @param {Number} x x-coordinate of the square.\n * @param {Number} y y-coordinate of the square.\n * @param {Number} s side size of the square.\n * @param {Number} [tl] optional radius of top-left corner.\n * @param {Number} [tr] optional radius of top-right corner.\n * @param {Number} [br] optional radius of bottom-right corner.\n * @param {Number} [bl] optional radius of bottom-left corner.\n * @chainable\n * @example\n * \n * \n * // Draw a square at location (30, 20) with a side size of 55.\n * square(30, 20, 55);\n * \n * \n *\n * \n * \n * // Draw a square with rounded corners, each having a radius of 20.\n * square(30, 20, 55, 20);\n * \n * \n *\n * \n * \n * // Draw a square with rounded corners having the following radii:\n * // top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\n * square(30, 20, 55, 20, 15, 10, 5);\n * \n * \n *\n * @alt\n * 55x55 white square with black outline in mid-right of canvas.\n * 55x55 white square with black outline and rounded edges in mid-right of canvas.\n * 55x55 white square with black outline and rounded edges of different radii.\n */\np5.prototype.square = function(x, y, s, tl, tr, br, bl) {\n return this.rect(x, y, s, s, tl, tr, br, bl);\n};\n\n/**\n * A triangle is a plane created by connecting three points. The first two\n * arguments specify the first point, the middle two arguments specify the\n * second point, and the last two arguments specify the third point.\n *\n * @method triangle\n * @param {Number} x1 x-coordinate of the first point\n * @param {Number} y1 y-coordinate of the first point\n * @param {Number} x2 x-coordinate of the second point\n * @param {Number} y2 y-coordinate of the second point\n * @param {Number} x3 x-coordinate of the third point\n * @param {Number} y3 y-coordinate of the third point\n * @chainable\n * @example\n * \n * \n * triangle(30, 75, 58, 20, 86, 75);\n * \n * \n *\n *@alt\n * white triangle with black outline in mid-right of canvas.\n *\n */\np5.prototype.triangle = function() {\n p5._validateParameters('triangle', arguments);\n\n if (this._renderer._doStroke || this._renderer._doFill) {\n this._renderer.triangle(arguments);\n }\n\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"../constants\":18,\"../error_helpers\":20,\"../helpers\":21,\"../main\":24}],31:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule Attributes\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../main');\nvar constants = _dereq_('../constants');\n\n/**\n * Modifies the location from which ellipses are drawn by changing the way\n * in which parameters given to ellipse() are interpreted.\n * \n * The default mode is ellipseMode(CENTER), which interprets the first two\n * parameters of ellipse() as the shape's center point, while the third and\n * fourth parameters are its width and height.\n * \n * ellipseMode(RADIUS) also uses the first two parameters of ellipse() as\n * the shape's center point, but uses the third and fourth parameters to\n * specify half of the shapes's width and height.\n * \n * ellipseMode(CORNER) interprets the first two parameters of ellipse() as\n * the upper-left corner of the shape, while the third and fourth parameters\n * are its width and height.\n * \n * ellipseMode(CORNERS) interprets the first two parameters of ellipse() as\n * the location of one corner of the ellipse's bounding box, and the third\n * and fourth parameters as the location of the opposite corner.\n * \n * The parameter must be written in ALL CAPS because Javascript is a\n * case-sensitive language.\n *\n * @method ellipseMode\n * @param {Constant} mode either CENTER, RADIUS, CORNER, or CORNERS\n * @chainable\n * @example\n * \n * \n * ellipseMode(RADIUS); // Set ellipseMode to RADIUS\n * fill(255); // Set fill to white\n * ellipse(50, 50, 30, 30); // Draw white ellipse using RADIUS mode\n *\n * ellipseMode(CENTER); // Set ellipseMode to CENTER\n * fill(100); // Set fill to gray\n * ellipse(50, 50, 30, 30); // Draw gray ellipse using CENTER mode\n * \n * \n *\n * \n * \n * ellipseMode(CORNER); // Set ellipseMode is CORNER\n * fill(255); // Set fill to white\n * ellipse(25, 25, 50, 50); // Draw white ellipse using CORNER mode\n *\n * ellipseMode(CORNERS); // Set ellipseMode to CORNERS\n * fill(100); // Set fill to gray\n * ellipse(25, 25, 50, 50); // Draw gray ellipse using CORNERS mode\n * \n * \n *\n * @alt\n * 60x60 white ellipse and 30x30 grey ellipse with black outlines at center.\n * 60x60 white ellipse @center and 30x30 grey ellipse top-right, black outlines.\n *\n */\np5.prototype.ellipseMode = function(m) {\n p5._validateParameters('ellipseMode', arguments);\n if (\n m === constants.CORNER ||\n m === constants.CORNERS ||\n m === constants.RADIUS ||\n m === constants.CENTER\n ) {\n this._renderer._ellipseMode = m;\n }\n return this;\n};\n\n/**\n * Draws all geometry with jagged (aliased) edges. Note that smooth() is\n * active by default in 2D mode, so it is necessary to call noSmooth() to disable\n * smoothing of geometry, images, and fonts. In 3D mode, noSmooth() is enabled\n * by default, so it is necessary to call smooth() if you would like\n * smooth (antialiased) edges on your geometry.\n *\n * @method noSmooth\n * @chainable\n * @example\n * \n * \n * background(0);\n * noStroke();\n * smooth();\n * ellipse(30, 48, 36, 36);\n * noSmooth();\n * ellipse(70, 48, 36, 36);\n * \n * \n *\n * @alt\n * 2 pixelated 36x36 white ellipses to left & right of center, black background\n *\n */\np5.prototype.noSmooth = function() {\n this.setAttributes('antialias', false);\n if ('imageSmoothingEnabled' in this.drawingContext) {\n this.drawingContext.imageSmoothingEnabled = false;\n }\n return this;\n};\n\n/**\n * Modifies the location from which rectangles are drawn by changing the way\n * in which parameters given to rect() are interpreted.\n * \n * The default mode is rectMode(CORNER), which interprets the first two\n * parameters of rect() as the upper-left corner of the shape, while the\n * third and fourth parameters are its width and height.\n * \n * rectMode(CORNERS) interprets the first two parameters of rect() as the\n * location of one corner, and the third and fourth parameters as the\n * location of the opposite corner.\n * \n * rectMode(CENTER) interprets the first two parameters of rect() as the\n * shape's center point, while the third and fourth parameters are its\n * width and height.\n * \n * rectMode(RADIUS) also uses the first two parameters of rect() as the\n * shape's center point, but uses the third and fourth parameters to specify\n * half of the shapes's width and height.\n * \n * The parameter must be written in ALL CAPS because Javascript is a\n * case-sensitive language.\n *\n * @method rectMode\n * @param {Constant} mode either CORNER, CORNERS, CENTER, or RADIUS\n * @chainable\n * @example\n * \n * \n * rectMode(CORNER); // Default rectMode is CORNER\n * fill(255); // Set fill to white\n * rect(25, 25, 50, 50); // Draw white rect using CORNER mode\n *\n * rectMode(CORNERS); // Set rectMode to CORNERS\n * fill(100); // Set fill to gray\n * rect(25, 25, 50, 50); // Draw gray rect using CORNERS mode\n * \n * \n *\n * \n * \n * rectMode(RADIUS); // Set rectMode to RADIUS\n * fill(255); // Set fill to white\n * rect(50, 50, 30, 30); // Draw white rect using RADIUS mode\n *\n * rectMode(CENTER); // Set rectMode to CENTER\n * fill(100); // Set fill to gray\n * rect(50, 50, 30, 30); // Draw gray rect using CENTER mode\n * \n * \n *\n * @alt\n * 50x50 white rect at center and 25x25 grey rect in the top left of the other.\n * 50x50 white rect at center and 25x25 grey rect in the center of the other.\n *\n */\np5.prototype.rectMode = function(m) {\n p5._validateParameters('rectMode', arguments);\n if (\n m === constants.CORNER ||\n m === constants.CORNERS ||\n m === constants.RADIUS ||\n m === constants.CENTER\n ) {\n this._renderer._rectMode = m;\n }\n return this;\n};\n\n/**\n * Draws all geometry with smooth (anti-aliased) edges. smooth() will also\n * improve image quality of resized images. Note that smooth() is active by\n * default in 2D mode; noSmooth() can be used to disable smoothing of geometry,\n * images, and fonts. In 3D mode, noSmooth() is enabled\n * by default, so it is necessary to call smooth() if you would like\n * smooth (antialiased) edges on your geometry.\n *\n * @method smooth\n * @chainable\n * @example\n * \n * \n * background(0);\n * noStroke();\n * smooth();\n * ellipse(30, 48, 36, 36);\n * noSmooth();\n * ellipse(70, 48, 36, 36);\n * \n * \n *\n * @alt\n * 2 pixelated 36x36 white ellipses one left one right of center. On black.\n *\n */\np5.prototype.smooth = function() {\n this.setAttributes('antialias', true);\n if ('imageSmoothingEnabled' in this.drawingContext) {\n this.drawingContext.imageSmoothingEnabled = true;\n }\n return this;\n};\n\n/**\n * Sets the style for rendering line endings. These ends are either squared,\n * extended, or rounded, each of which specified with the corresponding\n * parameters: SQUARE, PROJECT, and ROUND. The default cap is ROUND.\n *\n * @method strokeCap\n * @param {Constant} cap either SQUARE, PROJECT, or ROUND\n * @chainable\n * @example\n * \n * \n * strokeWeight(12.0);\n * strokeCap(ROUND);\n * line(20, 30, 80, 30);\n * strokeCap(SQUARE);\n * line(20, 50, 80, 50);\n * strokeCap(PROJECT);\n * line(20, 70, 80, 70);\n * \n * \n *\n * @alt\n * 3 lines. Top line: rounded ends, mid: squared, bottom:longer squared ends.\n *\n */\np5.prototype.strokeCap = function(cap) {\n p5._validateParameters('strokeCap', arguments);\n if (\n cap === constants.ROUND ||\n cap === constants.SQUARE ||\n cap === constants.PROJECT\n ) {\n this._renderer.strokeCap(cap);\n }\n return this;\n};\n\n/**\n * Sets the style of the joints which connect line segments. These joints\n * are either mitered, beveled, or rounded and specified with the\n * corresponding parameters MITER, BEVEL, and ROUND. The default joint is\n * MITER.\n *\n * @method strokeJoin\n * @param {Constant} join either MITER, BEVEL, ROUND\n * @chainable\n * @example\n * \n * \n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(MITER);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n * \n * \n *\n * \n * \n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(BEVEL);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n * \n * \n *\n * \n * \n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(ROUND);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n * \n * \n *\n * @alt\n * Right-facing arrowhead shape with pointed tip in center of canvas.\n * Right-facing arrowhead shape with flat tip in center of canvas.\n * Right-facing arrowhead shape with rounded tip in center of canvas.\n *\n */\np5.prototype.strokeJoin = function(join) {\n p5._validateParameters('strokeJoin', arguments);\n if (\n join === constants.ROUND ||\n join === constants.BEVEL ||\n join === constants.MITER\n ) {\n this._renderer.strokeJoin(join);\n }\n return this;\n};\n\n/**\n * Sets the width of the stroke used for lines, points, and the border\n * around shapes. All widths are set in units of pixels.\n *\n * @method strokeWeight\n * @param {Number} weight the weight (in pixels) of the stroke\n * @chainable\n * @example\n * \n * \n * strokeWeight(1); // Default\n * line(20, 20, 80, 20);\n * strokeWeight(4); // Thicker\n * line(20, 40, 80, 40);\n * strokeWeight(10); // Beastly\n * line(20, 70, 80, 70);\n * \n * \n *\n * @alt\n * 3 horizontal black lines. Top line: thin, mid: medium, bottom:thick.\n *\n */\np5.prototype.strokeWeight = function(w) {\n p5._validateParameters('strokeWeight', arguments);\n this._renderer.strokeWeight(w);\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"../constants\":18,\"../main\":24}],32:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule Curves\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../main');\n_dereq_('../error_helpers');\n\n/**\n * Draws a cubic Bezier curve on the screen. These curves are defined by a\n * series of anchor and control points. The first two parameters specify\n * the first anchor point and the last two parameters specify the other\n * anchor point, which become the first and last points on the curve. The\n * middle parameters specify the two control points which define the shape\n * of the curve. Approximately speaking, control points \"pull\" the curve\n * towards them.Bezier curves were developed by French\n * automotive engineer Pierre Bezier, and are commonly used in computer\n * graphics to define gently sloping curves. See also curve().\n *\n * @method bezier\n * @param {Number} x1 x-coordinate for the first anchor point\n * @param {Number} y1 y-coordinate for the first anchor point\n * @param {Number} x2 x-coordinate for the first control point\n * @param {Number} y2 y-coordinate for the first control point\n * @param {Number} x3 x-coordinate for the second control point\n * @param {Number} y3 y-coordinate for the second control point\n * @param {Number} x4 x-coordinate for the second anchor point\n * @param {Number} y4 y-coordinate for the second anchor point\n * @chainable\n * @example\n * \n * \n * noFill();\n * stroke(255, 102, 0);\n * line(85, 20, 10, 10);\n * line(90, 90, 15, 80);\n * stroke(0, 0, 0);\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n * \n * \n *\n * \n * \n * background(0, 0, 0);\n * noFill();\n * stroke(255);\n * bezier(250, 250, 0, 100, 100, 0, 100, 0, 0, 0, 100, 0);\n * \n * \n *\n * @alt\n * stretched black s-shape in center with orange lines extending from end points.\n * stretched black s-shape with 10 5x5 white ellipses along the shape.\n * stretched black s-shape with 7 5x5 ellipses and orange lines along the shape.\n * stretched black s-shape with 17 small orange lines extending from under shape.\n * horseshoe shape with orange ends facing left and black curved center.\n * horseshoe shape with orange ends facing left and black curved center.\n * Line shaped like right-facing arrow,points move with mouse-x and warp shape.\n * horizontal line that hooks downward on the right and 13 5x5 ellipses along it.\n * right curving line mid-right of canvas with 7 short lines radiating from it.\n */\n/**\n * @method bezier\n * @param {Number} x1\n * @param {Number} y1\n * @param {Number} z1 z-coordinate for the first anchor point\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 z-coordinate for the first control point\n * @param {Number} x3\n * @param {Number} y3\n * @param {Number} z3 z-coordinate for the second control point\n * @param {Number} x4\n * @param {Number} y4\n * @param {Number} z4 z-coordinate for the second anchor point\n * @chainable\n */\np5.prototype.bezier = function() {\n p5._validateParameters('bezier', arguments);\n\n // if the current stroke and fill settings wouldn't result in something\n // visible, exit immediately\n if (!this._renderer._doStroke && !this._renderer._doFill) {\n return this;\n }\n\n this._renderer.bezier.apply(this._renderer, arguments);\n\n return this;\n};\n\n/**\n * Sets the resolution at which Beziers display.\n *\n * The default value is 20.\n *\n * This function is only useful when using the WEBGL renderer\n * as the default canvas renderer does not use this information.\n *\n * @method bezierDetail\n * @param {Number} detail resolution of the curves\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noFill();\n *\n * bezierDetail(5);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // prettier-ignore\n * bezier(-40, -40, 0,\n * 90, -40, 0,\n * -90, 40, 0,\n * 40, 40, 0);\n * }\n * \n * \n *\n * @alt\n * stretched black s-shape with a low level of bezier detail\n *\n */\np5.prototype.bezierDetail = function(d) {\n p5._validateParameters('bezierDetail', arguments);\n this._bezierDetail = d;\n return this;\n};\n\n/**\n * Evaluates the Bezier at position t for points a, b, c, d.\n * The parameters a and d are the first and last points\n * on the curve, and b and c are the control points.\n * The final parameter t varies between 0 and 1.\n * This can be done once with the x coordinates and a second time\n * with the y coordinates to get the location of a bezier curve at t.\n *\n * @method bezierPoint\n * @param {Number} a coordinate of first point on the curve\n * @param {Number} b coordinate of first control point\n * @param {Number} c coordinate of second control point\n * @param {Number} d coordinate of second point on the curve\n * @param {Number} t value between 0 and 1\n * @return {Number} the value of the Bezier at position t\n * @example\n * \n * \n * noFill();\n * let x1 = 85,\n x2 = 10,\n x3 = 90,\n x4 = 15;\n * let y1 = 20,\n y2 = 10,\n y3 = 90,\n y4 = 80;\n * bezier(x1, y1, x2, y2, x3, y3, x4, y4);\n * fill(255);\n * let steps = 10;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = bezierPoint(x1, x2, x3, x4, t);\n * let y = bezierPoint(y1, y2, y3, y4, t);\n * ellipse(x, y, 5, 5);\n * }\n * \n * \n *\n * @alt\n * stretched black s-shape with 17 small orange lines extending from under shape.\n *\n */\np5.prototype.bezierPoint = function(a, b, c, d, t) {\n p5._validateParameters('bezierPoint', arguments);\n\n var adjustedT = 1 - t;\n return (\n Math.pow(adjustedT, 3) * a +\n 3 * Math.pow(adjustedT, 2) * t * b +\n 3 * adjustedT * Math.pow(t, 2) * c +\n Math.pow(t, 3) * d\n );\n};\n\n/**\n * Evaluates the tangent to the Bezier at position t for points a, b, c, d.\n * The parameters a and d are the first and last points\n * on the curve, and b and c are the control points.\n * The final parameter t varies between 0 and 1.\n *\n * @method bezierTangent\n * @param {Number} a coordinate of first point on the curve\n * @param {Number} b coordinate of first control point\n * @param {Number} c coordinate of second control point\n * @param {Number} d coordinate of second point on the curve\n * @param {Number} t value between 0 and 1\n * @return {Number} the tangent at position t\n * @example\n * \n * \n * noFill();\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n * let steps = 6;\n * fill(255);\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * // Get the location of the point\n * let x = bezierPoint(85, 10, 90, 15, t);\n * let y = bezierPoint(20, 10, 90, 80, t);\n * // Get the tangent points\n * let tx = bezierTangent(85, 10, 90, 15, t);\n * let ty = bezierTangent(20, 10, 90, 80, t);\n * // Calculate an angle from the tangent points\n * let a = atan2(ty, tx);\n * a += PI;\n * stroke(255, 102, 0);\n * line(x, y, cos(a) * 30 + x, sin(a) * 30 + y);\n * // The following line of code makes a line\n * // inverse of the above line\n * //line(x, y, cos(a)*-30 + x, sin(a)*-30 + y);\n * stroke(0);\n * ellipse(x, y, 5, 5);\n * }\n * \n * \n *\n * \n * \n * noFill();\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n * stroke(255, 102, 0);\n * let steps = 16;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = bezierPoint(85, 10, 90, 15, t);\n * let y = bezierPoint(20, 10, 90, 80, t);\n * let tx = bezierTangent(85, 10, 90, 15, t);\n * let ty = bezierTangent(20, 10, 90, 80, t);\n * let a = atan2(ty, tx);\n * a -= HALF_PI;\n * line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n * }\n * \n * \n *\n * @alt\n * s-shaped line with 17 short orange lines extending from underside of shape\n *\n */\np5.prototype.bezierTangent = function(a, b, c, d, t) {\n p5._validateParameters('bezierTangent', arguments);\n\n var adjustedT = 1 - t;\n return (\n 3 * d * Math.pow(t, 2) -\n 3 * c * Math.pow(t, 2) +\n 6 * c * adjustedT * t -\n 6 * b * adjustedT * t +\n 3 * b * Math.pow(adjustedT, 2) -\n 3 * a * Math.pow(adjustedT, 2)\n );\n};\n\n/**\n * Draws a curved line on the screen between two points, given as the\n * middle four parameters. The first two parameters are a control point, as\n * if the curve came from this point even though it's not drawn. The last\n * two parameters similarly describe the other control point. \n * Longer curves can be created by putting a series of curve() functions\n * together or using curveVertex(). An additional function called\n * curveTightness() provides control for the visual quality of the curve.\n * The curve() function is an implementation of Catmull-Rom splines.\n *\n * @method curve\n * @param {Number} x1 x-coordinate for the beginning control point\n * @param {Number} y1 y-coordinate for the beginning control point\n * @param {Number} x2 x-coordinate for the first point\n * @param {Number} y2 y-coordinate for the first point\n * @param {Number} x3 x-coordinate for the second point\n * @param {Number} y3 y-coordinate for the second point\n * @param {Number} x4 x-coordinate for the ending control point\n * @param {Number} y4 y-coordinate for the ending control point\n * @chainable\n * @example\n * \n * \n * noFill();\n * stroke(255, 102, 0);\n * curve(5, 26, 5, 26, 73, 24, 73, 61);\n * stroke(0);\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * stroke(255, 102, 0);\n * curve(73, 24, 73, 61, 15, 65, 15, 65);\n * \n * \n * \n * \n * // Define the curve points as JavaScript objects\n * let p1 = { x: 5, y: 26 },\n p2 = { x: 73, y: 24 };\n * let p3 = { x: 73, y: 61 },\n p4 = { x: 15, y: 65 };\n * noFill();\n * stroke(255, 102, 0);\n * curve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n * stroke(0);\n * curve(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);\n * stroke(255, 102, 0);\n * curve(p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, p4.x, p4.y);\n * \n * \n * \n * \n * noFill();\n * stroke(255, 102, 0);\n * curve(5, 26, 0, 5, 26, 0, 73, 24, 0, 73, 61, 0);\n * stroke(0);\n * curve(5, 26, 0, 73, 24, 0, 73, 61, 0, 15, 65, 0);\n * stroke(255, 102, 0);\n * curve(73, 24, 0, 73, 61, 0, 15, 65, 0, 15, 65, 0);\n * \n * \n *\n * @alt\n * horseshoe shape with orange ends facing left and black curved center.\n * horseshoe shape with orange ends facing left and black curved center.\n * curving black and orange lines.\n */\n/**\n * @method curve\n * @param {Number} x1\n * @param {Number} y1\n * @param {Number} z1 z-coordinate for the beginning control point\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 z-coordinate for the first point\n * @param {Number} x3\n * @param {Number} y3\n * @param {Number} z3 z-coordinate for the second point\n * @param {Number} x4\n * @param {Number} y4\n * @param {Number} z4 z-coordinate for the ending control point\n * @chainable\n */\np5.prototype.curve = function() {\n p5._validateParameters('curve', arguments);\n\n if (this._renderer._doStroke) {\n this._renderer.curve.apply(this._renderer, arguments);\n }\n\n return this;\n};\n\n/**\n * Sets the resolution at which curves display.\n *\n * The default value is 20 while the minimum value is 3.\n *\n * This function is only useful when using the WEBGL renderer\n * as the default canvas renderer does not use this\n * information.\n *\n * @method curveDetail\n * @param {Number} resolution resolution of the curves\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n *\n * curveDetail(5);\n * }\n * function draw() {\n * background(200);\n *\n * curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);\n * }\n * \n * \n *\n * @alt\n * white arch shape with a low level of curve detail.\n *\n */\np5.prototype.curveDetail = function(d) {\n p5._validateParameters('curveDetail', arguments);\n if (d < 3) {\n this._curveDetail = 3;\n } else {\n this._curveDetail = d;\n }\n return this;\n};\n\n/**\n * Modifies the quality of forms created with curve() and curveVertex().\n * The parameter tightness determines how the curve fits to the vertex\n * points. The value 0.0 is the default value for tightness (this value\n * defines the curves to be Catmull-Rom splines) and the value 1.0 connects\n * all the points with straight lines. Values within the range -5.0 and 5.0\n * will deform the curves but will leave them recognizable and as values\n * increase in magnitude, they will continue to deform.\n *\n * @method curveTightness\n * @param {Number} amount amount of deformation from the original vertices\n * @chainable\n * @example\n * \n * \n * // Move the mouse left and right to see the curve change\n *\n * function setup() {\n * createCanvas(100, 100);\n * noFill();\n * }\n *\n * function draw() {\n * background(204);\n * let t = map(mouseX, 0, width, -5, 5);\n * curveTightness(t);\n * beginShape();\n * curveVertex(10, 26);\n * curveVertex(10, 26);\n * curveVertex(83, 24);\n * curveVertex(83, 61);\n * curveVertex(25, 65);\n * curveVertex(25, 65);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * Line shaped like right-facing arrow,points move with mouse-x and warp shape.\n */\np5.prototype.curveTightness = function(t) {\n p5._validateParameters('curveTightness', arguments);\n this._renderer._curveTightness = t;\n return this;\n};\n\n/**\n * Evaluates the curve at position t for points a, b, c, d.\n * The parameter t varies between 0 and 1, a and d are control points\n * of the curve, and b and c are the start and end points of the curve.\n * This can be done once with the x coordinates and a second time\n * with the y coordinates to get the location of a curve at t.\n *\n * @method curvePoint\n * @param {Number} a coordinate of first control point of the curve\n * @param {Number} b coordinate of first point\n * @param {Number} c coordinate of second point\n * @param {Number} d coordinate of second control point\n * @param {Number} t value between 0 and 1\n * @return {Number} bezier value at position t\n * @example\n * \n * \n * noFill();\n * curve(5, 26, 5, 26, 73, 24, 73, 61);\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * fill(255);\n * ellipseMode(CENTER);\n * let steps = 6;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = curvePoint(5, 5, 73, 73, t);\n * let y = curvePoint(26, 26, 24, 61, t);\n * ellipse(x, y, 5, 5);\n * x = curvePoint(5, 73, 73, 15, t);\n * y = curvePoint(26, 24, 61, 65, t);\n * ellipse(x, y, 5, 5);\n * }\n * \n * \n *\n *line hooking down to right-bottom with 13 5x5 white ellipse points\n */\np5.prototype.curvePoint = function(a, b, c, d, t) {\n p5._validateParameters('curvePoint', arguments);\n\n var t3 = t * t * t,\n t2 = t * t,\n f1 = -0.5 * t3 + t2 - 0.5 * t,\n f2 = 1.5 * t3 - 2.5 * t2 + 1.0,\n f3 = -1.5 * t3 + 2.0 * t2 + 0.5 * t,\n f4 = 0.5 * t3 - 0.5 * t2;\n return a * f1 + b * f2 + c * f3 + d * f4;\n};\n\n/**\n * Evaluates the tangent to the curve at position t for points a, b, c, d.\n * The parameter t varies between 0 and 1, a and d are points on the curve,\n * and b and c are the control points.\n *\n * @method curveTangent\n * @param {Number} a coordinate of first point on the curve\n * @param {Number} b coordinate of first control point\n * @param {Number} c coordinate of second control point\n * @param {Number} d coordinate of second point on the curve\n * @param {Number} t value between 0 and 1\n * @return {Number} the tangent at position t\n * @example\n * \n * \n * noFill();\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * let steps = 6;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = curvePoint(5, 73, 73, 15, t);\n * let y = curvePoint(26, 24, 61, 65, t);\n * //ellipse(x, y, 5, 5);\n * let tx = curveTangent(5, 73, 73, 15, t);\n * let ty = curveTangent(26, 24, 61, 65, t);\n * let a = atan2(ty, tx);\n * a -= PI / 2.0;\n * line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n * }\n * \n * \n *\n * @alt\n *right curving line mid-right of canvas with 7 short lines radiating from it.\n */\np5.prototype.curveTangent = function(a, b, c, d, t) {\n p5._validateParameters('curveTangent', arguments);\n\n var t2 = t * t,\n f1 = -3 * t2 / 2 + 2 * t - 0.5,\n f2 = 9 * t2 / 2 - 5 * t,\n f3 = -9 * t2 / 2 + 4 * t + 0.5,\n f4 = 3 * t2 / 2 - t;\n return a * f1 + b * f2 + c * f3 + d * f4;\n};\n\nmodule.exports = p5;\n\n},{\"../error_helpers\":20,\"../main\":24}],33:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule Vertex\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../main');\nvar constants = _dereq_('../constants');\nvar shapeKind = null;\nvar vertices = [];\nvar contourVertices = [];\nvar isBezier = false;\nvar isCurve = false;\nvar isQuadratic = false;\nvar isContour = false;\nvar isFirstContour = true;\n\n/**\n * Use the beginContour() and endContour() functions to create negative\n * shapes within shapes such as the center of the letter 'O'. beginContour()\n * begins recording vertices for the shape and endContour() stops recording.\n * The vertices that define a negative shape must \"wind\" in the opposite\n * direction from the exterior shape. First draw vertices for the exterior\n * clockwise order, then for internal shapes, draw vertices\n * shape in counter-clockwise.\n * \n * These functions can only be used within a beginShape()/endShape() pair and\n * transformations such as translate(), rotate(), and scale() do not work\n * within a beginContour()/endContour() pair. It is also not possible to use\n * other shapes, such as ellipse() or rect() within.\n *\n * @method beginContour\n * @chainable\n * @example\n * \n * \n * translate(50, 50);\n * stroke(255, 0, 0);\n * beginShape();\n * // Exterior part of shape, clockwise winding\n * vertex(-40, -40);\n * vertex(40, -40);\n * vertex(40, 40);\n * vertex(-40, 40);\n * // Interior part of shape, counter-clockwise winding\n * beginContour();\n * vertex(-20, -20);\n * vertex(-20, 20);\n * vertex(20, 20);\n * vertex(20, -20);\n * endContour();\n * endShape(CLOSE);\n * \n * \n *\n * @alt\n * white rect and smaller grey rect with red outlines in center of canvas.\n *\n */\np5.prototype.beginContour = function() {\n contourVertices = [];\n isContour = true;\n return this;\n};\n\n/**\n * Using the beginShape() and endShape() functions allow creating more\n * complex forms. beginShape() begins recording vertices for a shape and\n * endShape() stops recording. The value of the kind parameter tells it which\n * types of shapes to create from the provided vertices. With no mode\n * specified, the shape can be any irregular polygon.\n * \n * The parameters available for beginShape() are POINTS, LINES, TRIANGLES,\n * TRIANGLE_FAN, TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the\n * beginShape() function, a series of vertex() commands must follow. To stop\n * drawing the shape, call endShape(). Each shape will be outlined with the\n * current stroke color and filled with the fill color.\n * \n * Transformations such as translate(), rotate(), and scale() do not work\n * within beginShape(). It is also not possible to use other shapes, such as\n * ellipse() or rect() within beginShape().\n *\n * @method beginShape\n * @param {Constant} [kind] either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\n * TRIANGLE_STRIP, QUADS, or QUAD_STRIP\n * @chainable\n * @example\n * \n * \n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape(CLOSE);\n * \n * \n *\n * \n * \n * beginShape(POINTS);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape(LINES);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n * \n * \n *\n * \n * \n * noFill();\n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n * \n * \n *\n * \n * \n * noFill();\n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape(CLOSE);\n * \n * \n *\n * \n * \n * beginShape(TRIANGLES);\n * vertex(30, 75);\n * vertex(40, 20);\n * vertex(50, 75);\n * vertex(60, 20);\n * vertex(70, 75);\n * vertex(80, 20);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape(TRIANGLE_STRIP);\n * vertex(30, 75);\n * vertex(40, 20);\n * vertex(50, 75);\n * vertex(60, 20);\n * vertex(70, 75);\n * vertex(80, 20);\n * vertex(90, 75);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape(TRIANGLE_FAN);\n * vertex(57.5, 50);\n * vertex(57.5, 15);\n * vertex(92, 50);\n * vertex(57.5, 85);\n * vertex(22, 50);\n * vertex(57.5, 15);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape(QUADS);\n * vertex(30, 20);\n * vertex(30, 75);\n * vertex(50, 75);\n * vertex(50, 20);\n * vertex(65, 20);\n * vertex(65, 75);\n * vertex(85, 75);\n * vertex(85, 20);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape(QUAD_STRIP);\n * vertex(30, 20);\n * vertex(30, 75);\n * vertex(50, 20);\n * vertex(50, 75);\n * vertex(65, 20);\n * vertex(65, 75);\n * vertex(85, 20);\n * vertex(85, 75);\n * endShape();\n * \n * \n *\n * \n * \n * beginShape();\n * vertex(20, 20);\n * vertex(40, 20);\n * vertex(40, 40);\n * vertex(60, 40);\n * vertex(60, 60);\n * vertex(20, 60);\n * endShape(CLOSE);\n * \n * \n * @alt\n * white square-shape with black outline in middle-right of canvas.\n * 4 black points in a square shape in middle-right of canvas.\n * 2 horizontal black lines. In the top-right and bottom-right of canvas.\n * 3 line shape with horizontal on top, vertical in middle and horizontal bottom.\n * square line shape in middle-right of canvas.\n * 2 white triangle shapes mid-right canvas. left one pointing up and right down.\n * 5 horizontal interlocking and alternating white triangles in mid-right canvas.\n * 4 interlocking white triangles in 45 degree rotated square-shape.\n * 2 white rectangle shapes in mid-right canvas. Both 20x55.\n * 3 side-by-side white rectangles center rect is smaller in mid-right canvas.\n * Thick white l-shape with black outline mid-top-left of canvas.\n *\n */\np5.prototype.beginShape = function(kind) {\n p5._validateParameters('beginShape', arguments);\n if (this._renderer.isP3D) {\n this._renderer.beginShape.apply(this._renderer, arguments);\n } else {\n if (\n kind === constants.POINTS ||\n kind === constants.LINES ||\n kind === constants.TRIANGLES ||\n kind === constants.TRIANGLE_FAN ||\n kind === constants.TRIANGLE_STRIP ||\n kind === constants.QUADS ||\n kind === constants.QUAD_STRIP\n ) {\n shapeKind = kind;\n } else {\n shapeKind = null;\n }\n\n vertices = [];\n contourVertices = [];\n }\n return this;\n};\n\n/**\n * Specifies vertex coordinates for Bezier curves. Each call to\n * bezierVertex() defines the position of two control points and\n * one anchor point of a Bezier curve, adding a new segment to a\n * line or shape. For WebGL mode bezierVertex() can be used in 2D\n * as well as 3D mode. 2D mode expects 6 parameters, while 3D mode\n * expects 9 parameters (including z coordinates).\n * \n * The first time bezierVertex() is used within a beginShape()\n * call, it must be prefaced with a call to vertex() to set the first anchor\n * point. This function must be used between beginShape() and endShape()\n * and only when there is no MODE or POINTS parameter specified to\n * beginShape().\n *\n * @method bezierVertex\n * @param {Number} x2 x-coordinate for the first control point\n * @param {Number} y2 y-coordinate for the first control point\n * @param {Number} x3 x-coordinate for the second control point\n * @param {Number} y3 y-coordinate for the second control point\n * @param {Number} x4 x-coordinate for the anchor point\n * @param {Number} y4 y-coordinate for the anchor point\n * @chainable\n *\n * @example\n * \n * \n * noFill();\n * beginShape();\n * vertex(30, 20);\n * bezierVertex(80, 0, 80, 75, 30, 75);\n * endShape();\n * \n * \n *\n * @alt\n * crescent-shaped line in middle of canvas. Points facing left.\n *\n * @example\n * \n * \n * beginShape();\n * vertex(30, 20);\n * bezierVertex(80, 0, 80, 75, 30, 75);\n * bezierVertex(50, 80, 60, 25, 30, 20);\n * endShape();\n * \n * \n *\n * @alt\n * white crescent shape in middle of canvas. Points facing left.\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n * point(-25, 30);\n * point(25, 30);\n * point(25, -30);\n * point(-25, -30);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * vertex(-25, 30);\n * bezierVertex(25, 30, 25, -30, -25, -30);\n * endShape();\n *\n * beginShape();\n * vertex(-25, 30, 20);\n * bezierVertex(25, 30, 20, 25, -30, 20, -25, -30, 20);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * crescent shape in middle of canvas with another crescent shape on positive z-axis.\n */\n\n/**\n * @method bezierVertex\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 z-coordinate for the first control point (for WebGL mode)\n * @param {Number} x3\n * @param {Number} y3\n * @param {Number} z3 z-coordinate for the second control point (for WebGL mode)\n * @param {Number} x4\n * @param {Number} y4\n * @param {Number} z4 z-coordinate for the anchor point (for WebGL mode)\n * @chainable\n */\np5.prototype.bezierVertex = function() {\n p5._validateParameters('bezierVertex', arguments);\n if (this._renderer.isP3D) {\n this._renderer.bezierVertex.apply(this._renderer, arguments);\n } else {\n if (vertices.length === 0) {\n p5._friendlyError(\n 'vertex() must be used once before calling bezierVertex()',\n 'bezierVertex'\n );\n } else {\n isBezier = true;\n var vert = [];\n for (var i = 0; i < arguments.length; i++) {\n vert[i] = arguments[i];\n }\n vert.isVert = false;\n if (isContour) {\n contourVertices.push(vert);\n } else {\n vertices.push(vert);\n }\n }\n }\n return this;\n};\n\n/**\n * Specifies vertex coordinates for curves. This function may only\n * be used between beginShape() and endShape() and only when there\n * is no MODE parameter specified to beginShape().\n * For WebGL mode curveVertex() can be used in 2D as well as 3D mode.\n * 2D mode expects 2 parameters, while 3D mode expects 3 parameters.\n * \n * The first and last points in a series of curveVertex() lines will be used to\n * guide the beginning and end of a the curve. A minimum of four\n * points is required to draw a tiny curve between the second and\n * third points. Adding a fifth point with curveVertex() will draw\n * the curve between the second, third, and fourth points. The\n * curveVertex() function is an implementation of Catmull-Rom\n * splines.\n *\n * @method curveVertex\n * @param {Number} x x-coordinate of the vertex\n * @param {Number} y y-coordinate of the vertex\n * @chainable\n * @example\n * \n * \n * strokeWeight(5);\n * point(84, 91);\n * point(68, 19);\n * point(21, 17);\n * point(32, 91);\n * strokeWeight(1);\n *\n * noFill();\n * beginShape();\n * curveVertex(84, 91);\n * curveVertex(84, 91);\n * curveVertex(68, 19);\n * curveVertex(21, 17);\n * curveVertex(32, 91);\n * curveVertex(32, 91);\n * endShape();\n * \n * \n *\n *\n * @alt\n * Upside-down u-shape line, mid canvas. left point extends beyond canvas view.\n */\n/**\n * @method curveVertex\n * @param {Number} x\n * @param {Number} y\n * @param {Number} [z] z-coordinate of the vertex (for WebGL mode)\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n *\n * point(-25, 25);\n * point(-25, 25);\n * point(-25, -25);\n * point(25, -25);\n * point(25, 25);\n * point(25, 25);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * curveVertex(-25, 25);\n * curveVertex(-25, 25);\n * curveVertex(-25, -25);\n * curveVertex(25, -25);\n * curveVertex(25, 25);\n * curveVertex(25, 25);\n * endShape();\n *\n * beginShape();\n * curveVertex(-25, 25, 20);\n * curveVertex(-25, 25, 20);\n * curveVertex(-25, -25, 20);\n * curveVertex(25, -25, 20);\n * curveVertex(25, 25, 20);\n * curveVertex(25, 25, 20);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * Upside-down u-shape line, mid canvas with the same shape in positive z-axis.\n *\n */\np5.prototype.curveVertex = function() {\n p5._validateParameters('curveVertex', arguments);\n if (this._renderer.isP3D) {\n this._renderer.curveVertex.apply(this._renderer, arguments);\n } else {\n isCurve = true;\n this.vertex(arguments[0], arguments[1]);\n }\n return this;\n};\n\n/**\n * Use the beginContour() and endContour() functions to create negative\n * shapes within shapes such as the center of the letter 'O'. beginContour()\n * begins recording vertices for the shape and endContour() stops recording.\n * The vertices that define a negative shape must \"wind\" in the opposite\n * direction from the exterior shape. First draw vertices for the exterior\n * clockwise order, then for internal shapes, draw vertices\n * shape in counter-clockwise.\n * \n * These functions can only be used within a beginShape()/endShape() pair and\n * transformations such as translate(), rotate(), and scale() do not work\n * within a beginContour()/endContour() pair. It is also not possible to use\n * other shapes, such as ellipse() or rect() within.\n *\n * @method endContour\n * @chainable\n * @example\n * \n * \n * translate(50, 50);\n * stroke(255, 0, 0);\n * beginShape();\n * // Exterior part of shape, clockwise winding\n * vertex(-40, -40);\n * vertex(40, -40);\n * vertex(40, 40);\n * vertex(-40, 40);\n * // Interior part of shape, counter-clockwise winding\n * beginContour();\n * vertex(-20, -20);\n * vertex(-20, 20);\n * vertex(20, 20);\n * vertex(20, -20);\n * endContour();\n * endShape(CLOSE);\n * \n * \n *\n * @alt\n * white rect and smaller grey rect with red outlines in center of canvas.\n *\n */\np5.prototype.endContour = function() {\n var vert = contourVertices[0].slice(); // copy all data\n vert.isVert = contourVertices[0].isVert;\n vert.moveTo = false;\n contourVertices.push(vert);\n\n // prevent stray lines with multiple contours\n if (isFirstContour) {\n vertices.push(vertices[0]);\n isFirstContour = false;\n }\n\n for (var i = 0; i < contourVertices.length; i++) {\n vertices.push(contourVertices[i]);\n }\n return this;\n};\n\n/**\n * The endShape() function is the companion to beginShape() and may only be\n * called after beginShape(). When endshape() is called, all of image data\n * defined since the previous call to beginShape() is written into the image\n * buffer. The constant CLOSE as the value for the MODE parameter to close\n * the shape (to connect the beginning and the end).\n *\n * @method endShape\n * @param {Constant} [mode] use CLOSE to close the shape\n * @chainable\n * @example\n * \n * \n * noFill();\n *\n * beginShape();\n * vertex(20, 20);\n * vertex(45, 20);\n * vertex(45, 80);\n * endShape(CLOSE);\n *\n * beginShape();\n * vertex(50, 20);\n * vertex(75, 20);\n * vertex(75, 80);\n * endShape();\n * \n * \n *\n * @alt\n * Triangle line shape with smallest interior angle on bottom and upside-down L.\n *\n */\np5.prototype.endShape = function(mode) {\n p5._validateParameters('endShape', arguments);\n if (this._renderer.isP3D) {\n this._renderer.endShape(\n mode,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n );\n } else {\n if (vertices.length === 0) {\n return this;\n }\n if (!this._renderer._doStroke && !this._renderer._doFill) {\n return this;\n }\n\n var closeShape = mode === constants.CLOSE;\n\n // if the shape is closed, the first element is also the last element\n if (closeShape && !isContour) {\n vertices.push(vertices[0]);\n }\n\n this._renderer.endShape(\n mode,\n vertices,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n );\n\n // Reset some settings\n isCurve = false;\n isBezier = false;\n isQuadratic = false;\n isContour = false;\n isFirstContour = true;\n\n // If the shape is closed, the first element was added as last element.\n // We must remove it again to prevent the list of vertices from growing\n // over successive calls to endShape(CLOSE)\n if (closeShape) {\n vertices.pop();\n }\n }\n return this;\n};\n\n/**\n * Specifies vertex coordinates for quadratic Bezier curves. Each call to\n * quadraticVertex() defines the position of one control points and one\n * anchor point of a Bezier curve, adding a new segment to a line or shape.\n * The first time quadraticVertex() is used within a beginShape() call, it\n * must be prefaced with a call to vertex() to set the first anchor point.\n * For WebGL mode quadraticVertex() can be used in 2D as well as 3D mode.\n * 2D mode expects 4 parameters, while 3D mode expects 6 parameters\n * (including z coordinates).\n * \n * This function must be used between beginShape() and endShape()\n * and only when there is no MODE or POINTS parameter specified to\n * beginShape().\n *\n * @method quadraticVertex\n * @param {Number} cx x-coordinate for the control point\n * @param {Number} cy y-coordinate for the control point\n * @param {Number} x3 x-coordinate for the anchor point\n * @param {Number} y3 y-coordinate for the anchor point\n * @chainable\n *\n * @example\n * \n * \n * strokeWeight(5);\n * point(20, 20);\n * point(80, 20);\n * point(50, 50);\n *\n * noFill();\n * strokeWeight(1);\n * beginShape();\n * vertex(20, 20);\n * quadraticVertex(80, 20, 50, 50);\n * endShape();\n * \n * \n *\n * \n * \n * strokeWeight(5);\n * point(20, 20);\n * point(80, 20);\n * point(50, 50);\n *\n * point(20, 80);\n * point(80, 80);\n * point(80, 60);\n *\n * noFill();\n * strokeWeight(1);\n * beginShape();\n * vertex(20, 20);\n * quadraticVertex(80, 20, 50, 50);\n * quadraticVertex(20, 80, 80, 80);\n * vertex(80, 60);\n * endShape();\n * \n * \n *\n * @alt\n * arched-shaped black line with 4 pixel thick stroke weight.\n * backwards s-shaped black line with 4 pixel thick stroke weight.\n *\n */\n\n/**\n * @method quadraticVertex\n * @param {Number} cx\n * @param {Number} cy\n * @param {Number} cz z-coordinate for the control point (for WebGL mode)\n * @param {Number} x3\n * @param {Number} y3\n * @param {Number} z3 z-coordinate for the anchor point (for WebGL mode)\n * @chainable\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n *\n * point(-35, -35);\n * point(35, -35);\n * point(0, 0);\n * point(-35, 35);\n * point(35, 35);\n * point(35, 10);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * vertex(-35, -35);\n * quadraticVertex(35, -35, 0, 0);\n * quadraticVertex(-35, 35, 35, 35);\n * vertex(35, 10);\n * endShape();\n *\n * beginShape();\n * vertex(-35, -35, 20);\n * quadraticVertex(35, -35, 20, 0, 0, 20);\n * quadraticVertex(-35, 35, 20, 35, 35, 20);\n * vertex(35, 10, 20);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * backwards s-shaped black line with the same s-shaped line in postive z-axis.\n */\np5.prototype.quadraticVertex = function() {\n p5._validateParameters('quadraticVertex', arguments);\n if (this._renderer.isP3D) {\n this._renderer.quadraticVertex.apply(this._renderer, arguments);\n } else {\n //if we're drawing a contour, put the points into an\n // array for inside drawing\n if (this._contourInited) {\n var pt = {};\n pt.x = arguments[0];\n pt.y = arguments[1];\n pt.x3 = arguments[2];\n pt.y3 = arguments[3];\n pt.type = constants.QUADRATIC;\n this._contourVertices.push(pt);\n\n return this;\n }\n if (vertices.length > 0) {\n isQuadratic = true;\n var vert = [];\n for (var i = 0; i < arguments.length; i++) {\n vert[i] = arguments[i];\n }\n vert.isVert = false;\n if (isContour) {\n contourVertices.push(vert);\n } else {\n vertices.push(vert);\n }\n } else {\n p5._friendlyError(\n 'vertex() must be used once before calling quadraticVertex()',\n 'quadraticVertex'\n );\n }\n }\n return this;\n};\n\n/**\n * All shapes are constructed by connecting a series of vertices. vertex()\n * is used to specify the vertex coordinates for points, lines, triangles,\n * quads, and polygons. It is used exclusively within the beginShape() and\n * endShape() functions.\n *\n * @method vertex\n * @param {Number} x x-coordinate of the vertex\n * @param {Number} y y-coordinate of the vertex\n * @chainable\n * @example\n * \n * \n * strokeWeight(3);\n * beginShape(POINTS);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n * \n * \n *\n * @alt\n * 4 black points in a square shape in middle-right of canvas.\n *\n * \n * \n * createCanvas(100, 100, WEBGL);\n * background(240, 240, 240);\n * fill(237, 34, 93);\n * noStroke();\n * beginShape();\n * vertex(0, 35);\n * vertex(35, 0);\n * vertex(0, -35);\n * vertex(-35, 0);\n * endShape();\n * \n * \n *\n * @alt\n * 4 points making a diamond shape\n *\n * \n * \n * createCanvas(100, 100, WEBGL);\n * background(240, 240, 240);\n * fill(237, 34, 93);\n * noStroke();\n * beginShape();\n * vertex(-10, 10);\n * vertex(0, 35);\n * vertex(10, 10);\n * vertex(35, 0);\n * vertex(10, -8);\n * vertex(0, -35);\n * vertex(-10, -8);\n * vertex(-35, 0);\n * endShape();\n * \n * \n *\n * @alt\n * 8 points making a star\n *\n * \n * \n * strokeWeight(3);\n * stroke(237, 34, 93);\n * beginShape(LINES);\n * vertex(10, 35);\n * vertex(90, 35);\n * vertex(10, 65);\n * vertex(90, 65);\n * vertex(35, 10);\n * vertex(35, 90);\n * vertex(65, 10);\n * vertex(65, 90);\n * endShape();\n * \n * \n *\n * @alt\n * 8 points making 4 lines\n *\n */\n/**\n * @method vertex\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z z-coordinate of the vertex\n * @param {Number} [u] the vertex's texture u-coordinate\n * @param {Number} [v] the vertex's texture v-coordinate\n * @chainable\n */\np5.prototype.vertex = function(x, y, moveTo, u, v) {\n if (this._renderer.isP3D) {\n this._renderer.vertex.apply(this._renderer, arguments);\n } else {\n var vert = [];\n vert.isVert = true;\n vert[0] = x;\n vert[1] = y;\n vert[2] = 0;\n vert[3] = 0;\n vert[4] = 0;\n vert[5] = this._renderer._getFill();\n vert[6] = this._renderer._getStroke();\n\n if (moveTo) {\n vert.moveTo = moveTo;\n }\n if (isContour) {\n if (contourVertices.length === 0) {\n vert.moveTo = true;\n }\n contourVertices.push(vert);\n } else {\n vertices.push(vert);\n }\n }\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"../constants\":18,\"../main\":24}],34:[function(_dereq_,module,exports){\n'use strict';\n\n// requestAnim shim layer by Paul Irish\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\n// http://my.opera.com/emoller/blog/2011/12/20/\n// requestanimationframe-for-smart-er-animating\n// requestAnimationFrame polyfill by Erik Möller\n// fixes from Paul Irish and Tino Zijdel\nwindow.requestAnimationFrame = (function() {\n return (\n window.requestAnimationFrame ||\n window.webkitRequestAnimationFrame ||\n window.mozRequestAnimationFrame ||\n window.oRequestAnimationFrame ||\n window.msRequestAnimationFrame ||\n function(callback, element) {\n // should '60' here be framerate?\n window.setTimeout(callback, 1000 / 60);\n }\n );\n})();\n\n/**\n * shim for Uint8ClampedArray.slice\n * (allows arrayCopy to work with pixels[])\n * with thanks to http://halfpapstudios.com/blog/tag/html5-canvas/\n * Enumerable set to false to protect for...in from\n * Uint8ClampedArray.prototype pollution.\n */\n(function() {\n 'use strict';\n if (\n typeof Uint8ClampedArray !== 'undefined' &&\n !Uint8ClampedArray.prototype.slice\n ) {\n Object.defineProperty(Uint8ClampedArray.prototype, 'slice', {\n value: Array.prototype.slice,\n writable: true,\n configurable: true,\n enumerable: false\n });\n }\n})();\n\n/**\n * this is implementation of Object.assign() which is unavailable in\n * IE11 and (non-Chrome) Android browsers.\n * The assign() method is used to copy the values of all enumerable\n * own properties from one or more source objects to a target object.\n * It will return the target object.\n * Modified from https://github.com/ljharb/object.assign\n */\n(function() {\n 'use strict';\n if (!Object.assign) {\n var keys = Object.keys;\n var defineProperty = Object.defineProperty;\n var canBeObject = function(obj) {\n return typeof obj !== 'undefined' && obj !== null;\n };\n var hasSymbols =\n typeof Symbol === 'function' && typeof Symbol() === 'symbol';\n var propIsEnumerable = Object.prototype.propertyIsEnumerable;\n var isEnumerableOn = function(obj) {\n return function isEnumerable(prop) {\n return propIsEnumerable.call(obj, prop);\n };\n };\n\n // per ES6 spec, this function has to have a length of 2\n var assignShim = function assign(target, source1) {\n if (!canBeObject(target)) {\n throw new TypeError('target must be an object');\n }\n var objTarget = Object(target);\n var s, source, i, props;\n for (s = 1; s < arguments.length; ++s) {\n source = Object(arguments[s]);\n props = keys(source);\n if (hasSymbols && Object.getOwnPropertySymbols) {\n props.push.apply(\n props,\n Object.getOwnPropertySymbols(source).filter(isEnumerableOn(source))\n );\n }\n for (i = 0; i < props.length; ++i) {\n objTarget[props[i]] = source[props[i]];\n }\n }\n return objTarget;\n };\n\n defineProperty(Object, 'assign', {\n value: assignShim,\n configurable: true,\n enumerable: false,\n writable: true\n });\n }\n})();\n\n},{}],35:[function(_dereq_,module,exports){\n/**\n * @module Structure\n * @submodule Structure\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\n\n/**\n * Stops p5.js from continuously executing the code within draw().\n * If loop() is called, the code in draw() begins to run continuously again.\n * If using noLoop() in setup(), it should be the last line inside the block.\n * \n * When noLoop() is used, it's not possible to manipulate or access the\n * screen inside event handling functions such as mousePressed() or\n * keyPressed(). Instead, use those functions to call redraw() or loop(),\n * which will run draw(), which can update the screen properly. This means\n * that when noLoop() has been called, no drawing can happen, and functions\n * like saveFrame() or loadPixels() may not be used.\n * \n * Note that if the sketch is resized, redraw() will be called to update\n * the sketch, even after noLoop() has been specified. Otherwise, the sketch\n * would enter an odd state until loop() was called.\n *\n * @method noLoop\n * @example\n * \n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * noLoop();\n * }\n\n * function draw() {\n * line(10, 10, 90, 90);\n * }\n * \n *\n * \n * let x = 0;\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * background(204);\n * x = x + 0.1;\n * if (x > width) {\n * x = 0;\n * }\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * noLoop();\n * }\n *\n * function mouseReleased() {\n * loop();\n * }\n * \n *\n * @alt\n * 113 pixel long line extending from top-left to bottom right of canvas.\n * horizontal line moves slowly from left. Loops but stops on mouse press.\n *\n */\np5.prototype.noLoop = function() {\n this._loop = false;\n};\n/**\n * By default, p5.js loops through draw() continuously, executing the code\n * within it. However, the draw() loop may be stopped by calling noLoop().\n * In that case, the draw() loop can be resumed with loop().\n *\n * Avoid calling loop() from inside setup().\n *\n * @method loop\n * @example\n * \n * let x = 0;\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * x = x + 0.1;\n * if (x > width) {\n * x = 0;\n * }\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * loop();\n * }\n *\n * function mouseReleased() {\n * noLoop();\n * }\n * \n *\n * @alt\n * horizontal line moves slowly from left. Loops but stops on mouse press.\n *\n */\n\np5.prototype.loop = function() {\n if (!this._loop) {\n this._loop = true;\n if (this._setupDone) {\n this._draw();\n }\n }\n};\n\n/**\n * The push() function saves the current drawing style settings and\n * transformations, while pop() restores these settings. Note that these\n * functions are always used together. They allow you to change the style\n * and transformation settings and later return to what you had. When a new\n * state is started with push(), it builds on the current style and transform\n * information. The push() and pop() functions can be embedded to provide\n * more control. (See the second example for a demonstration.)\n * \n * push() stores information related to the current transformation state\n * and style settings controlled by the following functions: fill(),\n * stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),\n * imageMode(), rectMode(), ellipseMode(), colorMode(), textAlign(),\n * textFont(), textSize(), textLeading().\n * \n * In WEBGL mode additional style settings are stored. These are controlled by the following functions: setCamera(), ambientLight(), directionalLight(),\n * pointLight(), texture(), specularMaterial(), shininess(), normalMaterial()\n * and shader().\n *\n * @method push\n * @example\n * \n * \n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * strokeWeight(10);\n * fill(204, 153, 0);\n * translate(50, 0);\n * ellipse(0, 50, 33, 33); // Middle circle\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n * \n * \n * \n * \n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * strokeWeight(10);\n * fill(204, 153, 0);\n * ellipse(33, 50, 33, 33); // Left-middle circle\n *\n * push(); // Start another new drawing state\n * stroke(0, 102, 153);\n * ellipse(66, 50, 33, 33); // Right-middle circle\n * pop(); // Restore previous state\n *\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n * \n * \n *\n * @alt\n * Gold ellipse + thick black outline @center 2 white ellipses on left and right.\n * 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.\n *\n */\np5.prototype.push = function() {\n this._styles.push({\n props: {\n _colorMode: this._colorMode\n },\n renderer: this._renderer.push()\n });\n};\n\n/**\n * The push() function saves the current drawing style settings and\n * transformations, while pop() restores these settings. Note that these\n * functions are always used together. They allow you to change the style\n * and transformation settings and later return to what you had. When a new\n * state is started with push(), it builds on the current style and transform\n * information. The push() and pop() functions can be embedded to provide\n * more control. (See the second example for a demonstration.)\n * \n * push() stores information related to the current transformation state\n * and style settings controlled by the following functions: fill(),\n * stroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),\n * imageMode(), rectMode(), ellipseMode(), colorMode(), textAlign(),\n * textFont(), textSize(), textLeading().\n * \n * In WEBGL mode additional style settings are stored. These are controlled by the following functions: setCamera(), ambientLight(), directionalLight(),\n * pointLight(), texture(), specularMaterial(), shininess(), normalMaterial()\n * and shader().\n *\n * @method pop\n * @example\n * \n * \n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * translate(50, 0);\n * strokeWeight(10);\n * fill(204, 153, 0);\n * ellipse(0, 50, 33, 33); // Middle circle\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n * \n * \n * \n * \n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * strokeWeight(10);\n * fill(204, 153, 0);\n * ellipse(33, 50, 33, 33); // Left-middle circle\n *\n * push(); // Start another new drawing state\n * stroke(0, 102, 153);\n * ellipse(66, 50, 33, 33); // Right-middle circle\n * pop(); // Restore previous state\n *\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n * \n * \n *\n * @alt\n * Gold ellipse + thick black outline @center 2 white ellipses on left and right.\n * 2 Gold ellipses left black right blue stroke. 2 white ellipses on left+right.\n *\n */\np5.prototype.pop = function() {\n var style = this._styles.pop();\n if (style) {\n this._renderer.pop(style.renderer);\n Object.assign(this, style.props);\n } else {\n console.warn('pop() was called without matching push()');\n }\n};\n\n/**\n *\n * Executes the code within draw() one time. This functions allows the\n * program to update the display window only when necessary, for example\n * when an event registered by mousePressed() or keyPressed() occurs.\n * \n * In structuring a program, it only makes sense to call redraw() within\n * events such as mousePressed(). This is because redraw() does not run\n * draw() immediately (it only sets a flag that indicates an update is\n * needed).\n * \n * The redraw() function does not work properly when called inside draw().\n * To enable/disable animations, use loop() and noLoop().\n * \n * In addition you can set the number of redraws per method call. Just\n * add an integer as single parameter for the number of redraws.\n *\n * @method redraw\n * @param {Integer} [n] Redraw for n-times. The default value is 1.\n * @example\n * \n * let x = 0;\n *\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * x += 1;\n * redraw();\n * }\n * \n *\n * \n * let x = 0;\n *\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * x += 1;\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * redraw(5);\n * }\n * \n *\n * @alt\n * black line on far left of canvas\n * black line on far left of canvas\n *\n */\np5.prototype.redraw = function(n) {\n if (this._inUserDraw || !this._setupDone) {\n return;\n }\n\n var numberOfRedraws = parseInt(n);\n if (isNaN(numberOfRedraws) || numberOfRedraws < 1) {\n numberOfRedraws = 1;\n }\n\n var context = this._isGlobal ? window : this;\n var userSetup = context.setup;\n var userDraw = context.draw;\n if (typeof userDraw === 'function') {\n if (typeof userSetup === 'undefined') {\n context.scale(context._pixelDensity, context._pixelDensity);\n }\n var callMethod = function(f) {\n f.call(context);\n };\n for (var idxRedraw = 0; idxRedraw < numberOfRedraws; idxRedraw++) {\n context.resetMatrix();\n if (context._renderer.isP3D) {\n context._renderer._update();\n }\n context._setProperty('frameCount', context.frameCount + 1);\n context._registeredMethods.pre.forEach(callMethod);\n this._inUserDraw = true;\n try {\n userDraw();\n } finally {\n this._inUserDraw = false;\n }\n context._registeredMethods.post.forEach(callMethod);\n }\n }\n};\n\nmodule.exports = p5;\n\n},{\"./main\":24}],36:[function(_dereq_,module,exports){\n/**\n * @module Transform\n * @submodule Transform\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('./main');\n\n/**\n * Multiplies the current matrix by the one specified through the parameters.\n * This is a powerful operation that can perform the equivalent of translate,\n * scale, shear and rotate all at once. You can learn more about transformation\n * matrices on \n * Wikipedia.\n *\n * The naming of the arguments here follows the naming of the \n * WHATWG specification and corresponds to a\n * transformation matrix of the\n * form:\n *\n * > \n *\n * @method applyMatrix\n * @param {Number} a numbers which define the 2x3 matrix to be multiplied\n * @param {Number} b numbers which define the 2x3 matrix to be multiplied\n * @param {Number} c numbers which define the 2x3 matrix to be multiplied\n * @param {Number} d numbers which define the 2x3 matrix to be multiplied\n * @param {Number} e numbers which define the 2x3 matrix to be multiplied\n * @param {Number} f numbers which define the 2x3 matrix to be multiplied\n * @chainable\n * @example\n * \n * \n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * background(200);\n * // Equivalent to translate(x, y);\n * applyMatrix(1, 0, 0, 1, 40 + step, 50);\n * rect(0, 0, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * background(200);\n * translate(50, 50);\n * // Equivalent to scale(x, y);\n * applyMatrix(1 / step, 0, 0, 1 / step, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * var angle = map(step, 0, 20, 0, TWO_PI);\n * var cos_a = cos(angle);\n * var sin_a = sin(angle);\n * background(200);\n * translate(50, 50);\n * // Equivalent to rotate(angle);\n * applyMatrix(cos_a, sin_a, -sin_a, cos_a, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * var angle = map(step, 0, 20, -PI / 4, PI / 4);\n * background(200);\n * translate(50, 50);\n * // equivalent to shearX(angle);\n * var shear_factor = 1 / tan(PI / 2 - angle);\n * applyMatrix(1, 0, shear_factor, 1, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noFill();\n * }\n *\n * function draw() {\n * background(200);\n * rotateY(PI / 6);\n * stroke(153);\n * box(35);\n * var rad = millis() / 1000;\n * // Set rotation angles\n * var ct = cos(rad);\n * var st = sin(rad);\n * // Matrix for rotation around the Y axis\n * // prettier-ignore\n * applyMatrix( ct, 0.0, st, 0.0,\n * 0.0, 1.0, 0.0, 0.0,\n * -st, 0.0, ct, 0.0,\n * 0.0, 0.0, 0.0, 1.0);\n * stroke(255);\n * box(50);\n * }\n * \n * \n *\n * @alt\n * A rectangle translating to the right\n * A rectangle shrinking to the center\n * A rectangle rotating clockwise about the center\n * A rectangle shearing\n *\n */\np5.prototype.applyMatrix = function(a, b, c, d, e, f) {\n this._renderer.applyMatrix.apply(this._renderer, arguments);\n return this;\n};\n\n/**\n * Replaces the current matrix with the identity matrix.\n *\n * @method resetMatrix\n * @chainable\n * @example\n * \n * \n * translate(50, 50);\n * applyMatrix(0.5, 0.5, -0.5, 0.5, 0, 0);\n * rect(0, 0, 20, 20);\n * // Note that the translate is also reset.\n * resetMatrix();\n * rect(0, 0, 20, 20);\n * \n * \n *\n * @alt\n * A rotated retangle in the center with another at the top left corner\n *\n */\np5.prototype.resetMatrix = function() {\n this._renderer.resetMatrix();\n return this;\n};\n\n/**\n * Rotates a shape the amount specified by the angle parameter. This\n * function accounts for angleMode, so angles can be entered in either\n * RADIANS or DEGREES.\n * \n * Objects are always rotated around their relative position to the\n * origin and positive numbers rotate objects in a clockwise direction.\n * Transformations apply to everything that happens after and subsequent\n * calls to the function accumulates the effect. For example, calling\n * rotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI).\n * All tranformations are reset when draw() begins again.\n * \n * Technically, rotate() multiplies the current transformation matrix\n * by a rotation matrix. This function can be further controlled by\n * the push() and pop().\n *\n * @method rotate\n * @param {Number} angle the angle of rotation, specified in radians\n * or degrees, depending on current angleMode\n * @param {p5.Vector|Number[]} [axis] (in 3d) the axis to rotate around\n * @chainable\n * @example\n * \n * \n * translate(width / 2, height / 2);\n * rotate(PI / 3.0);\n * rect(-26, -26, 52, 52);\n * \n * \n *\n * @alt\n * white 52x52 rect with black outline at center rotated counter 45 degrees\n *\n */\np5.prototype.rotate = function(angle, axis) {\n p5._validateParameters('rotate', arguments);\n this._renderer.rotate(this._toRadians(angle), axis);\n return this;\n};\n\n/**\n * Rotates around X axis.\n * @method rotateX\n * @param {Number} angle the angle of rotation, specified in radians\n * or degrees, depending on current angleMode\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateX(millis() / 1000);\n * box();\n * }\n * \n * \n *\n * @alt\n * 3d box rotating around the x axis.\n */\np5.prototype.rotateX = function(angle) {\n this._assert3d('rotateX');\n p5._validateParameters('rotateX', arguments);\n this._renderer.rotateX(this._toRadians(angle));\n return this;\n};\n\n/**\n * Rotates around Y axis.\n * @method rotateY\n * @param {Number} angle the angle of rotation, specified in radians\n * or degrees, depending on current angleMode\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateY(millis() / 1000);\n * box();\n * }\n * \n * \n *\n * @alt\n * 3d box rotating around the y axis.\n */\np5.prototype.rotateY = function(angle) {\n this._assert3d('rotateY');\n p5._validateParameters('rotateY', arguments);\n this._renderer.rotateY(this._toRadians(angle));\n return this;\n};\n\n/**\n * Rotates around Z axis. Webgl mode only.\n * @method rotateZ\n * @param {Number} angle the angle of rotation, specified in radians\n * or degrees, depending on current angleMode\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateZ(millis() / 1000);\n * box();\n * }\n * \n * \n *\n * @alt\n * 3d box rotating around the z axis.\n */\np5.prototype.rotateZ = function(angle) {\n this._assert3d('rotateZ');\n p5._validateParameters('rotateZ', arguments);\n this._renderer.rotateZ(this._toRadians(angle));\n return this;\n};\n\n/**\n * Increases or decreases the size of a shape by expanding and contracting\n * vertices. Objects always scale from their relative origin to the\n * coordinate system. Scale values are specified as decimal percentages.\n * For example, the function call scale(2.0) increases the dimension of a\n * shape by 200%.\n * \n * Transformations apply to everything that happens after and subsequent\n * calls to the function multiply the effect. For example, calling scale(2.0)\n * and then scale(1.5) is the same as scale(3.0). If scale() is called\n * within draw(), the transformation is reset when the loop begins again.\n * \n * Using this function with the z parameter is only available in WEBGL mode.\n * This function can be further controlled with push() and pop().\n *\n * @method scale\n * @param {Number|p5.Vector|Number[]} s\n * percent to scale the object, or percentage to\n * scale the object in the x-axis if multiple arguments\n * are given\n * @param {Number} [y] percent to scale the object in the y-axis\n * @param {Number} [z] percent to scale the object in the z-axis (webgl only)\n * @chainable\n * @example\n * \n * \n * rect(30, 20, 50, 50);\n * scale(0.5);\n * rect(30, 20, 50, 50);\n * \n * \n *\n * \n * \n * rect(30, 20, 50, 50);\n * scale(0.5, 1.3);\n * rect(30, 20, 50, 50);\n * \n * \n *\n * @alt\n * white 52x52 rect with black outline at center rotated counter 45 degrees\n * 2 white rects with black outline- 1 50x50 at center. other 25x65 bottom left\n *\n */\n/**\n * @method scale\n * @param {p5.Vector|Number[]} scales per-axis percents to scale the object\n * @chainable\n */\np5.prototype.scale = function(x, y, z) {\n p5._validateParameters('scale', arguments);\n // Only check for Vector argument type if Vector is available\n if (x instanceof p5.Vector) {\n var v = x;\n x = v.x;\n y = v.y;\n z = v.z;\n } else if (x instanceof Array) {\n var rg = x;\n x = rg[0];\n y = rg[1];\n z = rg[2] || 1;\n }\n if (isNaN(y)) {\n y = z = x;\n } else if (isNaN(z)) {\n z = 1;\n }\n\n this._renderer.scale.call(this._renderer, x, y, z);\n\n return this;\n};\n\n/**\n * Shears a shape around the x-axis the amount specified by the angle\n * parameter. Angles should be specified in the current angleMode.\n * Objects are always sheared around their relative position to the origin\n * and positive numbers shear objects in a clockwise direction.\n * \n * Transformations apply to everything that happens after and subsequent\n * calls to the function accumulates the effect. For example, calling\n * shearX(PI/2) and then shearX(PI/2) is the same as shearX(PI).\n * If shearX() is called within the draw(), the transformation is reset when\n * the loop begins again.\n * \n * Technically, shearX() multiplies the current transformation matrix by a\n * rotation matrix. This function can be further controlled by the\n * push() and pop() functions.\n *\n * @method shearX\n * @param {Number} angle angle of shear specified in radians or degrees,\n * depending on current angleMode\n * @chainable\n * @example\n * \n * \n * translate(width / 4, height / 4);\n * shearX(PI / 4.0);\n * rect(0, 0, 30, 30);\n * \n * \n *\n * @alt\n * white irregular quadrilateral with black outline at top middle.\n *\n */\np5.prototype.shearX = function(angle) {\n p5._validateParameters('shearX', arguments);\n var rad = this._toRadians(angle);\n this._renderer.applyMatrix(1, 0, Math.tan(rad), 1, 0, 0);\n return this;\n};\n\n/**\n * Shears a shape around the y-axis the amount specified by the angle\n * parameter. Angles should be specified in the current angleMode. Objects\n * are always sheared around their relative position to the origin and\n * positive numbers shear objects in a clockwise direction.\n * \n * Transformations apply to everything that happens after and subsequent\n * calls to the function accumulates the effect. For example, calling\n * shearY(PI/2) and then shearY(PI/2) is the same as shearY(PI). If\n * shearY() is called within the draw(), the transformation is reset when\n * the loop begins again.\n * \n * Technically, shearY() multiplies the current transformation matrix by a\n * rotation matrix. This function can be further controlled by the\n * push() and pop() functions.\n *\n * @method shearY\n * @param {Number} angle angle of shear specified in radians or degrees,\n * depending on current angleMode\n * @chainable\n * @example\n * \n * \n * translate(width / 4, height / 4);\n * shearY(PI / 4.0);\n * rect(0, 0, 30, 30);\n * \n * \n *\n * @alt\n * white irregular quadrilateral with black outline at middle bottom.\n *\n */\np5.prototype.shearY = function(angle) {\n p5._validateParameters('shearY', arguments);\n var rad = this._toRadians(angle);\n this._renderer.applyMatrix(1, Math.tan(rad), 0, 1, 0, 0);\n return this;\n};\n\n/**\n * Specifies an amount to displace objects within the display window.\n * The x parameter specifies left/right translation, the y parameter\n * specifies up/down translation.\n * \n * Transformations are cumulative and apply to everything that happens after\n * and subsequent calls to the function accumulates the effect. For example,\n * calling translate(50, 0) and then translate(20, 0) is the same as\n * translate(70, 0). If translate() is called within draw(), the\n * transformation is reset when the loop begins again. This function can be\n * further controlled by using push() and pop().\n *\n * @method translate\n * @param {Number} x left/right translation\n * @param {Number} y up/down translation\n * @param {Number} [z] forward/backward translation (webgl only)\n * @chainable\n * @example\n * \n * \n * translate(30, 20);\n * rect(0, 0, 55, 55);\n * \n * \n *\n * \n * \n * rect(0, 0, 55, 55); // Draw rect at original 0,0\n * translate(30, 20);\n * rect(0, 0, 55, 55); // Draw rect at new 0,0\n * translate(14, 14);\n * rect(0, 0, 55, 55); // Draw rect at new 0,0\n * \n * \n *\n\n * \n * \n * function draw() {\n * background(200);\n * rectMode(CENTER);\n * translate(width / 2, height / 2);\n * translate(p5.Vector.fromAngle(millis() / 1000, 40));\n * rect(0, 0, 20, 20);\n * }\n * \n * \n *\n * @alt\n * white 55x55 rect with black outline at center right.\n * 3 white 55x55 rects with black outlines at top-l, center-r and bottom-r.\n * a 20x20 white rect moving in a circle around the canvas\n *\n */\n/**\n * @method translate\n * @param {p5.Vector} vector the vector to translate by\n * @chainable\n */\np5.prototype.translate = function(x, y, z) {\n p5._validateParameters('translate', arguments);\n if (this._renderer.isP3D) {\n this._renderer.translate(x, y, z);\n } else {\n this._renderer.translate(x, y);\n }\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"./main\":24}],37:[function(_dereq_,module,exports){\n/**\n * @module Data\n * @submodule Dictionary\n * @for p5.TypedDict\n * @requires core\n *\n * This module defines the p5 methods for the p5 Dictionary classes.\n * The classes StringDict and NumberDict are for storing and working\n * with key-value pairs.\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n *\n * Creates a new instance of p5.StringDict using the key-value pair\n * or the object you provide.\n *\n * @method createStringDict\n * @for p5\n * @param {String} key\n * @param {String} value\n * @return {p5.StringDict}\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // logs true to console\n *\n * let anotherDictionary = createStringDict({ happy: 'coding' });\n * print(anotherDictionary.hasKey('happy')); // logs true to console\n * }\n * \n */\n/**\n * @method createStringDict\n * @param {Object} object object\n * @return {p5.StringDict}\n */\n\np5.prototype.createStringDict = function(key, value) {\n p5._validateParameters('createStringDict', arguments);\n return new p5.StringDict(key, value);\n};\n\n/**\n *\n * Creates a new instance of p5.NumberDict using the key-value pair\n * or object you provide.\n *\n * @method createNumberDict\n * @for p5\n * @param {Number} key\n * @param {Number} value\n * @return {p5.NumberDict}\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(100, 42);\n * print(myDictionary.hasKey(100)); // logs true to console\n *\n * let anotherDictionary = createNumberDict({ 200: 84 });\n * print(anotherDictionary.hasKey(200)); // logs true to console\n * }\n * \n */\n/**\n * @method createNumberDict\n * @param {Object} object object\n * @return {p5.NumberDict}\n */\n\np5.prototype.createNumberDict = function(key, value) {\n p5._validateParameters('createNumberDict', arguments);\n return new p5.NumberDict(key, value);\n};\n\n/**\n *\n * Base class for all p5.Dictionary types. Specifically\n * typed Dictionary classes inherit from this class.\n *\n * @class p5.TypedDict\n *\n */\n\np5.TypedDict = function(key, value) {\n if (key instanceof Object) {\n this.data = key;\n } else {\n this.data = {};\n this.data[key] = value;\n }\n return this;\n};\n\n/**\n * Returns the number of key-value pairs currently stored in the Dictionary.\n *\n * @method size\n * @return {Integer} the number of key-value pairs in the Dictionary\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(1, 10);\n * myDictionary.create(2, 20);\n * myDictionary.create(3, 30);\n * print(myDictionary.size()); // logs 3 to the console\n * }\n * \n *\n */\np5.TypedDict.prototype.size = function() {\n return Object.keys(this.data).length;\n};\n\n/**\n * Returns true if the given key exists in the Dictionary,\n * otherwise returns false.\n *\n * @method hasKey\n * @param {Number|String} key that you want to look up\n * @return {Boolean} whether that key exists in Dictionary\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // logs true to console\n * }\n * \n *\n */\n\np5.TypedDict.prototype.hasKey = function(key) {\n return this.data.hasOwnProperty(key);\n};\n\n/**\n * Returns the value stored at the given key.\n *\n * @method get\n * @param {Number|String} the key you want to access\n * @return {Number|String} the value stored at that key\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * let myValue = myDictionary.get('p5');\n * print(myValue === 'js'); // logs true to console\n * }\n * \n *\n */\n\np5.TypedDict.prototype.get = function(key) {\n if (this.data.hasOwnProperty(key)) {\n return this.data[key];\n } else {\n console.log(key + ' does not exist in this Dictionary');\n }\n};\n\n/**\n * Updates the value associated with the given key in case it already exists\n * in the Dictionary. Otherwise a new key-value pair is added.\n *\n * @method set\n * @param {Number|String} key\n * @param {Number|String} value\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.set('p5', 'JS');\n * myDictionary.print(); // logs \"key: p5 - value: JS\" to console\n * }\n * \n *\n */\n\np5.TypedDict.prototype.set = function(key, value) {\n if (this._validate(value)) {\n this.data[key] = value;\n } else {\n console.log('Those values dont work for this dictionary type.');\n }\n};\n\n/**\n * private helper function to handle the user passing in objects\n * during construction or calls to create()\n */\n\np5.TypedDict.prototype._addObj = function(obj) {\n for (var key in obj) {\n this.set(key, obj[key]);\n }\n};\n\n/**\n * Creates a new key-value pair in the Dictionary.\n *\n * @method create\n * @param {Number|String} key\n * @param {Number|String} value\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.create('happy', 'coding');\n * myDictionary.print();\n * // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n * }\n * \n */\n/**\n * @method create\n * @param {Object} obj key/value pair\n */\n\np5.TypedDict.prototype.create = function(key, value) {\n if (key instanceof Object && typeof value === 'undefined') {\n this._addObj(key);\n } else if (typeof key !== 'undefined') {\n this.set(key, value);\n } else {\n console.log(\n 'In order to create a new Dictionary entry you must pass ' +\n 'an object or a key, value pair'\n );\n }\n};\n\n/**\n * Removes all previously stored key-value pairs from the Dictionary.\n *\n * @method clear\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // prints 'true'\n * myDictionary.clear();\n * print(myDictionary.hasKey('p5')); // prints 'false'\n * }\n * \n * \n */\n\np5.TypedDict.prototype.clear = function() {\n this.data = {};\n};\n\n/**\n * Removes the key-value pair stored at the given key from the Dictionary.\n *\n * @method remove\n * @param {Number|String} key for the pair to remove\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.create('happy', 'coding');\n * myDictionary.print();\n * // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n * myDictionary.remove('p5');\n * myDictionary.print();\n * // above logs \"key: happy value: coding\" to console\n * }\n * \n *\n */\n\np5.TypedDict.prototype.remove = function(key) {\n if (this.data.hasOwnProperty(key)) {\n delete this.data[key];\n } else {\n throw new Error(key + ' does not exist in this Dictionary');\n }\n};\n\n/**\n * Logs the set of items currently stored in the Dictionary to the console.\n *\n * @method print\n *\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.create('happy', 'coding');\n * myDictionary.print();\n * // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n * }\n * \n * \n */\n\np5.TypedDict.prototype.print = function() {\n for (var item in this.data) {\n console.log('key:' + item + ' value:' + this.data[item]);\n }\n};\n\n/**\n * Converts the Dictionary into a CSV file for local download.\n *\n * @method saveTable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * createStringDict({\n * john: 1940,\n * paul: 1942,\n * george: 1943,\n * ringo: 1940\n * }).saveTable('beatles');\n * }\n * }\n * \n * \n */\n\np5.TypedDict.prototype.saveTable = function(filename) {\n var output = '';\n\n for (var key in this.data) {\n output += key + ',' + this.data[key] + '\\n';\n }\n\n var blob = new Blob([output], { type: 'text/csv' });\n p5.prototype.downloadFile(blob, filename || 'mycsv', 'csv');\n};\n\n/**\n * Converts the Dictionary into a JSON file for local download.\n *\n * @method saveJSON\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * createStringDict({\n * john: 1940,\n * paul: 1942,\n * george: 1943,\n * ringo: 1940\n * }).saveJSON('beatles');\n * }\n * }\n * \n * \n */\n\np5.TypedDict.prototype.saveJSON = function(filename, opt) {\n p5.prototype.saveJSON(this.data, filename, opt);\n};\n\n/**\n * private helper function to ensure that the user passed in valid\n * values for the Dictionary type\n */\n\np5.TypedDict.prototype._validate = function(value) {\n return true;\n};\n\n/**\n *\n * A simple Dictionary class for Strings.\n *\n * @class p5.StringDict\n * @extends p5.TypedDict\n *\n */\n\np5.StringDict = function() {\n p5.TypedDict.apply(this, arguments);\n};\n\np5.StringDict.prototype = Object.create(p5.TypedDict.prototype);\n\np5.StringDict.prototype._validate = function(value) {\n return typeof value === 'string';\n};\n\n/**\n *\n * A simple Dictionary class for Numbers.\n *\n * @class p5.NumberDict\n * @extends p5.TypedDict\n *\n */\n\np5.NumberDict = function() {\n p5.TypedDict.apply(this, arguments);\n};\n\np5.NumberDict.prototype = Object.create(p5.TypedDict.prototype);\n\n/**\n * private helper function to ensure that the user passed in valid\n * values for the Dictionary type\n */\n\np5.NumberDict.prototype._validate = function(value) {\n return typeof value === 'number';\n};\n\n/**\n * Add the given number to the value currently stored at the given key.\n * The sum then replaces the value previously stored in the Dictionary.\n *\n * @method add\n * @param {Number} Key for the value you wish to add to\n * @param {Number} Number to add to the value\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(2, 5);\n * myDictionary.add(2, 2);\n * print(myDictionary.get(2)); // logs 7 to console.\n * }\n * \n *\n *\n */\n\np5.NumberDict.prototype.add = function(key, amount) {\n if (this.data.hasOwnProperty(key)) {\n this.data[key] += amount;\n } else {\n console.log('The key - ' + key + ' does not exist in this dictionary.');\n }\n};\n\n/**\n * Subtract the given number from the value currently stored at the given key.\n * The difference then replaces the value previously stored in the Dictionary.\n *\n * @method sub\n * @param {Number} Key for the value you wish to subtract from\n * @param {Number} Number to subtract from the value\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(2, 5);\n * myDictionary.sub(2, 2);\n * print(myDictionary.get(2)); // logs 3 to console.\n * }\n * \n *\n *\n */\n\np5.NumberDict.prototype.sub = function(key, amount) {\n this.add(key, -amount);\n};\n\n/**\n * Multiply the given number with the value currently stored at the given key.\n * The product then replaces the value previously stored in the Dictionary.\n *\n * @method mult\n * @param {Number} Key for value you wish to multiply\n * @param {Number} Amount to multiply the value by\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(2, 4);\n * myDictionary.mult(2, 2);\n * print(myDictionary.get(2)); // logs 8 to console.\n * }\n * \n *\n *\n */\n\np5.NumberDict.prototype.mult = function(key, amount) {\n if (this.data.hasOwnProperty(key)) {\n this.data[key] *= amount;\n } else {\n console.log('The key - ' + key + ' does not exist in this dictionary.');\n }\n};\n\n/**\n * Divide the given number with the value currently stored at the given key.\n * The quotient then replaces the value previously stored in the Dictionary.\n *\n * @method div\n * @param {Number} Key for value you wish to divide\n * @param {Number} Amount to divide the value by\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict(2, 8);\n * myDictionary.div(2, 2);\n * print(myDictionary.get(2)); // logs 4 to console.\n * }\n * \n *\n *\n */\n\np5.NumberDict.prototype.div = function(key, amount) {\n if (this.data.hasOwnProperty(key)) {\n this.data[key] /= amount;\n } else {\n console.log('The key - ' + key + ' does not exist in this dictionary.');\n }\n};\n\n/**\n * private helper function for finding lowest or highest value\n * the argument 'flip' is used to flip the comparison arrow\n * from 'less than' to 'greater than'\n *\n */\n\np5.NumberDict.prototype._valueTest = function(flip) {\n if (Object.keys(this.data).length === 0) {\n throw new Error(\n 'Unable to search for a minimum or maximum value on an empty NumberDict'\n );\n } else if (Object.keys(this.data).length === 1) {\n return this.data[Object.keys(this.data)[0]];\n } else {\n var result = this.data[Object.keys(this.data)[0]];\n for (var key in this.data) {\n if (this.data[key] * flip < result * flip) {\n result = this.data[key];\n }\n }\n return result;\n }\n};\n\n/**\n * Return the lowest number currently stored in the Dictionary.\n *\n * @method minValue\n * @return {Number}\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n * let lowestValue = myDictionary.minValue(); // value is -10\n * print(lowestValue);\n * }\n * \n *\n */\n\np5.NumberDict.prototype.minValue = function() {\n return this._valueTest(1);\n};\n\n/**\n * Return the highest number currently stored in the Dictionary.\n *\n * @method maxValue\n * @return {Number}\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n * let highestValue = myDictionary.maxValue(); // value is 3\n * print(highestValue);\n * }\n * \n *\n */\n\np5.NumberDict.prototype.maxValue = function() {\n return this._valueTest(-1);\n};\n\n/**\n * private helper function for finding lowest or highest key\n * the argument 'flip' is used to flip the comparison arrow\n * from 'less than' to 'greater than'\n *\n */\n\np5.NumberDict.prototype._keyTest = function(flip) {\n if (Object.keys(this.data).length === 0) {\n throw new Error('Unable to use minValue on an empty NumberDict');\n } else if (Object.keys(this.data).length === 1) {\n return Object.keys(this.data)[0];\n } else {\n var result = Object.keys(this.data)[0];\n for (var i = 1; i < Object.keys(this.data).length; i++) {\n if (Object.keys(this.data)[i] * flip < result * flip) {\n result = Object.keys(this.data)[i];\n }\n }\n return result;\n }\n};\n\n/**\n * Return the lowest key currently used in the Dictionary.\n *\n * @method minKey\n * @return {Number}\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n * let lowestKey = myDictionary.minKey(); // value is 1.2\n * print(lowestKey);\n * }\n * \n *\n */\n\np5.NumberDict.prototype.minKey = function() {\n return this._keyTest(1);\n};\n\n/**\n * Return the highest key currently used in the Dictionary.\n *\n * @method maxKey\n * @return {Number}\n * @example\n * \n * \n * function setup() {\n * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n * let highestKey = myDictionary.maxKey(); // value is 4\n * print(highestKey);\n * }\n * \n *\n */\n\np5.NumberDict.prototype.maxKey = function() {\n return this._keyTest(-1);\n};\n\nmodule.exports = p5.TypedDict;\n\n},{\"../core/main\":24}],38:[function(_dereq_,module,exports){\n/**\n * @module Events\n * @submodule Acceleration\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * The system variable deviceOrientation always contains the orientation of\n * the device. The value of this variable will either be set 'landscape'\n * or 'portrait'. If no data is available it will be set to 'undefined'.\n * either LANDSCAPE or PORTRAIT.\n *\n * @property {Constant} deviceOrientation\n * @readOnly\n */\np5.prototype.deviceOrientation = undefined;\n\n/**\n * The system variable accelerationX always contains the acceleration of the\n * device along the x axis. Value is represented as meters per second squared.\n *\n * @property {Number} accelerationX\n * @readOnly\n * @example\n * \n * \n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationX);\n * }\n * \n * \n * @alt\n * Magnitude of device acceleration is displayed as ellipse size\n */\np5.prototype.accelerationX = 0;\n\n/**\n * The system variable accelerationY always contains the acceleration of the\n * device along the y axis. Value is represented as meters per second squared.\n *\n * @property {Number} accelerationY\n * @readOnly\n * @example\n * \n * \n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationY);\n * }\n * \n * \n * @alt\n * Magnitude of device acceleration is displayed as ellipse size\n */\np5.prototype.accelerationY = 0;\n\n/**\n * The system variable accelerationZ always contains the acceleration of the\n * device along the z axis. Value is represented as meters per second squared.\n *\n * @property {Number} accelerationZ\n * @readOnly\n *\n * @example\n * \n * \n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationZ);\n * }\n * \n * \n *\n * @alt\n * Magnitude of device acceleration is displayed as ellipse size\n */\np5.prototype.accelerationZ = 0;\n\n/**\n * The system variable pAccelerationX always contains the acceleration of the\n * device along the x axis in the frame previous to the current frame. Value\n * is represented as meters per second squared.\n *\n * @property {Number} pAccelerationX\n * @readOnly\n */\np5.prototype.pAccelerationX = 0;\n\n/**\n * The system variable pAccelerationY always contains the acceleration of the\n * device along the y axis in the frame previous to the current frame. Value\n * is represented as meters per second squared.\n *\n * @property {Number} pAccelerationY\n * @readOnly\n */\np5.prototype.pAccelerationY = 0;\n\n/**\n * The system variable pAccelerationZ always contains the acceleration of the\n * device along the z axis in the frame previous to the current frame. Value\n * is represented as meters per second squared.\n *\n * @property {Number} pAccelerationZ\n * @readOnly\n */\np5.prototype.pAccelerationZ = 0;\n\n/**\n * _updatePAccelerations updates the pAcceleration values\n *\n * @private\n */\np5.prototype._updatePAccelerations = function() {\n this._setProperty('pAccelerationX', this.accelerationX);\n this._setProperty('pAccelerationY', this.accelerationY);\n this._setProperty('pAccelerationZ', this.accelerationZ);\n};\n\n/**\n * The system variable rotationX always contains the rotation of the\n * device along the x axis. Value is represented as 0 to +/-180 degrees.\n * \n * Note: The order the rotations are called is important, ie. if used\n * together, it must be called in the order Z-X-Y or there might be\n * unexpected behaviour.\n *\n * @property {Number} rotationX\n * @readOnly\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * //rotateZ(radians(rotationZ));\n * rotateX(radians(rotationX));\n * //rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n * \n * \n * @alt\n * red horizontal line right, green vertical line bottom. black background.\n */\np5.prototype.rotationX = 0;\n\n/**\n * The system variable rotationY always contains the rotation of the\n * device along the y axis. Value is represented as 0 to +/-90 degrees.\n * \n * Note: The order the rotations are called is important, ie. if used\n * together, it must be called in the order Z-X-Y or there might be\n * unexpected behaviour.\n *\n * @property {Number} rotationY\n * @readOnly\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * //rotateZ(radians(rotationZ));\n * //rotateX(radians(rotationX));\n * rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n * \n * \n * @alt\n * red horizontal line right, green vertical line bottom. black background.\n */\np5.prototype.rotationY = 0;\n\n/**\n * The system variable rotationZ always contains the rotation of the\n * device along the z axis. Value is represented as 0 to 359 degrees.\n * \n * Unlike rotationX and rotationY, this variable is available for devices\n * with a built-in compass only.\n * \n * Note: The order the rotations are called is important, ie. if used\n * together, it must be called in the order Z-X-Y or there might be\n * unexpected behaviour.\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateZ(radians(rotationZ));\n * //rotateX(radians(rotationX));\n * //rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n * \n * \n *\n * @property {Number} rotationZ\n * @readOnly\n *\n * @alt\n * red horizontal line right, green vertical line bottom. black background.\n */\np5.prototype.rotationZ = 0;\n\n/**\n * The system variable pRotationX always contains the rotation of the\n * device along the x axis in the frame previous to the current frame. Value\n * is represented as 0 to +/-180 degrees.\n * \n * pRotationX can also be used with rotationX to determine the rotate\n * direction of the device along the X-axis.\n * @example\n * \n * \n * // A simple if statement looking at whether\n * // rotationX - pRotationX < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * // Simple range conversion to make things simpler.\n * // This is not absolutely necessary but the logic\n * // will be different in that case.\n *\n * let rX = rotationX + 180;\n * let pRX = pRotationX + 180;\n *\n * if ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\n * rotateDirection = 'clockwise';\n * } else if (rX - pRX < 0 || rX - pRX > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n *\n * print(rotateDirection);\n * \n * \n *\n * @alt\n * no image to display.\n *\n *\n * @property {Number} pRotationX\n * @readOnly\n */\np5.prototype.pRotationX = 0;\n\n/**\n * The system variable pRotationY always contains the rotation of the\n * device along the y axis in the frame previous to the current frame. Value\n * is represented as 0 to +/-90 degrees.\n * \n * pRotationY can also be used with rotationY to determine the rotate\n * direction of the device along the Y-axis.\n * @example\n * \n * \n * // A simple if statement looking at whether\n * // rotationY - pRotationY < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * // Simple range conversion to make things simpler.\n * // This is not absolutely necessary but the logic\n * // will be different in that case.\n *\n * let rY = rotationY + 180;\n * let pRY = pRotationY + 180;\n *\n * if ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\n * rotateDirection = 'clockwise';\n * } else if (rY - pRY < 0 || rY - pRY > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n * print(rotateDirection);\n * \n * \n *\n * @alt\n * no image to display.\n *\n *\n * @property {Number} pRotationY\n * @readOnly\n */\np5.prototype.pRotationY = 0;\n\n/**\n * The system variable pRotationZ always contains the rotation of the\n * device along the z axis in the frame previous to the current frame. Value\n * is represented as 0 to 359 degrees.\n * \n * pRotationZ can also be used with rotationZ to determine the rotate\n * direction of the device along the Z-axis.\n * @example\n * \n * \n * // A simple if statement looking at whether\n * // rotationZ - pRotationZ < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * if (\n * (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\n * rotationZ - pRotationZ < -270\n * ) {\n * rotateDirection = 'clockwise';\n * } else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n * print(rotateDirection);\n * \n * \n *\n * @alt\n * no image to display.\n *\n *\n * @property {Number} pRotationZ\n * @readOnly\n */\np5.prototype.pRotationZ = 0;\n\nvar startAngleX = 0;\nvar startAngleY = 0;\nvar startAngleZ = 0;\n\nvar rotateDirectionX = 'clockwise';\nvar rotateDirectionY = 'clockwise';\nvar rotateDirectionZ = 'clockwise';\n\nvar pRotateDirectionX;\nvar pRotateDirectionY;\nvar pRotateDirectionZ;\n\np5.prototype._updatePRotations = function() {\n this._setProperty('pRotationX', this.rotationX);\n this._setProperty('pRotationY', this.rotationY);\n this._setProperty('pRotationZ', this.rotationZ);\n};\n\n/**\n * When a device is rotated, the axis that triggers the deviceTurned()\n * method is stored in the turnAxis variable. The turnAxis variable is only defined within\n * the scope of deviceTurned().\n * @property {String} turnAxis\n * @readOnly\n * @example\n * \n * \n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees in the\n * // X-axis to change the value.\n *\n * var value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (turnAxis === 'X') {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device turns\n * 50x50 black rect in center of canvas. turns white on mobile when x-axis turns\n */\np5.prototype.turnAxis = undefined;\n\nvar move_threshold = 0.5;\nvar shake_threshold = 30;\n\n/**\n * The setMoveThreshold() function is used to set the movement threshold for\n * the deviceMoved() function. The default threshold is set to 0.5.\n *\n * @method setMoveThreshold\n * @param {number} value The threshold value\n * @example\n * \n * \n * // Run this example on a mobile device\n * // You will need to move the device incrementally further\n * // the closer the square's color gets to white in order to change the value.\n *\n * let value = 0;\n * let threshold = 0.5;\n * function setup() {\n * setMoveThreshold(threshold);\n * }\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * threshold = threshold + 0.1;\n * if (value > 255) {\n * value = 0;\n * threshold = 30;\n * }\n * setMoveThreshold(threshold);\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device moves\n */\n\np5.prototype.setMoveThreshold = function(val) {\n p5._validateParameters('setMoveThreshold', arguments);\n move_threshold = val;\n};\n\n/**\n * The setShakeThreshold() function is used to set the movement threshold for\n * the deviceShaken() function. The default threshold is set to 30.\n *\n * @method setShakeThreshold\n * @param {number} value The threshold value\n * @example\n * \n * \n * // Run this example on a mobile device\n * // You will need to shake the device more firmly\n * // the closer the box's fill gets to white in order to change the value.\n *\n * let value = 0;\n * let threshold = 30;\n * function setup() {\n * setShakeThreshold(threshold);\n * }\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * threshold = threshold + 5;\n * if (value > 255) {\n * value = 0;\n * threshold = 30;\n * }\n * setShakeThreshold(threshold);\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device\n * is being shaked\n */\n\np5.prototype.setShakeThreshold = function(val) {\n p5._validateParameters('setShakeThreshold', arguments);\n shake_threshold = val;\n};\n\n/**\n * The deviceMoved() function is called when the device is moved by more than\n * the threshold value along X, Y or Z axis. The default threshold is set to 0.5.\n * The threshold value can be changed using setMoveThreshold().\n *\n * @method deviceMoved\n * @example\n * \n * \n * // Run this example on a mobile device\n * // Move the device around\n * // to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device moves\n *\n */\n\n/**\n * The deviceTurned() function is called when the device rotates by\n * more than 90 degrees continuously.\n * \n * The axis that triggers the deviceTurned() method is stored in the turnAxis\n * variable. The deviceTurned() method can be locked to trigger on any axis:\n * X, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.\n *\n * @method deviceTurned\n * @example\n * \n * \n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees\n * // to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n * \n * \n * \n * \n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees in the\n * // X-axis to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (turnAxis === 'X') {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device turns\n * 50x50 black rect in center of canvas. turns white on mobile when x-axis turns\n *\n */\n\n/**\n * The deviceShaken() function is called when the device total acceleration\n * changes of accelerationX and accelerationY values is more than\n * the threshold value. The default threshold is set to 30.\n * The threshold value can be changed using setShakeThreshold().\n *\n * @method deviceShaken\n * @example\n * \n * \n * // Run this example on a mobile device\n * // Shake the device to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceShaken() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect in center of canvas. turns white on mobile when device shakes\n *\n */\n\np5.prototype._ondeviceorientation = function(e) {\n this._updatePRotations();\n this._setProperty('rotationX', e.beta);\n this._setProperty('rotationY', e.gamma);\n this._setProperty('rotationZ', e.alpha);\n this._handleMotion();\n};\np5.prototype._ondevicemotion = function(e) {\n this._updatePAccelerations();\n this._setProperty('accelerationX', e.acceleration.x * 2);\n this._setProperty('accelerationY', e.acceleration.y * 2);\n this._setProperty('accelerationZ', e.acceleration.z * 2);\n this._handleMotion();\n};\np5.prototype._handleMotion = function() {\n if (window.orientation === 90 || window.orientation === -90) {\n this._setProperty('deviceOrientation', 'landscape');\n } else if (window.orientation === 0) {\n this._setProperty('deviceOrientation', 'portrait');\n } else if (window.orientation === undefined) {\n this._setProperty('deviceOrientation', 'undefined');\n }\n var deviceMoved = this.deviceMoved || window.deviceMoved;\n if (typeof deviceMoved === 'function') {\n if (\n Math.abs(this.accelerationX - this.pAccelerationX) > move_threshold ||\n Math.abs(this.accelerationY - this.pAccelerationY) > move_threshold ||\n Math.abs(this.accelerationZ - this.pAccelerationZ) > move_threshold\n ) {\n deviceMoved();\n }\n }\n var deviceTurned = this.deviceTurned || window.deviceTurned;\n if (typeof deviceTurned === 'function') {\n // The angles given by rotationX etc is from range -180 to 180.\n // The following will convert them to 0 to 360 for ease of calculation\n // of cases when the angles wrapped around.\n // _startAngleX will be converted back at the end and updated.\n var wRX = this.rotationX + 180;\n var wPRX = this.pRotationX + 180;\n var wSAX = startAngleX + 180;\n if ((wRX - wPRX > 0 && wRX - wPRX < 270) || wRX - wPRX < -270) {\n rotateDirectionX = 'clockwise';\n } else if (wRX - wPRX < 0 || wRX - wPRX > 270) {\n rotateDirectionX = 'counter-clockwise';\n }\n if (rotateDirectionX !== pRotateDirectionX) {\n wSAX = wRX;\n }\n if (Math.abs(wRX - wSAX) > 90 && Math.abs(wRX - wSAX) < 270) {\n wSAX = wRX;\n this._setProperty('turnAxis', 'X');\n deviceTurned();\n }\n pRotateDirectionX = rotateDirectionX;\n startAngleX = wSAX - 180;\n\n // Y-axis is identical to X-axis except for changing some names.\n var wRY = this.rotationY + 180;\n var wPRY = this.pRotationY + 180;\n var wSAY = startAngleY + 180;\n if ((wRY - wPRY > 0 && wRY - wPRY < 270) || wRY - wPRY < -270) {\n rotateDirectionY = 'clockwise';\n } else if (wRY - wPRY < 0 || wRY - this.pRotationY > 270) {\n rotateDirectionY = 'counter-clockwise';\n }\n if (rotateDirectionY !== pRotateDirectionY) {\n wSAY = wRY;\n }\n if (Math.abs(wRY - wSAY) > 90 && Math.abs(wRY - wSAY) < 270) {\n wSAY = wRY;\n this._setProperty('turnAxis', 'Y');\n deviceTurned();\n }\n pRotateDirectionY = rotateDirectionY;\n startAngleY = wSAY - 180;\n\n // Z-axis is already in the range 0 to 360\n // so no conversion is needed.\n if (\n (this.rotationZ - this.pRotationZ > 0 &&\n this.rotationZ - this.pRotationZ < 270) ||\n this.rotationZ - this.pRotationZ < -270\n ) {\n rotateDirectionZ = 'clockwise';\n } else if (\n this.rotationZ - this.pRotationZ < 0 ||\n this.rotationZ - this.pRotationZ > 270\n ) {\n rotateDirectionZ = 'counter-clockwise';\n }\n if (rotateDirectionZ !== pRotateDirectionZ) {\n startAngleZ = this.rotationZ;\n }\n if (\n Math.abs(this.rotationZ - startAngleZ) > 90 &&\n Math.abs(this.rotationZ - startAngleZ) < 270\n ) {\n startAngleZ = this.rotationZ;\n this._setProperty('turnAxis', 'Z');\n deviceTurned();\n }\n pRotateDirectionZ = rotateDirectionZ;\n this._setProperty('turnAxis', undefined);\n }\n var deviceShaken = this.deviceShaken || window.deviceShaken;\n if (typeof deviceShaken === 'function') {\n var accelerationChangeX;\n var accelerationChangeY;\n // Add accelerationChangeZ if acceleration change on Z is needed\n if (this.pAccelerationX !== null) {\n accelerationChangeX = Math.abs(this.accelerationX - this.pAccelerationX);\n accelerationChangeY = Math.abs(this.accelerationY - this.pAccelerationY);\n }\n if (accelerationChangeX + accelerationChangeY > shake_threshold) {\n deviceShaken();\n }\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],39:[function(_dereq_,module,exports){\n/**\n * @module Events\n * @submodule Keyboard\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * The boolean system variable keyIsPressed is true if any key is pressed\n * and false if no keys are pressed.\n *\n * @property {Boolean} keyIsPressed\n * @readOnly\n * @example\n * \n * \n * function draw() {\n * if (keyIsPressed === true) {\n * fill(0);\n * } else {\n * fill(255);\n * }\n * rect(25, 25, 50, 50);\n * }\n * \n * \n *\n * @alt\n * 50x50 white rect that turns black on keypress.\n *\n */\np5.prototype.isKeyPressed = false;\np5.prototype.keyIsPressed = false; // khan\n\n/**\n * The system variable key always contains the value of the most recent\n * key on the keyboard that was typed. To get the proper capitalization, it\n * is best to use it within keyTyped(). For non-ASCII keys, use the keyCode\n * variable.\n *\n * @property {String} key\n * @readOnly\n * @example\n * \n * // Click any key to display it!\n * // (Not Guaranteed to be Case Sensitive)\n * function setup() {\n * fill(245, 123, 158);\n * textSize(50);\n * }\n *\n * function draw() {\n * background(200);\n * text(key, 33, 65); // Display last key pressed.\n * }\n * \n *\n * @alt\n * canvas displays any key value that is pressed in pink font.\n *\n */\np5.prototype.key = '';\n\n/**\n * The variable keyCode is used to detect special keys such as BACKSPACE,\n * DELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL, OPTION, ALT, UP_ARROW,\n * DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\n * You can also check for custom keys by looking up the keyCode of any key\n * on a site like this: keycode.info.\n *\n * @property {Integer} keyCode\n * @readOnly\n * @example\n * \n * let fillVal = 126;\n * function draw() {\n * fill(fillVal);\n * rect(25, 25, 50, 50);\n * }\n *\n * function keyPressed() {\n * if (keyCode === UP_ARROW) {\n * fillVal = 255;\n * } else if (keyCode === DOWN_ARROW) {\n * fillVal = 0;\n * }\n * return false; // prevent default\n * }\n * \n * \n * function draw() {}\n * function keyPressed() {\n * background('yellow');\n * text(`${key} ${keyCode}`, 10, 40);\n * print(key, ' ', keyCode);\n * return false; // prevent default\n * }\n * \n * @alt\n * Grey rect center. turns white when up arrow pressed and black when down\n * Display key pressed and its keyCode in a yellow box\n */\np5.prototype.keyCode = 0;\n\n/**\n * The keyPressed() function is called once every time a key is pressed. The\n * keyCode for the key that was pressed is stored in the keyCode variable.\n * \n * For non-ASCII keys, use the keyCode variable. You can check if the keyCode\n * equals BACKSPACE, DELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL,\n * OPTION, ALT, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\n * \n * For ASCII keys, the key that was pressed is stored in the key variable. However, it\n * does not distinguish between uppercase and lowercase. For this reason, it\n * is recommended to use keyTyped() to read the key variable, in which the\n * case of the variable will be distinguished.\n * \n * Because of how operating systems handle key repeats, holding down a key\n * may cause multiple calls to keyTyped() (and keyReleased() as well). The\n * rate of repeat is set by the operating system and how each computer is\n * configured.\n * Browsers may have different default\n * behaviors attached to various key events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method keyPressed\n * @example\n * \n * \n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyPressed() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n * \n * \n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyPressed() {\n * if (keyCode === LEFT_ARROW) {\n * value = 255;\n * } else if (keyCode === RIGHT_ARROW) {\n * value = 0;\n * }\n * }\n * \n * \n * \n * \n * function keyPressed() {\n * // Do something\n * return false; // prevent any default behaviour\n * }\n * \n * \n *\n * @alt\n * black rect center. turns white when key pressed and black when released\n * black rect center. turns white when left arrow pressed and black when right.\n *\n */\np5.prototype._onkeydown = function(e) {\n if (this._downKeys[e.which]) {\n // prevent multiple firings\n return;\n }\n this._setProperty('isKeyPressed', true);\n this._setProperty('keyIsPressed', true);\n this._setProperty('keyCode', e.which);\n this._downKeys[e.which] = true;\n this._setProperty('key', e.key || String.fromCharCode(e.which) || e.which);\n var keyPressed = this.keyPressed || window.keyPressed;\n if (typeof keyPressed === 'function' && !e.charCode) {\n var executeDefault = keyPressed(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n/**\n * The keyReleased() function is called once every time a key is released.\n * See key and keyCode for more information.\n * Browsers may have different default\n * behaviors attached to various key events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method keyReleased\n * @example\n * \n * \n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyReleased() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * return false; // prevent any default behavior\n * }\n * \n * \n *\n * @alt\n * black rect center. turns white when key pressed and black when pressed again\n *\n */\np5.prototype._onkeyup = function(e) {\n var keyReleased = this.keyReleased || window.keyReleased;\n this._downKeys[e.which] = false;\n\n if (!this._areDownKeys()) {\n this._setProperty('isKeyPressed', false);\n this._setProperty('keyIsPressed', false);\n }\n\n this._setProperty('_lastKeyCodeTyped', null);\n\n this._setProperty('key', e.key || String.fromCharCode(e.which) || e.which);\n this._setProperty('keyCode', e.which);\n if (typeof keyReleased === 'function') {\n var executeDefault = keyReleased(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * The keyTyped() function is called once every time a key is pressed, but\n * action keys such as Ctrl, Shift, and Alt are ignored. The most recent\n * key pressed will be stored in the key variable.\n * \n * Because of how operating systems handle key repeats, holding down a key\n * will cause multiple calls to keyTyped() (and keyReleased() as well). The\n * rate of repeat is set by the operating system and how each computer is\n * configured.\n * Browsers may have different default behaviors attached to various key\n * events. To prevent any default behavior for this event, add \"return false\"\n * to the end of the method.\n *\n * @method keyTyped\n * @example\n * \n * \n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyTyped() {\n * if (key === 'a') {\n * value = 255;\n * } else if (key === 'b') {\n * value = 0;\n * }\n * // uncomment to prevent any default behavior\n * // return false;\n * }\n * \n * \n *\n * @alt\n * black rect center. turns white when 'a' key typed and black when 'b' pressed\n *\n */\np5.prototype._onkeypress = function(e) {\n if (e.which === this._lastKeyCodeTyped) {\n // prevent multiple firings\n return;\n }\n this._setProperty('keyCode', e.which);\n this._setProperty('_lastKeyCodeTyped', e.which); // track last keyCode\n this._setProperty('key', String.fromCharCode(e.which));\n var keyTyped = this.keyTyped || window.keyTyped;\n if (typeof keyTyped === 'function') {\n var executeDefault = keyTyped(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n/**\n * The onblur function is called when the user is no longer focused\n * on the p5 element. Because the keyup events will not fire if the user is\n * not focused on the element we must assume all keys currently down have\n * been released.\n */\np5.prototype._onblur = function(e) {\n this._downKeys = {};\n};\n\n/**\n * The keyIsDown() function checks if the key is currently down, i.e. pressed.\n * It can be used if you have an object that moves, and you want several keys\n * to be able to affect its behaviour simultaneously, such as moving a\n * sprite diagonally. You can put in any number representing the keyCode of\n * the key, or use any of the variable keyCode names listed\n * here.\n *\n * @method keyIsDown\n * @param {Number} code The key to check for.\n * @return {Boolean} whether key is down or not\n * @example\n * \n * let x = 100;\n * let y = 100;\n *\n * function setup() {\n * createCanvas(512, 512);\n * fill(255, 0, 0);\n * }\n *\n * function draw() {\n * if (keyIsDown(LEFT_ARROW)) {\n * x -= 5;\n * }\n *\n * if (keyIsDown(RIGHT_ARROW)) {\n * x += 5;\n * }\n *\n * if (keyIsDown(UP_ARROW)) {\n * y -= 5;\n * }\n *\n * if (keyIsDown(DOWN_ARROW)) {\n * y += 5;\n * }\n *\n * clear();\n * ellipse(x, y, 50, 50);\n * }\n * \n *\n * \n * let diameter = 50;\n *\n * function setup() {\n * createCanvas(512, 512);\n * }\n *\n * function draw() {\n * // 107 and 187 are keyCodes for \"+\"\n * if (keyIsDown(107) || keyIsDown(187)) {\n * diameter += 1;\n * }\n *\n * // 109 and 189 are keyCodes for \"-\"\n * if (keyIsDown(109) || keyIsDown(189)) {\n * diameter -= 1;\n * }\n *\n * clear();\n * fill(255, 0, 0);\n * ellipse(50, 50, diameter, diameter);\n * }\n * \n *\n * @alt\n * 50x50 red ellipse moves left, right, up and down with arrow presses.\n * 50x50 red ellipse gets bigger or smaller when + or - are pressed.\n *\n */\np5.prototype.keyIsDown = function(code) {\n p5._validateParameters('keyIsDown', arguments);\n return this._downKeys[code];\n};\n\n/**\n * The _areDownKeys function returns a boolean true if any keys pressed\n * and a false if no keys are currently pressed.\n\n * Helps avoid instances where multiple keys are pressed simultaneously and\n * releasing a single key will then switch the\n * keyIsPressed property to true.\n * @private\n**/\np5.prototype._areDownKeys = function() {\n for (var key in this._downKeys) {\n if (this._downKeys.hasOwnProperty(key) && this._downKeys[key] === true) {\n return true;\n }\n }\n return false;\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],40:[function(_dereq_,module,exports){\n/**\n * @module Events\n * @submodule Mouse\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/*\n * This is a flag which is false until the first time\n * we receive a mouse event. The pmouseX and pmouseY\n * values will match the mouseX and mouseY values until\n * this interaction takes place.\n */\np5.prototype._hasMouseInteracted = false;\n\n/**\n * The system variable mouseX always contains the current horizontal\n * position of the mouse, relative to (0, 0) of the canvas. If touch is\n * used instead of mouse input, mouseX will hold the x value of the most\n * recent touch point.\n *\n * @property {Number} mouseX\n * @readOnly\n *\n * @example\n * \n * \n * // Move the mouse across the canvas\n * function draw() {\n * background(244, 248, 252);\n * line(mouseX, 0, mouseX, 100);\n * }\n * \n * \n *\n * @alt\n * horizontal black line moves left and right with mouse x-position\n *\n */\np5.prototype.mouseX = 0;\n\n/**\n * The system variable mouseY always contains the current vertical position\n * of the mouse, relative to (0, 0) of the canvas. If touch is\n * used instead of mouse input, mouseY will hold the y value of the most\n * recent touch point.\n *\n * @property {Number} mouseY\n * @readOnly\n *\n * @example\n * \n * \n * // Move the mouse across the canvas\n * function draw() {\n * background(244, 248, 252);\n * line(0, mouseY, 100, mouseY);\n * }\n * \n * \n *\n * @alt\n * vertical black line moves up and down with mouse y-position\n *\n */\np5.prototype.mouseY = 0;\n\n/**\n * The system variable pmouseX always contains the horizontal position of\n * the mouse or finger in the frame previous to the current frame, relative to\n * (0, 0) of the canvas. Note: pmouseX will be reset to the current mouseX\n * value at the start of each touch event.\n *\n * @property {Number} pmouseX\n * @readOnly\n *\n * @example\n * \n * \n * // Move the mouse across the canvas to leave a trail\n * function setup() {\n * //slow down the frameRate to make it more visible\n * frameRate(10);\n * }\n *\n * function draw() {\n * background(244, 248, 252);\n * line(mouseX, mouseY, pmouseX, pmouseY);\n * print(pmouseX + ' -> ' + mouseX);\n * }\n * \n * \n *\n * @alt\n * line trail is created from cursor movements. faster movement make longer line.\n *\n */\np5.prototype.pmouseX = 0;\n\n/**\n * The system variable pmouseY always contains the vertical position of the\n * mouse or finger in the frame previous to the current frame, relative to\n * (0, 0) of the canvas. Note: pmouseY will be reset to the current mouseY\n * value at the start of each touch event.\n *\n * @property {Number} pmouseY\n * @readOnly\n *\n * @example\n * \n * \n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n * //draw a square only if the mouse is not moving\n * if (mouseY === pmouseY && mouseX === pmouseX) {\n * rect(20, 20, 60, 60);\n * }\n *\n * print(pmouseY + ' -> ' + mouseY);\n * }\n * \n * \n *\n * @alt\n * 60x60 black rect center, fuchsia background. rect flickers on mouse movement\n *\n */\np5.prototype.pmouseY = 0;\n\n/**\n * The system variable winMouseX always contains the current horizontal\n * position of the mouse, relative to (0, 0) of the window.\n *\n * @property {Number} winMouseX\n * @readOnly\n *\n * @example\n * \n * \n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * const body = document.getElementsByTagName('body')[0];\n * myCanvas.parent(body);\n * }\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * //move the canvas to the horizontal mouse position\n * //relative to the window\n * myCanvas.position(winMouseX + 1, windowHeight / 2);\n *\n * //the y of the square is relative to the canvas\n * rect(20, mouseY, 60, 60);\n * }\n * \n * \n *\n * @alt\n * 60x60 black rect y moves with mouse y and fuchsia canvas moves with mouse x\n *\n */\np5.prototype.winMouseX = 0;\n\n/**\n * The system variable winMouseY always contains the current vertical\n * position of the mouse, relative to (0, 0) of the window.\n *\n * @property {Number} winMouseY\n * @readOnly\n *\n * @example\n * \n * \n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * const body = document.getElementsByTagName('body')[0];\n * myCanvas.parent(body);\n * }\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * //move the canvas to the vertical mouse position\n * //relative to the window\n * myCanvas.position(windowWidth / 2, winMouseY + 1);\n *\n * //the x of the square is relative to the canvas\n * rect(mouseX, 20, 60, 60);\n * }\n * \n * \n *\n * @alt\n * 60x60 black rect x moves with mouse x and fuchsia canvas y moves with mouse y\n *\n */\np5.prototype.winMouseY = 0;\n\n/**\n * The system variable pwinMouseX always contains the horizontal position\n * of the mouse in the frame previous to the current frame, relative to\n * (0, 0) of the window. Note: pwinMouseX will be reset to the current winMouseX\n * value at the start of each touch event.\n *\n * @property {Number} pwinMouseX\n * @readOnly\n *\n * @example\n * \n * \n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * noStroke();\n * fill(237, 34, 93);\n * }\n *\n * function draw() {\n * clear();\n * //the difference between previous and\n * //current x position is the horizontal mouse speed\n * let speed = abs(winMouseX - pwinMouseX);\n * //change the size of the circle\n * //according to the horizontal speed\n * ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n * //move the canvas to the mouse position\n * myCanvas.position(winMouseX + 1, winMouseY + 1);\n * }\n * \n * \n *\n * @alt\n * fuchsia ellipse moves with mouse x and y. Grows and shrinks with mouse speed\n *\n */\np5.prototype.pwinMouseX = 0;\n\n/**\n * The system variable pwinMouseY always contains the vertical position of\n * the mouse in the frame previous to the current frame, relative to (0, 0)\n * of the window. Note: pwinMouseY will be reset to the current winMouseY\n * value at the start of each touch event.\n *\n * @property {Number} pwinMouseY\n * @readOnly\n *\n *\n * @example\n * \n * \n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * noStroke();\n * fill(237, 34, 93);\n * }\n *\n * function draw() {\n * clear();\n * //the difference between previous and\n * //current y position is the vertical mouse speed\n * let speed = abs(winMouseY - pwinMouseY);\n * //change the size of the circle\n * //according to the vertical speed\n * ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n * //move the canvas to the mouse position\n * myCanvas.position(winMouseX + 1, winMouseY + 1);\n * }\n * \n * \n *\n * @alt\n * fuchsia ellipse moves with mouse x and y. Grows and shrinks with mouse speed\n *\n */\np5.prototype.pwinMouseY = 0;\n\n/**\n * Processing automatically tracks if the mouse button is pressed and which\n * button is pressed. The value of the system variable mouseButton is either\n * LEFT, RIGHT, or CENTER depending on which button was pressed last.\n * Warning: different browsers may track mouseButton differently.\n *\n * @property {Constant} mouseButton\n * @readOnly\n *\n * @example\n * \n * \n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * if (mouseIsPressed) {\n * if (mouseButton === LEFT) {\n * ellipse(50, 50, 50, 50);\n * }\n * if (mouseButton === RIGHT) {\n * rect(25, 25, 50, 50);\n * }\n * if (mouseButton === CENTER) {\n * triangle(23, 75, 50, 20, 78, 75);\n * }\n * }\n *\n * print(mouseButton);\n * }\n * \n * \n *\n * @alt\n * 50x50 black ellipse appears on center of fuchsia canvas on mouse click/press.\n *\n */\np5.prototype.mouseButton = 0;\n\n/**\n * The boolean system variable mouseIsPressed is true if the mouse is pressed\n * and false if not.\n *\n * @property {Boolean} mouseIsPressed\n * @readOnly\n *\n * @example\n * \n * \n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * if (mouseIsPressed) {\n * ellipse(50, 50, 50, 50);\n * } else {\n * rect(25, 25, 50, 50);\n * }\n *\n * print(mouseIsPressed);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect becomes ellipse with mouse click/press. fuchsia background.\n *\n */\np5.prototype.mouseIsPressed = false;\n\np5.prototype._updateNextMouseCoords = function(e) {\n if (this._curElement !== null && (!e.touches || e.touches.length > 0)) {\n var mousePos = getMousePos(\n this._curElement.elt,\n this.width,\n this.height,\n e\n );\n this._setProperty('mouseX', mousePos.x);\n this._setProperty('mouseY', mousePos.y);\n this._setProperty('winMouseX', mousePos.winX);\n this._setProperty('winMouseY', mousePos.winY);\n }\n if (!this._hasMouseInteracted) {\n // For first draw, make previous and next equal\n this._updateMouseCoords();\n this._setProperty('_hasMouseInteracted', true);\n }\n};\n\np5.prototype._updateMouseCoords = function() {\n this._setProperty('pmouseX', this.mouseX);\n this._setProperty('pmouseY', this.mouseY);\n this._setProperty('pwinMouseX', this.winMouseX);\n this._setProperty('pwinMouseY', this.winMouseY);\n\n this._setProperty('_pmouseWheelDeltaY', this._mouseWheelDeltaY);\n};\n\nfunction getMousePos(canvas, w, h, evt) {\n if (evt && !evt.clientX) {\n // use touches if touch and not mouse\n if (evt.touches) {\n evt = evt.touches[0];\n } else if (evt.changedTouches) {\n evt = evt.changedTouches[0];\n }\n }\n var rect = canvas.getBoundingClientRect();\n var sx = canvas.scrollWidth / w;\n var sy = canvas.scrollHeight / h;\n return {\n x: (evt.clientX - rect.left) / sx,\n y: (evt.clientY - rect.top) / sy,\n winX: evt.clientX,\n winY: evt.clientY,\n id: evt.identifier\n };\n}\n\np5.prototype._setMouseButton = function(e) {\n if (e.button === 1) {\n this._setProperty('mouseButton', constants.CENTER);\n } else if (e.button === 2) {\n this._setProperty('mouseButton', constants.RIGHT);\n } else {\n this._setProperty('mouseButton', constants.LEFT);\n }\n};\n\n/**\n * The mouseMoved() function is called every time the mouse moves and a mouse\n * button is not pressed.\n * Browsers may have different default\n * behaviors attached to various mouse events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method mouseMoved\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Move the mouse across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function mouseMoved() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseMoved(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect becomes lighter with mouse movements until white then resets\n * no image displayed\n *\n */\n\n/**\n * The mouseDragged() function is called once every time the mouse moves and\n * a mouse button is pressed. If no mouseDragged() function is defined, the\n * touchMoved() function will be called instead if it is defined.\n * Browsers may have different default\n * behaviors attached to various mouse events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method mouseDragged\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Drag the mouse across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseDragged() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function mouseDragged() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseDragged(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect turns lighter with mouse click and drag until white, resets\n * no image displayed\n *\n */\np5.prototype._onmousemove = function(e) {\n var context = this._isGlobal ? window : this;\n var executeDefault;\n this._updateNextMouseCoords(e);\n if (!this.mouseIsPressed) {\n if (typeof context.mouseMoved === 'function') {\n executeDefault = context.mouseMoved(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n } else {\n if (typeof context.mouseDragged === 'function') {\n executeDefault = context.mouseDragged(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.touchMoved === 'function') {\n executeDefault = context.touchMoved(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n }\n};\n\n/**\n * The mousePressed() function is called once after every time a mouse button\n * is pressed. The mouseButton variable (see the related reference entry)\n * can be used to determine which button has been pressed. If no\n * mousePressed() function is defined, the touchStarted() function will be\n * called instead if it is defined.\n * Browsers may have different default\n * behaviors attached to various mouse events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method mousePressed\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Click within the image to change\n * // the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mousePressed() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function mousePressed() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function mousePressed(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect turns white with mouse click/press.\n * no image displayed\n *\n */\np5.prototype._onmousedown = function(e) {\n var context = this._isGlobal ? window : this;\n var executeDefault;\n this._setProperty('mouseIsPressed', true);\n this._setMouseButton(e);\n this._updateNextMouseCoords(e);\n if (typeof context.mousePressed === 'function') {\n executeDefault = context.mousePressed(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.touchStarted === 'function') {\n executeDefault = context.touchStarted(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * The mouseReleased() function is called every time a mouse button is\n * released. If no mouseReleased() function is defined, the touchEnded()\n * function will be called instead if it is defined.\n * Browsers may have different default\n * behaviors attached to various mouse events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n *\n * @method mouseReleased\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseReleased() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function mouseReleased() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseReleased(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect turns white with mouse click/press.\n * no image displayed\n *\n */\np5.prototype._onmouseup = function(e) {\n var context = this._isGlobal ? window : this;\n var executeDefault;\n this._setProperty('mouseIsPressed', false);\n if (typeof context.mouseReleased === 'function') {\n executeDefault = context.mouseReleased(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.touchEnded === 'function') {\n executeDefault = context.touchEnded(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\np5.prototype._ondragend = p5.prototype._onmouseup;\np5.prototype._ondragover = p5.prototype._onmousemove;\n\n/**\n * The mouseClicked() function is called once after a mouse button has been\n * pressed and then released.\n * Browsers handle clicks differently, so this function is only guaranteed to be\n * run when the left mouse button is clicked. To handle other mouse buttons\n * being pressed or released, see mousePressed() or mouseReleased().\n * Browsers may have different default\n * behaviors attached to various mouse events. To prevent any default\n * behavior for this event, add \"return false\" to the end of the method.\n *\n * @method mouseClicked\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n *\n * function mouseClicked() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function mouseClicked() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseClicked(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect turns white with mouse click/press.\n * no image displayed\n *\n */\np5.prototype._onclick = function(e) {\n var context = this._isGlobal ? window : this;\n if (typeof context.mouseClicked === 'function') {\n var executeDefault = context.mouseClicked(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * The doubleClicked() function is executed every time a event\n * listener has detected a dblclick event which is a part of the\n * DOM L3 specification. The doubleClicked event is fired when a\n * pointing device button (usually a mouse's primary button)\n * is clicked twice on a single element. For more info on the\n * dblclick event refer to mozilla's documentation here:\n * https://developer.mozilla.org/en-US/docs/Web/Events/dblclick\n *\n * @method doubleClicked\n * @param {Object} [event] optional MouseEvent callback argument.\n * @example\n * \n * \n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been double clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n *\n * function doubleClicked() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function doubleClicked() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a MouseEvent object\n * // as a callback argument\n * function doubleClicked(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect turns white with mouse doubleClick/press.\n * no image displayed\n */\n\np5.prototype._ondblclick = function(e) {\n var context = this._isGlobal ? window : this;\n if (typeof context.doubleClicked === 'function') {\n var executeDefault = context.doubleClicked(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * For use with WebGL orbitControl.\n * @property {Number} _mouseWheelDeltaY\n * @readOnly\n * @private\n */\np5.prototype._mouseWheelDeltaY = 0;\n\n/**\n * For use with WebGL orbitControl.\n * @property {Number} _pmouseWheelDeltaY\n * @readOnly\n * @private\n */\np5.prototype._pmouseWheelDeltaY = 0;\n\n/**\n * The function mouseWheel() is executed every time a vertical mouse wheel\n * event is detected either triggered by an actual mouse wheel or by a\n * touchpad.\n * The event.delta property returns the amount the mouse wheel\n * have scrolled. The values can be positive or negative depending on the\n * scroll direction (on OS X with \"natural\" scrolling enabled, the signs\n * are inverted).\n * Browsers may have different default behaviors attached to various\n * mouse events. To prevent any default behavior for this event, add\n * \"return false\" to the end of the method.\n * Due to the current support of the \"wheel\" event on Safari, the function\n * may only work as expected if \"return false\" is included while using Safari.\n *\n * @method mouseWheel\n * @param {Object} [event] optional WheelEvent callback argument.\n *\n * @example\n * \n * \n * let pos = 25;\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n * rect(25, pos, 50, 50);\n * }\n *\n * function mouseWheel(event) {\n * print(event.delta);\n * //move the square according to the vertical scroll amount\n * pos += event.delta;\n * //uncomment to block page scrolling\n * //return false;\n * }\n * \n * \n *\n * @alt\n * black 50x50 rect moves up and down with vertical scroll. fuchsia background\n *\n */\np5.prototype._onwheel = function(e) {\n var context = this._isGlobal ? window : this;\n this._setProperty('_mouseWheelDeltaY', e.deltaY);\n if (typeof context.mouseWheel === 'function') {\n e.delta = e.deltaY;\n var executeDefault = context.mouseWheel(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24}],41:[function(_dereq_,module,exports){\n/**\n * @module Events\n * @submodule Touch\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * The system variable touches[] contains an array of the positions of all\n * current touch points, relative to (0, 0) of the canvas, and IDs identifying a\n * unique touch as it moves. Each element in the array is an object with x, y,\n * and id properties.\n *\n * The touches[] array is not supported on Safari and IE on touch-based\n * desktops (laptops).\n *\n * @property {Object[]} touches\n * @readOnly\n *\n * @example\n * \n * \n * // On a touchscreen device, touch\n * // the canvas using one or more fingers\n * // at the same time\n * function draw() {\n * clear();\n * let display = touches.length + ' touches';\n * text(display, 5, 10);\n * }\n * \n * \n *\n * @alt\n * Number of touches currently registered are displayed on the canvas\n */\np5.prototype.touches = [];\n\np5.prototype._updateTouchCoords = function(e) {\n if (this._curElement !== null) {\n var touches = [];\n for (var i = 0; i < e.touches.length; i++) {\n touches[i] = getTouchInfo(\n this._curElement.elt,\n this.width,\n this.height,\n e,\n i\n );\n }\n this._setProperty('touches', touches);\n }\n};\n\nfunction getTouchInfo(canvas, w, h, e, i) {\n i = i || 0;\n var rect = canvas.getBoundingClientRect();\n var sx = canvas.scrollWidth / w;\n var sy = canvas.scrollHeight / h;\n var touch = e.touches[i] || e.changedTouches[i];\n return {\n x: (touch.clientX - rect.left) / sx,\n y: (touch.clientY - rect.top) / sy,\n winX: touch.clientX,\n winY: touch.clientY,\n id: touch.identifier\n };\n}\n\n/**\n * The touchStarted() function is called once after every time a touch is\n * registered. If no touchStarted() function is defined, the mousePressed()\n * function will be called instead if it is defined.\n * Browsers may have different default behaviors attached to various touch\n * events. To prevent any default behavior for this event, add \"return false\"\n * to the end of the method.\n *\n * @method touchStarted\n * @param {Object} [event] optional TouchEvent callback argument.\n * @example\n * \n * \n * // Touch within the image to change\n * // the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchStarted() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function touchStarted() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a TouchEvent object\n * // as a callback argument\n * function touchStarted(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect turns white with touch event.\n * no image displayed\n */\np5.prototype._ontouchstart = function(e) {\n var context = this._isGlobal ? window : this;\n var executeDefault;\n this._setProperty('mouseIsPressed', true);\n this._updateTouchCoords(e);\n this._updateNextMouseCoords(e);\n this._updateMouseCoords(); // reset pmouseXY at the start of each touch event\n if (typeof context.touchStarted === 'function') {\n executeDefault = context.touchStarted(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.mousePressed === 'function') {\n executeDefault = context.mousePressed(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * The touchMoved() function is called every time a touch move is registered.\n * If no touchMoved() function is defined, the mouseDragged() function will\n * be called instead if it is defined.\n * Browsers may have different default behaviors attached to various touch\n * events. To prevent any default behavior for this event, add \"return false\"\n * to the end of the method.\n *\n * @method touchMoved\n * @param {Object} [event] optional TouchEvent callback argument.\n * @example\n * \n * \n * // Move your finger across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function touchMoved() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a TouchEvent object\n * // as a callback argument\n * function touchMoved(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect turns lighter with touch until white. resets\n * no image displayed\n *\n */\np5.prototype._ontouchmove = function(e) {\n var context = this._isGlobal ? window : this;\n var executeDefault;\n this._updateTouchCoords(e);\n this._updateNextMouseCoords(e);\n if (typeof context.touchMoved === 'function') {\n executeDefault = context.touchMoved(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.mouseDragged === 'function') {\n executeDefault = context.mouseDragged(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\n/**\n * The touchEnded() function is called every time a touch ends. If no\n * touchEnded() function is defined, the mouseReleased() function will be\n * called instead if it is defined.\n * Browsers may have different default behaviors attached to various touch\n * events. To prevent any default behavior for this event, add \"return false\"\n * to the end of the method.\n *\n * @method touchEnded\n * @param {Object} [event] optional TouchEvent callback argument.\n * @example\n * \n * \n * // Release touch within the image to\n * // change the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchEnded() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n * \n * \n *\n * \n * \n * function touchEnded() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n * \n * \n *\n * \n * \n * // returns a TouchEvent object\n * // as a callback argument\n * function touchEnded(event) {\n * console.log(event);\n * }\n * \n * \n *\n * @alt\n * 50x50 black rect turns white with touch.\n * no image displayed\n *\n */\np5.prototype._ontouchend = function(e) {\n this._setProperty('mouseIsPressed', false);\n this._updateTouchCoords(e);\n this._updateNextMouseCoords(e);\n var context = this._isGlobal ? window : this;\n var executeDefault;\n if (typeof context.touchEnded === 'function') {\n executeDefault = context.touchEnded(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n } else if (typeof context.mouseReleased === 'function') {\n executeDefault = context.mouseReleased(e);\n if (executeDefault === false) {\n e.preventDefault();\n }\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],42:[function(_dereq_,module,exports){\n/*global ImageData:false */\n\n/**\n * This module defines the filters for use with image buffers.\n *\n * This module is basically a collection of functions stored in an object\n * as opposed to modules. The functions are destructive, modifying\n * the passed in canvas rather than creating a copy.\n *\n * Generally speaking users of this module will use the Filters.apply method\n * on a canvas to create an effect.\n *\n * A number of functions are borrowed/adapted from\n * http://www.html5rocks.com/en/tutorials/canvas/imagefilters/\n * or the java processing implementation.\n */\n\n'use strict';\n\nvar Filters = {};\n\n/*\n * Helper functions\n */\n\n/**\n * Returns the pixel buffer for a canvas\n *\n * @private\n *\n * @param {Canvas|ImageData} canvas the canvas to get pixels from\n * @return {Uint8ClampedArray} a one-dimensional array containing\n * the data in thc RGBA order, with integer\n * values between 0 and 255\n */\nFilters._toPixels = function(canvas) {\n if (canvas instanceof ImageData) {\n return canvas.data;\n } else {\n return canvas\n .getContext('2d')\n .getImageData(0, 0, canvas.width, canvas.height).data;\n }\n};\n\n/**\n * Returns a 32 bit number containing ARGB data at ith pixel in the\n * 1D array containing pixels data.\n *\n * @private\n *\n * @param {Uint8ClampedArray} data array returned by _toPixels()\n * @param {Integer} i index of a 1D Image Array\n * @return {Integer} 32 bit integer value representing\n * ARGB value.\n */\nFilters._getARGB = function(data, i) {\n var offset = i * 4;\n return (\n ((data[offset + 3] << 24) & 0xff000000) |\n ((data[offset] << 16) & 0x00ff0000) |\n ((data[offset + 1] << 8) & 0x0000ff00) |\n (data[offset + 2] & 0x000000ff)\n );\n};\n\n/**\n * Modifies pixels RGBA values to values contained in the data object.\n *\n * @private\n *\n * @param {Uint8ClampedArray} pixels array returned by _toPixels()\n * @param {Int32Array} data source 1D array where each value\n * represents ARGB values\n */\nFilters._setPixels = function(pixels, data) {\n var offset = 0;\n for (var i = 0, al = pixels.length; i < al; i++) {\n offset = i * 4;\n pixels[offset + 0] = (data[i] & 0x00ff0000) >>> 16;\n pixels[offset + 1] = (data[i] & 0x0000ff00) >>> 8;\n pixels[offset + 2] = data[i] & 0x000000ff;\n pixels[offset + 3] = (data[i] & 0xff000000) >>> 24;\n }\n};\n\n/**\n * Returns the ImageData object for a canvas\n * https://developer.mozilla.org/en-US/docs/Web/API/ImageData\n *\n * @private\n *\n * @param {Canvas|ImageData} canvas canvas to get image data from\n * @return {ImageData} Holder of pixel data (and width and\n * height) for a canvas\n */\nFilters._toImageData = function(canvas) {\n if (canvas instanceof ImageData) {\n return canvas;\n } else {\n return canvas\n .getContext('2d')\n .getImageData(0, 0, canvas.width, canvas.height);\n }\n};\n\n/**\n * Returns a blank ImageData object.\n *\n * @private\n *\n * @param {Integer} width\n * @param {Integer} height\n * @return {ImageData}\n */\nFilters._createImageData = function(width, height) {\n Filters._tmpCanvas = document.createElement('canvas');\n Filters._tmpCtx = Filters._tmpCanvas.getContext('2d');\n return this._tmpCtx.createImageData(width, height);\n};\n\n/**\n * Applys a filter function to a canvas.\n *\n * The difference between this and the actual filter functions defined below\n * is that the filter functions generally modify the pixel buffer but do\n * not actually put that data back to the canvas (where it would actually\n * update what is visible). By contrast this method does make the changes\n * actually visible in the canvas.\n *\n * The apply method is the method that callers of this module would generally\n * use. It has been separated from the actual filters to support an advanced\n * use case of creating a filter chain that executes without actually updating\n * the canvas in between everystep.\n *\n * @private\n * @param {HTMLCanvasElement} canvas [description]\n * @param {function(ImageData,Object)} func [description]\n * @param {Object} filterParam [description]\n */\nFilters.apply = function(canvas, func, filterParam) {\n var pixelsState = canvas.getContext('2d');\n var imageData = pixelsState.getImageData(0, 0, canvas.width, canvas.height);\n\n //Filters can either return a new ImageData object, or just modify\n //the one they received.\n var newImageData = func(imageData, filterParam);\n if (newImageData instanceof ImageData) {\n pixelsState.putImageData(\n newImageData,\n 0,\n 0,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n } else {\n pixelsState.putImageData(\n imageData,\n 0,\n 0,\n 0,\n 0,\n canvas.width,\n canvas.height\n );\n }\n};\n\n/*\n * Filters\n */\n\n/**\n * Converts the image to black and white pixels depending if they are above or\n * below the threshold defined by the level parameter. The parameter must be\n * between 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used.\n *\n * Borrowed from http://www.html5rocks.com/en/tutorials/canvas/imagefilters/\n *\n * @private\n * @param {Canvas} canvas\n * @param {Float} level\n */\nFilters.threshold = function(canvas, level) {\n var pixels = Filters._toPixels(canvas);\n\n if (level === undefined) {\n level = 0.5;\n }\n var thresh = Math.floor(level * 255);\n\n for (var i = 0; i < pixels.length; i += 4) {\n var r = pixels[i];\n var g = pixels[i + 1];\n var b = pixels[i + 2];\n var gray = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n var val;\n if (gray >= thresh) {\n val = 255;\n } else {\n val = 0;\n }\n pixels[i] = pixels[i + 1] = pixels[i + 2] = val;\n }\n};\n\n/**\n * Converts any colors in the image to grayscale equivalents.\n * No parameter is used.\n *\n * Borrowed from http://www.html5rocks.com/en/tutorials/canvas/imagefilters/\n *\n * @private\n * @param {Canvas} canvas\n */\nFilters.gray = function(canvas) {\n var pixels = Filters._toPixels(canvas);\n\n for (var i = 0; i < pixels.length; i += 4) {\n var r = pixels[i];\n var g = pixels[i + 1];\n var b = pixels[i + 2];\n\n // CIE luminance for RGB\n var gray = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n pixels[i] = pixels[i + 1] = pixels[i + 2] = gray;\n }\n};\n\n/**\n * Sets the alpha channel to entirely opaque. No parameter is used.\n *\n * @private\n * @param {Canvas} canvas\n */\nFilters.opaque = function(canvas) {\n var pixels = Filters._toPixels(canvas);\n\n for (var i = 0; i < pixels.length; i += 4) {\n pixels[i + 3] = 255;\n }\n\n return pixels;\n};\n\n/**\n * Sets each pixel to its inverse value. No parameter is used.\n * @private\n * @param {Canvas} canvas\n */\nFilters.invert = function(canvas) {\n var pixels = Filters._toPixels(canvas);\n\n for (var i = 0; i < pixels.length; i += 4) {\n pixels[i] = 255 - pixels[i];\n pixels[i + 1] = 255 - pixels[i + 1];\n pixels[i + 2] = 255 - pixels[i + 2];\n }\n};\n\n/**\n * Limits each channel of the image to the number of colors specified as\n * the parameter. The parameter can be set to values between 2 and 255, but\n * results are most noticeable in the lower ranges.\n *\n * Adapted from java based processing implementation\n *\n * @private\n * @param {Canvas} canvas\n * @param {Integer} level\n */\nFilters.posterize = function(canvas, level) {\n var pixels = Filters._toPixels(canvas);\n\n if (level < 2 || level > 255) {\n throw new Error(\n 'Level must be greater than 2 and less than 255 for posterize'\n );\n }\n\n var levels1 = level - 1;\n for (var i = 0; i < pixels.length; i += 4) {\n var rlevel = pixels[i];\n var glevel = pixels[i + 1];\n var blevel = pixels[i + 2];\n\n pixels[i] = ((rlevel * level) >> 8) * 255 / levels1;\n pixels[i + 1] = ((glevel * level) >> 8) * 255 / levels1;\n pixels[i + 2] = ((blevel * level) >> 8) * 255 / levels1;\n }\n};\n\n/**\n * reduces the bright areas in an image\n * @private\n * @param {Canvas} canvas\n *\n */\nFilters.dilate = function(canvas) {\n var pixels = Filters._toPixels(canvas);\n var currIdx = 0;\n var maxIdx = pixels.length ? pixels.length / 4 : 0;\n var out = new Int32Array(maxIdx);\n var currRowIdx, maxRowIdx, colOrig, colOut, currLum;\n\n var idxRight, idxLeft, idxUp, idxDown;\n var colRight, colLeft, colUp, colDown;\n var lumRight, lumLeft, lumUp, lumDown;\n\n while (currIdx < maxIdx) {\n currRowIdx = currIdx;\n maxRowIdx = currIdx + canvas.width;\n while (currIdx < maxRowIdx) {\n colOrig = colOut = Filters._getARGB(pixels, currIdx);\n idxLeft = currIdx - 1;\n idxRight = currIdx + 1;\n idxUp = currIdx - canvas.width;\n idxDown = currIdx + canvas.width;\n\n if (idxLeft < currRowIdx) {\n idxLeft = currIdx;\n }\n if (idxRight >= maxRowIdx) {\n idxRight = currIdx;\n }\n if (idxUp < 0) {\n idxUp = 0;\n }\n if (idxDown >= maxIdx) {\n idxDown = currIdx;\n }\n colUp = Filters._getARGB(pixels, idxUp);\n colLeft = Filters._getARGB(pixels, idxLeft);\n colDown = Filters._getARGB(pixels, idxDown);\n colRight = Filters._getARGB(pixels, idxRight);\n\n //compute luminance\n currLum =\n 77 * ((colOrig >> 16) & 0xff) +\n 151 * ((colOrig >> 8) & 0xff) +\n 28 * (colOrig & 0xff);\n lumLeft =\n 77 * ((colLeft >> 16) & 0xff) +\n 151 * ((colLeft >> 8) & 0xff) +\n 28 * (colLeft & 0xff);\n lumRight =\n 77 * ((colRight >> 16) & 0xff) +\n 151 * ((colRight >> 8) & 0xff) +\n 28 * (colRight & 0xff);\n lumUp =\n 77 * ((colUp >> 16) & 0xff) +\n 151 * ((colUp >> 8) & 0xff) +\n 28 * (colUp & 0xff);\n lumDown =\n 77 * ((colDown >> 16) & 0xff) +\n 151 * ((colDown >> 8) & 0xff) +\n 28 * (colDown & 0xff);\n\n if (lumLeft > currLum) {\n colOut = colLeft;\n currLum = lumLeft;\n }\n if (lumRight > currLum) {\n colOut = colRight;\n currLum = lumRight;\n }\n if (lumUp > currLum) {\n colOut = colUp;\n currLum = lumUp;\n }\n if (lumDown > currLum) {\n colOut = colDown;\n currLum = lumDown;\n }\n out[currIdx++] = colOut;\n }\n }\n Filters._setPixels(pixels, out);\n};\n\n/**\n * increases the bright areas in an image\n * @private\n * @param {Canvas} canvas\n *\n */\nFilters.erode = function(canvas) {\n var pixels = Filters._toPixels(canvas);\n var currIdx = 0;\n var maxIdx = pixels.length ? pixels.length / 4 : 0;\n var out = new Int32Array(maxIdx);\n var currRowIdx, maxRowIdx, colOrig, colOut, currLum;\n var idxRight, idxLeft, idxUp, idxDown;\n var colRight, colLeft, colUp, colDown;\n var lumRight, lumLeft, lumUp, lumDown;\n\n while (currIdx < maxIdx) {\n currRowIdx = currIdx;\n maxRowIdx = currIdx + canvas.width;\n while (currIdx < maxRowIdx) {\n colOrig = colOut = Filters._getARGB(pixels, currIdx);\n idxLeft = currIdx - 1;\n idxRight = currIdx + 1;\n idxUp = currIdx - canvas.width;\n idxDown = currIdx + canvas.width;\n\n if (idxLeft < currRowIdx) {\n idxLeft = currIdx;\n }\n if (idxRight >= maxRowIdx) {\n idxRight = currIdx;\n }\n if (idxUp < 0) {\n idxUp = 0;\n }\n if (idxDown >= maxIdx) {\n idxDown = currIdx;\n }\n colUp = Filters._getARGB(pixels, idxUp);\n colLeft = Filters._getARGB(pixels, idxLeft);\n colDown = Filters._getARGB(pixels, idxDown);\n colRight = Filters._getARGB(pixels, idxRight);\n\n //compute luminance\n currLum =\n 77 * ((colOrig >> 16) & 0xff) +\n 151 * ((colOrig >> 8) & 0xff) +\n 28 * (colOrig & 0xff);\n lumLeft =\n 77 * ((colLeft >> 16) & 0xff) +\n 151 * ((colLeft >> 8) & 0xff) +\n 28 * (colLeft & 0xff);\n lumRight =\n 77 * ((colRight >> 16) & 0xff) +\n 151 * ((colRight >> 8) & 0xff) +\n 28 * (colRight & 0xff);\n lumUp =\n 77 * ((colUp >> 16) & 0xff) +\n 151 * ((colUp >> 8) & 0xff) +\n 28 * (colUp & 0xff);\n lumDown =\n 77 * ((colDown >> 16) & 0xff) +\n 151 * ((colDown >> 8) & 0xff) +\n 28 * (colDown & 0xff);\n\n if (lumLeft < currLum) {\n colOut = colLeft;\n currLum = lumLeft;\n }\n if (lumRight < currLum) {\n colOut = colRight;\n currLum = lumRight;\n }\n if (lumUp < currLum) {\n colOut = colUp;\n currLum = lumUp;\n }\n if (lumDown < currLum) {\n colOut = colDown;\n currLum = lumDown;\n }\n\n out[currIdx++] = colOut;\n }\n }\n Filters._setPixels(pixels, out);\n};\n\n// BLUR\n\n// internal kernel stuff for the gaussian blur filter\nvar blurRadius;\nvar blurKernelSize;\nvar blurKernel;\nvar blurMult;\n\n/*\n * Port of https://github.com/processing/processing/blob/\n * master/core/src/processing/core/PImage.java#L1250\n *\n * Optimized code for building the blur kernel.\n * further optimized blur code (approx. 15% for radius=20)\n * bigger speed gains for larger radii (~30%)\n * added support for various image types (ALPHA, RGB, ARGB)\n * [toxi 050728]\n */\nfunction buildBlurKernel(r) {\n var radius = (r * 3.5) | 0;\n radius = radius < 1 ? 1 : radius < 248 ? radius : 248;\n\n if (blurRadius !== radius) {\n blurRadius = radius;\n blurKernelSize = (1 + blurRadius) << 1;\n blurKernel = new Int32Array(blurKernelSize);\n blurMult = new Array(blurKernelSize);\n for (var l = 0; l < blurKernelSize; l++) {\n blurMult[l] = new Int32Array(256);\n }\n\n var bk, bki;\n var bm, bmi;\n\n for (var i = 1, radiusi = radius - 1; i < radius; i++) {\n blurKernel[radius + i] = blurKernel[radiusi] = bki = radiusi * radiusi;\n bm = blurMult[radius + i];\n bmi = blurMult[radiusi--];\n for (var j = 0; j < 256; j++) {\n bm[j] = bmi[j] = bki * j;\n }\n }\n bk = blurKernel[radius] = radius * radius;\n bm = blurMult[radius];\n\n for (var k = 0; k < 256; k++) {\n bm[k] = bk * k;\n }\n }\n}\n\n// Port of https://github.com/processing/processing/blob/\n// master/core/src/processing/core/PImage.java#L1433\nfunction blurARGB(canvas, radius) {\n var pixels = Filters._toPixels(canvas);\n var width = canvas.width;\n var height = canvas.height;\n var numPackedPixels = width * height;\n var argb = new Int32Array(numPackedPixels);\n for (var j = 0; j < numPackedPixels; j++) {\n argb[j] = Filters._getARGB(pixels, j);\n }\n var sum, cr, cg, cb, ca;\n var read, ri, ym, ymi, bk0;\n var a2 = new Int32Array(numPackedPixels);\n var r2 = new Int32Array(numPackedPixels);\n var g2 = new Int32Array(numPackedPixels);\n var b2 = new Int32Array(numPackedPixels);\n var yi = 0;\n buildBlurKernel(radius);\n var x, y, i;\n var bm;\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n cb = cg = cr = ca = sum = 0;\n read = x - blurRadius;\n if (read < 0) {\n bk0 = -read;\n read = 0;\n } else {\n if (read >= width) {\n break;\n }\n bk0 = 0;\n }\n for (i = bk0; i < blurKernelSize; i++) {\n if (read >= width) {\n break;\n }\n var c = argb[read + yi];\n bm = blurMult[i];\n ca += bm[(c & -16777216) >>> 24];\n cr += bm[(c & 16711680) >> 16];\n cg += bm[(c & 65280) >> 8];\n cb += bm[c & 255];\n sum += blurKernel[i];\n read++;\n }\n ri = yi + x;\n a2[ri] = ca / sum;\n r2[ri] = cr / sum;\n g2[ri] = cg / sum;\n b2[ri] = cb / sum;\n }\n yi += width;\n }\n yi = 0;\n ym = -blurRadius;\n ymi = ym * width;\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n cb = cg = cr = ca = sum = 0;\n if (ym < 0) {\n bk0 = ri = -ym;\n read = x;\n } else {\n if (ym >= height) {\n break;\n }\n bk0 = 0;\n ri = ym;\n read = x + ymi;\n }\n for (i = bk0; i < blurKernelSize; i++) {\n if (ri >= height) {\n break;\n }\n bm = blurMult[i];\n ca += bm[a2[read]];\n cr += bm[r2[read]];\n cg += bm[g2[read]];\n cb += bm[b2[read]];\n sum += blurKernel[i];\n ri++;\n read += width;\n }\n argb[x + yi] =\n ((ca / sum) << 24) |\n ((cr / sum) << 16) |\n ((cg / sum) << 8) |\n (cb / sum);\n }\n yi += width;\n ymi += width;\n ym++;\n }\n Filters._setPixels(pixels, argb);\n}\n\nFilters.blur = function(canvas, radius) {\n blurARGB(canvas, radius);\n};\n\nmodule.exports = Filters;\n\n},{}],43:[function(_dereq_,module,exports){\n/**\n * @module Image\n * @submodule Image\n * @for p5\n * @requires core\n */\n\n/**\n * This module defines the p5 methods for the p5.Image class\n * for drawing images to the main display canvas.\n */\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n// This is not global, but ESLint is not aware that\n// this module is implicitly enclosed with Browserify: this overrides the\n// redefined-global error and permits using the name \"frames\" for the array\n// of saved animation frames.\n\n/* global frames:true */ var frames = [];\n\n/**\n * Creates a new p5.Image (the datatype for storing images). This provides a\n * fresh buffer of pixels to play with. Set the size of the buffer with the\n * width and height parameters.\n * \n * .pixels gives access to an array containing the values for all the pixels\n * in the display window.\n * These values are numbers. This array is the size (including an appropriate\n * factor for the pixelDensity) of the display window x4,\n * representing the R, G, B, A values in order for each pixel, moving from\n * left to right across each row, then down each column. See .pixels for\n * more info. It may also be simpler to use set() or get().\n * \n * Before accessing the pixels of an image, the data must loaded with the\n * loadPixels() function. After the array data has been modified, the\n * updatePixels() function must be run to update the changes.\n *\n * @method createImage\n * @param {Integer} width width in pixels\n * @param {Integer} height height in pixels\n * @return {p5.Image} the p5.Image object\n * @example\n * \n * \n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * \n * \n *\n * \n * \n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * image(img, 34, 34);\n * \n * \n *\n * \n * \n * let pink = color(255, 102, 204);\n * let img = createImage(66, 66);\n * img.loadPixels();\n * let d = pixelDensity();\n * let halfImage = 4 * (img.width * d) * (img.height / 2 * d);\n * for (let i = 0; i < halfImage; i += 4) {\n * img.pixels[i] = red(pink);\n * img.pixels[i + 1] = green(pink);\n * img.pixels[i + 2] = blue(pink);\n * img.pixels[i + 3] = alpha(pink);\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * \n * \n *\n * @alt\n * 66x66 dark turquoise rect in center of canvas.\n * 2 gradated dark turquoise rects fade left. 1 center 1 bottom right of canvas\n * no image displayed\n *\n */\np5.prototype.createImage = function(width, height) {\n p5._validateParameters('createImage', arguments);\n return new p5.Image(width, height);\n};\n\n/**\n * Save the current canvas as an image. The browser will either save the\n * file immediately, or prompt the user with a dialogue window.\n *\n * @method saveCanvas\n * @param {p5.Element|HTMLCanvasElement} selectedCanvas a variable\n * representing a specific html5 canvas (optional)\n * @param {String} [filename]\n * @param {String} [extension] 'jpg' or 'png'\n *\n * @example\n * \n * function setup() {\n * let c = createCanvas(100, 100);\n * background(255, 0, 0);\n * saveCanvas(c, 'myCanvas', 'jpg');\n * }\n * \n * \n * // note that this example has the same result as above\n * // if no canvas is specified, defaults to main canvas\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(255, 0, 0);\n * saveCanvas('myCanvas', 'jpg');\n *\n * // all of the following are valid\n * saveCanvas(c, 'myCanvas', 'jpg');\n * saveCanvas(c, 'myCanvas.jpg');\n * saveCanvas(c, 'myCanvas');\n * saveCanvas(c);\n * saveCanvas('myCanvas', 'png');\n * saveCanvas('myCanvas');\n * saveCanvas();\n * }\n * \n *\n * @alt\n * no image displayed\n * no image displayed\n * no image displayed\n */\n/**\n * @method saveCanvas\n * @param {String} [filename]\n * @param {String} [extension]\n */\np5.prototype.saveCanvas = function() {\n p5._validateParameters('saveCanvas', arguments);\n\n // copy arguments to array\n var args = [].slice.call(arguments);\n var htmlCanvas, filename, extension;\n\n if (arguments[0] instanceof HTMLCanvasElement) {\n htmlCanvas = arguments[0];\n args.shift();\n } else if (arguments[0] instanceof p5.Element) {\n htmlCanvas = arguments[0].elt;\n args.shift();\n } else {\n htmlCanvas = this._curElement && this._curElement.elt;\n }\n\n if (args.length >= 1) {\n filename = args[0];\n }\n if (args.length >= 2) {\n extension = args[1];\n }\n\n extension =\n extension ||\n p5.prototype._checkFileExtension(filename, extension)[1] ||\n 'png';\n\n var mimeType;\n switch (extension) {\n default:\n //case 'png':\n mimeType = 'image/png';\n break;\n case 'jpeg':\n case 'jpg':\n mimeType = 'image/jpeg';\n break;\n }\n\n htmlCanvas.toBlob(function(blob) {\n p5.prototype.downloadFile(blob, filename, extension);\n }, mimeType);\n};\n\n/**\n * Capture a sequence of frames that can be used to create a movie.\n * Accepts a callback. For example, you may wish to send the frames\n * to a server where they can be stored or converted into a movie.\n * If no callback is provided, the browser will pop up save dialogues in an\n * attempt to download all of the images that have just been created. With the\n * callback provided the image data isn't saved by default but instead passed\n * as an argument to the callback function as an array of objects, with the\n * size of array equal to the total number of frames.\n *\n * Note that saveFrames() will only save the first 15 frames of an animation.\n * To export longer animations, you might look into a library like\n * ccapture.js.\n *\n * @method saveFrames\n * @param {String} filename\n * @param {String} extension 'jpg' or 'png'\n * @param {Number} duration Duration in seconds to save the frames for.\n * @param {Number} framerate Framerate to save the frames in.\n * @param {function(Array)} [callback] A callback function that will be executed\n to handle the image data. This function\n should accept an array as argument. The\n array will contain the specified number of\n frames of objects. Each object has three\n properties: imageData - an\n image/octet-stream, filename and extension.\n * @example\n * \n * function draw() {\n * background(mouseX);\n * }\n *\n * function mousePressed() {\n * saveFrames('out', 'png', 1, 25, data => {\n * print(data);\n * });\n * }\n\n *\n * @alt\n * canvas background goes from light to dark with mouse x.\n *\n */\np5.prototype.saveFrames = function(fName, ext, _duration, _fps, callback) {\n p5._validateParameters('saveFrames', arguments);\n var duration = _duration || 3;\n duration = p5.prototype.constrain(duration, 0, 15);\n duration = duration * 1000;\n var fps = _fps || 15;\n fps = p5.prototype.constrain(fps, 0, 22);\n var count = 0;\n\n var makeFrame = p5.prototype._makeFrame;\n var cnv = this._curElement.elt;\n var frameFactory = setInterval(function() {\n makeFrame(fName + count, ext, cnv);\n count++;\n }, 1000 / fps);\n\n setTimeout(function() {\n clearInterval(frameFactory);\n if (callback) {\n callback(frames);\n } else {\n for (var i = 0; i < frames.length; i++) {\n var f = frames[i];\n p5.prototype.downloadFile(f.imageData, f.filename, f.ext);\n }\n }\n frames = []; // clear frames\n }, duration + 0.01);\n};\n\np5.prototype._makeFrame = function(filename, extension, _cnv) {\n var cnv;\n if (this) {\n cnv = this._curElement.elt;\n } else {\n cnv = _cnv;\n }\n var mimeType;\n if (!extension) {\n extension = 'png';\n mimeType = 'image/png';\n } else {\n switch (extension.toLowerCase()) {\n case 'png':\n mimeType = 'image/png';\n break;\n case 'jpeg':\n mimeType = 'image/jpeg';\n break;\n case 'jpg':\n mimeType = 'image/jpeg';\n break;\n default:\n mimeType = 'image/png';\n break;\n }\n }\n var downloadMime = 'image/octet-stream';\n var imageData = cnv.toDataURL(mimeType);\n imageData = imageData.replace(mimeType, downloadMime);\n\n var thisFrame = {};\n thisFrame.imageData = imageData;\n thisFrame.filename = filename;\n thisFrame.ext = extension;\n frames.push(thisFrame);\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],44:[function(_dereq_,module,exports){\n/**\n * @module Image\n * @submodule Loading & Displaying\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar Filters = _dereq_('./filters');\nvar canvas = _dereq_('../core/helpers');\nvar constants = _dereq_('../core/constants');\n\n_dereq_('../core/error_helpers');\n\n/**\n * Loads an image from a path and creates a p5.Image from it.\n * \n * The image may not be immediately available for rendering\n * If you want to ensure that the image is ready before doing\n * anything with it, place the loadImage() call in preload().\n * You may also supply a callback function to handle the image when it's ready.\n * \n * The path to the image should be relative to the HTML file\n * that links in your sketch. Loading an image from a URL or other\n * remote location may be blocked due to your browser's built-in\n * security.\n *\n * @method loadImage\n * @param {String} path Path of the image to be loaded\n * @param {function(p5.Image)} [successCallback] Function to be called once\n * the image is loaded. Will be passed the\n * p5.Image.\n * @param {function(Event)} [failureCallback] called with event error if\n * the image fails to load.\n * @return {p5.Image} the p5.Image object\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * }\n * \n * \n * \n * \n * function setup() {\n * // here we use a callback to display the image after loading\n * loadImage('assets/laDefense.jpg', img => {\n * image(img, 0, 0);\n * });\n * }\n * \n * \n *\n * @alt\n * image of the underside of a white umbrella and grided ceililng above\n * image of the underside of a white umbrella and grided ceililng above\n *\n */\np5.prototype.loadImage = function(path, successCallback, failureCallback) {\n p5._validateParameters('loadImage', arguments);\n var img = new Image();\n var pImg = new p5.Image(1, 1, this);\n\n var self = this;\n img.onload = function() {\n pImg.width = pImg.canvas.width = img.width;\n pImg.height = pImg.canvas.height = img.height;\n\n // Draw the image into the backing canvas of the p5.Image\n pImg.drawingContext.drawImage(img, 0, 0);\n pImg.modified = true;\n\n if (typeof successCallback === 'function') {\n successCallback(pImg);\n }\n\n self._decrementPreload();\n };\n img.onerror = function(e) {\n p5._friendlyFileLoadError(0, img.src);\n if (typeof failureCallback === 'function') {\n failureCallback(e);\n } else {\n console.error(e);\n }\n };\n\n // Set crossOrigin in case image is served with CORS headers.\n // This will let us draw to the canvas without tainting it.\n // See https://developer.mozilla.org/en-US/docs/HTML/CORS_Enabled_Image\n // When using data-uris the file will be loaded locally\n // so we don't need to worry about crossOrigin with base64 file types.\n if (path.indexOf('data:image/') !== 0) {\n img.crossOrigin = 'Anonymous';\n }\n\n // start loading the image\n img.src = path;\n\n return pImg;\n};\n\n/**\n * Validates clipping params. Per drawImage spec sWidth and sHight cannot be\n * negative or greater than image intrinsic width and height\n * @private\n * @param {Number} sVal\n * @param {Number} iVal\n * @returns {Number}\n * @private\n */\nfunction _sAssign(sVal, iVal) {\n if (sVal > 0 && sVal < iVal) {\n return sVal;\n } else {\n return iVal;\n }\n}\n\n/**\n * Draw an image to the p5.js canvas.\n *\n * This function can be used with different numbers of parameters. The\n * simplest use requires only three parameters: img, x, and y—where (x, y) is\n * the position of the image. Two more parameters can optionally be added to\n * specify the width and height of the image.\n *\n * This function can also be used with all eight Number parameters. To\n * differentiate between all these parameters, p5.js uses the language of\n * \"destination rectangle\" (which corresponds to \"dx\", \"dy\", etc.) and \"source\n * image\" (which corresponds to \"sx\", \"sy\", etc.) below. Specifying the\n * \"source image\" dimensions can be useful when you want to display a\n * subsection of the source image instead of the whole thing. Here's a diagram\n * to explain further:\n * \n *\n * @method image\n * @param {p5.Image|p5.Element} img the image to display\n * @param {Number} x the x-coordinate of the top-left corner of the image\n * @param {Number} y the y-coordinate of the top-left corner of the image\n * @param {Number} [width] the width to draw the image\n * @param {Number} [height] the height to draw the image\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * // Top-left corner of the img is at (0, 0)\n * // Width and height are the img's original width and height\n * image(img, 0, 0);\n * }\n * \n * \n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * background(50);\n * // Top-left corner of the img is at (10, 10)\n * // Width and height are 50 x 50\n * image(img, 10, 10, 50, 50);\n * }\n * \n * \n * \n * \n * function setup() {\n * // Here, we use a callback to display the image after loading\n * loadImage('assets/laDefense.jpg', img => {\n * image(img, 0, 0);\n * });\n * }\n * \n * \n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/gradient.png');\n * }\n * function setup() {\n * // 1. Background image\n * // Top-left corner of the img is at (0, 0)\n * // Width and height are the img's original width and height, 100 x 100\n * image(img, 0, 0);\n * // 2. Top right image\n * // Top-left corner of destination rectangle is at (50, 0)\n * // Destination rectangle width and height are 40 x 20\n * // The next parameters are relative to the source image:\n * // - Starting at position (50, 50) on the source image, capture a 50 x 50\n * // subsection\n * // - Draw this subsection to fill the dimensions of the destination rectangle\n * image(img, 50, 0, 40, 20, 50, 50, 50, 50);\n * }\n * \n * \n * @alt\n * image of the underside of a white umbrella and gridded ceiling above\n * image of the underside of a white umbrella and gridded ceiling above\n *\n */\n/**\n * @method image\n * @param {p5.Image|p5.Element} img\n * @param {Number} dx the x-coordinate of the destination\n * rectangle in which to draw the source image\n * @param {Number} dy the y-coordinate of the destination\n * rectangle in which to draw the source image\n * @param {Number} dWidth the width of the destination rectangle\n * @param {Number} dHeight the height of the destination rectangle\n * @param {Number} sx the x-coordinate of the subsection of the source\n * image to draw into the destination rectangle\n * @param {Number} sy the y-coordinate of the subsection of the source\n * image to draw into the destination rectangle\n * @param {Number} [sWidth] the width of the subsection of the\n * source image to draw into the destination\n * rectangle\n * @param {Number} [sHeight] the height of the subsection of the\n * source image to draw into the destination rectangle\n */\np5.prototype.image = function(\n img,\n dx,\n dy,\n dWidth,\n dHeight,\n sx,\n sy,\n sWidth,\n sHeight\n) {\n // set defaults per spec: https://goo.gl/3ykfOq\n\n p5._validateParameters('image', arguments);\n\n var defW = img.width;\n var defH = img.height;\n\n if (img.elt && img.elt.videoWidth && !img.canvas) {\n // video no canvas\n defW = img.elt.videoWidth;\n defH = img.elt.videoHeight;\n }\n\n var _dx = dx;\n var _dy = dy;\n var _dw = dWidth || defW;\n var _dh = dHeight || defH;\n var _sx = sx || 0;\n var _sy = sy || 0;\n var _sw = sWidth || defW;\n var _sh = sHeight || defH;\n\n _sw = _sAssign(_sw, defW);\n _sh = _sAssign(_sh, defH);\n\n // This part needs cleanup and unit tests\n // see issues https://github.com/processing/p5.js/issues/1741\n // and https://github.com/processing/p5.js/issues/1673\n var pd = 1;\n\n if (img.elt && !img.canvas && img.elt.style.width) {\n //if img is video and img.elt.size() has been used and\n //no width passed to image()\n if (img.elt.videoWidth && !dWidth) {\n pd = img.elt.videoWidth;\n } else {\n //all other cases\n pd = img.elt.width;\n }\n pd /= parseInt(img.elt.style.width, 10);\n }\n\n _sx *= pd;\n _sy *= pd;\n _sh *= pd;\n _sw *= pd;\n\n var vals = canvas.modeAdjust(_dx, _dy, _dw, _dh, this._renderer._imageMode);\n\n // tint the image if there is a tint\n this._renderer.image(img, _sx, _sy, _sw, _sh, vals.x, vals.y, vals.w, vals.h);\n};\n\n/**\n * Sets the fill value for displaying images. Images can be tinted to\n * specified colors or made transparent by including an alpha value.\n * \n * To apply transparency to an image without affecting its color, use\n * white as the tint color and specify an alpha value. For instance,\n * tint(255, 128) will make an image 50% transparent (assuming the default\n * alpha range of 0-255, which can be changed with colorMode()).\n * \n * The value for the gray parameter must be less than or equal to the current\n * maximum value as specified by colorMode(). The default maximum value is\n * 255.\n *\n *\n * @method tint\n * @param {Number} v1 red or hue value relative to\n * the current color range\n * @param {Number} v2 green or saturation value\n * relative to the current color range\n * @param {Number} v3 blue or brightness value\n * relative to the current color range\n * @param {Number} [alpha]\n *\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(0, 153, 204); // Tint blue\n * image(img, 50, 0);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(0, 153, 204, 126); // Tint blue and set transparency\n * image(img, 50, 0);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(255, 126); // Apply transparency without changing color\n * image(img, 50, 0);\n * }\n * \n * \n *\n * @alt\n * 2 side by side images of umbrella and ceiling, one image with blue tint\n * Images of umbrella and ceiling, one half of image with blue tint\n * 2 side by side images of umbrella and ceiling, one image translucent\n *\n */\n\n/**\n * @method tint\n * @param {String} value a color string\n */\n\n/**\n * @method tint\n * @param {Number} gray a gray value\n * @param {Number} [alpha]\n */\n\n/**\n * @method tint\n * @param {Number[]} values an array containing the red,green,blue &\n * and alpha components of the color\n */\n\n/**\n * @method tint\n * @param {p5.Color} color the tint color\n */\np5.prototype.tint = function() {\n p5._validateParameters('tint', arguments);\n var c = this.color.apply(this, arguments);\n this._renderer._tint = c.levels;\n};\n\n/**\n * Removes the current fill value for displaying images and reverts to\n * displaying images with their original hues.\n *\n * @method noTint\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * tint(0, 153, 204); // Tint blue\n * image(img, 0, 0);\n * noTint(); // Disable tint\n * image(img, 50, 0);\n * }\n * \n * \n *\n * @alt\n * 2 side by side images of bricks, left image with blue tint\n *\n */\np5.prototype.noTint = function() {\n this._renderer._tint = null;\n};\n\n/**\n * Apply the current tint color to the input image, return the resulting\n * canvas.\n *\n * @private\n * @param {p5.Image} The image to be tinted\n * @return {canvas} The resulting tinted canvas\n *\n */\np5.prototype._getTintedImageCanvas = function(img) {\n if (!img.canvas) {\n return img;\n }\n var pixels = Filters._toPixels(img.canvas);\n var tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = img.canvas.width;\n tmpCanvas.height = img.canvas.height;\n var tmpCtx = tmpCanvas.getContext('2d');\n var id = tmpCtx.createImageData(img.canvas.width, img.canvas.height);\n var newPixels = id.data;\n\n for (var i = 0; i < pixels.length; i += 4) {\n var r = pixels[i];\n var g = pixels[i + 1];\n var b = pixels[i + 2];\n var a = pixels[i + 3];\n\n newPixels[i] = r * this._renderer._tint[0] / 255;\n newPixels[i + 1] = g * this._renderer._tint[1] / 255;\n newPixels[i + 2] = b * this._renderer._tint[2] / 255;\n newPixels[i + 3] = a * this._renderer._tint[3] / 255;\n }\n\n tmpCtx.putImageData(id, 0, 0);\n return tmpCanvas;\n};\n\n/**\n * Set image mode. Modifies the location from which images are drawn by\n * changing the way in which parameters given to image() are interpreted.\n * The default mode is imageMode(CORNER), which interprets the second and\n * third parameters of image() as the upper-left corner of the image. If\n * two additional parameters are specified, they are used to set the image's\n * width and height.\n * \n * imageMode(CORNERS) interprets the second and third parameters of image()\n * as the location of one corner, and the fourth and fifth parameters as the\n * opposite corner.\n * \n * imageMode(CENTER) interprets the second and third parameters of image()\n * as the image's center point. If two additional parameters are specified,\n * they are used to set the image's width and height.\n *\n * @method imageMode\n * @param {Constant} mode either CORNER, CORNERS, or CENTER\n * @example\n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CORNER);\n * image(img, 10, 10, 50, 50);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CORNERS);\n * image(img, 10, 10, 90, 40);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CENTER);\n * image(img, 50, 50, 80, 80);\n * }\n * \n * \n *\n * @alt\n * small square image of bricks\n * horizontal rectangle image of bricks\n * large square image of bricks\n *\n */\np5.prototype.imageMode = function(m) {\n p5._validateParameters('imageMode', arguments);\n if (\n m === constants.CORNER ||\n m === constants.CORNERS ||\n m === constants.CENTER\n ) {\n this._renderer._imageMode = m;\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/error_helpers\":20,\"../core/helpers\":21,\"../core/main\":24,\"./filters\":42}],45:[function(_dereq_,module,exports){\n/**\n * @module Image\n * @submodule Image\n * @requires core\n * @requires constants\n * @requires filters\n */\n\n/**\n * This module defines the p5.Image class and P5 methods for\n * drawing images to the main display canvas.\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar Filters = _dereq_('./filters');\n\n/*\n * Class methods\n */\n\n/**\n * Creates a new p5.Image. A p5.Image is a canvas backed representation of an\n * image.\n * \n * p5 can display .gif, .jpg and .png images. Images may be displayed\n * in 2D and 3D space. Before an image is used, it must be loaded with the\n * loadImage() function. The p5.Image class contains fields for the width and\n * height of the image, as well as an array called pixels[] that contains the\n * values for every pixel in the image.\n * \n * The methods described below allow easy access to the image's pixels and\n * alpha channel and simplify the process of compositing.\n * \n * Before using the pixels[] array, be sure to use the loadPixels() method on\n * the image to make sure that the pixel data is properly loaded.\n * @example\n * \n * function setup() {\n * let img = createImage(100, 100); // same as new p5.Image(100, 100);\n * img.loadPixels();\n * createCanvas(100, 100);\n * background(0);\n *\n * // helper for writing color to array\n * function writeColor(image, x, y, red, green, blue, alpha) {\n * let index = (x + y * width) * 4;\n * image.pixels[index] = red;\n * image.pixels[index + 1] = green;\n * image.pixels[index + 2] = blue;\n * image.pixels[index + 3] = alpha;\n * }\n *\n * let x, y;\n * // fill with random colors\n * for (y = 0; y < img.height; y++) {\n * for (x = 0; x < img.width; x++) {\n * let red = random(255);\n * let green = random(255);\n * let blue = random(255);\n * let alpha = 255;\n * writeColor(img, x, y, red, green, blue, alpha);\n * }\n * }\n *\n * // draw a red line\n * y = 0;\n * for (x = 0; x < img.width; x++) {\n * writeColor(img, x, y, 255, 0, 0, 255);\n * }\n *\n * // draw a green line\n * y = img.height - 1;\n * for (x = 0; x < img.width; x++) {\n * writeColor(img, x, y, 0, 255, 0, 255);\n * }\n *\n * img.updatePixels();\n * image(img, 0, 0);\n * }\n * \n *\n *\n * @class p5.Image\n * @param {Number} width\n * @param {Number} height\n */\np5.Image = function(width, height) {\n /**\n * Image width.\n * @property {Number} width\n * @readOnly\n * @example\n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * image(img, 0, 0);\n * for (let i = 0; i < img.width; i++) {\n * let c = img.get(i, img.height / 2);\n * stroke(c);\n * line(i, height / 2, i, height);\n * }\n * }\n * \n *\n * @alt\n * rocky mountains in top and horizontal lines in corresponding colors in bottom.\n *\n */\n this.width = width;\n /**\n * Image height.\n * @property {Number} height\n * @readOnly\n * @example\n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * image(img, 0, 0);\n * for (let i = 0; i < img.height; i++) {\n * let c = img.get(img.width / 2, i);\n * stroke(c);\n * line(0, i, width / 2, i);\n * }\n * }\n * \n *\n * @alt\n * rocky mountains on right and vertical lines in corresponding colors on left.\n *\n */\n this.height = height;\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.width;\n this.canvas.height = this.height;\n this.drawingContext = this.canvas.getContext('2d');\n this._pixelsState = this;\n this._pixelDensity = 1;\n //used for webgl texturing only\n this._modified = false;\n this._pixelsDirty = true;\n /**\n * Array containing the values for all the pixels in the display window.\n * These values are numbers. This array is the size (include an appropriate\n * factor for pixelDensity) of the display window x4,\n * representing the R, G, B, A values in order for each pixel, moving from\n * left to right across each row, then down each column. Retina and other\n * high denisty displays may have more pixels (by a factor of\n * pixelDensity^2).\n * For example, if the image is 100x100 pixels, there will be 40,000. With\n * pixelDensity = 2, there will be 160,000. The first four values\n * (indices 0-3) in the array will be the R, G, B, A values of the pixel at\n * (0, 0). The second four values (indices 4-7) will contain the R, G, B, A\n * values of the pixel at (1, 0). More generally, to set values for a pixel\n * at (x, y):\n * ```javascript\n * let d = pixelDensity();\n * for (let i = 0; i < d; i++) {\n * for (let j = 0; j < d; j++) {\n * // loop over\n * index = 4 * ((y * d + j) * width * d + (x * d + i));\n * pixels[index] = r;\n * pixels[index+1] = g;\n * pixels[index+2] = b;\n * pixels[index+3] = a;\n * }\n * }\n * ```\n * \n * Before accessing this array, the data must loaded with the loadPixels()\n * function. After the array data has been modified, the updatePixels()\n * function must be run to update the changes.\n * @property {Number[]} pixels\n * @example\n * \n * \n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * \n * \n * \n * \n * let pink = color(255, 102, 204);\n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < 4 * (width * height / 2); i += 4) {\n * img.pixels[i] = red(pink);\n * img.pixels[i + 1] = green(pink);\n * img.pixels[i + 2] = blue(pink);\n * img.pixels[i + 3] = alpha(pink);\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * \n * \n *\n * @alt\n * 66x66 turquoise rect in center of canvas\n * 66x66 pink rect in center of canvas\n *\n */\n this.pixels = [];\n};\n\n/**\n * Helper fxn for sharing pixel methods\n *\n */\np5.Image.prototype._setProperty = function(prop, value) {\n this[prop] = value;\n this.setModified(true);\n};\n\n/**\n * Loads the pixels data for this image into the [pixels] attribute.\n *\n * @method loadPixels\n * @example\n * \n * let myImage;\n * let halfImage;\n *\n * function preload() {\n * myImage = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * myImage.loadPixels();\n * halfImage = 4 * myImage.width * myImage.height / 2;\n * for (let i = 0; i < halfImage; i++) {\n * myImage.pixels[i + halfImage] = myImage.pixels[i];\n * }\n * myImage.updatePixels();\n * }\n *\n * function draw() {\n * image(myImage, 0, 0, width, height);\n * }\n * \n *\n * @alt\n * 2 images of rocky mountains vertically stacked\n *\n */\np5.Image.prototype.loadPixels = function() {\n p5.Renderer2D.prototype.loadPixels.call(this);\n this.setModified(true);\n};\n\n/**\n * Updates the backing canvas for this image with the contents of\n * the [pixels] array.\n *\n * @method updatePixels\n * @param {Integer} x x-offset of the target update area for the\n * underlying canvas\n * @param {Integer} y y-offset of the target update area for the\n * underlying canvas\n * @param {Integer} w height of the target update area for the\n * underlying canvas\n * @param {Integer} h height of the target update area for the\n * underlying canvas\n * @example\n * \n * let myImage;\n * let halfImage;\n *\n * function preload() {\n * myImage = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * myImage.loadPixels();\n * halfImage = 4 * myImage.width * myImage.height / 2;\n * for (let i = 0; i < halfImage; i++) {\n * myImage.pixels[i + halfImage] = myImage.pixels[i];\n * }\n * myImage.updatePixels();\n * }\n *\n * function draw() {\n * image(myImage, 0, 0, width, height);\n * }\n * \n *\n * @alt\n * 2 images of rocky mountains vertically stacked\n *\n */\n/**\n * @method updatePixels\n */\np5.Image.prototype.updatePixels = function(x, y, w, h) {\n p5.Renderer2D.prototype.updatePixels.call(this, x, y, w, h);\n this.setModified(true);\n};\n\n/**\n * Get a region of pixels from an image.\n *\n * If no params are passed, the whole image is returned.\n * If x and y are the only params passed a single pixel is extracted.\n * If all params are passed a rectangle region is extracted and a p5.Image\n * is returned.\n *\n * @method get\n * @param {Number} x x-coordinate of the pixel\n * @param {Number} y y-coordinate of the pixel\n * @param {Number} w width\n * @param {Number} h height\n * @return {p5.Image} the rectangle p5.Image\n * @example\n * \n * let myImage;\n * let c;\n *\n * function preload() {\n * myImage = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * background(myImage);\n * noStroke();\n * c = myImage.get(60, 90);\n * fill(c);\n * rect(25, 25, 50, 50);\n * }\n *\n * //get() returns color here\n * \n *\n * @alt\n * image of rocky mountains with 50x50 green rect in front\n *\n */\n/**\n * @method get\n * @return {p5.Image} the whole p5.Image\n */\n/**\n * @method get\n * @param {Number} x\n * @param {Number} y\n * @return {Number[]} color of pixel at x,y in array format [R, G, B, A]\n */\np5.Image.prototype.get = function(x, y, w, h) {\n p5._validateParameters('p5.Image.get', arguments);\n return p5.Renderer2D.prototype.get.apply(this, arguments);\n};\n\np5.Image.prototype._getPixel = p5.Renderer2D.prototype._getPixel;\n\n/**\n * Set the color of a single pixel or write an image into\n * this p5.Image.\n *\n * Note that for a large number of pixels this will\n * be slower than directly manipulating the pixels array\n * and then calling updatePixels().\n *\n * @method set\n * @param {Number} x x-coordinate of the pixel\n * @param {Number} y y-coordinate of the pixel\n * @param {Number|Number[]|Object} a grayscale value | pixel array |\n * a p5.Color | image to copy\n * @example\n * \n * \n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * image(img, 34, 34);\n * \n * \n *\n * @alt\n * 2 gradated dark turquoise rects fade left. 1 center 1 bottom right of canvas\n *\n */\np5.Image.prototype.set = function(x, y, imgOrCol) {\n p5.Renderer2D.prototype.set.call(this, x, y, imgOrCol);\n this.setModified(true);\n};\n\n/**\n * Resize the image to a new width and height. To make the image scale\n * proportionally, use 0 as the value for the wide or high parameter.\n * For instance, to make the width of an image 150 pixels, and change\n * the height using the same proportion, use resize(150, 0).\n *\n * @method resize\n * @param {Number} width the resized image width\n * @param {Number} height the resized image height\n * @example\n * \n * let img;\n *\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n\n * function draw() {\n * image(img, 0, 0);\n * }\n *\n * function mousePressed() {\n * img.resize(50, 100);\n * }\n * \n *\n * @alt\n * image of rocky mountains. zoomed in\n *\n */\np5.Image.prototype.resize = function(width, height) {\n // Copy contents to a temporary canvas, resize the original\n // and then copy back.\n //\n // There is a faster approach that involves just one copy and swapping the\n // this.canvas reference. We could switch to that approach if (as i think\n // is the case) there an expectation that the user would not hold a\n // reference to the backing canvas of a p5.Image. But since we do not\n // enforce that at the moment, I am leaving in the slower, but safer\n // implementation.\n\n // auto-resize\n if (width === 0 && height === 0) {\n width = this.canvas.width;\n height = this.canvas.height;\n } else if (width === 0) {\n width = this.canvas.width * height / this.canvas.height;\n } else if (height === 0) {\n height = this.canvas.height * width / this.canvas.width;\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n var tempCanvas = document.createElement('canvas');\n tempCanvas.width = width;\n tempCanvas.height = height;\n // prettier-ignore\n tempCanvas.getContext('2d').drawImage(\n this.canvas,\n 0, 0, this.canvas.width, this.canvas.height,\n 0, 0, tempCanvas.width, tempCanvas.height\n );\n\n // Resize the original canvas, which will clear its contents\n this.canvas.width = this.width = width;\n this.canvas.height = this.height = height;\n\n //Copy the image back\n\n // prettier-ignore\n this.drawingContext.drawImage(\n tempCanvas,\n 0, 0, width, height,\n 0, 0, width, height\n );\n\n if (this.pixels.length > 0) {\n this.loadPixels();\n }\n\n this.setModified(true);\n this._pixelsDirty = true;\n};\n\n/**\n * Copies a region of pixels from one image to another. If no\n * srcImage is specified this is used as the source. If the source\n * and destination regions aren't the same size, it will\n * automatically resize source pixels to fit the specified\n * target region.\n *\n * @method copy\n * @param {p5.Image|p5.Element} srcImage source image\n * @param {Integer} sx X coordinate of the source's upper left corner\n * @param {Integer} sy Y coordinate of the source's upper left corner\n * @param {Integer} sw source image width\n * @param {Integer} sh source image height\n * @param {Integer} dx X coordinate of the destination's upper left corner\n * @param {Integer} dy Y coordinate of the destination's upper left corner\n * @param {Integer} dw destination image width\n * @param {Integer} dh destination image height\n * @example\n * \n * let photo;\n * let bricks;\n * let x;\n * let y;\n *\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks.jpg');\n * }\n *\n * function setup() {\n * x = bricks.width / 2;\n * y = bricks.height / 2;\n * photo.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n * image(photo, 0, 0);\n * }\n * \n *\n * @alt\n * image of rocky mountains and smaller image on top of bricks at top left\n *\n */\n/**\n * @method copy\n * @param {Integer} sx\n * @param {Integer} sy\n * @param {Integer} sw\n * @param {Integer} sh\n * @param {Integer} dx\n * @param {Integer} dy\n * @param {Integer} dw\n * @param {Integer} dh\n */\np5.Image.prototype.copy = function() {\n var srcImage, sx, sy, sw, sh, dx, dy, dw, dh;\n if (arguments.length === 9) {\n srcImage = arguments[0];\n sx = arguments[1];\n sy = arguments[2];\n sw = arguments[3];\n sh = arguments[4];\n dx = arguments[5];\n dy = arguments[6];\n dw = arguments[7];\n dh = arguments[8];\n } else if (arguments.length === 8) {\n srcImage = this;\n sx = arguments[0];\n sy = arguments[1];\n sw = arguments[2];\n sh = arguments[3];\n dx = arguments[4];\n dy = arguments[5];\n dw = arguments[6];\n dh = arguments[7];\n } else {\n throw new Error('Signature not supported');\n }\n p5.Renderer2D._copyHelper(this, srcImage, sx, sy, sw, sh, dx, dy, dw, dh);\n this._pixelsDirty = true;\n};\n\n/**\n * Masks part of an image from displaying by loading another\n * image and using it's alpha channel as an alpha channel for\n * this image.\n *\n * @method mask\n * @param {p5.Image} srcImage source image\n * @example\n * \n * let photo, maskImage;\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * maskImage = loadImage('assets/mask2.png');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * photo.mask(maskImage);\n * image(photo, 0, 0);\n * }\n * \n *\n * @alt\n * image of rocky mountains with white at right\n *\n *\n * http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\n *\n */\n// TODO: - Accept an array of alpha values.\n// - Use other channels of an image. p5 uses the\n// blue channel (which feels kind of arbitrary). Note: at the\n// moment this method does not match native processings original\n// functionality exactly.\np5.Image.prototype.mask = function(p5Image) {\n if (p5Image === undefined) {\n p5Image = this;\n }\n var currBlend = this.drawingContext.globalCompositeOperation;\n\n var scaleFactor = 1;\n if (p5Image instanceof p5.Renderer) {\n scaleFactor = p5Image._pInst._pixelDensity;\n }\n\n var copyArgs = [\n p5Image,\n 0,\n 0,\n scaleFactor * p5Image.width,\n scaleFactor * p5Image.height,\n 0,\n 0,\n this.width,\n this.height\n ];\n\n this.drawingContext.globalCompositeOperation = 'destination-in';\n p5.Image.prototype.copy.apply(this, copyArgs);\n this.drawingContext.globalCompositeOperation = currBlend;\n this.setModified(true);\n};\n\n/**\n * Applies an image filter to a p5.Image\n *\n * @method filter\n * @param {Constant} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,\n * POSTERIZE, BLUR, ERODE, DILATE or BLUR.\n * See Filters.js for docs on\n * each available filter\n * @param {Number} [filterParam] an optional parameter unique\n * to each filter, see above\n * @example\n * \n * let photo1;\n * let photo2;\n *\n * function preload() {\n * photo1 = loadImage('assets/rockies.jpg');\n * photo2 = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * photo2.filter(GRAY);\n * image(photo1, 0, 0);\n * image(photo2, width / 2, 0);\n * }\n * \n *\n * @alt\n * 2 images of rocky mountains left one in color, right in black and white\n *\n */\np5.Image.prototype.filter = function(operation, value) {\n Filters.apply(this.canvas, Filters[operation], value);\n this.setModified(true);\n};\n\n/**\n * Copies a region of pixels from one image to another, using a specified\n * blend mode to do the operation.\n *\n * @method blend\n * @param {p5.Image} srcImage source image\n * @param {Integer} sx X coordinate of the source's upper left corner\n * @param {Integer} sy Y coordinate of the source's upper left corner\n * @param {Integer} sw source image width\n * @param {Integer} sh source image height\n * @param {Integer} dx X coordinate of the destination's upper left corner\n * @param {Integer} dy Y coordinate of the destination's upper left corner\n * @param {Integer} dw destination image width\n * @param {Integer} dh destination image height\n * @param {Constant} blendMode the blend mode. either\n * BLEND, DARKEST, LIGHTEST, DIFFERENCE,\n * MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n * SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.\n *\n * Available blend modes are: normal | multiply | screen | overlay |\n * darken | lighten | color-dodge | color-burn | hard-light |\n * soft-light | difference | exclusion | hue | saturation |\n * color | luminosity\n *\n *\n * http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/\n * @example\n * \n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n * \n * \n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n * \n * \n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n * \n *\n * @alt\n * image of rocky mountains. Brick images on left and right. Right overexposed\n * image of rockies. Brickwall images on left and right. Right mortar transparent\n * image of rockies. Brickwall images on left and right. Right translucent\n *\n */\n/**\n * @method blend\n * @param {Integer} sx\n * @param {Integer} sy\n * @param {Integer} sw\n * @param {Integer} sh\n * @param {Integer} dx\n * @param {Integer} dy\n * @param {Integer} dw\n * @param {Integer} dh\n * @param {Constant} blendMode\n */\np5.Image.prototype.blend = function() {\n p5.prototype.blend.apply(this, arguments);\n this.setModified(true);\n};\n\n/**\n * helper method for web GL mode to indicate that an image has been\n * changed or unchanged since last upload. gl texture upload will\n * set this value to false after uploading the texture.\n * @method setModified\n * @param {boolean} val sets whether or not the image has been\n * modified.\n * @private\n */\np5.Image.prototype.setModified = function(val) {\n this._modified = val; //enforce boolean?\n};\n\n/**\n * helper method for web GL mode to figure out if the image\n * has been modified and might need to be re-uploaded to texture\n * memory between frames.\n * @method isModified\n * @private\n * @return {boolean} a boolean indicating whether or not the\n * image has been updated or modified since last texture upload.\n */\np5.Image.prototype.isModified = function() {\n return this._modified;\n};\n\n/**\n * Saves the image to a file and force the browser to download it.\n * Accepts two strings for filename and file extension\n * Supports png (default) and jpg.\n *\n * @method save\n * @param {String} filename give your file a name\n * @param {String} extension 'png' or 'jpg'\n * @example\n * \n * let photo;\n *\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * }\n *\n * function draw() {\n * image(photo, 0, 0);\n * }\n *\n * function keyTyped() {\n * if (key === 's') {\n * photo.save('photo', 'png');\n * }\n * }\n * \n *\n * @alt\n * image of rocky mountains.\n *\n */\np5.Image.prototype.save = function(filename, extension) {\n p5.prototype.saveCanvas(this.canvas, filename, extension);\n};\n\nmodule.exports = p5.Image;\n\n},{\"../core/main\":24,\"./filters\":42}],46:[function(_dereq_,module,exports){\n/**\n * @module Image\n * @submodule Pixels\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar Filters = _dereq_('./filters');\n_dereq_('../color/p5.Color');\n\n/**\n * Uint8ClampedArray\n * containing the values for all the pixels in the display window.\n * These values are numbers. This array is the size (include an appropriate\n * factor for pixelDensity) of the display window x4,\n * representing the R, G, B, A values in order for each pixel, moving from\n * left to right across each row, then down each column. Retina and other\n * high density displays will have more pixels[] (by a factor of\n * pixelDensity^2).\n * For example, if the image is 100x100 pixels, there will be 40,000. On a\n * retina display, there will be 160,000.\n * \n * The first four values (indices 0-3) in the array will be the R, G, B, A\n * values of the pixel at (0, 0). The second four values (indices 4-7) will\n * contain the R, G, B, A values of the pixel at (1, 0). More generally, to\n * set values for a pixel at (x, y):\n * ```javascript\n * let d = pixelDensity();\n * for (let i = 0; i < d; i++) {\n * for (let j = 0; j < d; j++) {\n * // loop over\n * index = 4 * ((y * d + j) * width * d + (x * d + i));\n * pixels[index] = r;\n * pixels[index+1] = g;\n * pixels[index+2] = b;\n * pixels[index+3] = a;\n * }\n * }\n * ```\n * While the above method is complex, it is flexible enough to work with\n * any pixelDensity. Note that set() will automatically take care of\n * setting all the appropriate values in pixels[] for a given (x, y) at\n * any pixelDensity, but the performance may not be as fast when lots of\n * modifications are made to the pixel array.\n * \n * Before accessing this array, the data must loaded with the loadPixels()\n * function. After the array data has been modified, the updatePixels()\n * function must be run to update the changes.\n * \n * Note that this is not a standard javascript array. This means that\n * standard javascript functions such as slice() or\n * arrayCopy() do not\n * work.\n *\n * @property {Number[]} pixels\n * @example\n * \n * \n * let pink = color(255, 102, 204);\n * loadPixels();\n * let d = pixelDensity();\n * let halfImage = 4 * (width * d) * (height / 2 * d);\n * for (let i = 0; i < halfImage; i += 4) {\n * pixels[i] = red(pink);\n * pixels[i + 1] = green(pink);\n * pixels[i + 2] = blue(pink);\n * pixels[i + 3] = alpha(pink);\n * }\n * updatePixels();\n * \n * \n *\n * @alt\n * top half of canvas pink, bottom grey\n *\n */\np5.prototype.pixels = [];\n\n/**\n * Copies a region of pixels from one image to another, using a specified\n * blend mode to do the operation.\n *\n * @method blend\n * @param {p5.Image} srcImage source image\n * @param {Integer} sx X coordinate of the source's upper left corner\n * @param {Integer} sy Y coordinate of the source's upper left corner\n * @param {Integer} sw source image width\n * @param {Integer} sh source image height\n * @param {Integer} dx X coordinate of the destination's upper left corner\n * @param {Integer} dy Y coordinate of the destination's upper left corner\n * @param {Integer} dw destination image width\n * @param {Integer} dh destination image height\n * @param {Constant} blendMode the blend mode. either\n * BLEND, DARKEST, LIGHTEST, DIFFERENCE,\n * MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\n * SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.\n *\n * @example\n * \n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n * }\n * \n * \n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n * }\n * \n * \n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n * }\n * \n *\n * @alt\n * image of rocky mountains. Brick images on left and right. Right overexposed\n * image of rockies. Brickwall images on left and right. Right mortar transparent\n * image of rockies. Brickwall images on left and right. Right translucent\n *\n *\n */\n/**\n * @method blend\n * @param {Integer} sx\n * @param {Integer} sy\n * @param {Integer} sw\n * @param {Integer} sh\n * @param {Integer} dx\n * @param {Integer} dy\n * @param {Integer} dw\n * @param {Integer} dh\n * @param {Constant} blendMode\n */\np5.prototype.blend = function() {\n p5._validateParameters('blend', arguments);\n if (this._renderer) {\n this._renderer.blend.apply(this._renderer, arguments);\n } else {\n p5.Renderer2D.prototype.blend.apply(this, arguments);\n }\n};\n\n/**\n * Copies a region of the canvas to another region of the canvas\n * and copies a region of pixels from an image used as the srcImg parameter\n * into the canvas srcImage is specified this is used as the source. If\n * the source and destination regions aren't the same size, it will\n * automatically resize source pixels to fit the specified\n * target region.\n *\n * @method copy\n * @param {p5.Image|p5.Element} srcImage source image\n * @param {Integer} sx X coordinate of the source's upper left corner\n * @param {Integer} sy Y coordinate of the source's upper left corner\n * @param {Integer} sw source image width\n * @param {Integer} sh source image height\n * @param {Integer} dx X coordinate of the destination's upper left corner\n * @param {Integer} dy Y coordinate of the destination's upper left corner\n * @param {Integer} dw destination image width\n * @param {Integer} dh destination image height\n *\n * @example\n * \n * let img;\n *\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * background(img);\n * copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\n * stroke(255);\n * noFill();\n * // Rectangle shows area being copied\n * rect(7, 22, 10, 10);\n * }\n * \n *\n * @alt\n * image of rocky mountains. Brick images on left and right. Right overexposed\n * image of rockies. Brickwall images on left and right. Right mortar transparent\n * image of rockies. Brickwall images on left and right. Right translucent\n *\n */\n/**\n * @method copy\n * @param {Integer} sx\n * @param {Integer} sy\n * @param {Integer} sw\n * @param {Integer} sh\n * @param {Integer} dx\n * @param {Integer} dy\n * @param {Integer} dw\n * @param {Integer} dh\n */\np5.prototype.copy = function() {\n p5._validateParameters('copy', arguments);\n p5.Renderer2D.prototype.copy.apply(this._renderer, arguments);\n};\n\n/**\n * Applies a filter to the canvas.\n * \n *\n * The presets options are:\n * \n *\n * THRESHOLD\n * Converts the image to black and white pixels depending if they are above or\n * below the threshold defined by the level parameter. The parameter must be\n * between 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used.\n * \n *\n * GRAY\n * Converts any colors in the image to grayscale equivalents. No parameter\n * is used.\n * \n *\n * OPAQUE\n * Sets the alpha channel to entirely opaque. No parameter is used.\n * \n *\n * INVERT\n * Sets each pixel to its inverse value. No parameter is used.\n * \n *\n * POSTERIZE\n * Limits each channel of the image to the number of colors specified as the\n * parameter. The parameter can be set to values between 2 and 255, but\n * results are most noticeable in the lower ranges.\n * \n *\n * BLUR\n * Executes a Gaussian blur with the level parameter specifying the extent\n * of the blurring. If no parameter is used, the blur is equivalent to\n * Gaussian blur of radius 1. Larger values increase the blur.\n * \n *\n * ERODE\n * Reduces the light areas. No parameter is used.\n * \n *\n * DILATE\n * Increases the light areas. No parameter is used.\n *\n * @method filter\n * @param {Constant} filterType either THRESHOLD, GRAY, OPAQUE, INVERT,\n * POSTERIZE, BLUR, ERODE, DILATE or BLUR.\n * See Filters.js for docs on\n * each available filter\n * @param {Number} [filterParam] an optional parameter unique\n * to each filter, see above\n *\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(THRESHOLD);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(GRAY);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(OPAQUE);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(INVERT);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(POSTERIZE, 3);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(DILATE);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(BLUR, 3);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(ERODE);\n * }\n * \n * \n *\n * @alt\n * black and white image of a brick wall.\n * greyscale image of a brickwall\n * image of a brickwall\n * jade colored image of a brickwall\n * red and pink image of a brickwall\n * image of a brickwall\n * blurry image of a brickwall\n * image of a brickwall\n * image of a brickwall with less detail\n *\n */\np5.prototype.filter = function(operation, value) {\n p5._validateParameters('filter', arguments);\n if (this.canvas !== undefined) {\n Filters.apply(this.canvas, Filters[operation], value);\n } else {\n Filters.apply(this.elt, Filters[operation], value);\n }\n};\n\n/**\n * Get a region of pixels, or a single pixel, from the canvas.\n *\n * Returns an array of [R,G,B,A] values for any pixel or grabs a section of\n * an image. If no parameters are specified, the entire image is returned.\n * Use the x and y parameters to get the value of one pixel. Get a section of\n * the display window by specifying additional w and h parameters. When\n * getting an image, the x and y parameters define the coordinates for the\n * upper-left corner of the image, regardless of the current imageMode().\n * \n * To get the color components scaled according to the current color ranges\n * and taking into account colorMode, use getColor instead of get.\n * \n * Getting the color of a single pixel with get(x, y) is easy, but not as fast\n * as grabbing the data directly from pixels[]. The equivalent statement to\n * get(x, y) using pixels[] with pixel density d is\n * ```javascript\n * let x, y, d; // set these to the coordinates\n * let off = (y * width + x) * d * 4;\n * let components = [\n * pixels[off],\n * pixels[off + 1],\n * pixels[off + 2],\n * pixels[off + 3]\n * ];\n * print(components);\n * ```\n * \n *\n * See the reference for pixels[] for more information.\n *\n * If you want to extract an array of colors or a subimage from an p5.Image object,\n * take a look at p5.Image.get()\n *\n * @method get\n * @param {Number} x x-coordinate of the pixel\n * @param {Number} y y-coordinate of the pixel\n * @param {Number} w width\n * @param {Number} h height\n * @return {p5.Image} the rectangle p5.Image\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * let c = get();\n * image(c, width / 2, 0);\n * }\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * let c = get(50, 90);\n * fill(c);\n * noStroke();\n * rect(25, 25, 50, 50);\n * }\n * \n * \n *\n * @alt\n * 2 images of the rocky mountains, side-by-side\n * Image of the rocky mountains with 50x50 green rect in center of canvas\n *\n */\n/**\n * @method get\n * @return {p5.Image} the whole p5.Image\n */\n/**\n * @method get\n * @param {Number} x\n * @param {Number} y\n * @return {Number[]} color of pixel at x,y in array format [R, G, B, A]\n */\np5.prototype.get = function(x, y, w, h) {\n p5._validateParameters('get', arguments);\n return this._renderer.get.apply(this._renderer, arguments);\n};\n\n/**\n * Loads the pixel data for the display window into the pixels[] array. This\n * function must always be called before reading from or writing to pixels[].\n * Note that only changes made with set() or direct manipulation of pixels[]\n * will occur.\n *\n * @method loadPixels\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * image(img, 0, 0, width, height);\n * let d = pixelDensity();\n * let halfImage = 4 * (width * d) * (height * d / 2);\n * loadPixels();\n * for (let i = 0; i < halfImage; i++) {\n * pixels[i + halfImage] = pixels[i];\n * }\n * updatePixels();\n * }\n * \n * \n *\n * @alt\n * two images of the rocky mountains. one on top, one on bottom of canvas.\n *\n */\np5.prototype.loadPixels = function() {\n p5._validateParameters('loadPixels', arguments);\n this._renderer.loadPixels();\n};\n\n/**\n * Changes the color of any pixel, or writes an image directly to the\n * display window.\n * The x and y parameters specify the pixel to change and the c parameter\n * specifies the color value. This can be a p5.Color object, or [R, G, B, A]\n * pixel array. It can also be a single grayscale value.\n * When setting an image, the x and y parameters define the coordinates for\n * the upper-left corner of the image, regardless of the current imageMode().\n * \n * \n * After using set(), you must call updatePixels() for your changes to appear.\n * This should be called once all pixels have been set, and must be called before\n * calling .get() or drawing the image.\n * \n * Setting the color of a single pixel with set(x, y) is easy, but not as\n * fast as putting the data directly into pixels[]. Setting the pixels[]\n * values directly may be complicated when working with a retina display,\n * but will perform better when lots of pixels need to be set directly on\n * every loop.\n * See the reference for pixels[] for more information.\n *\n * @method set\n * @param {Number} x x-coordinate of the pixel\n * @param {Number} y y-coordinate of the pixel\n * @param {Number|Number[]|Object} c insert a grayscale value | a pixel array |\n * a p5.Color object | a p5.Image to copy\n * @example\n * \n * \n * let black = color(0);\n * set(30, 20, black);\n * set(85, 20, black);\n * set(85, 75, black);\n * set(30, 75, black);\n * updatePixels();\n * \n * \n *\n * \n * \n * for (let i = 30; i < width - 15; i++) {\n * for (let j = 20; j < height - 25; j++) {\n * let c = color(204 - j, 153 - i, 0);\n * set(i, j, c);\n * }\n * }\n * updatePixels();\n * \n * \n *\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * set(0, 0, img);\n * updatePixels();\n * line(0, 0, width, height);\n * line(0, height, width, 0);\n * }\n * \n * \n *\n * @alt\n * 4 black points in the shape of a square middle-right of canvas.\n * square with orangey-brown gradient lightening at bottom right.\n * image of the rocky mountains. with lines like an 'x' through the center.\n */\np5.prototype.set = function(x, y, imgOrCol) {\n this._renderer.set(x, y, imgOrCol);\n};\n/**\n * Updates the display window with the data in the pixels[] array.\n * Use in conjunction with loadPixels(). If you're only reading pixels from\n * the array, there's no need to call updatePixels() — updating is only\n * necessary to apply changes. updatePixels() should be called anytime the\n * pixels array is manipulated or set() is called, and only changes made with\n * set() or direct changes to pixels[] will occur.\n *\n * @method updatePixels\n * @param {Number} [x] x-coordinate of the upper-left corner of region\n * to update\n * @param {Number} [y] y-coordinate of the upper-left corner of region\n * to update\n * @param {Number} [w] width of region to update\n * @param {Number} [h] height of region to update\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * image(img, 0, 0, width, height);\n * let d = pixelDensity();\n * let halfImage = 4 * (width * d) * (height * d / 2);\n * loadPixels();\n * for (let i = 0; i < halfImage; i++) {\n * pixels[i + halfImage] = pixels[i];\n * }\n * updatePixels();\n * }\n * \n * \n * @alt\n * two images of the rocky mountains. one on top, one on bottom of canvas.\n */\np5.prototype.updatePixels = function(x, y, w, h) {\n p5._validateParameters('updatePixels', arguments);\n // graceful fail - if loadPixels() or set() has not been called, pixel\n // array will be empty, ignore call to updatePixels()\n if (this.pixels.length === 0) {\n return;\n }\n this._renderer.updatePixels(x, y, w, h);\n};\n\nmodule.exports = p5;\n\n},{\"../color/p5.Color\":16,\"../core/main\":24,\"./filters\":42}],47:[function(_dereq_,module,exports){\n/**\n * @module IO\n * @submodule Input\n * @for p5\n * @requires core\n */\n\n/* globals Request: false */\n/* globals Headers: false */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n_dereq_('whatwg-fetch');\n_dereq_('es6-promise').polyfill();\nvar fetchJsonp = _dereq_('fetch-jsonp');\n_dereq_('../core/error_helpers');\n\n/**\n * Loads a JSON file from a file or a URL, and returns an Object.\n * Note that even if the JSON file contains an Array, an Object will be\n * returned with index numbers as keys.\n *\n * This method is asynchronous, meaning it may not finish before the next\n * line in your sketch is executed. JSONP is supported via a polyfill and you\n * can pass in as the second argument an object with definitions of the json\n * callback following the syntax specified here.\n *\n * This method is suitable for fetching files up to size of 64MB.\n * @method loadJSON\n * @param {String} path name of the file or url to load\n * @param {Object} [jsonpOptions] options object for jsonp related settings\n * @param {String} [datatype] \"json\" or \"jsonp\"\n * @param {function} [callback] function to be executed after\n * loadJSON() completes, data is passed\n * in as first argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Object|Array} JSON data\n * @example\n *\n * Calling loadJSON() inside preload() guarantees to complete the\n * operation before setup() and draw() are called.\n *\n * \n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n * let earthquakes;\n * function preload() {\n * // Get the most recent earthquake in the database\n * let url =\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n * 'summary/all_day.geojson';\n * earthquakes = loadJSON(url);\n * }\n *\n * function setup() {\n * noLoop();\n * }\n *\n * function draw() {\n * background(200);\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * }\n * \n *\n *\n * Outside of preload(), you may supply a callback function to handle the\n * object:\n * \n * function setup() {\n * noLoop();\n * let url =\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n * 'summary/all_day.geojson';\n * loadJSON(url, drawEarthquake);\n * }\n *\n * function draw() {\n * background(200);\n * }\n *\n * function drawEarthquake(earthquakes) {\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * }\n * \n *\n * @alt\n * 50x50 ellipse that changes from black to white depending on the current humidity\n * 50x50 ellipse that changes from black to white depending on the current humidity\n *\n */\n/**\n * @method loadJSON\n * @param {String} path\n * @param {String} datatype\n * @param {function} [callback]\n * @param {function} [errorCallback]\n * @return {Object|Array}\n */\n/**\n * @method loadJSON\n * @param {String} path\n * @param {function} callback\n * @param {function} [errorCallback]\n * @return {Object|Array}\n */\np5.prototype.loadJSON = function() {\n p5._validateParameters('loadJSON', arguments);\n var path = arguments[0];\n var callback;\n var errorCallback;\n var options;\n\n var ret = {}; // object needed for preload\n var t = 'json';\n\n // check for explicit data type argument\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n if (typeof arg === 'string') {\n if (arg === 'jsonp' || arg === 'json') {\n t = arg;\n }\n } else if (typeof arg === 'function') {\n if (!callback) {\n callback = arg;\n } else {\n errorCallback = arg;\n }\n } else if (typeof arg === 'object' && arg.hasOwnProperty('jsonpCallback')) {\n t = 'jsonp';\n options = arg;\n }\n }\n\n var self = this;\n this.httpDo(\n path,\n 'GET',\n options,\n t,\n function(resp) {\n for (var k in resp) {\n ret[k] = resp[k];\n }\n if (typeof callback !== 'undefined') {\n callback(resp);\n }\n\n self._decrementPreload();\n },\n function(err) {\n // Error handling\n p5._friendlyFileLoadError(5, path);\n\n if (errorCallback) {\n errorCallback(err);\n } else {\n throw err;\n }\n }\n );\n\n return ret;\n};\n\n/**\n * Reads the contents of a file and creates a String array of its individual\n * lines. If the name of the file is used as the parameter, as in the above\n * example, the file must be located in the sketch directory/folder.\n * \n * Alternatively, the file maybe be loaded from anywhere on the local\n * computer using an absolute path (something that starts with / on Unix and\n * Linux, or a drive letter on Windows), or the filename parameter can be a\n * URL for a file found on a network.\n * \n * This method is asynchronous, meaning it may not finish before the next\n * line in your sketch is executed.\n *\n * This method is suitable for fetching files up to size of 64MB.\n * @method loadStrings\n * @param {String} filename name of the file or url to load\n * @param {function} [callback] function to be executed after loadStrings()\n * completes, Array is passed in as first\n * argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {String[]} Array of Strings\n * @example\n *\n * Calling loadStrings() inside preload() guarantees to complete the\n * operation before setup() and draw() are called.\n *\n * \n * let result;\n * function preload() {\n * result = loadStrings('assets/test.txt');\n * }\n\n * function setup() {\n * background(200);\n * let ind = floor(random(result.length));\n * text(result[ind], 10, 10, 80, 80);\n * }\n * \n *\n * Outside of preload(), you may supply a callback function to handle the\n * object:\n *\n * \n * function setup() {\n * loadStrings('assets/test.txt', pickString);\n * }\n *\n * function pickString(result) {\n * background(200);\n * let ind = floor(random(result.length));\n * text(result[ind], 10, 10, 80, 80);\n * }\n * \n *\n * @alt\n * randomly generated text from a file, for example \"i smell like butter\"\n * randomly generated text from a file, for example \"i have three feet\"\n *\n */\np5.prototype.loadStrings = function() {\n p5._validateParameters('loadStrings', arguments);\n\n var ret = [];\n var callback, errorCallback;\n\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n if (typeof arg === 'function') {\n if (typeof callback === 'undefined') {\n callback = arg;\n } else if (typeof errorCallback === 'undefined') {\n errorCallback = arg;\n }\n }\n }\n\n var self = this;\n p5.prototype.httpDo.call(\n this,\n arguments[0],\n 'GET',\n 'text',\n function(data) {\n // split lines handling mac/windows/linux endings\n var lines = data\n .replace(/\\r\\n/g, '\\r')\n .replace(/\\n/g, '\\r')\n .split(/\\r/);\n Array.prototype.push.apply(ret, lines);\n\n if (typeof callback !== 'undefined') {\n callback(ret);\n }\n\n self._decrementPreload();\n },\n function(err) {\n // Error handling\n p5._friendlyFileLoadError(3, arguments[0]);\n\n if (errorCallback) {\n errorCallback(err);\n } else {\n throw err;\n }\n }\n );\n\n return ret;\n};\n\n/**\n * Reads the contents of a file or URL and creates a p5.Table object with\n * its values. If a file is specified, it must be located in the sketch's\n * \"data\" folder. The filename parameter can also be a URL to a file found\n * online. By default, the file is assumed to be comma-separated (in CSV\n * format). Table only looks for a header row if the 'header' option is\n * included.\n *\n * Possible options include:\n * \n * csv - parse the table as comma-separated values\n * tsv - parse the table as tab-separated values\n * header - this table has a header (title) row\n * \n * \n *\n * When passing in multiple options, pass them in as separate parameters,\n * seperated by commas. For example:\n * \n * \n * loadTable('my_csv_file.csv', 'csv', 'header');\n * \n * \n *\n * All files loaded and saved use UTF-8 encoding.\n *\n * This method is asynchronous, meaning it may not finish before the next\n * line in your sketch is executed. Calling loadTable() inside preload()\n * guarantees to complete the operation before setup() and draw() are called.\n * Outside of preload(), you may supply a callback function to handle the\n * object:\n * \n *\n * This method is suitable for fetching files up to size of 64MB.\n * @method loadTable\n * @param {String} filename name of the file or URL to load\n * @param {String} options \"header\" \"csv\" \"tsv\"\n * @param {function} [callback] function to be executed after\n * loadTable() completes. On success, the\n * Table object is passed in as the\n * first argument.\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Object} Table object containing data\n *\n * @example\n * \n * \n * // Given the following CSV file called \"mammals.csv\"\n * // located in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * //the file can be remote\n * //table = loadTable(\"http://p5js.org/reference/assets/mammals.csv\",\n * // \"csv\", \"header\");\n * }\n *\n * function setup() {\n * //count the columns\n * print(table.getRowCount() + ' total rows in table');\n * print(table.getColumnCount() + ' total columns in table');\n *\n * print(table.getColumn('name'));\n * //[\"Goat\", \"Leopard\", \"Zebra\"]\n *\n * //cycle through the table\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++) {\n * print(table.getString(r, c));\n * }\n * }\n * \n * \n *\n * @alt\n * randomly generated text from a file, for example \"i smell like butter\"\n * randomly generated text from a file, for example \"i have three feet\"\n *\n */\n/**\n * @method loadTable\n * @param {String} filename\n * @param {function} [callback]\n * @param {function} [errorCallback]\n * @return {Object}\n */\np5.prototype.loadTable = function(path) {\n var callback;\n var errorCallback;\n var options = [];\n var header = false;\n var ext = path.substring(path.lastIndexOf('.') + 1, path.length);\n var sep = ',';\n var separatorSet = false;\n\n if (ext === 'tsv') {\n //Only need to check extension is tsv because csv is default\n sep = '\\t';\n }\n\n for (var i = 1; i < arguments.length; i++) {\n if (typeof arguments[i] === 'function') {\n if (typeof callback === 'undefined') {\n callback = arguments[i];\n } else if (typeof errorCallback === 'undefined') {\n errorCallback = arguments[i];\n }\n } else if (typeof arguments[i] === 'string') {\n options.push(arguments[i]);\n if (arguments[i] === 'header') {\n header = true;\n }\n if (arguments[i] === 'csv') {\n if (separatorSet) {\n throw new Error('Cannot set multiple separator types.');\n } else {\n sep = ',';\n separatorSet = true;\n }\n } else if (arguments[i] === 'tsv') {\n if (separatorSet) {\n throw new Error('Cannot set multiple separator types.');\n } else {\n sep = '\\t';\n separatorSet = true;\n }\n }\n }\n }\n\n var t = new p5.Table();\n\n var self = this;\n this.httpDo(\n path,\n 'GET',\n 'table',\n function(resp) {\n var state = {};\n\n // define constants\n var PRE_TOKEN = 0,\n MID_TOKEN = 1,\n POST_TOKEN = 2,\n POST_RECORD = 4;\n\n var QUOTE = '\"',\n CR = '\\r',\n LF = '\\n';\n\n var records = [];\n var offset = 0;\n var currentRecord = null;\n var currentChar;\n\n var tokenBegin = function() {\n state.currentState = PRE_TOKEN;\n state.token = '';\n };\n\n var tokenEnd = function() {\n currentRecord.push(state.token);\n tokenBegin();\n };\n\n var recordBegin = function() {\n state.escaped = false;\n currentRecord = [];\n tokenBegin();\n };\n\n var recordEnd = function() {\n state.currentState = POST_RECORD;\n records.push(currentRecord);\n currentRecord = null;\n };\n\n for (;;) {\n currentChar = resp[offset++];\n\n // EOF\n if (currentChar == null) {\n if (state.escaped) {\n throw new Error('Unclosed quote in file.');\n }\n if (currentRecord) {\n tokenEnd();\n recordEnd();\n break;\n }\n }\n if (currentRecord === null) {\n recordBegin();\n }\n\n // Handle opening quote\n if (state.currentState === PRE_TOKEN) {\n if (currentChar === QUOTE) {\n state.escaped = true;\n state.currentState = MID_TOKEN;\n continue;\n }\n state.currentState = MID_TOKEN;\n }\n\n // mid-token and escaped, look for sequences and end quote\n if (state.currentState === MID_TOKEN && state.escaped) {\n if (currentChar === QUOTE) {\n if (resp[offset] === QUOTE) {\n state.token += QUOTE;\n offset++;\n } else {\n state.escaped = false;\n state.currentState = POST_TOKEN;\n }\n } else if (currentChar === CR) {\n continue;\n } else {\n state.token += currentChar;\n }\n continue;\n }\n\n // fall-through: mid-token or post-token, not escaped\n if (currentChar === CR) {\n if (resp[offset] === LF) {\n offset++;\n }\n tokenEnd();\n recordEnd();\n } else if (currentChar === LF) {\n tokenEnd();\n recordEnd();\n } else if (currentChar === sep) {\n tokenEnd();\n } else if (state.currentState === MID_TOKEN) {\n state.token += currentChar;\n }\n }\n\n // set up column names\n if (header) {\n t.columns = records.shift();\n } else {\n for (i = 0; i < records[0].length; i++) {\n t.columns[i] = 'null';\n }\n }\n var row;\n for (i = 0; i < records.length; i++) {\n //Handles row of 'undefined' at end of some CSVs\n if (records[i].length === 1) {\n if (records[i][0] === 'undefined' || records[i][0] === '') {\n continue;\n }\n }\n row = new p5.TableRow();\n row.arr = records[i];\n row.obj = makeObject(records[i], t.columns);\n t.addRow(row);\n }\n if (typeof callback === 'function') {\n callback(t);\n }\n\n self._decrementPreload();\n },\n function(err) {\n // Error handling\n p5._friendlyFileLoadError(2, path);\n\n if (errorCallback) {\n errorCallback(err);\n } else {\n console.error(err);\n }\n }\n );\n\n return t;\n};\n\n// helper function to turn a row into a JSON object\nfunction makeObject(row, headers) {\n var ret = {};\n headers = headers || [];\n if (typeof headers === 'undefined') {\n for (var j = 0; j < row.length; j++) {\n headers[j.toString()] = j;\n }\n }\n for (var i = 0; i < headers.length; i++) {\n var key = headers[i];\n var val = row[i];\n ret[key] = val;\n }\n return ret;\n}\n\n/**\n * Reads the contents of a file and creates an XML object with its values.\n * If the name of the file is used as the parameter, as in the above example,\n * the file must be located in the sketch directory/folder.\n *\n * Alternatively, the file maybe be loaded from anywhere on the local\n * computer using an absolute path (something that starts with / on Unix and\n * Linux, or a drive letter on Windows), or the filename parameter can be a\n * URL for a file found on a network.\n *\n * This method is asynchronous, meaning it may not finish before the next\n * line in your sketch is executed. Calling loadXML() inside preload()\n * guarantees to complete the operation before setup() and draw() are called.\n *\n * Outside of preload(), you may supply a callback function to handle the\n * object.\n *\n * This method is suitable for fetching files up to size of 64MB.\n * @method loadXML\n * @param {String} filename name of the file or URL to load\n * @param {function} [callback] function to be executed after loadXML()\n * completes, XML object is passed in as\n * first argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Object} XML object containing data\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let children = xml.getChildren('animal');\n *\n * for (let i = 0; i < children.length; i++) {\n * let id = children[i].getNum('id');\n * let coloring = children[i].getString('species');\n * let name = children[i].getContent();\n * print(id + ', ' + coloring + ', ' + name);\n * }\n * }\n *\n * // Sketch prints:\n * // 0, Capra hircus, Goat\n * // 1, Panthera pardus, Leopard\n * // 2, Equus zebra, Zebra\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.loadXML = function() {\n var ret = new p5.XML();\n var callback, errorCallback;\n\n for (var i = 1; i < arguments.length; i++) {\n var arg = arguments[i];\n if (typeof arg === 'function') {\n if (typeof callback === 'undefined') {\n callback = arg;\n } else if (typeof errorCallback === 'undefined') {\n errorCallback = arg;\n }\n }\n }\n\n var self = this;\n this.httpDo(\n arguments[0],\n 'GET',\n 'xml',\n function(xml) {\n for (var key in xml) {\n ret[key] = xml[key];\n }\n if (typeof callback !== 'undefined') {\n callback(ret);\n }\n\n self._decrementPreload();\n },\n function(err) {\n // Error handling\n p5._friendlyFileLoadError(1, arguments[0]);\n\n if (errorCallback) {\n errorCallback(err);\n } else {\n throw err;\n }\n }\n );\n\n return ret;\n};\n\n/**\n * This method is suitable for fetching files up to size of 64MB.\n * @method loadBytes\n * @param {string} file name of the file or URL to load\n * @param {function} [callback] function to be executed after loadBytes()\n * completes\n * @param {function} [errorCallback] function to be executed if there\n * is an error\n * @returns {Object} an object whose 'bytes' property will be the loaded buffer\n *\n * @example\n * \n * let data;\n *\n * function preload() {\n * data = loadBytes('assets/mammals.xml');\n * }\n *\n * function setup() {\n * for (let i = 0; i < 5; i++) {\n * console.log(data.bytes[i].toString(16));\n * }\n * }\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.loadBytes = function(file, callback, errorCallback) {\n var ret = {};\n\n var self = this;\n this.httpDo(\n file,\n 'GET',\n 'arrayBuffer',\n function(arrayBuffer) {\n ret.bytes = new Uint8Array(arrayBuffer);\n\n if (typeof callback === 'function') {\n callback(ret);\n }\n\n self._decrementPreload();\n },\n function(err) {\n // Error handling\n p5._friendlyFileLoadError(6, file);\n\n if (errorCallback) {\n errorCallback(err);\n } else {\n throw err;\n }\n }\n );\n return ret;\n};\n\n/**\n * Method for executing an HTTP GET request. If data type is not specified,\n * p5 will try to guess based on the URL, defaulting to text. This is equivalent to\n * calling httpDo(path, 'GET'). The 'binary' datatype will return\n * a Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\n * which can be used to initialize typed arrays (such as Uint8Array).\n *\n * @method httpGet\n * @param {String} path name of the file or url to load\n * @param {String} [datatype] \"json\", \"jsonp\", \"binary\", \"arrayBuffer\",\n * \"xml\", or \"text\"\n * @param {Object|Boolean} [data] param data passed sent with request\n * @param {function} [callback] function to be executed after\n * httpGet() completes, data is passed in\n * as first argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Promise} A promise that resolves with the data when the operation\n * completes successfully or rejects with the error after\n * one occurs.\n * @example\n * \n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n * let earthquakes;\n * function preload() {\n * // Get the most recent earthquake in the database\n * let url =\n 'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\n * 'format=geojson&limit=1&orderby=time';\n * httpGet(url, 'jsonp', false, function(response) {\n * // when the HTTP request completes, populate the variable that holds the\n * // earthquake data used in the visualization.\n * earthquakes = response;\n * });\n * }\n *\n * function draw() {\n * if (!earthquakes) {\n * // Wait until the earthquake data has loaded before drawing.\n * return;\n * }\n * background(200);\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * noLoop();\n * }\n * \n */\n/**\n * @method httpGet\n * @param {String} path\n * @param {Object|Boolean} data\n * @param {function} [callback]\n * @param {function} [errorCallback]\n * @return {Promise}\n */\n/**\n * @method httpGet\n * @param {String} path\n * @param {function} callback\n * @param {function} [errorCallback]\n * @return {Promise}\n */\np5.prototype.httpGet = function() {\n p5._validateParameters('httpGet', arguments);\n\n var args = Array.prototype.slice.call(arguments);\n args.splice(1, 0, 'GET');\n return p5.prototype.httpDo.apply(this, args);\n};\n\n/**\n * Method for executing an HTTP POST request. If data type is not specified,\n * p5 will try to guess based on the URL, defaulting to text. This is equivalent to\n * calling httpDo(path, 'POST').\n *\n * @method httpPost\n * @param {String} path name of the file or url to load\n * @param {String} [datatype] \"json\", \"jsonp\", \"xml\", or \"text\".\n * If omitted, httpPost() will guess.\n * @param {Object|Boolean} [data] param data passed sent with request\n * @param {function} [callback] function to be executed after\n * httpPost() completes, data is passed in\n * as first argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Promise} A promise that resolves with the data when the operation\n * completes successfully or rejects with the error after\n * one occurs.\n *\n * @example\n * \n * \n * // Examples use jsonplaceholder.typicode.com for a Mock Data API\n *\n * let url = 'https://jsonplaceholder.typicode.com/posts';\n * let postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is way cool.' };\n *\n * function setup() {\n * createCanvas(800, 800);\n * }\n *\n * function mousePressed() {\n * // Pick new random color values\n * let r = random(255);\n * let g = random(255);\n * let b = random(255);\n *\n * httpPost(url, 'json', postData, function(result) {\n * strokeWeight(2);\n * stroke(r, g, b);\n * fill(r, g, b, 127);\n * ellipse(mouseX, mouseY, 200, 200);\n * text(result.body, mouseX, mouseY);\n * });\n * }\n * \n * \n *\n *\n * \n * let url = 'https://invalidURL'; // A bad URL that will cause errors\n * let postData = { title: 'p5 Clicked!', body: 'p5.js is way cool.' };\n *\n * function setup() {\n * createCanvas(800, 800);\n * }\n *\n * function mousePressed() {\n * // Pick new random color values\n * let r = random(255);\n * let g = random(255);\n * let b = random(255);\n *\n * httpPost(\n * url,\n * 'json',\n * postData,\n * function(result) {\n * // ... won't be called\n * },\n * function(error) {\n * strokeWeight(2);\n * stroke(r, g, b);\n * fill(r, g, b, 127);\n * text(error.toString(), mouseX, mouseY);\n * }\n * );\n * }\n * \n *\n */\n/**\n * @method httpPost\n * @param {String} path\n * @param {Object|Boolean} data\n * @param {function} [callback]\n * @param {function} [errorCallback]\n * @return {Promise}\n */\n/**\n * @method httpPost\n * @param {String} path\n * @param {function} callback\n * @param {function} [errorCallback]\n * @return {Promise}\n */\np5.prototype.httpPost = function() {\n p5._validateParameters('httpPost', arguments);\n\n var args = Array.prototype.slice.call(arguments);\n args.splice(1, 0, 'POST');\n return p5.prototype.httpDo.apply(this, args);\n};\n\n/**\n * Method for executing an HTTP request. If data type is not specified,\n * p5 will try to guess based on the URL, defaulting to text.\n * For more advanced use, you may also pass in the path as the first argument\n * and a object as the second argument, the signature follows the one specified\n * in the Fetch API specification.\n * This method is suitable for fetching files up to size of 64MB when \"GET\" is used.\n *\n * @method httpDo\n * @param {String} path name of the file or url to load\n * @param {String} [method] either \"GET\", \"POST\", or \"PUT\",\n * defaults to \"GET\"\n * @param {String} [datatype] \"json\", \"jsonp\", \"xml\", or \"text\"\n * @param {Object} [data] param data passed sent with request\n * @param {function} [callback] function to be executed after\n * httpGet() completes, data is passed in\n * as first argument\n * @param {function} [errorCallback] function to be executed if\n * there is an error, response is passed\n * in as first argument\n * @return {Promise} A promise that resolves with the data when the operation\n * completes successfully or rejects with the error after\n * one occurs.\n *\n * @example\n * \n * \n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n *\n * // displays an animation of all USGS earthquakes\n * let earthquakes;\n * let eqFeatureIndex = 0;\n *\n * function preload() {\n * let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\n * httpDo(\n * url,\n * {\n * method: 'GET',\n * // Other Request options, like special headers for apis\n * headers: { authorization: 'Bearer secretKey' }\n * },\n * function(res) {\n * earthquakes = res;\n * }\n * );\n * }\n *\n * function draw() {\n * // wait until the data is loaded\n * if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\n * return;\n * }\n * clear();\n *\n * let feature = earthquakes.features[eqFeatureIndex];\n * let mag = feature.properties.mag;\n * let rad = mag / 11 * ((width + height) / 2);\n * fill(255, 0, 0, 100);\n * ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\n *\n * if (eqFeatureIndex >= earthquakes.features.length) {\n * eqFeatureIndex = 0;\n * } else {\n * eqFeatureIndex += 1;\n * }\n * }\n * \n * \n */\n/**\n * @method httpDo\n * @param {String} path\n * @param {Object} options Request object options as documented in the\n * \"fetch\" API\n * reference\n * @param {function} [callback]\n * @param {function} [errorCallback]\n * @return {Promise}\n */\np5.prototype.httpDo = function() {\n var type;\n var callback;\n var errorCallback;\n var request;\n var promise;\n var jsonpOptions = {};\n var cbCount = 0;\n var contentType = 'text/plain';\n // Trim the callbacks off the end to get an idea of how many arguments are passed\n for (var i = arguments.length - 1; i > 0; i--) {\n if (typeof arguments[i] === 'function') {\n cbCount++;\n } else {\n break;\n }\n }\n // The number of arguments minus callbacks\n var argsCount = arguments.length - cbCount;\n var path = arguments[0];\n if (\n argsCount === 2 &&\n typeof path === 'string' &&\n typeof arguments[1] === 'object'\n ) {\n // Intended for more advanced use, pass in Request parameters directly\n request = new Request(path, arguments[1]);\n callback = arguments[2];\n errorCallback = arguments[3];\n } else {\n // Provided with arguments\n var method = 'GET';\n var data;\n\n for (var j = 1; j < arguments.length; j++) {\n var a = arguments[j];\n if (typeof a === 'string') {\n if (a === 'GET' || a === 'POST' || a === 'PUT' || a === 'DELETE') {\n method = a;\n } else if (\n a === 'json' ||\n a === 'jsonp' ||\n a === 'binary' ||\n a === 'arrayBuffer' ||\n a === 'xml' ||\n a === 'text' ||\n a === 'table'\n ) {\n type = a;\n } else {\n data = a;\n }\n } else if (typeof a === 'number') {\n data = a.toString();\n } else if (typeof a === 'object') {\n if (a.hasOwnProperty('jsonpCallback')) {\n for (var attr in a) {\n jsonpOptions[attr] = a[attr];\n }\n } else if (a instanceof p5.XML) {\n data = a.serialize();\n contentType = 'application/xml';\n } else {\n data = JSON.stringify(a);\n contentType = 'application/json';\n }\n } else if (typeof a === 'function') {\n if (!callback) {\n callback = a;\n } else {\n errorCallback = a;\n }\n }\n }\n\n request = new Request(path, {\n method: method,\n mode: 'cors',\n body: data,\n headers: new Headers({\n 'Content-Type': contentType\n })\n });\n }\n // do some sort of smart type checking\n if (!type) {\n if (path.indexOf('json') !== -1) {\n type = 'json';\n } else if (path.indexOf('xml') !== -1) {\n type = 'xml';\n } else {\n type = 'text';\n }\n }\n\n if (type === 'jsonp') {\n promise = fetchJsonp(path, jsonpOptions);\n } else {\n promise = fetch(request);\n }\n promise = promise.then(function(res) {\n if (!res.ok) {\n var err = new Error(res.body);\n err.status = res.status;\n err.ok = false;\n throw err;\n } else {\n var fileSize = 0;\n if (type !== 'jsonp') {\n fileSize = res.headers.get('content-length');\n }\n if (fileSize && fileSize > 64000000) {\n p5._friendlyFileLoadError(7, path);\n }\n switch (type) {\n case 'json':\n case 'jsonp':\n return res.json();\n case 'binary':\n return res.blob();\n case 'arrayBuffer':\n return res.arrayBuffer();\n case 'xml':\n return res.text().then(function(text) {\n var parser = new DOMParser();\n var xml = parser.parseFromString(text, 'text/xml');\n return new p5.XML(xml.documentElement);\n });\n default:\n return res.text();\n }\n }\n });\n promise.then(callback || function() {});\n promise.catch(errorCallback || console.error);\n return promise;\n};\n\n/**\n * @module IO\n * @submodule Output\n * @for p5\n */\n\nwindow.URL = window.URL || window.webkitURL;\n\n// private array of p5.PrintWriter objects\np5.prototype._pWriters = [];\n\n/**\n * @method createWriter\n * @param {String} name name of the file to be created\n * @param {String} [extension]\n * @return {p5.PrintWriter}\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * var writer = createWriter('squares.txt');\n * for (let i = 0; i < 10; i++) {\n * writer.print(i * i);\n * }\n * writer.close();\n * writer.clear();\n * }\n * }\n * \n * \n */\np5.prototype.createWriter = function(name, extension) {\n var newPW;\n // check that it doesn't already exist\n for (var i in p5.prototype._pWriters) {\n if (p5.prototype._pWriters[i].name === name) {\n // if a p5.PrintWriter w/ this name already exists...\n // return p5.prototype._pWriters[i]; // return it w/ contents intact.\n // or, could return a new, empty one with a unique name:\n newPW = new p5.PrintWriter(name + this.millis(), extension);\n p5.prototype._pWriters.push(newPW);\n return newPW;\n }\n }\n newPW = new p5.PrintWriter(name, extension);\n p5.prototype._pWriters.push(newPW);\n return newPW;\n};\n\n/**\n * @class p5.PrintWriter\n * @param {String} filename\n * @param {String} [extension]\n */\np5.PrintWriter = function(filename, extension) {\n var self = this;\n this.name = filename;\n this.content = '';\n //Changed to write because it was being overloaded by function below.\n /**\n * Writes data to the PrintWriter stream\n * @method write\n * @param {Array} data all data to be written by the PrintWriter\n * @example\n * \n * \n * // creates a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // write 'Hello world!'' to the file\n * writer.write(['Hello world!']);\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n * \n * \n * // creates a file called 'newFile2.txt'\n * let writer = createWriter('newFile2.txt');\n * // write 'apples,bananas,123' to the file\n * writer.write(['apples', 'bananas', 123]);\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n * \n * \n * // creates a file called 'newFile3.txt'\n * let writer = createWriter('newFile3.txt');\n * // write 'My name is: Teddy' to the file\n * writer.write('My name is:');\n * writer.write(' Teddy');\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n */\n this.write = function(data) {\n this.content += data;\n };\n /**\n * Writes data to the PrintWriter stream, and adds a new line at the end\n * @method print\n * @param {Array} data all data to be printed by the PrintWriter\n * @example\n * \n * \n * // creates a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // creates a file containing\n * // My name is:\n * // Teddy\n * writer.print('My name is:');\n * writer.print('Teddy');\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n * \n * \n * let writer;\n *\n * function setup() {\n * createCanvas(400, 400);\n * // create a PrintWriter\n * writer = createWriter('newFile.txt');\n * }\n *\n * function draw() {\n * // print all mouseX and mouseY coordinates to the stream\n * writer.print([mouseX, mouseY]);\n * }\n *\n * function mouseClicked() {\n * // close the PrintWriter and save the file\n * writer.close();\n * }\n * \n * \n */\n this.print = function(data) {\n this.content += data + '\\n';\n };\n /**\n * Clears the data already written to the PrintWriter object\n * @method clear\n * @example\n * \n * // create writer object\n * let writer = createWriter('newFile.txt');\n * writer.write(['clear me']);\n * // clear writer object here\n * writer.clear();\n * // close writer\n * writer.close();\n * \n *\n */\n this.clear = function() {\n this.content = '';\n };\n /**\n * Closes the PrintWriter\n * @method close\n * @example\n * \n * \n * // create a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n * \n * \n * // create a file called 'newFile2.txt'\n * let writer = createWriter('newFile2.txt');\n * // write some data to the file\n * writer.write([100, 101, 102]);\n * // close the PrintWriter and save the file\n * writer.close();\n * \n * \n */\n this.close = function() {\n // convert String to Array for the writeFile Blob\n var arr = [];\n arr.push(this.content);\n p5.prototype.writeFile(arr, filename, extension);\n // remove from _pWriters array and delete self\n for (var i in p5.prototype._pWriters) {\n if (p5.prototype._pWriters[i].name === this.name) {\n // remove from _pWriters array\n p5.prototype._pWriters.splice(i, 1);\n }\n }\n self.clear();\n self = {};\n };\n};\n\n/**\n * @module IO\n * @submodule Output\n * @for p5\n */\n\n// object, filename, options --> saveJSON, saveStrings,\n// filename, [extension] [canvas] --> saveImage\n\n/**\n * Save an image, text, json, csv, wav, or html. Prompts download to\n * the client's computer. Note that it is not recommended to call save()\n * within draw if it's looping, as the save() function will open a new save\n * dialog every frame.\n * The default behavior is to save the canvas as an image. You can\n * optionally specify a filename.\n * For example:\n * \n * save();\n * save('myCanvas.jpg'); // save a specific canvas with a filename\n * \n *\n * Alternately, the first parameter can be a pointer to a canvas\n * p5.Element, an Array of Strings,\n * an Array of JSON, a JSON object, a p5.Table, a p5.Image, or a\n * p5.SoundFile (requires p5.sound). The second parameter is a filename\n * (including extension). The third parameter is for options specific\n * to this type of object. This method will save a file that fits the\n * given parameters. For example:\n *\n * \n * // Saves canvas as an image\n * save('myCanvas.jpg');\n *\n * // Saves pImage as a png image\n * let img = createImage(10, 10);\n * save(img, 'my.png');\n *\n * // Saves canvas as an image\n * let cnv = createCanvas(100, 100);\n * save(cnv, 'myCanvas.jpg');\n *\n * // Saves p5.Renderer object as an image\n * let gb = createGraphics(100, 100);\n * save(gb, 'myGraphics.jpg');\n *\n * let myTable = new p5.Table();\n *\n * // Saves table as html file\n * save(myTable, 'myTable.html');\n *\n * // Comma Separated Values\n * save(myTable, 'myTable.csv');\n *\n * // Tab Separated Values\n * save(myTable, 'myTable.tsv');\n *\n * let myJSON = { a: 1, b: true };\n *\n * // Saves pretty JSON\n * save(myJSON, 'my.json');\n *\n * // Optimizes JSON filesize\n * save(myJSON, 'my.json', true);\n *\n * // Saves array of strings to a text file with line breaks after each item\n * let arrayOfStrings = ['a', 'b'];\n * save(arrayOfStrings, 'my.txt');\n * \n *\n * @method save\n * @param {Object|String} [objectOrFilename] If filename is provided, will\n * save canvas as an image with\n * either png or jpg extension\n * depending on the filename.\n * If object is provided, will\n * save depending on the object\n * and filename (see examples\n * above).\n * @param {String} [filename] If an object is provided as the first\n * parameter, then the second parameter\n * indicates the filename,\n * and should include an appropriate\n * file extension (see examples above).\n * @param {Boolean|String} [options] Additional options depend on\n * filetype. For example, when saving JSON,\n * true indicates that the\n * output will be optimized for filesize,\n * rather than readability.\n */\np5.prototype.save = function(object, _filename, _options) {\n // parse the arguments and figure out which things we are saving\n var args = arguments;\n // =================================================\n // OPTION 1: saveCanvas...\n\n // if no arguments are provided, save canvas\n var cnv = this._curElement ? this._curElement.elt : this.elt;\n if (args.length === 0) {\n p5.prototype.saveCanvas(cnv);\n return;\n } else if (args[0] instanceof p5.Renderer || args[0] instanceof p5.Graphics) {\n // otherwise, parse the arguments\n\n // if first param is a p5Graphics, then saveCanvas\n p5.prototype.saveCanvas(args[0].elt, args[1], args[2]);\n return;\n } else if (args.length === 1 && typeof args[0] === 'string') {\n // if 1st param is String and only one arg, assume it is canvas filename\n p5.prototype.saveCanvas(cnv, args[0]);\n } else {\n // =================================================\n // OPTION 2: extension clarifies saveStrings vs. saveJSON\n var extension = _checkFileExtension(args[1], args[2])[1];\n switch (extension) {\n case 'json':\n p5.prototype.saveJSON(args[0], args[1], args[2]);\n return;\n case 'txt':\n p5.prototype.saveStrings(args[0], args[1], args[2]);\n return;\n // =================================================\n // OPTION 3: decide based on object...\n default:\n if (args[0] instanceof Array) {\n p5.prototype.saveStrings(args[0], args[1], args[2]);\n } else if (args[0] instanceof p5.Table) {\n p5.prototype.saveTable(args[0], args[1], args[2]);\n } else if (args[0] instanceof p5.Image) {\n p5.prototype.saveCanvas(args[0].canvas, args[1]);\n } else if (args[0] instanceof p5.SoundFile) {\n p5.prototype.saveSound(args[0], args[1], args[2], args[3]);\n }\n }\n }\n};\n\n/**\n * Writes the contents of an Array or a JSON object to a .json file.\n * The file saving process and location of the saved file will\n * vary between web browsers.\n *\n * @method saveJSON\n * @param {Array|Object} json\n * @param {String} filename\n * @param {Boolean} [optimize] If true, removes line breaks\n * and spaces from the output\n * file to optimize filesize\n * (but not readability).\n * @example\n * \n * let json = {}; // new JSON Object\n *\n * json.id = 0;\n * json.species = 'Panthera leo';\n * json.name = 'Lion';\n *\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * saveJSON(json, 'lion.json');\n * }\n * }\n *\n * // saves the following to a file called \"lion.json\":\n * // {\n * // \"id\": 0,\n * // \"species\": \"Panthera leo\",\n * // \"name\": \"Lion\"\n * // }\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.saveJSON = function(json, filename, opt) {\n p5._validateParameters('saveJSON', arguments);\n var stringify;\n if (opt) {\n stringify = JSON.stringify(json);\n } else {\n stringify = JSON.stringify(json, undefined, 2);\n }\n this.saveStrings(stringify.split('\\n'), filename, 'json');\n};\n\np5.prototype.saveJSONObject = p5.prototype.saveJSON;\np5.prototype.saveJSONArray = p5.prototype.saveJSON;\n\n/**\n * Writes an array of Strings to a text file, one line per String.\n * The file saving process and location of the saved file will\n * vary between web browsers.\n *\n * @method saveStrings\n * @param {String[]} list string array to be written\n * @param {String} filename filename for output\n * @param {String} [extension] the filename's extension\n * @example\n * \n * let words = 'apple bear cat dog';\n *\n * // .split() outputs an Array\n * let list = split(words, ' ');\n *\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * saveStrings(list, 'nouns.txt');\n * }\n * }\n *\n * // Saves the following to a file called 'nouns.txt':\n * //\n * // apple\n * // bear\n * // cat\n * // dog\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.saveStrings = function(list, filename, extension) {\n p5._validateParameters('saveStrings', arguments);\n var ext = extension || 'txt';\n var pWriter = this.createWriter(filename, ext);\n for (var i = 0; i < list.length; i++) {\n if (i < list.length - 1) {\n pWriter.print(list[i]);\n } else {\n pWriter.print(list[i]);\n }\n }\n pWriter.close();\n pWriter.clear();\n};\n\n// =======\n// HELPERS\n// =======\n\nfunction escapeHelper(content) {\n return content\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''');\n}\n\n/**\n * Writes the contents of a Table object to a file. Defaults to a\n * text file with comma-separated-values ('csv') but can also\n * use tab separation ('tsv'), or generate an HTML table ('html').\n * The file saving process and location of the saved file will\n * vary between web browsers.\n *\n * @method saveTable\n * @param {p5.Table} Table the Table object to save to a file\n * @param {String} filename the filename to which the Table should be saved\n * @param {String} [options] can be one of \"tsv\", \"csv\", or \"html\"\n * @example\n * \n * let table;\n *\n * function setup() {\n * table = new p5.Table();\n *\n * table.addColumn('id');\n * table.addColumn('species');\n * table.addColumn('name');\n *\n * let newRow = table.addRow();\n * newRow.setNum('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Panthera leo');\n * newRow.setString('name', 'Lion');\n *\n * // To save, un-comment next line then click 'run'\n * // saveTable(table, 'new.csv');\n * }\n *\n * // Saves the following to a file called 'new.csv':\n * // id,species,name\n * // 0,Panthera leo,Lion\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.saveTable = function(table, filename, options) {\n p5._validateParameters('saveTable', arguments);\n var ext;\n if (options === undefined) {\n ext = filename.substring(filename.lastIndexOf('.') + 1, filename.length);\n } else {\n ext = options;\n }\n var pWriter = this.createWriter(filename, ext);\n\n var header = table.columns;\n\n var sep = ','; // default to CSV\n if (ext === 'tsv') {\n sep = '\\t';\n }\n if (ext !== 'html') {\n // make header if it has values\n if (header[0] !== '0') {\n for (var h = 0; h < header.length; h++) {\n if (h < header.length - 1) {\n pWriter.write(header[h] + sep);\n } else {\n pWriter.write(header[h]);\n }\n }\n pWriter.write('\\n');\n }\n\n // make rows\n for (var i = 0; i < table.rows.length; i++) {\n var j;\n for (j = 0; j < table.rows[i].arr.length; j++) {\n if (j < table.rows[i].arr.length - 1) {\n pWriter.write(table.rows[i].arr[j] + sep);\n } else if (i < table.rows.length - 1) {\n pWriter.write(table.rows[i].arr[j]);\n } else {\n pWriter.write(table.rows[i].arr[j]);\n }\n }\n pWriter.write('\\n');\n }\n } else {\n // otherwise, make HTML\n pWriter.print('');\n pWriter.print('');\n var str = ' ';\n pWriter.print(str);\n pWriter.print('');\n\n pWriter.print('');\n pWriter.print(' ');\n\n // make header if it has values\n if (header[0] !== '0') {\n pWriter.print(' ');\n for (var k = 0; k < header.length; k++) {\n var e = escapeHelper(header[k]);\n pWriter.print(' ' + e);\n pWriter.print(' ');\n }\n pWriter.print(' ');\n }\n\n // make rows\n for (var row = 0; row < table.rows.length; row++) {\n pWriter.print(' ');\n for (var col = 0; col < table.columns.length; col++) {\n var entry = table.rows[row].getString(col);\n var htmlEntry = escapeHelper(entry);\n pWriter.print(' ' + htmlEntry);\n pWriter.print(' ');\n }\n pWriter.print(' ');\n }\n pWriter.print(' ');\n pWriter.print('');\n pWriter.print('');\n }\n // close and clear the pWriter\n pWriter.close();\n pWriter.clear();\n}; // end saveTable()\n\n/**\n * Generate a blob of file data as a url to prepare for download.\n * Accepts an array of data, a filename, and an extension (optional).\n * This is a private function because it does not do any formatting,\n * but it is used by saveStrings, saveJSON, saveTable etc.\n *\n * @param {Array} dataToDownload\n * @param {String} filename\n * @param {String} [extension]\n * @private\n */\np5.prototype.writeFile = function(dataToDownload, filename, extension) {\n var type = 'application/octet-stream';\n if (p5.prototype._isSafari()) {\n type = 'text/plain';\n }\n var blob = new Blob(dataToDownload, {\n type: type\n });\n p5.prototype.downloadFile(blob, filename, extension);\n};\n\n/**\n * Forces download. Accepts a url to filedata/blob, a filename,\n * and an extension (optional).\n * This is a private function because it does not do any formatting,\n * but it is used by saveStrings, saveJSON, saveTable etc.\n *\n * @method downloadFile\n * @private\n * @param {String|Blob} data either an href generated by createObjectURL,\n * or a Blob object containing the data\n * @param {String} [filename]\n * @param {String} [extension]\n */\np5.prototype.downloadFile = function(data, fName, extension) {\n var fx = _checkFileExtension(fName, extension);\n var filename = fx[0];\n\n if (data instanceof Blob) {\n var fileSaver = _dereq_('file-saver');\n fileSaver.saveAs(data, filename);\n return;\n }\n\n var a = document.createElement('a');\n a.href = data;\n a.download = filename;\n\n // Firefox requires the link to be added to the DOM before click()\n a.onclick = function(e) {\n destroyClickedElement(e);\n e.stopPropagation();\n };\n\n a.style.display = 'none';\n document.body.appendChild(a);\n\n // Safari will open this file in the same page as a confusing Blob.\n if (p5.prototype._isSafari()) {\n var aText = 'Hello, Safari user! To download this file...\\n';\n aText += '1. Go to File --> Save As.\\n';\n aText += '2. Choose \"Page Source\" as the Format.\\n';\n aText += '3. Name it with this extension: .\"' + fx[1] + '\"';\n alert(aText);\n }\n a.click();\n};\n\n/**\n * Returns a file extension, or another string\n * if the provided parameter has no extension.\n *\n * @param {String} filename\n * @param {String} [extension]\n * @return {String[]} [fileName, fileExtension]\n *\n * @private\n */\nfunction _checkFileExtension(filename, extension) {\n if (!extension || extension === true || extension === 'true') {\n extension = '';\n }\n if (!filename) {\n filename = 'untitled';\n }\n var ext = '';\n // make sure the file will have a name, see if filename needs extension\n if (filename && filename.indexOf('.') > -1) {\n ext = filename.split('.').pop();\n }\n // append extension if it doesn't exist\n if (extension) {\n if (ext !== extension) {\n ext = extension;\n filename = filename + '.' + ext;\n }\n }\n return [filename, ext];\n}\np5.prototype._checkFileExtension = _checkFileExtension;\n\n/**\n * Returns true if the browser is Safari, false if not.\n * Safari makes trouble for downloading files.\n *\n * @return {Boolean} [description]\n * @private\n */\np5.prototype._isSafari = function() {\n var x = Object.prototype.toString.call(window.HTMLElement);\n return x.indexOf('Constructor') > 0;\n};\n\n/**\n * Helper function, a callback for download that deletes\n * an invisible anchor element from the DOM once the file\n * has been automatically downloaded.\n *\n * @private\n */\nfunction destroyClickedElement(event) {\n document.body.removeChild(event.target);\n}\n\nmodule.exports = p5;\n\n},{\"../core/error_helpers\":20,\"../core/main\":24,\"es6-promise\":5,\"fetch-jsonp\":6,\"file-saver\":7,\"whatwg-fetch\":12}],48:[function(_dereq_,module,exports){\n/**\n * @module IO\n * @submodule Table\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Table Options\n * Generic class for handling tabular data, typically from a\n * CSV, TSV, or other sort of spreadsheet file.\n * CSV files are\n * \n * comma separated values, often with the data in quotes. TSV\n * files use tabs as separators, and usually don't bother with the\n * quotes.\n * File names should end with .csv if they're comma separated.\n * A rough \"spec\" for CSV can be found\n * here.\n * To load files, use the loadTable method.\n * To save tables to your computer, use the save method\n * or the saveTable method.\n *\n * Possible options include:\n * \n * csv - parse the table as comma-separated values\n * tsv - parse the table as tab-separated values\n * header - this table has a header (title) row\n * \n */\n\n/**\n * Table objects store data with multiple rows and columns, much\n * like in a traditional spreadsheet. Tables can be generated from\n * scratch, dynamically, or using data from an existing file.\n *\n * @class p5.Table\n * @constructor\n * @param {p5.TableRow[]} [rows] An array of p5.TableRow objects\n */\np5.Table = function(rows) {\n /**\n * @property columns {String[]}\n */\n this.columns = [];\n\n /**\n * @property rows {p5.TableRow[]}\n */\n this.rows = [];\n};\n\n/**\n * Use addRow() to add a new row of data to a p5.Table object. By default,\n * an empty row is created. Typically, you would store a reference to\n * the new row in a TableRow object (see newRow in the example above),\n * and then set individual values using set().\n *\n * If a p5.TableRow object is included as a parameter, then that row is\n * duplicated and added to the table.\n *\n * @method addRow\n * @param {p5.TableRow} [row] row to be added to the table\n * @return {p5.TableRow} the row that was added\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add a row\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Canis Lupus');\n * newRow.setString('name', 'Wolf');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n * \n * \n *\n * @alt\n * no image displayed\n *\n */\np5.Table.prototype.addRow = function(row) {\n // make sure it is a valid TableRow\n var r = row || new p5.TableRow();\n\n if (typeof r.arr === 'undefined' || typeof r.obj === 'undefined') {\n //r = new p5.prototype.TableRow(r);\n throw new Error('invalid TableRow: ' + r);\n }\n r.table = this;\n this.rows.push(r);\n return r;\n};\n\n/**\n * Removes a row from the table object.\n *\n * @method removeRow\n * @param {Integer} id ID number of the row to remove\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //remove the first row\n * table.removeRow(0);\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n * \n * \n *\n * @alt\n * no image displayed\n *\n */\np5.Table.prototype.removeRow = function(id) {\n this.rows[id].table = null; // remove reference to table\n var chunk = this.rows.splice(id + 1, this.rows.length);\n this.rows.pop();\n this.rows = this.rows.concat(chunk);\n};\n\n/**\n * Returns a reference to the specified p5.TableRow. The reference\n * can then be used to get and set values of the selected row.\n *\n * @method getRow\n * @param {Integer} rowID ID number of the row to get\n * @return {p5.TableRow} p5.TableRow object\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let row = table.getRow(1);\n * //print it column by column\n * //note: a row is an object, not an array\n * for (let c = 0; c < table.getColumnCount(); c++) {\n * print(row.getString(c));\n * }\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.getRow = function(r) {\n return this.rows[r];\n};\n\n/**\n * Gets all rows from the table. Returns an array of p5.TableRows.\n *\n * @method getRows\n * @return {p5.TableRow[]} Array of p5.TableRows\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n *\n * //warning: rows is an array of objects\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].set('name', 'Unicorn');\n * }\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n * \n * \n *\n * @alt\n * no image displayed\n *\n */\np5.Table.prototype.getRows = function() {\n return this.rows;\n};\n\n/**\n * Finds the first row in the Table that contains the value\n * provided, and returns a reference to that row. Even if\n * multiple rows are possible matches, only the first matching\n * row is returned. The column to search may be specified by\n * either its ID or title.\n *\n * @method findRow\n * @param {String} value The value to match\n * @param {Integer|String} column ID number or title of the\n * column to search\n * @return {p5.TableRow}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //find the animal named zebra\n * let row = table.findRow('Zebra', 'name');\n * //find the corresponding species\n * print(row.getString('species'));\n * }\n * \n * \n *\n * @alt\n * no image displayed\n *\n */\np5.Table.prototype.findRow = function(value, column) {\n // try the Object\n if (typeof column === 'string') {\n for (var i = 0; i < this.rows.length; i++) {\n if (this.rows[i].obj[column] === value) {\n return this.rows[i];\n }\n }\n } else {\n // try the Array\n for (var j = 0; j < this.rows.length; j++) {\n if (this.rows[j].arr[column] === value) {\n return this.rows[j];\n }\n }\n }\n // otherwise...\n return null;\n};\n\n/**\n * Finds the rows in the Table that contain the value\n * provided, and returns references to those rows. Returns an\n * Array, so for must be used to iterate through all the rows,\n * as shown in the example above. The column to search may be\n * specified by either its ID or title.\n *\n * @method findRows\n * @param {String} value The value to match\n * @param {Integer|String} column ID number or title of the\n * column to search\n * @return {p5.TableRow[]} An Array of TableRow objects\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add another goat\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Scape Goat');\n * newRow.setString('name', 'Goat');\n *\n * //find the rows containing animals named Goat\n * let rows = table.findRows('Goat', 'name');\n * print(rows.length + ' Goats found');\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.findRows = function(value, column) {\n var ret = [];\n if (typeof column === 'string') {\n for (var i = 0; i < this.rows.length; i++) {\n if (this.rows[i].obj[column] === value) {\n ret.push(this.rows[i]);\n }\n }\n } else {\n // try the Array\n for (var j = 0; j < this.rows.length; j++) {\n if (this.rows[j].arr[column] === value) {\n ret.push(this.rows[j]);\n }\n }\n }\n return ret;\n};\n\n/**\n * Finds the first row in the Table that matches the regular\n * expression provided, and returns a reference to that row.\n * Even if multiple rows are possible matches, only the first\n * matching row is returned. The column to search may be\n * specified by either its ID or title.\n *\n * @method matchRow\n * @param {String|RegExp} regexp The regular expression to match\n * @param {String|Integer} column The column ID (number) or\n * title (string)\n * @return {p5.TableRow} TableRow object\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //Search using specified regex on a given column, return TableRow object\n * let mammal = table.matchRow(new RegExp('ant'), 1);\n * print(mammal.getString(1));\n * //Output \"Panthera pardus\"\n * }\n * \n * \n *\n */\np5.Table.prototype.matchRow = function(regexp, column) {\n if (typeof column === 'number') {\n for (var j = 0; j < this.rows.length; j++) {\n if (this.rows[j].arr[column].match(regexp)) {\n return this.rows[j];\n }\n }\n } else {\n for (var i = 0; i < this.rows.length; i++) {\n if (this.rows[i].obj[column].match(regexp)) {\n return this.rows[i];\n }\n }\n }\n return null;\n};\n\n/**\n * Finds the rows in the Table that match the regular expression provided,\n * and returns references to those rows. Returns an array, so for must be\n * used to iterate through all the rows, as shown in the example. The\n * column to search may be specified by either its ID or title.\n *\n * @method matchRows\n * @param {String} regexp The regular expression to match\n * @param {String|Integer} [column] The column ID (number) or\n * title (string)\n * @return {p5.TableRow[]} An Array of TableRow objects\n * @example\n * \n * \n * let table;\n *\n * function setup() {\n * table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', 'Lion');\n * newRow.setString('type', 'Mammal');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Snake');\n * newRow.setString('type', 'Reptile');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Mosquito');\n * newRow.setString('type', 'Insect');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Lizard');\n * newRow.setString('type', 'Reptile');\n *\n * let rows = table.matchRows('R.*', 'type');\n * for (let i = 0; i < rows.length; i++) {\n * print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n * }\n * }\n * // Sketch prints:\n * // Snake: Reptile\n * // Lizard: Reptile\n * \n * \n */\np5.Table.prototype.matchRows = function(regexp, column) {\n var ret = [];\n if (typeof column === 'number') {\n for (var j = 0; j < this.rows.length; j++) {\n if (this.rows[j].arr[column].match(regexp)) {\n ret.push(this.rows[j]);\n }\n }\n } else {\n for (var i = 0; i < this.rows.length; i++) {\n if (this.rows[i].obj[column].match(regexp)) {\n ret.push(this.rows[i]);\n }\n }\n }\n return ret;\n};\n\n/**\n * Retrieves all values in the specified column, and returns them\n * as an array. The column may be specified by either its ID or title.\n *\n * @method getColumn\n * @param {String|Number} column String or Number of the column to return\n * @return {Array} Array of column values\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //getColumn returns an array that can be printed directly\n * print(table.getColumn('species'));\n * //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.getColumn = function(value) {\n var ret = [];\n if (typeof value === 'string') {\n for (var i = 0; i < this.rows.length; i++) {\n ret.push(this.rows[i].obj[value]);\n }\n } else {\n for (var j = 0; j < this.rows.length; j++) {\n ret.push(this.rows[j].arr[value]);\n }\n }\n return ret;\n};\n\n/**\n * Removes all rows from a Table. While all rows are removed,\n * columns and column titles are maintained.\n *\n * @method clearRows\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.clearRows();\n * print(table.getRowCount() + ' total rows in table');\n * print(table.getColumnCount() + ' total columns in table');\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.clearRows = function() {\n delete this.rows;\n this.rows = [];\n};\n\n/**\n * Use addColumn() to add a new column to a Table object.\n * Typically, you will want to specify a title, so the column\n * may be easily referenced later by name. (If no title is\n * specified, the new column's title will be null.)\n *\n * @method addColumn\n * @param {String} [title] title of the given column\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.addColumn('carnivore');\n * table.set(0, 'carnivore', 'no');\n * table.set(1, 'carnivore', 'yes');\n * table.set(2, 'carnivore', 'no');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.addColumn = function(title) {\n var t = title || null;\n this.columns.push(t);\n};\n\n/**\n * Returns the total number of columns in a Table.\n *\n * @method getColumnCount\n * @return {Integer} Number of columns in this table\n * @example\n * \n * \n * // given the cvs file \"blobs.csv\" in /assets directory\n * // ID, Name, Flavor, Shape, Color\n * // Blob1, Blobby, Sweet, Blob, Pink\n * // Blob2, Saddy, Savory, Blob, Blue\n *\n * let table;\n *\n * function preload() {\n * table = loadTable('assets/blobs.csv');\n * }\n *\n * function setup() {\n * createCanvas(200, 100);\n * textAlign(CENTER);\n * background(255);\n * }\n *\n * function draw() {\n * let numOfColumn = table.getColumnCount();\n * text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n * }\n * \n * \n */\np5.Table.prototype.getColumnCount = function() {\n return this.columns.length;\n};\n\n/**\n * Returns the total number of rows in a Table.\n *\n * @method getRowCount\n * @return {Integer} Number of rows in this table\n * @example\n * \n * \n * // given the cvs file \"blobs.csv\" in /assets directory\n * //\n * // ID, Name, Flavor, Shape, Color\n * // Blob1, Blobby, Sweet, Blob, Pink\n * // Blob2, Saddy, Savory, Blob, Blue\n *\n * let table;\n *\n * function preload() {\n * table = loadTable('assets/blobs.csv');\n * }\n *\n * function setup() {\n * createCanvas(200, 100);\n * textAlign(CENTER);\n * background(255);\n * }\n *\n * function draw() {\n * text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n * }\n * \n * \n */\np5.Table.prototype.getRowCount = function() {\n return this.rows.length;\n};\n\n/**\n * Removes any of the specified characters (or \"tokens\").\n *\n * If no column is specified, then the values in all columns and\n * rows are processed. A specific column may be referenced by\n * either its ID or title.\n *\n * @method removeTokens\n * @param {String} chars String listing characters to be removed\n * @param {String|Integer} [column] Column ID (number)\n * or name (string)\n *\n * @example\n * \n * function setup() {\n * let table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', ' $Lion ,');\n * newRow.setString('type', ',,,Mammal');\n *\n * newRow = table.addRow();\n * newRow.setString('name', '$Snake ');\n * newRow.setString('type', ',,,Reptile');\n *\n * table.removeTokens(',$ ');\n * print(table.getArray());\n * }\n *\n * // prints:\n * // 0 \"Lion\" \"Mamal\"\n * // 1 \"Snake\" \"Reptile\"\n * \n */\np5.Table.prototype.removeTokens = function(chars, column) {\n var escape = function(s) {\n return s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n };\n var charArray = [];\n for (var i = 0; i < chars.length; i++) {\n charArray.push(escape(chars.charAt(i)));\n }\n var regex = new RegExp(charArray.join('|'), 'g');\n\n if (typeof column === 'undefined') {\n for (var c = 0; c < this.columns.length; c++) {\n for (var d = 0; d < this.rows.length; d++) {\n var s = this.rows[d].arr[c];\n s = s.replace(regex, '');\n this.rows[d].arr[c] = s;\n this.rows[d].obj[this.columns[c]] = s;\n }\n }\n } else if (typeof column === 'string') {\n for (var j = 0; j < this.rows.length; j++) {\n var val = this.rows[j].obj[column];\n val = val.replace(regex, '');\n this.rows[j].obj[column] = val;\n var pos = this.columns.indexOf(column);\n this.rows[j].arr[pos] = val;\n }\n } else {\n for (var k = 0; k < this.rows.length; k++) {\n var str = this.rows[k].arr[column];\n str = str.replace(regex, '');\n this.rows[k].arr[column] = str;\n this.rows[k].obj[this.columns[column]] = str;\n }\n }\n};\n\n/**\n * Trims leading and trailing whitespace, such as spaces and tabs,\n * from String table values. If no column is specified, then the\n * values in all columns and rows are trimmed. A specific column\n * may be referenced by either its ID or title.\n *\n * @method trim\n * @param {String|Integer} [column] Column ID (number)\n * or name (string)\n * @example\n * \n * function setup() {\n * let table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', ' Lion ,');\n * newRow.setString('type', ' Mammal ');\n *\n * newRow = table.addRow();\n * newRow.setString('name', ' Snake ');\n * newRow.setString('type', ' Reptile ');\n *\n * table.trim();\n * print(table.getArray());\n * }\n *\n * // prints:\n * // 0 \"Lion\" \"Mamal\"\n * // 1 \"Snake\" \"Reptile\"\n * \n */\np5.Table.prototype.trim = function(column) {\n var regex = new RegExp(' ', 'g');\n\n if (typeof column === 'undefined') {\n for (var c = 0; c < this.columns.length; c++) {\n for (var d = 0; d < this.rows.length; d++) {\n var s = this.rows[d].arr[c];\n s = s.replace(regex, '');\n this.rows[d].arr[c] = s;\n this.rows[d].obj[this.columns[c]] = s;\n }\n }\n } else if (typeof column === 'string') {\n for (var j = 0; j < this.rows.length; j++) {\n var val = this.rows[j].obj[column];\n val = val.replace(regex, '');\n this.rows[j].obj[column] = val;\n var pos = this.columns.indexOf(column);\n this.rows[j].arr[pos] = val;\n }\n } else {\n for (var k = 0; k < this.rows.length; k++) {\n var str = this.rows[k].arr[column];\n str = str.replace(regex, '');\n this.rows[k].arr[column] = str;\n this.rows[k].obj[this.columns[column]] = str;\n }\n }\n};\n\n/**\n * Use removeColumn() to remove an existing column from a Table\n * object. The column to be removed may be identified by either\n * its title (a String) or its index value (an int).\n * removeColumn(0) would remove the first column, removeColumn(1)\n * would remove the second column, and so on.\n *\n * @method removeColumn\n * @param {String|Integer} column columnName (string) or ID (number)\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.removeColumn('id');\n * print(table.getColumnCount());\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.removeColumn = function(c) {\n var cString;\n var cNumber;\n if (typeof c === 'string') {\n // find the position of c in the columns\n cString = c;\n cNumber = this.columns.indexOf(c);\n } else {\n cNumber = c;\n cString = this.columns[c];\n }\n\n var chunk = this.columns.splice(cNumber + 1, this.columns.length);\n this.columns.pop();\n this.columns = this.columns.concat(chunk);\n\n for (var i = 0; i < this.rows.length; i++) {\n var tempR = this.rows[i].arr;\n var chip = tempR.splice(cNumber + 1, tempR.length);\n tempR.pop();\n this.rows[i].arr = tempR.concat(chip);\n delete this.rows[i].obj[cString];\n }\n};\n\n/**\n * Stores a value in the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified\n * by either its ID or title.\n *\n * @method set\n * @param {Integer} row row ID\n * @param {String|Integer} column column ID (Number)\n * or title (String)\n * @param {String|Number} value value to assign\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.set(0, 'species', 'Canis Lupus');\n * table.set(0, 'name', 'Wolf');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.set = function(row, column, value) {\n this.rows[row].set(column, value);\n};\n\n/**\n * Stores a Float value in the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified\n * by either its ID or title.\n *\n * @method setNum\n * @param {Integer} row row ID\n * @param {String|Integer} column column ID (Number)\n * or title (String)\n * @param {Number} value value to assign\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.setNum(1, 'id', 1);\n *\n * print(table.getColumn(0));\n * //[\"0\", 1, \"2\"]\n * }\n * \n * \n *\n *@alt\n * no image displayed\n */\np5.Table.prototype.setNum = function(row, column, value) {\n this.rows[row].setNum(column, value);\n};\n\n/**\n * Stores a String value in the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified\n * by either its ID or title.\n *\n * @method setString\n * @param {Integer} row row ID\n * @param {String|Integer} column column ID (Number)\n * or title (String)\n * @param {String} value value to assign\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add a row\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Canis Lupus');\n * newRow.setString('name', 'Wolf');\n *\n * print(table.getArray());\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.Table.prototype.setString = function(row, column, value) {\n this.rows[row].setString(column, value);\n};\n\n/**\n * Retrieves a value from the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified by\n * either its ID or title.\n *\n * @method get\n * @param {Integer} row row ID\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {String|Number}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.get(0, 1));\n * //Capra hircus\n * print(table.get(0, 'species'));\n * //Capra hircus\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.get = function(row, column) {\n return this.rows[row].get(column);\n};\n\n/**\n * Retrieves a Float value from the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified by\n * either its ID or title.\n *\n * @method getNum\n * @param {Integer} row row ID\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {Number}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.getNum(1, 0) + 100);\n * //id 1 + 100 = 101\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.getNum = function(row, column) {\n return this.rows[row].getNum(column);\n};\n\n/**\n * Retrieves a String value from the Table's specified row and column.\n * The row is specified by its ID, while the column may be specified by\n * either its ID or title.\n *\n * @method getString\n * @param {Integer} row row ID\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {String}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * // table is comma separated value \"CSV\"\n * // and has specifiying header for column labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.getString(0, 0)); // 0\n * print(table.getString(0, 1)); // Capra hircus\n * print(table.getString(0, 2)); // Goat\n * print(table.getString(1, 0)); // 1\n * print(table.getString(1, 1)); // Panthera pardus\n * print(table.getString(1, 2)); // Leopard\n * print(table.getString(2, 0)); // 2\n * print(table.getString(2, 1)); // Equus zebra\n * print(table.getString(2, 2)); // Zebra\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\n\np5.Table.prototype.getString = function(row, column) {\n return this.rows[row].getString(column);\n};\n\n/**\n * Retrieves all table data and returns as an object. If a column name is\n * passed in, each row object will be stored with that attribute as its\n * title.\n *\n * @method getObject\n * @param {String} [headerColumn] Name of the column which should be used to\n * title each row object (optional)\n * @return {Object}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let tableObject = table.getObject();\n *\n * print(tableObject);\n * //outputs an object\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.getObject = function(headerColumn) {\n var tableObject = {};\n var obj, cPos, index;\n\n for (var i = 0; i < this.rows.length; i++) {\n obj = this.rows[i].obj;\n\n if (typeof headerColumn === 'string') {\n cPos = this.columns.indexOf(headerColumn); // index of columnID\n if (cPos >= 0) {\n index = obj[headerColumn];\n tableObject[index] = obj;\n } else {\n throw new Error(\n 'This table has no column named \"' + headerColumn + '\"'\n );\n }\n } else {\n tableObject[i] = this.rows[i].obj;\n }\n }\n return tableObject;\n};\n\n/**\n * Retrieves all table data and returns it as a multidimensional array.\n *\n * @method getArray\n * @return {Array}\n *\n * @example\n * \n * \n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leoperd\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * // table is comma separated value \"CSV\"\n * // and has specifiying header for column labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let tableArray = table.getArray();\n * for (let i = 0; i < tableArray.length; i++) {\n * print(tableArray[i]);\n * }\n * }\n * \n * \n *\n *@alt\n * no image displayed\n *\n */\np5.Table.prototype.getArray = function() {\n var tableArray = [];\n for (var i = 0; i < this.rows.length; i++) {\n tableArray.push(this.rows[i].arr);\n }\n return tableArray;\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],49:[function(_dereq_,module,exports){\n/**\n * @module IO\n * @submodule Table\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * A TableRow object represents a single row of data values,\n * stored in columns, from a table.\n *\n * A Table Row contains both an ordered array, and an unordered\n * JSON object.\n *\n * @class p5.TableRow\n * @constructor\n * @param {String} [str] optional: populate the row with a\n * string of values, separated by the\n * separator\n * @param {String} [separator] comma separated values (csv) by default\n */\np5.TableRow = function(str, separator) {\n var arr = [];\n var obj = {};\n if (str) {\n separator = separator || ',';\n arr = str.split(separator);\n }\n for (var i = 0; i < arr.length; i++) {\n var key = i;\n var val = arr[i];\n obj[key] = val;\n }\n this.arr = arr;\n this.obj = obj;\n this.table = null;\n};\n\n/**\n * Stores a value in the TableRow's specified column.\n * The column may be specified by either its ID or title.\n *\n * @method set\n * @param {String|Integer} column Column ID (Number)\n * or Title (String)\n * @param {String|Number} value The value to be stored\n *\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].set('name', 'Unicorn');\n * }\n *\n * //print the results\n * print(table.getArray());\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.set = function(column, value) {\n // if typeof column is string, use .obj\n if (typeof column === 'string') {\n var cPos = this.table.columns.indexOf(column); // index of columnID\n if (cPos >= 0) {\n this.obj[column] = value;\n this.arr[cPos] = value;\n } else {\n throw new Error('This table has no column named \"' + column + '\"');\n }\n } else {\n // if typeof column is number, use .arr\n if (column < this.table.columns.length) {\n this.arr[column] = value;\n var cTitle = this.table.columns[column];\n this.obj[cTitle] = value;\n } else {\n throw new Error(\n 'Column #' + column + ' is out of the range of this table'\n );\n }\n }\n};\n\n/**\n * Stores a Float value in the TableRow's specified column.\n * The column may be specified by either its ID or title.\n *\n * @method setNum\n * @param {String|Integer} column Column ID (Number)\n * or Title (String)\n * @param {Number|String} value The value to be stored\n * as a Float\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].setNum('id', r + 10);\n * }\n *\n * print(table.getArray());\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.setNum = function(column, value) {\n var floatVal = parseFloat(value);\n this.set(column, floatVal);\n};\n\n/**\n * Stores a String value in the TableRow's specified column.\n * The column may be specified by either its ID or title.\n *\n * @method setString\n * @param {String|Integer} column Column ID (Number)\n * or Title (String)\n * @param {String|Number|Boolean|Object} value The value to be stored\n * as a String\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * let name = rows[r].getString('name');\n * rows[r].setString('name', 'A ' + name + ' named George');\n * }\n *\n * print(table.getArray());\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.setString = function(column, value) {\n var stringVal = value.toString();\n this.set(column, stringVal);\n};\n\n/**\n * Retrieves a value from the TableRow's specified column.\n * The column may be specified by either its ID or title.\n *\n * @method get\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {String|Number}\n *\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let names = [];\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * names.push(rows[r].get('name'));\n * }\n *\n * print(names);\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.get = function(column) {\n if (typeof column === 'string') {\n return this.obj[column];\n } else {\n return this.arr[column];\n }\n};\n\n/**\n * Retrieves a Float value from the TableRow's specified\n * column. The column may be specified by either its ID or\n * title.\n *\n * @method getNum\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {Number} Float Floating point number\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * let minId = Infinity;\n * let maxId = -Infinity;\n * for (let r = 0; r < rows.length; r++) {\n * let id = rows[r].getNum('id');\n * minId = min(minId, id);\n * maxId = min(maxId, id);\n * }\n * print('minimum id = ' + minId + ', maximum id = ' + maxId);\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.getNum = function(column) {\n var ret;\n if (typeof column === 'string') {\n ret = parseFloat(this.obj[column]);\n } else {\n ret = parseFloat(this.arr[column]);\n }\n\n if (ret.toString() === 'NaN') {\n throw 'Error: ' + this.obj[column] + ' is NaN (Not a Number)';\n }\n return ret;\n};\n\n/**\n * Retrieves an String value from the TableRow's specified\n * column. The column may be specified by either its ID or\n * title.\n *\n * @method getString\n * @param {String|Integer} column columnName (string) or\n * ID (number)\n * @return {String} String\n * @example\n * \n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * let longest = '';\n * for (let r = 0; r < rows.length; r++) {\n * let species = rows[r].getString('species');\n * if (longest.length < species.length) {\n * longest = species;\n * }\n * }\n *\n * print('longest: ' + longest);\n * }\n * \n *\n * @alt\n * no image displayed\n */\np5.TableRow.prototype.getString = function(column) {\n if (typeof column === 'string') {\n return this.obj[column].toString();\n } else {\n return this.arr[column].toString();\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],50:[function(_dereq_,module,exports){\n/**\n * @module IO\n * @submodule XML\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * XML is a representation of an XML object, able to parse XML code. Use\n * loadXML() to load external XML files and create XML objects.\n *\n * @class p5.XML\n * @constructor\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let children = xml.getChildren('animal');\n *\n * for (let i = 0; i < children.length; i++) {\n * let id = children[i].getNum('id');\n * let coloring = children[i].getString('species');\n * let name = children[i].getContent();\n * print(id + ', ' + coloring + ', ' + name);\n * }\n * }\n *\n * // Sketch prints:\n * // 0, Capra hircus, Goat\n * // 1, Panthera pardus, Leopard\n * // 2, Equus zebra, Zebra\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.XML = function(DOM) {\n if (!DOM) {\n var xmlDoc = document.implementation.createDocument(null, 'doc');\n this.DOM = xmlDoc.createElement('root');\n } else {\n this.DOM = DOM;\n }\n};\n\n/**\n * Gets a copy of the element's parent. Returns the parent as another\n * p5.XML object.\n *\n * @method getParent\n * @return {p5.XML} element parent\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let children = xml.getChildren('animal');\n * let parent = children[1].getParent();\n * print(parent.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n * \n */\np5.XML.prototype.getParent = function() {\n return new p5.XML(this.DOM.parentElement);\n};\n\n/**\n * Gets the element's full name, which is returned as a String.\n *\n * @method getName\n * @return {String} the name of the node\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n * \n */\np5.XML.prototype.getName = function() {\n return this.DOM.tagName;\n};\n\n/**\n * Sets the element's name, which is specified as a String.\n *\n * @method setName\n * @param {String} the new name of the node\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.getName());\n * xml.setName('fish');\n * print(xml.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n * // fish\n * \n */\np5.XML.prototype.setName = function(name) {\n var content = this.DOM.innerHTML;\n var attributes = this.DOM.attributes;\n var xmlDoc = document.implementation.createDocument(null, 'default');\n var newDOM = xmlDoc.createElement(name);\n newDOM.innerHTML = content;\n for (var i = 0; i < attributes.length; i++) {\n newDOM.setAttribute(attributes[i].nodeName, attributes.nodeValue);\n }\n this.DOM = newDOM;\n};\n\n/**\n * Checks whether or not the element has any children, and returns the result\n * as a boolean.\n *\n * @method hasChildren\n * @return {boolean}\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.hasChildren());\n * }\n *\n * // Sketch prints:\n * // true\n * \n */\np5.XML.prototype.hasChildren = function() {\n return this.DOM.children.length > 0;\n};\n\n/**\n * Get the names of all of the element's children, and returns the names as an\n * array of Strings. This is the same as looping through and calling getName()\n * on each child element individually.\n *\n * @method listChildren\n * @return {String[]} names of the children of the element\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.listChildren());\n * }\n *\n * // Sketch prints:\n * // [\"animal\", \"animal\", \"animal\"]\n * \n */\np5.XML.prototype.listChildren = function() {\n var arr = [];\n for (var i = 0; i < this.DOM.childNodes.length; i++) {\n arr.push(this.DOM.childNodes[i].nodeName);\n }\n return arr;\n};\n\n/**\n * Returns all of the element's children as an array of p5.XML objects. When\n * the name parameter is specified, then it will return all children that match\n * that name.\n *\n * @method getChildren\n * @param {String} [name] element name\n * @return {p5.XML[]} children of the element\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let animals = xml.getChildren('animal');\n *\n * for (let i = 0; i < animals.length; i++) {\n * print(animals[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Leopard\"\n * // \"Zebra\"\n * \n */\np5.XML.prototype.getChildren = function(param) {\n if (param) {\n return elementsToP5XML(this.DOM.getElementsByTagName(param));\n } else {\n return elementsToP5XML(this.DOM.children);\n }\n};\n\nfunction elementsToP5XML(elements) {\n var arr = [];\n for (var i = 0; i < elements.length; i++) {\n arr.push(new p5.XML(elements[i]));\n }\n return arr;\n}\n\n/**\n * Returns the first of the element's children that matches the name parameter\n * or the child of the given index.It returns undefined if no matching\n * child is found.\n *\n * @method getChild\n * @param {String|Integer} name element name or index\n * @return {p5.XML}\n * @example<animal\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * \n * \n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let secondChild = xml.getChild(1);\n * print(secondChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Leopard\"\n * \n */\np5.XML.prototype.getChild = function(param) {\n if (typeof param === 'string') {\n for (var i = 0; i < this.DOM.children.length; i++) {\n var child = this.DOM.children[i];\n if (child.tagName === param) return new p5.XML(child);\n }\n } else {\n return new p5.XML(this.DOM.children[param]);\n }\n};\n\n/**\n * Appends a new child to the element. The child can be specified with\n * either a String, which will be used as the new tag's name, or as a\n * reference to an existing p5.XML object.\n * A reference to the newly created child is returned as an p5.XML object.\n *\n * @method addChild\n * @param {p5.XML} node a p5.XML Object which will be the child to be added\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let child = new p5.XML();\n * child.setName('animal');\n * child.setAttribute('id', '3');\n * child.setAttribute('species', 'Ornithorhynchus anatinus');\n * child.setContent('Platypus');\n * xml.addChild(child);\n *\n * let animals = xml.getChildren('animal');\n * print(animals[animals.length - 1].getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Leopard\"\n * // \"Zebra\"\n * \n */\np5.XML.prototype.addChild = function(node) {\n if (node instanceof p5.XML) {\n this.DOM.appendChild(node.DOM);\n } else {\n // PEND\n }\n};\n\n/**\n * Removes the element specified by name or index.\n *\n * @method removeChild\n * @param {String|Integer} name element name or index\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * xml.removeChild('animal');\n * let children = xml.getChildren();\n * for (let i = 0; i < children.length; i++) {\n * print(children[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Leopard\"\n * // \"Zebra\"\n * \n * \n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * xml.removeChild(1);\n * let children = xml.getChildren();\n * for (let i = 0; i < children.length; i++) {\n * print(children[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Zebra\"\n * \n */\np5.XML.prototype.removeChild = function(param) {\n var ind = -1;\n if (typeof param === 'string') {\n for (var i = 0; i < this.DOM.children.length; i++) {\n if (this.DOM.children[i].tagName === param) {\n ind = i;\n break;\n }\n }\n } else {\n ind = param;\n }\n if (ind !== -1) {\n this.DOM.removeChild(this.DOM.children[ind]);\n }\n};\n\n/**\n * Counts the specified element's number of attributes, returned as an Number.\n *\n * @method getAttributeCount\n * @return {Integer}\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getAttributeCount());\n * }\n *\n * // Sketch prints:\n * // 2\n * \n */\np5.XML.prototype.getAttributeCount = function() {\n return this.DOM.attributes.length;\n};\n\n/**\n * Gets all of the specified element's attributes, and returns them as an\n * array of Strings.\n *\n * @method listAttributes\n * @return {String[]} an array of strings containing the names of attributes\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.listAttributes());\n * }\n *\n * // Sketch prints:\n * // [\"id\", \"species\"]\n * \n */\np5.XML.prototype.listAttributes = function() {\n var arr = [];\n for (var i = 0; i < this.DOM.attributes.length; i++) {\n var attribute = this.DOM.attributes[i];\n arr.push(attribute.nodeName);\n }\n return arr;\n};\n\n/**\n * Checks whether or not an element has the specified attribute.\n *\n * @method hasAttribute\n * @param {String} the attribute to be checked\n * @return {boolean} true if attribute found else false\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.hasAttribute('species'));\n * print(firstChild.hasAttribute('color'));\n * }\n *\n * // Sketch prints:\n * // true\n * // false\n * \n */\np5.XML.prototype.hasAttribute = function(name) {\n var obj = {};\n for (var i = 0; i < this.DOM.attributes.length; i++) {\n var attribute = this.DOM.attributes[i];\n obj[attribute.nodeName] = attribute.nodeValue;\n }\n return obj[name] ? true : false;\n};\n\n/**\n * Returns an attribute value of the element as an Number. If the defaultValue\n * parameter is specified and the attribute doesn't exist, then defaultValue\n * is returned. If no defaultValue is specified and the attribute doesn't\n * exist, the value 0 is returned.\n *\n * @method getNum\n * @param {String} name the non-null full name of the attribute\n * @param {Number} [defaultValue] the default value of the attribute\n * @return {Number}\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getNum('id'));\n * }\n *\n * // Sketch prints:\n * // 0\n * \n */\np5.XML.prototype.getNum = function(name, defaultValue) {\n var obj = {};\n for (var i = 0; i < this.DOM.attributes.length; i++) {\n var attribute = this.DOM.attributes[i];\n obj[attribute.nodeName] = attribute.nodeValue;\n }\n return Number(obj[name]) || defaultValue || 0;\n};\n\n/**\n * Returns an attribute value of the element as an String. If the defaultValue\n * parameter is specified and the attribute doesn't exist, then defaultValue\n * is returned. If no defaultValue is specified and the attribute doesn't\n * exist, null is returned.\n *\n * @method getString\n * @param {String} name the non-null full name of the attribute\n * @param {Number} [defaultValue] the default value of the attribute\n * @return {String}\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getString('species'));\n * }\n *\n * // Sketch prints:\n * // \"Capra hircus\"\n * \n */\np5.XML.prototype.getString = function(name, defaultValue) {\n var obj = {};\n for (var i = 0; i < this.DOM.attributes.length; i++) {\n var attribute = this.DOM.attributes[i];\n obj[attribute.nodeName] = attribute.nodeValue;\n }\n return obj[name] ? String(obj[name]) : defaultValue || null;\n};\n\n/**\n * Sets the content of an element's attribute. The first parameter specifies\n * the attribute name, while the second specifies the new content.\n *\n * @method setAttribute\n * @param {String} name the full name of the attribute\n * @param {Number|String|Boolean} value the value of the attribute\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getString('species'));\n * firstChild.setAttribute('species', 'Jamides zebra');\n * print(firstChild.getString('species'));\n * }\n *\n * // Sketch prints:\n * // \"Capra hircus\"\n * // \"Jamides zebra\"\n * \n */\np5.XML.prototype.setAttribute = function(name, value) {\n this.DOM.setAttribute(name, value);\n};\n\n/**\n * Returns the content of an element. If there is no such content,\n * defaultValue is returned if specified, otherwise null is returned.\n *\n * @method getContent\n * @param {String} [defaultValue] value returned if no content is found\n * @return {String}\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * \n */\np5.XML.prototype.getContent = function(defaultValue) {\n var str;\n str = this.DOM.textContent;\n str = str.replace(/\\s\\s+/g, ',');\n return str || defaultValue || null;\n};\n\n/**\n * Sets the element's content.\n *\n * @method setContent\n * @param {String} text the new content\n * @example\n * \n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getContent());\n * firstChild.setContent('Mountain Goat');\n * print(firstChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Mountain Goat\"\n * \n */\np5.XML.prototype.setContent = function(content) {\n if (!this.DOM.children.length) {\n this.DOM.textContent = content;\n }\n};\n\n/**\n * Serializes the element into a string. This function is useful for preparing\n * the content to be sent over a http request or saved to file.\n *\n * @method serialize\n * @return {String} Serialized string of the element\n * @example\n * \n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.serialize());\n * }\n *\n * // Sketch prints:\n * // \n * // Goat\n * // Leopard\n * // Zebra\n * // \n * \n */\np5.XML.prototype.serialize = function() {\n var xmlSerializer = new XMLSerializer();\n return xmlSerializer.serializeToString(this.DOM);\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],51:[function(_dereq_,module,exports){\n/**\n * @module Math\n * @submodule Calculation\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Calculates the absolute value (magnitude) of a number. Maps to Math.abs().\n * The absolute value of a number is always positive.\n *\n * @method abs\n * @param {Number} n number to compute\n * @return {Number} absolute value of given number\n * @example\n * \n * function setup() {\n * let x = -3;\n * let y = abs(x);\n *\n * print(x); // -3\n * print(y); // 3\n * }\n * \n *\n * @alt\n * no image displayed\n *\n */\np5.prototype.abs = Math.abs;\n\n/**\n * Calculates the closest int value that is greater than or equal to the\n * value of the parameter. Maps to Math.ceil(). For example, ceil(9.03)\n * returns the value 10.\n *\n * @method ceil\n * @param {Number} n number to round up\n * @return {Integer} rounded up number\n * @example\n * \n * function draw() {\n * background(200);\n * // map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * //Get the ceiling of the mapped number.\n * let bx = ceil(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n * \n *\n * @alt\n * 2 horizontal lines & number sets. increase with mouse x. bottom to 2 decimals\n *\n */\np5.prototype.ceil = Math.ceil;\n\n/**\n * Constrains a value between a minimum and maximum value.\n *\n * @method constrain\n * @param {Number} n number to constrain\n * @param {Number} low minimum limit\n * @param {Number} high maximum limit\n * @return {Number} constrained number\n * @example\n * \n * function draw() {\n * background(200);\n *\n * let leftWall = 25;\n * let rightWall = 75;\n *\n * // xm is just the mouseX, while\n * // xc is the mouseX, but constrained\n * // between the leftWall and rightWall!\n * let xm = mouseX;\n * let xc = constrain(mouseX, leftWall, rightWall);\n *\n * // Draw the walls.\n * stroke(150);\n * line(leftWall, 0, leftWall, height);\n * line(rightWall, 0, rightWall, height);\n *\n * // Draw xm and xc as circles.\n * noStroke();\n * fill(150);\n * ellipse(xm, 33, 9, 9); // Not Constrained\n * fill(0);\n * ellipse(xc, 66, 9, 9); // Constrained\n * }\n * \n *\n * @alt\n * 2 vertical lines. 2 ellipses move with mouse X 1 does not move passed lines\n *\n */\np5.prototype.constrain = function(n, low, high) {\n p5._validateParameters('constrain', arguments);\n return Math.max(Math.min(n, high), low);\n};\n\n/**\n * Calculates the distance between two points.\n *\n * @method dist\n * @param {Number} x1 x-coordinate of the first point\n * @param {Number} y1 y-coordinate of the first point\n * @param {Number} x2 x-coordinate of the second point\n * @param {Number} y2 y-coordinate of the second point\n * @return {Number} distance between the two points\n *\n * @example\n * \n * // Move your mouse inside the canvas to see the\n * // change in distance between two points!\n * function draw() {\n * background(200);\n * fill(0);\n *\n * let x1 = 10;\n * let y1 = 90;\n * let x2 = mouseX;\n * let y2 = mouseY;\n *\n * line(x1, y1, x2, y2);\n * ellipse(x1, y1, 7, 7);\n * ellipse(x2, y2, 7, 7);\n *\n * // d is the length of the line\n * // the distance from point 1 to point 2.\n * let d = int(dist(x1, y1, x2, y2));\n *\n * // Let's write d along the line we are drawing!\n * push();\n * translate((x1 + x2) / 2, (y1 + y2) / 2);\n * rotate(atan2(y2 - y1, x2 - x1));\n * text(nfc(d, 1), 0, -5);\n * pop();\n * // Fancy!\n * }\n * \n *\n * @alt\n * 2 ellipses joined by line. 1 ellipse moves with mouse X&Y. Distance displayed.\n */\n/**\n * @method dist\n * @param {Number} x1\n * @param {Number} y1\n * @param {Number} z1 z-coordinate of the first point\n * @param {Number} x2\n * @param {Number} y2\n * @param {Number} z2 z-coordinate of the second point\n * @return {Number} distance between the two points\n */\np5.prototype.dist = function() {\n p5._validateParameters('dist', arguments);\n if (arguments.length === 4) {\n //2D\n return hypot(arguments[2] - arguments[0], arguments[3] - arguments[1]);\n } else if (arguments.length === 6) {\n //3D\n return hypot(\n arguments[3] - arguments[0],\n arguments[4] - arguments[1],\n arguments[5] - arguments[2]\n );\n }\n};\n\n/**\n * Returns Euler's number e (2.71828...) raised to the power of the n\n * parameter. Maps to Math.exp().\n *\n * @method exp\n * @param {Number} n exponent to raise\n * @return {Number} e^n\n * @example\n * \n * function draw() {\n * background(200);\n *\n * // Compute the exp() function with a value between 0 and 2\n * let xValue = map(mouseX, 0, width, 0, 2);\n * let yValue = exp(xValue);\n *\n * let y = map(yValue, 0, 8, height, 0);\n *\n * let legend = 'exp (' + nfc(xValue, 3) + ')\\n= ' + nf(yValue, 1, 4);\n * stroke(150);\n * line(mouseX, y, mouseX, height);\n * fill(0);\n * text(legend, 5, 15);\n * noStroke();\n * ellipse(mouseX, y, 7, 7);\n *\n * // Draw the exp(x) curve,\n * // over the domain of x from 0 to 2\n * noFill();\n * stroke(0);\n * beginShape();\n * for (let x = 0; x < width; x++) {\n * xValue = map(x, 0, width, 0, 2);\n * yValue = exp(xValue);\n * y = map(yValue, 0, 8, height, 0);\n * vertex(x, y);\n * }\n *\n * endShape();\n * line(0, 0, 0, height);\n * line(0, height - 1, width, height - 1);\n * }\n * \n *\n * @alt\n * ellipse moves along a curve with mouse x. e^n displayed.\n *\n */\np5.prototype.exp = Math.exp;\n\n/**\n * Calculates the closest int value that is less than or equal to the\n * value of the parameter. Maps to Math.floor().\n *\n * @method floor\n * @param {Number} n number to round down\n * @return {Integer} rounded down number\n * @example\n * \n * function draw() {\n * background(200);\n * //map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * //Get the floor of the mapped number.\n * let bx = floor(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n * \n *\n * @alt\n * 2 horizontal lines & number sets. increase with mouse x. bottom to 2 decimals\n *\n */\np5.prototype.floor = Math.floor;\n\n/**\n * Calculates a number between two numbers at a specific increment. The amt\n * parameter is the amount to interpolate between the two values where 0.0\n * equal to the first point, 0.1 is very near the first point, 0.5 is\n * half-way in between, and 1.0 is equal to the second point. If the\n * value of amt is more than 1.0 or less than 0.0, the number will be\n * calculated accordingly in the ratio of the two given numbers. The lerp\n * function is convenient for creating motion along a straight\n * path and for drawing dotted lines.\n *\n * @method lerp\n * @param {Number} start first value\n * @param {Number} stop second value\n * @param {Number} amt number\n * @return {Number} lerped value\n * @example\n * \n * function setup() {\n * background(200);\n * let a = 20;\n * let b = 80;\n * let c = lerp(a, b, 0.2);\n * let d = lerp(a, b, 0.5);\n * let e = lerp(a, b, 0.8);\n *\n * let y = 50;\n *\n * strokeWeight(5);\n * stroke(0); // Draw the original points in black\n * point(a, y);\n * point(b, y);\n *\n * stroke(100); // Draw the lerp points in gray\n * point(c, y);\n * point(d, y);\n * point(e, y);\n * }\n * \n *\n * @alt\n * 5 points horizontally staggered mid-canvas. mid 3 are grey, outer black\n *\n */\np5.prototype.lerp = function(start, stop, amt) {\n p5._validateParameters('lerp', arguments);\n return amt * (stop - start) + start;\n};\n\n/**\n * Calculates the natural logarithm (the base-e logarithm) of a number. This\n * function expects the n parameter to be a value greater than 0.0. Maps to\n * Math.log().\n *\n * @method log\n * @param {Number} n number greater than 0\n * @return {Number} natural logarithm of n\n * @example\n * \n * function draw() {\n * background(200);\n * let maxX = 2.8;\n * let maxY = 1.5;\n *\n * // Compute the natural log of a value between 0 and maxX\n * let xValue = map(mouseX, 0, width, 0, maxX);\n * let yValue, y;\n * if (xValue > 0) {\n // Cannot take the log of a negative number.\n * yValue = log(xValue);\n * y = map(yValue, -maxY, maxY, height, 0);\n *\n * // Display the calculation occurring.\n * let legend = 'log(' + nf(xValue, 1, 2) + ')\\n= ' + nf(yValue, 1, 3);\n * stroke(150);\n * line(mouseX, y, mouseX, height);\n * fill(0);\n * text(legend, 5, 15);\n * noStroke();\n * ellipse(mouseX, y, 7, 7);\n * }\n *\n * // Draw the log(x) curve,\n * // over the domain of x from 0 to maxX\n * noFill();\n * stroke(0);\n * beginShape();\n * for (let x = 0; x < width; x++) {\n * xValue = map(x, 0, width, 0, maxX);\n * yValue = log(xValue);\n * y = map(yValue, -maxY, maxY, height, 0);\n * vertex(x, y);\n * }\n * endShape();\n * line(0, 0, 0, height);\n * line(0, height / 2, width, height / 2);\n * }\n * \n *\n * @alt\n * ellipse moves along a curve with mouse x. natural logarithm of n displayed.\n *\n */\np5.prototype.log = Math.log;\n\n/**\n * Calculates the magnitude (or length) of a vector. A vector is a direction\n * in space commonly used in computer graphics and linear algebra. Because it\n * has no \"start\" position, the magnitude of a vector can be thought of as\n * the distance from the coordinate 0,0 to its x,y value. Therefore, mag() is\n * a shortcut for writing dist(0, 0, x, y).\n *\n * @method mag\n * @param {Number} a first value\n * @param {Number} b second value\n * @return {Number} magnitude of vector from (0,0) to (a,b)\n * @example\n * \n * function setup() {\n * let x1 = 20;\n * let x2 = 80;\n * let y1 = 30;\n * let y2 = 70;\n *\n * line(0, 0, x1, y1);\n * print(mag(x1, y1)); // Prints \"36.05551275463989\"\n * line(0, 0, x2, y1);\n * print(mag(x2, y1)); // Prints \"85.44003745317531\"\n * line(0, 0, x1, y2);\n * print(mag(x1, y2)); // Prints \"72.80109889280519\"\n * line(0, 0, x2, y2);\n * print(mag(x2, y2)); // Prints \"106.3014581273465\"\n * }\n * \n *\n * @alt\n * 4 lines of different length radiate from top left of canvas.\n *\n */\np5.prototype.mag = function(x, y) {\n p5._validateParameters('mag', arguments);\n return hypot(x, y);\n};\n\n/**\n * Re-maps a number from one range to another.\n * \n * In the first example above, the number 25 is converted from a value in the\n * range of 0 to 100 into a value that ranges from the left edge of the\n * window (0) to the right edge (width).\n *\n * @method map\n * @param {Number} value the incoming value to be converted\n * @param {Number} start1 lower bound of the value's current range\n * @param {Number} stop1 upper bound of the value's current range\n * @param {Number} start2 lower bound of the value's target range\n * @param {Number} stop2 upper bound of the value's target range\n * @param {Boolean} [withinBounds] constrain the value to the newly mapped range\n * @return {Number} remapped number\n * @example\n * \n * let value = 25;\n * let m = map(value, 0, 100, 0, width);\n * ellipse(m, 50, 10, 10);\n\n *\n * \n * function setup() {\n * noStroke();\n * }\n *\n * function draw() {\n * background(204);\n * let x1 = map(mouseX, 0, width, 25, 75);\n * ellipse(x1, 25, 25, 25);\n * //This ellipse is constrained to the 0-100 range\n * //after setting withinBounds to true\n * let x2 = map(mouseX, 0, width, 0, 100, true);\n * ellipse(x2, 75, 25, 25);\n * }\n\n *\n * @alt\n * 10 by 10 white ellipse with in mid left canvas\n * 2 25 by 25 white ellipses move with mouse x. Bottom has more range from X\n *\n */\np5.prototype.map = function(n, start1, stop1, start2, stop2, withinBounds) {\n p5._validateParameters('map', arguments);\n var newval = (n - start1) / (stop1 - start1) * (stop2 - start2) + start2;\n if (!withinBounds) {\n return newval;\n }\n if (start2 < stop2) {\n return this.constrain(newval, start2, stop2);\n } else {\n return this.constrain(newval, stop2, start2);\n }\n};\n\n/**\n * Determines the largest value in a sequence of numbers, and then returns\n * that value. max() accepts any number of Number parameters, or an Array\n * of any length.\n *\n * @method max\n * @param {Number} n0 Number to compare\n * @param {Number} n1 Number to compare\n * @return {Number} maximum Number\n * @example\n * \n * function setup() {\n * // Change the elements in the array and run the sketch\n * // to show how max() works!\n * let numArray = [2, 1, 5, 4, 8, 9];\n * fill(0);\n * noStroke();\n * text('Array Elements', 0, 10);\n * // Draw all numbers in the array\n * let spacing = 15;\n * let elemsY = 25;\n * for (let i = 0; i < numArray.length; i++) {\n * text(numArray[i], i * spacing, elemsY);\n * }\n * let maxX = 33;\n * let maxY = 80;\n * // Draw the Maximum value in the array.\n * textSize(32);\n * text(max(numArray), maxX, maxY);\n * }\n * \n *\n * @alt\n * Small text at top reads: Array Elements 2 1 5 4 8 9. Large text at center: 9\n *\n */\n/**\n * @method max\n * @param {Number[]} nums Numbers to compare\n * @return {Number}\n */\np5.prototype.max = function() {\n p5._validateParameters('max', arguments);\n if (arguments[0] instanceof Array) {\n return Math.max.apply(null, arguments[0]);\n } else {\n return Math.max.apply(null, arguments);\n }\n};\n\n/**\n * Determines the smallest value in a sequence of numbers, and then returns\n * that value. min() accepts any number of Number parameters, or an Array\n * of any length.\n *\n * @method min\n * @param {Number} n0 Number to compare\n * @param {Number} n1 Number to compare\n * @return {Number} minimum Number\n * @example\n * \n * function setup() {\n * // Change the elements in the array and run the sketch\n * // to show how min() works!\n * let numArray = [2, 1, 5, 4, 8, 9];\n * fill(0);\n * noStroke();\n * text('Array Elements', 0, 10);\n * // Draw all numbers in the array\n * let spacing = 15;\n * let elemsY = 25;\n * for (let i = 0; i < numArray.length; i++) {\n * text(numArray[i], i * spacing, elemsY);\n * }\n * let maxX = 33;\n * let maxY = 80;\n * // Draw the Minimum value in the array.\n * textSize(32);\n * text(min(numArray), maxX, maxY);\n * }\n * \n *\n * @alt\n * Small text at top reads: Array Elements 2 1 5 4 8 9. Large text at center: 1\n *\n */\n/**\n * @method min\n * @param {Number[]} nums Numbers to compare\n * @return {Number}\n */\np5.prototype.min = function() {\n p5._validateParameters('min', arguments);\n if (arguments[0] instanceof Array) {\n return Math.min.apply(null, arguments[0]);\n } else {\n return Math.min.apply(null, arguments);\n }\n};\n\n/**\n * Normalizes a number from another range into a value between 0 and 1.\n * Identical to map(value, low, high, 0, 1).\n * Numbers outside of the range are not clamped to 0 and 1, because\n * out-of-range values are often intentional and useful. (See the example above.)\n *\n * @method norm\n * @param {Number} value incoming value to be normalized\n * @param {Number} start lower bound of the value's current range\n * @param {Number} stop upper bound of the value's current range\n * @return {Number} normalized number\n * @example\n * \n * function draw() {\n * background(200);\n * let currentNum = mouseX;\n * let lowerBound = 0;\n * let upperBound = width; //100;\n * let normalized = norm(currentNum, lowerBound, upperBound);\n * let lineY = 70;\n * stroke(3);\n * line(0, lineY, width, lineY);\n * //Draw an ellipse mapped to the non-normalized value.\n * noStroke();\n * fill(50);\n * let s = 7; // ellipse size\n * ellipse(currentNum, lineY, s, s);\n *\n * // Draw the guide\n * let guideY = lineY + 15;\n * text('0', 0, guideY);\n * textAlign(RIGHT);\n * text('100', width, guideY);\n *\n * // Draw the normalized value\n * textAlign(LEFT);\n * fill(0);\n * textSize(32);\n * let normalY = 40;\n * let normalX = 20;\n * text(normalized, normalX, normalY);\n * }\n * \n *\n * @alt\n * ellipse moves with mouse. 0 shown left & 100 right and updating values center\n *\n */\np5.prototype.norm = function(n, start, stop) {\n p5._validateParameters('norm', arguments);\n return this.map(n, start, stop, 0, 1);\n};\n\n/**\n * Facilitates exponential expressions. The pow() function is an efficient\n * way of multiplying numbers by themselves (or their reciprocals) in large\n * quantities. For example, pow(3, 5) is equivalent to the expression\n * 3*3*3*3*3 and pow(3, -5) is equivalent to 1 / 3*3*3*3*3. Maps to\n * Math.pow().\n *\n * @method pow\n * @param {Number} n base of the exponential expression\n * @param {Number} e power by which to raise the base\n * @return {Number} n^e\n * @example\n * \n * function setup() {\n * //Exponentially increase the size of an ellipse.\n * let eSize = 3; // Original Size\n * let eLoc = 10; // Original Location\n *\n * ellipse(eLoc, eLoc, eSize, eSize);\n *\n * ellipse(eLoc * 2, eLoc * 2, pow(eSize, 2), pow(eSize, 2));\n *\n * ellipse(eLoc * 4, eLoc * 4, pow(eSize, 3), pow(eSize, 3));\n *\n * ellipse(eLoc * 8, eLoc * 8, pow(eSize, 4), pow(eSize, 4));\n * }\n * \n *\n * @alt\n * small to large ellipses radiating from top left of canvas\n *\n */\np5.prototype.pow = Math.pow;\n\n/**\n * Calculates the integer closest to the n parameter. For example,\n * round(133.8) returns the value 134. Maps to Math.round().\n *\n * @method round\n * @param {Number} n number to round\n * @return {Integer} rounded number\n * @example\n * \n * function draw() {\n * background(200);\n * //map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * // Round the mapped number.\n * let bx = round(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n * \n *\n * @alt\n * horizontal center line squared values displayed on top and regular on bottom.\n *\n */\np5.prototype.round = Math.round;\n\n/**\n * Squares a number (multiplies a number by itself). The result is always a\n * positive number, as multiplying two negative numbers always yields a\n * positive result. For example, -1 * -1 = 1.\n *\n * @method sq\n * @param {Number} n number to square\n * @return {Number} squared number\n * @example\n * \n * function draw() {\n * background(200);\n * let eSize = 7;\n * let x1 = map(mouseX, 0, width, 0, 10);\n * let y1 = 80;\n * let x2 = sq(x1);\n * let y2 = 20;\n *\n * // Draw the non-squared.\n * line(0, y1, width, y1);\n * ellipse(x1, y1, eSize, eSize);\n *\n * // Draw the squared.\n * line(0, y2, width, y2);\n * ellipse(x2, y2, eSize, eSize);\n *\n * // Draw dividing line.\n * stroke(100);\n * line(0, height / 2, width, height / 2);\n *\n * // Draw text.\n * let spacing = 15;\n * noStroke();\n * fill(0);\n * text('x = ' + x1, 0, y1 + spacing);\n * text('sq(x) = ' + x2, 0, y2 + spacing);\n * }\n * \n *\n * @alt\n * horizontal center line squared values displayed on top and regular on bottom.\n *\n */\np5.prototype.sq = function(n) {\n return n * n;\n};\n\n/**\n * Calculates the square root of a number. The square root of a number is\n * always positive, even though there may be a valid negative root. The\n * square root s of number a is such that s*s = a. It is the opposite of\n * squaring. Maps to Math.sqrt().\n *\n * @method sqrt\n * @param {Number} n non-negative number to square root\n * @return {Number} square root of number\n * @example\n * \n * function draw() {\n * background(200);\n * let eSize = 7;\n * let x1 = mouseX;\n * let y1 = 80;\n * let x2 = sqrt(x1);\n * let y2 = 20;\n *\n * // Draw the non-squared.\n * line(0, y1, width, y1);\n * ellipse(x1, y1, eSize, eSize);\n *\n * // Draw the squared.\n * line(0, y2, width, y2);\n * ellipse(x2, y2, eSize, eSize);\n *\n * // Draw dividing line.\n * stroke(100);\n * line(0, height / 2, width, height / 2);\n *\n * // Draw text.\n * noStroke();\n * fill(0);\n * let spacing = 15;\n * text('x = ' + x1, 0, y1 + spacing);\n * text('sqrt(x) = ' + x2, 0, y2 + spacing);\n * }\n * \n *\n * @alt\n * horizontal center line squareroot values displayed on top and regular on bottom.\n *\n */\np5.prototype.sqrt = Math.sqrt;\n\n// Calculate the length of the hypotenuse of a right triangle\n// This won't under- or overflow in intermediate steps\n// https://en.wikipedia.org/wiki/Hypot\nfunction hypot(x, y, z) {\n // Use the native implementation if it's available\n if (typeof Math.hypot === 'function') {\n return Math.hypot.apply(null, arguments);\n }\n\n // Otherwise use the V8 implementation\n // https://github.com/v8/v8/blob/8cd3cf297287e581a49e487067f5cbd991b27123/src/js/math.js#L217\n var length = arguments.length;\n var args = [];\n var max = 0;\n for (var i = 0; i < length; i++) {\n var n = arguments[i];\n n = +n;\n if (n === Infinity || n === -Infinity) {\n return Infinity;\n }\n n = Math.abs(n);\n if (n > max) {\n max = n;\n }\n args[i] = n;\n }\n\n if (max === 0) {\n max = 1;\n }\n var sum = 0;\n var compensation = 0;\n for (var j = 0; j < length; j++) {\n var m = args[j] / max;\n var summand = m * m - compensation;\n var preliminary = sum + summand;\n compensation = preliminary - sum - summand;\n sum = preliminary;\n }\n return Math.sqrt(sum) * max;\n}\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],52:[function(_dereq_,module,exports){\n/**\n * @module Math\n * @submodule Math\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Creates a new p5.Vector (the datatype for storing vectors). This provides a\n * two or three dimensional vector, specifically a Euclidean (also known as\n * geometric) vector. A vector is an entity that has both magnitude and\n * direction.\n *\n * @method createVector\n * @param {Number} [x] x component of the vector\n * @param {Number} [y] y component of the vector\n * @param {Number} [z] z component of the vector\n * @return {p5.Vector}\n * @example\n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noStroke();\n * fill(255, 102, 204);\n * }\n *\n * function draw() {\n * background(255);\n * pointLight(color(255), createVector(sin(millis() / 1000) * 20, -40, -10));\n * scale(0.75);\n * sphere();\n * }\n * \n *\n * @alt\n * a purple sphere lit by a point light oscillating horizontally\n */\np5.prototype.createVector = function(x, y, z) {\n if (this instanceof p5) {\n return new p5.Vector(this, arguments);\n } else {\n return new p5.Vector(x, y, z);\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],53:[function(_dereq_,module,exports){\n//////////////////////////////////////////////////////////////\n\n// http://mrl.nyu.edu/~perlin/noise/\n// Adapting from PApplet.java\n// which was adapted from toxi\n// which was adapted from the german demo group farbrausch\n// as used in their demo \"art\": http://www.farb-rausch.de/fr010src.zip\n\n// someday we might consider using \"improved noise\"\n// http://mrl.nyu.edu/~perlin/paper445.pdf\n// See: https://github.com/shiffman/The-Nature-of-Code-Examples-p5.js/\n// blob/master/introduction/Noise1D/noise.js\n\n/**\n * @module Math\n * @submodule Noise\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\nvar PERLIN_YWRAPB = 4;\nvar PERLIN_YWRAP = 1 << PERLIN_YWRAPB;\nvar PERLIN_ZWRAPB = 8;\nvar PERLIN_ZWRAP = 1 << PERLIN_ZWRAPB;\nvar PERLIN_SIZE = 4095;\n\nvar perlin_octaves = 4; // default to medium smooth\nvar perlin_amp_falloff = 0.5; // 50% reduction/octave\n\nvar scaled_cosine = function(i) {\n return 0.5 * (1.0 - Math.cos(i * Math.PI));\n};\n\nvar perlin; // will be initialized lazily by noise() or noiseSeed()\n\n/**\n * Returns the Perlin noise value at specified coordinates. Perlin noise is\n * a random sequence generator producing a more natural ordered, harmonic\n * succession of numbers compared to the standard random() function.\n * It was invented by Ken Perlin in the 1980s and been used since in\n * graphical applications to produce procedural textures, natural motion,\n * shapes, terrains etc. The main difference to the\n * random() function is that Perlin noise is defined in an infinite\n * n-dimensional space where each pair of coordinates corresponds to a\n * fixed semi-random value (fixed only for the lifespan of the program; see\n * the noiseSeed() function). p5.js can compute 1D, 2D and 3D noise,\n * depending on the number of coordinates given. The resulting value will\n * always be between 0.0 and 1.0. The noise value can be animated by moving\n * through the noise space as demonstrated in the example above. The 2nd\n * and 3rd dimension can also be interpreted as time.The actual\n * noise is structured similar to an audio signal, in respect to the\n * function's use of frequencies. Similar to the concept of harmonics in\n * physics, perlin noise is computed over several octaves which are added\n * together for the final result. Another way to adjust the\n * character of the resulting sequence is the scale of the input\n * coordinates. As the function works within an infinite space the value of\n * the coordinates doesn't matter as such, only the distance between\n * successive coordinates does (eg. when using noise() within a\n * loop). As a general rule the smaller the difference between coordinates,\n * the smoother the resulting noise sequence will be. Steps of 0.005-0.03\n * work best for most applications, but this will differ depending on use.\n *\n *\n * @method noise\n * @param {Number} x x-coordinate in noise space\n * @param {Number} [y] y-coordinate in noise space\n * @param {Number} [z] z-coordinate in noise space\n * @return {Number} Perlin noise value (between 0 and 1) at specified\n * coordinates\n * @example\n * \n * \n * let xoff = 0.0;\n *\n * function draw() {\n * background(204);\n * xoff = xoff + 0.01;\n * let n = noise(xoff) * width;\n * line(n, 0, n, height);\n * }\n * \n * \n * \n * let noiseScale=0.02;\n *\n * function draw() {\n * background(0);\n * for (let x=0; x < width; x++) {\n * let noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale);\n * stroke(noiseVal*255);\n * line(x, mouseY+noiseVal*80, x, height);\n * }\n * }\n * \n * \n *\n * @alt\n * vertical line moves left to right with updating noise values.\n * horizontal wave pattern effected by mouse x-position & updating noise values.\n *\n */\n\np5.prototype.noise = function(x, y, z) {\n y = y || 0;\n z = z || 0;\n\n if (perlin == null) {\n perlin = new Array(PERLIN_SIZE + 1);\n for (var i = 0; i < PERLIN_SIZE + 1; i++) {\n perlin[i] = Math.random();\n }\n }\n\n if (x < 0) {\n x = -x;\n }\n if (y < 0) {\n y = -y;\n }\n if (z < 0) {\n z = -z;\n }\n\n var xi = Math.floor(x),\n yi = Math.floor(y),\n zi = Math.floor(z);\n var xf = x - xi;\n var yf = y - yi;\n var zf = z - zi;\n var rxf, ryf;\n\n var r = 0;\n var ampl = 0.5;\n\n var n1, n2, n3;\n\n for (var o = 0; o < perlin_octaves; o++) {\n var of = xi + (yi << PERLIN_YWRAPB) + (zi << PERLIN_ZWRAPB);\n\n rxf = scaled_cosine(xf);\n ryf = scaled_cosine(yf);\n\n n1 = perlin[of & PERLIN_SIZE];\n n1 += rxf * (perlin[(of + 1) & PERLIN_SIZE] - n1);\n n2 = perlin[(of + PERLIN_YWRAP) & PERLIN_SIZE];\n n2 += rxf * (perlin[(of + PERLIN_YWRAP + 1) & PERLIN_SIZE] - n2);\n n1 += ryf * (n2 - n1);\n\n of += PERLIN_ZWRAP;\n n2 = perlin[of & PERLIN_SIZE];\n n2 += rxf * (perlin[(of + 1) & PERLIN_SIZE] - n2);\n n3 = perlin[(of + PERLIN_YWRAP) & PERLIN_SIZE];\n n3 += rxf * (perlin[(of + PERLIN_YWRAP + 1) & PERLIN_SIZE] - n3);\n n2 += ryf * (n3 - n2);\n\n n1 += scaled_cosine(zf) * (n2 - n1);\n\n r += n1 * ampl;\n ampl *= perlin_amp_falloff;\n xi <<= 1;\n xf *= 2;\n yi <<= 1;\n yf *= 2;\n zi <<= 1;\n zf *= 2;\n\n if (xf >= 1.0) {\n xi++;\n xf--;\n }\n if (yf >= 1.0) {\n yi++;\n yf--;\n }\n if (zf >= 1.0) {\n zi++;\n zf--;\n }\n }\n return r;\n};\n\n/**\n *\n * Adjusts the character and level of detail produced by the Perlin noise\n * function. Similar to harmonics in physics, noise is computed over\n * several octaves. Lower octaves contribute more to the output signal and\n * as such define the overall intensity of the noise, whereas higher octaves\n * create finer grained details in the noise sequence.\n * \n * By default, noise is computed over 4 octaves with each octave contributing\n * exactly half than its predecessor, starting at 50% strength for the 1st\n * octave. This falloff amount can be changed by adding an additional function\n * parameter. Eg. a falloff factor of 0.75 means each octave will now have\n * 75% impact (25% less) of the previous lower octave. Any value between\n * 0.0 and 1.0 is valid, however note that values greater than 0.5 might\n * result in greater than 1.0 values returned by noise().\n * \n * By changing these parameters, the signal created by the noise()\n * function can be adapted to fit very specific needs and characteristics.\n *\n * @method noiseDetail\n * @param {Number} lod number of octaves to be used by the noise\n * @param {Number} falloff falloff factor for each octave\n * @example\n * \n * \n * let noiseVal;\n * let noiseScale = 0.02;\n *\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * background(0);\n * for (let y = 0; y < height; y++) {\n * for (let x = 0; x < width / 2; x++) {\n * noiseDetail(2, 0.2);\n * noiseVal = noise((mouseX + x) * noiseScale, (mouseY + y) * noiseScale);\n * stroke(noiseVal * 255);\n * point(x, y);\n * noiseDetail(8, 0.65);\n * noiseVal = noise(\n * (mouseX + x + width / 2) * noiseScale,\n * (mouseY + y) * noiseScale\n * );\n * stroke(noiseVal * 255);\n * point(x + width / 2, y);\n * }\n * }\n * }\n * \n * \n *\n * @alt\n * 2 vertical grey smokey patterns affected my mouse x-position and noise.\n *\n */\np5.prototype.noiseDetail = function(lod, falloff) {\n if (lod > 0) {\n perlin_octaves = lod;\n }\n if (falloff > 0) {\n perlin_amp_falloff = falloff;\n }\n};\n\n/**\n * Sets the seed value for noise(). By default, noise()\n * produces different results each time the program is run. Set the\n * value parameter to a constant to return the same pseudo-random\n * numbers each time the software is run.\n *\n * @method noiseSeed\n * @param {Number} seed the seed value\n * @example\n * \n * let xoff = 0.0;\n *\n * function setup() {\n * noiseSeed(99);\n * stroke(0, 10);\n * }\n *\n * function draw() {\n * xoff = xoff + .01;\n * let n = noise(xoff) * width;\n * line(n, 0, n, height);\n * }\n * \n * \n *\n * @alt\n * vertical grey lines drawing in pattern affected by noise.\n *\n */\np5.prototype.noiseSeed = function(seed) {\n // Linear Congruential Generator\n // Variant of a Lehman Generator\n var lcg = (function() {\n // Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes\n // m is basically chosen to be large (as it is the max period)\n // and for its relationships to a and c\n var m = 4294967296;\n // a - 1 should be divisible by m's prime factors\n var a = 1664525;\n // c and m should be co-prime\n var c = 1013904223;\n var seed, z;\n return {\n setSeed: function(val) {\n // pick a random seed if val is undefined or null\n // the >>> 0 casts the seed to an unsigned 32-bit integer\n z = seed = (val == null ? Math.random() * m : val) >>> 0;\n },\n getSeed: function() {\n return seed;\n },\n rand: function() {\n // define the recurrence relationship\n z = (a * z + c) % m;\n // return a float in [0, 1)\n // if z = m then z / m = 0 therefore (z % m) / m < 1 always\n return z / m;\n }\n };\n })();\n\n lcg.setSeed(seed);\n perlin = new Array(PERLIN_SIZE + 1);\n for (var i = 0; i < PERLIN_SIZE + 1; i++) {\n perlin[i] = lcg.rand();\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],54:[function(_dereq_,module,exports){\n/**\n * @module Math\n * @submodule Math\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * A class to describe a two or three dimensional vector, specifically\n * a Euclidean (also known as geometric) vector. A vector is an entity\n * that has both magnitude and direction. The datatype, however, stores\n * the components of the vector (x, y for 2D, and x, y, z for 3D). The magnitude\n * and direction can be accessed via the methods mag() and heading().\n * \n * In many of the p5.js examples, you will see p5.Vector used to describe a\n * position, velocity, or acceleration. For example, if you consider a rectangle\n * moving across the screen, at any given instant it has a position (a vector\n * that points from the origin to its location), a velocity (the rate at which\n * the object's position changes per time unit, expressed as a vector), and\n * acceleration (the rate at which the object's velocity changes per time\n * unit, expressed as a vector).\n * \n * Since vectors represent groupings of values, we cannot simply use\n * traditional addition/multiplication/etc. Instead, we'll need to do some\n * \"vector\" math, which is made easy by the methods inside the p5.Vector class.\n *\n * @class p5.Vector\n * @param {Number} [x] x component of the vector\n * @param {Number} [y] y component of the vector\n * @param {Number} [z] z component of the vector\n * @example\n * \n * \n * let v1 = createVector(40, 50);\n * let v2 = createVector(40, 50);\n *\n * ellipse(v1.x, v1.y, 50, 50);\n * ellipse(v2.x, v2.y, 50, 50);\n * v1.add(v2);\n * ellipse(v1.x, v1.y, 50, 50);\n * \n * \n *\n * @alt\n * 2 white ellipses. One center-left the other bottom right and off canvas\n *\n */\np5.Vector = function Vector() {\n var x, y, z;\n // This is how it comes in with createVector()\n if (arguments[0] instanceof p5) {\n // save reference to p5 if passed in\n this.p5 = arguments[0];\n x = arguments[1][0] || 0;\n y = arguments[1][1] || 0;\n z = arguments[1][2] || 0;\n // This is what we'll get with new p5.Vector()\n } else {\n x = arguments[0] || 0;\n y = arguments[1] || 0;\n z = arguments[2] || 0;\n }\n /**\n * The x component of the vector\n * @property x {Number}\n */\n this.x = x;\n /**\n * The y component of the vector\n * @property y {Number}\n */\n this.y = y;\n /**\n * The z component of the vector\n * @property z {Number}\n */\n this.z = z;\n};\n\n/**\n * Returns a string representation of a vector v by calling String(v)\n * or v.toString(). This method is useful for logging vectors in the\n * console.\n * @method toString\n * @return {String}\n * @example\n * \n * \n * function setup() {\n * let v = createVector(20, 30);\n * print(String(v)); // prints \"p5.Vector Object : [20, 30, 0]\"\n * }\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text(v1.toString(), 10, 25, 90, 75);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.toString = function p5VectorToString() {\n return 'p5.Vector Object : [' + this.x + ', ' + this.y + ', ' + this.z + ']';\n};\n\n/**\n * Sets the x, y, and z component of the vector using two or three separate\n * variables, the data from a p5.Vector, or the values from a float array.\n * @method set\n * @param {Number} [x] the x component of the vector\n * @param {Number} [y] the y component of the vector\n * @param {Number} [z] the z component of the vector\n * @chainable\n * @example\n * \n * \n * function setup() {\n * let v = createVector(1, 2, 3);\n * v.set(4, 5, 6); // Sets vector to [4, 5, 6]\n *\n * let v1 = createVector(0, 0, 0);\n * let arr = [1, 2, 3];\n * v1.set(arr); // Sets vector to [1, 2, 3]\n * }\n * \n * \n *\n * \n * \n * let v0, v1;\n * function setup() {\n * createCanvas(100, 100);\n *\n * v0 = createVector(0, 0);\n * v1 = createVector(50, 50);\n * }\n *\n * function draw() {\n * background(240);\n *\n * drawArrow(v0, v1, 'black');\n * v1.set(v1.x + random(-1, 1), v1.y + random(-1, 1));\n *\n * noStroke();\n * text('x: ' + round(v1.x) + ' y: ' + round(v1.y), 20, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\n/**\n * @method set\n * @param {p5.Vector|Number[]} value the vector to set\n * @chainable\n */\np5.Vector.prototype.set = function set(x, y, z) {\n if (x instanceof p5.Vector) {\n this.x = x.x || 0;\n this.y = x.y || 0;\n this.z = x.z || 0;\n return this;\n }\n if (x instanceof Array) {\n this.x = x[0] || 0;\n this.y = x[1] || 0;\n this.z = x[2] || 0;\n return this;\n }\n this.x = x || 0;\n this.y = y || 0;\n this.z = z || 0;\n return this;\n};\n\n/**\n * Gets a copy of the vector, returns a p5.Vector object.\n *\n * @method copy\n * @return {p5.Vector} the copy of the p5.Vector object\n * @example\n * \n * \n * let v1 = createVector(1, 2, 3);\n * let v2 = v1.copy();\n * print(v1.x === v2.x && v1.y === v2.y && v1.z === v2.z);\n * // Prints \"true\"\n * \n * \n */\np5.Vector.prototype.copy = function copy() {\n if (this.p5) {\n return new p5.Vector(this.p5, [this.x, this.y, this.z]);\n } else {\n return new p5.Vector(this.x, this.y, this.z);\n }\n};\n\n/**\n * Adds x, y, and z components to a vector, adds one vector to another, or\n * adds two independent vectors together. The version of the method that adds\n * two vectors together is a static method and returns a p5.Vector, the others\n * acts directly on the vector. See the examples for more context.\n *\n * @method add\n * @param {Number} x the x component of the vector to be added\n * @param {Number} [y] the y component of the vector to be added\n * @param {Number} [z] the z component of the vector to be added\n * @chainable\n * @example\n * \n * \n * let v = createVector(1, 2, 3);\n * v.add(4, 5, 6);\n * // v's components are set to [5, 7, 9]\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(2, 3, 4);\n *\n * let v3 = p5.Vector.add(v1, v2);\n * // v3 has components [3, 5, 7]\n * print(v3);\n * \n * \n *\n * \n * \n * // red vector + blue vector = purple vector\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(-30, 20);\n * drawArrow(v1, v2, 'blue');\n *\n * let v3 = p5.Vector.add(v1, v2);\n * drawArrow(v0, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\n/**\n * @method add\n * @param {p5.Vector|Number[]} value the vector to add\n * @chainable\n */\np5.Vector.prototype.add = function add(x, y, z) {\n if (x instanceof p5.Vector) {\n this.x += x.x || 0;\n this.y += x.y || 0;\n this.z += x.z || 0;\n return this;\n }\n if (x instanceof Array) {\n this.x += x[0] || 0;\n this.y += x[1] || 0;\n this.z += x[2] || 0;\n return this;\n }\n this.x += x || 0;\n this.y += y || 0;\n this.z += z || 0;\n return this;\n};\n\n/**\n * Subtracts x, y, and z components from a vector, subtracts one vector from\n * another, or subtracts two independent vectors. The version of the method\n * that subtracts two vectors is a static method and returns a p5.Vector, the\n * other acts directly on the vector. See the examples for more context.\n *\n * @method sub\n * @param {Number} x the x component of the vector to subtract\n * @param {Number} [y] the y component of the vector to subtract\n * @param {Number} [z] the z component of the vector to subtract\n * @chainable\n * @example\n * \n * \n * let v = createVector(4, 5, 6);\n * v.sub(1, 1, 1);\n * // v's components are set to [3, 4, 5]\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(2, 3, 4);\n * let v2 = createVector(1, 2, 3);\n *\n * let v3 = p5.Vector.sub(v1, v2);\n * // v3 has components [1, 1, 1]\n * print(v3);\n * \n * \n *\n * \n * \n * // red vector - blue vector = purple vector\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(70, 50);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX, mouseY);\n * drawArrow(v0, v2, 'blue');\n *\n * let v3 = p5.Vector.sub(v1, v2);\n * drawArrow(v2, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\n/**\n * @method sub\n * @param {p5.Vector|Number[]} value the vector to subtract\n * @chainable\n */\np5.Vector.prototype.sub = function sub(x, y, z) {\n if (x instanceof p5.Vector) {\n this.x -= x.x || 0;\n this.y -= x.y || 0;\n this.z -= x.z || 0;\n return this;\n }\n if (x instanceof Array) {\n this.x -= x[0] || 0;\n this.y -= x[1] || 0;\n this.z -= x[2] || 0;\n return this;\n }\n this.x -= x || 0;\n this.y -= y || 0;\n this.z -= z || 0;\n return this;\n};\n\n/**\n * Multiply the vector by a scalar. The static version of this method\n * creates a new p5.Vector while the non static version acts on the vector\n * directly. See the examples for more context.\n *\n * @method mult\n * @param {Number} n the number to multiply with the vector\n * @chainable\n * @example\n * \n * \n * let v = createVector(1, 2, 3);\n * v.mult(2);\n * // v's components are set to [2, 4, 6]\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = p5.Vector.mult(v1, 2);\n * // v2 has components [2, 4, 6]\n * print(v2);\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(25, -25);\n * drawArrow(v0, v1, 'red');\n *\n * let num = map(mouseX, 0, width, -2, 2, true);\n * let v2 = p5.Vector.mult(v1, num);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('multiplied by ' + num.toFixed(2), 5, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.mult = function mult(n) {\n if (!(typeof n === 'number' && isFinite(n))) {\n console.warn(\n 'p5.Vector.prototype.mult:',\n 'n is undefined or not a finite number'\n );\n return this;\n }\n this.x *= n;\n this.y *= n;\n this.z *= n;\n return this;\n};\n\n/**\n * Divide the vector by a scalar. The static version of this method creates a\n * new p5.Vector while the non static version acts on the vector directly.\n * See the examples for more context.\n *\n * @method div\n * @param {number} n the number to divide the vector by\n * @chainable\n * @example\n * \n * \n * let v = createVector(6, 4, 2);\n * v.div(2); //v's components are set to [3, 2, 1]\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(6, 4, 2);\n * let v2 = p5.Vector.div(v1, 2);\n * // v2 has components [3, 2, 1]\n * print(v2);\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 100);\n * let v1 = createVector(50, -50);\n * drawArrow(v0, v1, 'red');\n *\n * let num = map(mouseX, 0, width, 10, 0.5, true);\n * let v2 = p5.Vector.div(v1, num);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('divided by ' + num.toFixed(2), 10, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.div = function div(n) {\n if (!(typeof n === 'number' && isFinite(n))) {\n console.warn(\n 'p5.Vector.prototype.div:',\n 'n is undefined or not a finite number'\n );\n return this;\n }\n if (n === 0) {\n console.warn('p5.Vector.prototype.div:', 'divide by 0');\n return this;\n }\n this.x /= n;\n this.y /= n;\n this.z /= n;\n return this;\n};\n\n/**\n * Calculates the magnitude (length) of the vector and returns the result as\n * a float (this is simply the equation sqrt(x*x + y*y + z*z).)\n *\n * @method mag\n * @return {Number} magnitude of the vector\n * @example\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text('vector length: ' + v1.mag().toFixed(2), 10, 70, 90, 30);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n * \n * \n * let v = createVector(20.0, 30.0, 40.0);\n * let m = v.mag();\n * print(m); // Prints \"53.85164807134504\"\n * \n * \n */\np5.Vector.prototype.mag = function mag() {\n return Math.sqrt(this.magSq());\n};\n\n/**\n * Calculates the squared magnitude of the vector and returns the result\n * as a float (this is simply the equation (x*x + y*y + z*z).)\n * Faster if the real length is not required in the\n * case of comparing vectors, etc.\n *\n * @method magSq\n * @return {number} squared magnitude of the vector\n * @example\n * \n * \n * // Static method\n * let v1 = createVector(6, 4, 2);\n * print(v1.magSq()); // Prints \"56\"\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text('vector length squared: ' + v1.magSq().toFixed(2), 10, 45, 90, 55);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.magSq = function magSq() {\n var x = this.x;\n var y = this.y;\n var z = this.z;\n return x * x + y * y + z * z;\n};\n\n/**\n * Calculates the dot product of two vectors. The version of the method\n * that computes the dot product of two independent vectors is a static\n * method. See the examples for more context.\n *\n *\n * @method dot\n * @param {Number} x x component of the vector\n * @param {Number} [y] y component of the vector\n * @param {Number} [z] z component of the vector\n * @return {Number} the dot product\n *\n * @example\n * \n * \n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(2, 3, 4);\n *\n * print(v1.dot(v2)); // Prints \"20\"\n * \n * \n *\n * \n * \n * //Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(3, 2, 1);\n * print(p5.Vector.dot(v1, v2)); // Prints \"10\"\n * \n * \n */\n/**\n * @method dot\n * @param {p5.Vector} value value component of the vector or a p5.Vector\n * @return {Number}\n */\np5.Vector.prototype.dot = function dot(x, y, z) {\n if (x instanceof p5.Vector) {\n return this.dot(x.x, x.y, x.z);\n }\n return this.x * (x || 0) + this.y * (y || 0) + this.z * (z || 0);\n};\n\n/**\n * Calculates and returns a vector composed of the cross product between\n * two vectors. Both the static and non static methods return a new p5.Vector.\n * See the examples for more context.\n *\n * @method cross\n * @param {p5.Vector} v p5.Vector to be crossed\n * @return {p5.Vector} p5.Vector composed of cross product\n * @example\n * \n * \n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(1, 2, 3);\n *\n * v1.cross(v2); // v's components are [0, 0, 0]\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let crossProduct = p5.Vector.cross(v1, v2);\n * // crossProduct has components [0, 0, 1]\n * print(crossProduct);\n * \n * \n */\np5.Vector.prototype.cross = function cross(v) {\n var x = this.y * v.z - this.z * v.y;\n var y = this.z * v.x - this.x * v.z;\n var z = this.x * v.y - this.y * v.x;\n if (this.p5) {\n return new p5.Vector(this.p5, [x, y, z]);\n } else {\n return new p5.Vector(x, y, z);\n }\n};\n\n/**\n * Calculates the Euclidean distance between two points (considering a\n * point as a vector object).\n *\n * @method dist\n * @param {p5.Vector} v the x, y, and z coordinates of a p5.Vector\n * @return {Number} the distance\n * @example\n * \n * \n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let distance = v1.dist(v2); // distance is 1.4142...\n * print(distance);\n * \n * \n *\n * \n * \n * // Static method\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let distance = p5.Vector.dist(v1, v2);\n * // distance is 1.4142...\n * print(distance);\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n *\n * let v1 = createVector(70, 50);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX, mouseY);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('distance between vectors: ' + v2.dist(v1).toFixed(2), 5, 50, 95, 50);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.dist = function dist(v) {\n return v\n .copy()\n .sub(this)\n .mag();\n};\n\n/**\n * Normalize the vector to length 1 (make it a unit vector).\n *\n * @method normalize\n * @return {p5.Vector} normalized p5.Vector\n * @example\n * \n * \n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.normalize();\n * // v's components are set to\n * // [0.4454354, 0.8908708, 0.089087084]\n * \n * \n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'red');\n * v1.normalize();\n * drawArrow(v0, v1.mult(35), 'blue');\n *\n * noFill();\n * ellipse(50, 50, 35 * 2);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.normalize = function normalize() {\n var len = this.mag();\n // here we multiply by the reciprocal instead of calling 'div()'\n // since div duplicates this zero check.\n if (len !== 0) this.mult(1 / len);\n return this;\n};\n\n/**\n * Limit the magnitude of this vector to the value used for the max\n * parameter.\n *\n * @method limit\n * @param {Number} max the maximum magnitude for the vector\n * @chainable\n * @example\n * \n * \n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.limit(5);\n * // v's components are set to\n * // [2.2271771, 4.4543543, 0.4454354]\n * \n * \n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'red');\n * drawArrow(v0, v1.limit(35), 'blue');\n *\n * noFill();\n * ellipse(50, 50, 35 * 2);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.limit = function limit(max) {\n var mSq = this.magSq();\n if (mSq > max * max) {\n this.div(Math.sqrt(mSq)) //normalize it\n .mult(max);\n }\n return this;\n};\n\n/**\n * Set the magnitude of this vector to the value used for the len\n * parameter.\n *\n * @method setMag\n * @param {number} len the new length for this vector\n * @chainable\n * @example\n * \n * \n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.setMag(10);\n * // v's components are set to [6.0, 8.0, 0.0]\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(50, 50);\n *\n * drawArrow(v0, v1, 'red');\n *\n * let length = map(mouseX, 0, width, 0, 141, true);\n * v1.setMag(length);\n * drawArrow(v0, v1, 'blue');\n *\n * noStroke();\n * text('magnitude set to: ' + length.toFixed(2), 10, 70, 90, 30);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.setMag = function setMag(n) {\n return this.normalize().mult(n);\n};\n\n/**\n * Calculate the angle of rotation for this vector (only 2D vectors)\n *\n * @method heading\n * @return {Number} the angle of rotation\n * @example\n * \n * \n * function setup() {\n * let v1 = createVector(30, 50);\n * print(v1.heading()); // 1.0303768265243125\n *\n * v1 = createVector(40, 50);\n * print(v1.heading()); // 0.8960553845713439\n *\n * v1 = createVector(30, 70);\n * print(v1.heading()); // 1.1659045405098132\n * }\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'black');\n *\n * let myHeading = v1.heading();\n * noStroke();\n * text(\n * 'vector heading: ' +\n * myHeading.toFixed(2) +\n * ' radians or ' +\n * degrees(myHeading).toFixed(2) +\n * ' degrees',\n * 10,\n * 50,\n * 90,\n * 50\n * );\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.heading = function heading() {\n var h = Math.atan2(this.y, this.x);\n if (this.p5) return this.p5._fromRadians(h);\n return h;\n};\n\n/**\n * Rotate the vector by an angle (only 2D vectors), magnitude remains the\n * same\n *\n * @method rotate\n * @param {number} angle the angle of rotation\n * @chainable\n * @example\n * \n * \n * let v = createVector(10.0, 20.0);\n * // v has components [10.0, 20.0, 0.0]\n * v.rotate(HALF_PI);\n * // v's components are set to [-20.0, 9.999999, 0.0]\n * \n * \n *\n * \n * \n * let angle = 0;\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(50, 0);\n *\n * drawArrow(v0, v1.rotate(angle), 'black');\n * angle += 0.01;\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.rotate = function rotate(a) {\n var newHeading = this.heading() + a;\n if (this.p5) newHeading = this.p5._toRadians(newHeading);\n var mag = this.mag();\n this.x = Math.cos(newHeading) * mag;\n this.y = Math.sin(newHeading) * mag;\n return this;\n};\n\n/**\n * Calculates and returns the angle (in radians) between two vectors.\n * @method angleBetween\n * @param {p5.Vector} the x, y, and z components of a p5.Vector\n * @return {Number} the angle between (in radians)\n * @example\n * \n * \n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let angle = v1.angleBetween(v2);\n * // angle is PI/2\n * print(angle);\n * \n * \n *\n * \n * \n * function draw() {\n * background(240);\n * let v0 = createVector(50, 50);\n *\n * let v1 = createVector(50, 0);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX - 50, mouseY - 50);\n * drawArrow(v0, v2, 'blue');\n *\n * let angleBetween = v1.angleBetween(v2);\n * noStroke();\n * text(\n * 'angle between: ' +\n * angleBetween.toFixed(2) +\n * ' radians or ' +\n * degrees(angleBetween).toFixed(2) +\n * ' degrees',\n * 10,\n * 50,\n * 90,\n * 50\n * );\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.prototype.angleBetween = function angleBetween(v) {\n var dotmagmag = this.dot(v) / (this.mag() * v.mag());\n // Mathematically speaking: the dotmagmag variable will be between -1 and 1\n // inclusive. Practically though it could be slightly outside this range due\n // to floating-point rounding issues. This can make Math.acos return NaN.\n //\n // Solution: we'll clamp the value to the -1,1 range\n var angle = Math.acos(Math.min(1, Math.max(-1, dotmagmag)));\n if (this.p5) return this.p5._fromRadians(angle);\n return angle;\n};\n\n/**\n * Linear interpolate the vector to another vector\n *\n * @method lerp\n * @param {Number} x the x component\n * @param {Number} y the y component\n * @param {Number} z the z component\n * @param {Number} amt the amount of interpolation; some value between 0.0\n * (old vector) and 1.0 (new vector). 0.9 is very near\n * the new vector. 0.5 is halfway in between.\n * @chainable\n *\n * @example\n * \n * \n * let v = createVector(1, 1, 0);\n *\n * v.lerp(3, 3, 0, 0.5); // v now has components [2,2,0]\n * \n * \n *\n * \n * \n * let v1 = createVector(0, 0, 0);\n * let v2 = createVector(100, 100, 0);\n *\n * let v3 = p5.Vector.lerp(v1, v2, 0.5);\n * // v3 has components [50,50,0]\n * print(v3);\n * \n * \n *\n * \n * \n * let step = 0.01;\n * let amount = 0;\n *\n * function draw() {\n * background(240);\n * let v0 = createVector(0, 0);\n *\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(90, 90);\n * drawArrow(v0, v2, 'blue');\n *\n * if (amount > 1 || amount < 0) {\n * step *= -1;\n * }\n * amount += step;\n * let v3 = p5.Vector.lerp(v1, v2, amount);\n *\n * drawArrow(v0, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\n/**\n * @method lerp\n * @param {p5.Vector} v the p5.Vector to lerp to\n * @param {Number} amt\n * @chainable\n */\np5.Vector.prototype.lerp = function lerp(x, y, z, amt) {\n if (x instanceof p5.Vector) {\n return this.lerp(x.x, x.y, x.z, y);\n }\n this.x += (x - this.x) * amt || 0;\n this.y += (y - this.y) * amt || 0;\n this.z += (z - this.z) * amt || 0;\n return this;\n};\n\n/**\n * Return a representation of this vector as a float array. This is only\n * for temporary use. If used in any other fashion, the contents should be\n * copied by using the p5.Vector.copy() method to copy into your own\n * array.\n *\n * @method array\n * @return {Number[]} an Array with the 3 values\n * @example\n * \n * \n * function setup() {\n * let v = createVector(20, 30);\n * print(v.array()); // Prints : Array [20, 30, 0]\n * }\n * \n * \n *\n * \n * \n * let v = createVector(10.0, 20.0, 30.0);\n * let f = v.array();\n * print(f[0]); // Prints \"10.0\"\n * print(f[1]); // Prints \"20.0\"\n * print(f[2]); // Prints \"30.0\"\n * \n * \n */\np5.Vector.prototype.array = function array() {\n return [this.x || 0, this.y || 0, this.z || 0];\n};\n\n/**\n * Equality check against a p5.Vector\n *\n * @method equals\n * @param {Number} [x] the x component of the vector\n * @param {Number} [y] the y component of the vector\n * @param {Number} [z] the z component of the vector\n * @return {Boolean} whether the vectors are equals\n * @example\n * \n * \n * let v1 = createVector(5, 10, 20);\n * let v2 = createVector(5, 10, 20);\n * let v3 = createVector(13, 10, 19);\n *\n * print(v1.equals(v2.x, v2.y, v2.z)); // true\n * print(v1.equals(v3.x, v3.y, v3.z)); // false\n * \n * \n *\n * \n * \n * let v1 = createVector(10.0, 20.0, 30.0);\n * let v2 = createVector(10.0, 20.0, 30.0);\n * let v3 = createVector(0.0, 0.0, 0.0);\n * print(v1.equals(v2)); // true\n * print(v1.equals(v3)); // false\n * \n * \n */\n/**\n * @method equals\n * @param {p5.Vector|Array} value the vector to compare\n * @return {Boolean}\n */\np5.Vector.prototype.equals = function equals(x, y, z) {\n var a, b, c;\n if (x instanceof p5.Vector) {\n a = x.x || 0;\n b = x.y || 0;\n c = x.z || 0;\n } else if (x instanceof Array) {\n a = x[0] || 0;\n b = x[1] || 0;\n c = x[2] || 0;\n } else {\n a = x || 0;\n b = y || 0;\n c = z || 0;\n }\n return this.x === a && this.y === b && this.z === c;\n};\n\n// Static Methods\n\n/**\n * Make a new 2D vector from an angle\n *\n * @method fromAngle\n * @static\n * @param {Number} angle the desired angle, in radians\n * @param {Number} [length] the length of the new vector (defaults to 1)\n * @return {p5.Vector} the new p5.Vector object\n * @example\n * \n * \n * function draw() {\n * background(200);\n *\n * // Create a variable, proportional to the mouseX,\n * // varying from 0-360, to represent an angle in degrees.\n * angleMode(DEGREES);\n * let myDegrees = map(mouseX, 0, width, 0, 360);\n *\n * // Display that variable in an onscreen text.\n * // (Note the nfc() function to truncate additional decimal places,\n * // and the \"\\xB0\" character for the degree symbol.)\n * let readout = 'angle = ' + nfc(myDegrees, 1) + '\\xB0';\n * noStroke();\n * fill(0);\n * text(readout, 5, 15);\n *\n * // Create a p5.Vector using the fromAngle function,\n * // and extract its x and y components.\n * let v = p5.Vector.fromAngle(radians(myDegrees), 30);\n * let vx = v.x;\n * let vy = v.y;\n *\n * push();\n * translate(width / 2, height / 2);\n * noFill();\n * stroke(150);\n * line(0, 0, 30, 0);\n * stroke(0);\n * line(0, 0, vx, vy);\n * pop();\n * }\n * \n * \n */\np5.Vector.fromAngle = function fromAngle(angle, length) {\n if (typeof length === 'undefined') {\n length = 1;\n }\n return new p5.Vector(length * Math.cos(angle), length * Math.sin(angle), 0);\n};\n\n/**\n * Make a new 3D vector from a pair of ISO spherical angles\n *\n * @method fromAngles\n * @static\n * @param {Number} theta the polar angle, in radians (zero is up)\n * @param {Number} phi the azimuthal angle, in radians\n * (zero is out of the screen)\n * @param {Number} [length] the length of the new vector (defaults to 1)\n * @return {p5.Vector} the new p5.Vector object\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * fill(255);\n * noStroke();\n * }\n * function draw() {\n * background(255);\n *\n * let t = millis() / 1000;\n *\n * // add three point lights\n * pointLight(color('#f00'), p5.Vector.fromAngles(t * 1.0, t * 1.3, 100));\n * pointLight(color('#0f0'), p5.Vector.fromAngles(t * 1.1, t * 1.2, 100));\n * pointLight(color('#00f'), p5.Vector.fromAngles(t * 1.2, t * 1.1, 100));\n *\n * sphere(35);\n * }\n * \n * \n */\np5.Vector.fromAngles = function(theta, phi, length) {\n if (typeof length === 'undefined') {\n length = 1;\n }\n var cosPhi = Math.cos(phi);\n var sinPhi = Math.sin(phi);\n var cosTheta = Math.cos(theta);\n var sinTheta = Math.sin(theta);\n\n return new p5.Vector(\n length * sinTheta * sinPhi,\n -length * cosTheta,\n length * sinTheta * cosPhi\n );\n};\n\n/**\n * Make a new 2D unit vector from a random angle\n *\n * @method random2D\n * @static\n * @return {p5.Vector} the new p5.Vector object\n * @example\n * \n * \n * let v = p5.Vector.random2D();\n * // May make v's attributes something like:\n * // [0.61554617, -0.51195765, 0.0] or\n * // [-0.4695841, -0.14366731, 0.0] or\n * // [0.6091097, -0.22805278, 0.0]\n * print(v);\n * \n * \n *\n * \n * \n * function setup() {\n * frameRate(1);\n * }\n *\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = p5.Vector.random2D();\n * drawArrow(v0, v1.mult(50), 'black');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n * \n * \n */\np5.Vector.random2D = function random2D() {\n return this.fromAngle(Math.random() * constants.TWO_PI);\n};\n\n/**\n * Make a new random 3D unit vector.\n *\n * @method random3D\n * @static\n * @return {p5.Vector} the new p5.Vector object\n * @example\n * \n * \n * let v = p5.Vector.random3D();\n * // May make v's attributes something like:\n * // [0.61554617, -0.51195765, 0.599168] or\n * // [-0.4695841, -0.14366731, -0.8711202] or\n * // [0.6091097, -0.22805278, -0.7595902]\n * print(v);\n * \n * \n */\np5.Vector.random3D = function random3D() {\n var angle = Math.random() * constants.TWO_PI;\n var vz = Math.random() * 2 - 1;\n var vzBase = Math.sqrt(1 - vz * vz);\n var vx = vzBase * Math.cos(angle);\n var vy = vzBase * Math.sin(angle);\n return new p5.Vector(vx, vy, vz);\n};\n\n// Adds two vectors together and returns a new one.\n/**\n * @method add\n * @static\n * @param {p5.Vector} v1 a p5.Vector to add\n * @param {p5.Vector} v2 a p5.Vector to add\n * @param {p5.Vector} target the vector to receive the result\n */\n/**\n * @method add\n * @static\n * @param {p5.Vector} v1\n * @param {p5.Vector} v2\n * @return {p5.Vector} the resulting p5.Vector\n *\n */\n\np5.Vector.add = function add(v1, v2, target) {\n if (!target) {\n target = v1.copy();\n } else {\n target.set(v1);\n }\n target.add(v2);\n return target;\n};\n\n/*\n * Subtracts one p5.Vector from another and returns a new one. The second\n * vector (v2) is subtracted from the first (v1), resulting in v1-v2.\n */\n/**\n * @method sub\n * @static\n * @param {p5.Vector} v1 a p5.Vector to subtract from\n * @param {p5.Vector} v2 a p5.Vector to subtract\n * @param {p5.Vector} target if undefined a new vector will be created\n */\n/**\n * @method sub\n * @static\n * @param {p5.Vector} v1\n * @param {p5.Vector} v2\n * @return {p5.Vector} the resulting p5.Vector\n */\n\np5.Vector.sub = function sub(v1, v2, target) {\n if (!target) {\n target = v1.copy();\n } else {\n target.set(v1);\n }\n target.sub(v2);\n return target;\n};\n\n/**\n * Multiplies a vector by a scalar and returns a new vector.\n */\n/**\n * @method mult\n * @static\n * @param {p5.Vector} v the vector to multiply\n * @param {Number} n\n * @param {p5.Vector} target if undefined a new vector will be created\n */\n/**\n * @method mult\n * @static\n * @param {p5.Vector} v\n * @param {Number} n\n * @return {p5.Vector} the resulting new p5.Vector\n */\np5.Vector.mult = function mult(v, n, target) {\n if (!target) {\n target = v.copy();\n } else {\n target.set(v);\n }\n target.mult(n);\n return target;\n};\n\n/**\n * Divides a vector by a scalar and returns a new vector.\n */\n/**\n * @method div\n * @static\n * @param {p5.Vector} v the vector to divide\n * @param {Number} n\n * @param {p5.Vector} target if undefined a new vector will be created\n */\n/**\n * @method div\n * @static\n * @param {p5.Vector} v\n * @param {Number} n\n * @return {p5.Vector} the resulting new p5.Vector\n */\np5.Vector.div = function div(v, n, target) {\n if (!target) {\n target = v.copy();\n } else {\n target.set(v);\n }\n target.div(n);\n return target;\n};\n\n/**\n * Calculates the dot product of two vectors.\n */\n/**\n * @method dot\n * @static\n * @param {p5.Vector} v1 the first p5.Vector\n * @param {p5.Vector} v2 the second p5.Vector\n * @return {Number} the dot product\n */\np5.Vector.dot = function dot(v1, v2) {\n return v1.dot(v2);\n};\n\n/**\n * Calculates the cross product of two vectors.\n */\n/**\n * @method cross\n * @static\n * @param {p5.Vector} v1 the first p5.Vector\n * @param {p5.Vector} v2 the second p5.Vector\n * @return {Number} the cross product\n */\np5.Vector.cross = function cross(v1, v2) {\n return v1.cross(v2);\n};\n\n/**\n * Calculates the Euclidean distance between two points (considering a\n * point as a vector object).\n */\n/**\n * @method dist\n * @static\n * @param {p5.Vector} v1 the first p5.Vector\n * @param {p5.Vector} v2 the second p5.Vector\n * @return {Number} the distance\n */\np5.Vector.dist = function dist(v1, v2) {\n return v1.dist(v2);\n};\n\n/**\n * Linear interpolate a vector to another vector and return the result as a\n * new vector.\n */\n/**\n * @method lerp\n * @static\n * @param {p5.Vector} v1\n * @param {p5.Vector} v2\n * @param {Number} amt\n * @param {p5.Vector} target if undefined a new vector will be created\n */\n/**\n * @method lerp\n * @static\n * @param {p5.Vector} v1\n * @param {p5.Vector} v2\n * @param {Number} amt\n * @return {Number} the lerped value\n */\np5.Vector.lerp = function lerp(v1, v2, amt, target) {\n if (!target) {\n target = v1.copy();\n } else {\n target.set(v1);\n }\n target.lerp(v2, amt);\n return target;\n};\n\n/**\n * @method mag\n * @param {p5.Vector} vecT the vector to return the magnitude of\n * @return {Number} the magnitude of vecT\n * @static\n */\np5.Vector.mag = function mag(vecT) {\n var x = vecT.x,\n y = vecT.y,\n z = vecT.z;\n var magSq = x * x + y * y + z * z;\n return Math.sqrt(magSq);\n};\n\nmodule.exports = p5.Vector;\n\n},{\"../core/constants\":18,\"../core/main\":24}],55:[function(_dereq_,module,exports){\n/**\n * @module Math\n * @submodule Random\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\nvar seeded = false;\nvar previous = false;\nvar y2 = 0;\n\n// Linear Congruential Generator\n// Variant of a Lehman Generator\nvar lcg = (function() {\n // Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes\n // m is basically chosen to be large (as it is the max period)\n // and for its relationships to a and c\n var m = 4294967296,\n // a - 1 should be divisible by m's prime factors\n a = 1664525,\n // c and m should be co-prime\n c = 1013904223,\n seed,\n z;\n return {\n setSeed: function(val) {\n // pick a random seed if val is undefined or null\n // the >>> 0 casts the seed to an unsigned 32-bit integer\n z = seed = (val == null ? Math.random() * m : val) >>> 0;\n },\n getSeed: function() {\n return seed;\n },\n rand: function() {\n // define the recurrence relationship\n z = (a * z + c) % m;\n // return a float in [0, 1)\n // if z = m then z / m = 0 therefore (z % m) / m < 1 always\n return z / m;\n }\n };\n})();\n\n/**\n * Sets the seed value for random().\n *\n * By default, random() produces different results each time the program\n * is run. Set the seed parameter to a constant to return the same\n * pseudo-random numbers each time the software is run.\n *\n * @method randomSeed\n * @param {Number} seed the seed value\n * @example\n * \n * \n * randomSeed(99);\n * for (let i = 0; i < 100; i++) {\n * let r = random(0, 255);\n * stroke(r);\n * line(i, 0, i, 100);\n * }\n * \n * \n *\n * @alt\n * many vertical lines drawn in white, black or grey.\n *\n */\np5.prototype.randomSeed = function(seed) {\n lcg.setSeed(seed);\n seeded = true;\n previous = false;\n};\n\n/**\n * Return a random floating-point number.\n *\n * Takes either 0, 1 or 2 arguments.\n *\n * If no argument is given, returns a random number from 0\n * up to (but not including) 1.\n *\n * If one argument is given and it is a number, returns a random number from 0\n * up to (but not including) the number.\n *\n * If one argument is given and it is an array, returns a random element from\n * that array.\n *\n * If two arguments are given, returns a random number from the\n * first argument up to (but not including) the second argument.\n *\n * @method random\n * @param {Number} [min] the lower bound (inclusive)\n * @param {Number} [max] the upper bound (exclusive)\n * @return {Number} the random number\n * @example\n * \n * \n * for (let i = 0; i < 100; i++) {\n * let r = random(50);\n * stroke(r * 5);\n * line(50, i, 50 + r, i);\n * }\n * \n * \n * \n * \n * for (let i = 0; i < 100; i++) {\n * let r = random(-50, 50);\n * line(50, i, 50 + r, i);\n * }\n * \n * \n * \n * \n * // Get a random element from an array using the random(Array) syntax\n * let words = ['apple', 'bear', 'cat', 'dog'];\n * let word = random(words); // select random word\n * text(word, 10, 50); // draw the word\n * \n * \n *\n * @alt\n * 100 horizontal lines from center canvas to right. size+fill change each time\n * 100 horizontal lines from center of canvas. height & side change each render\n * word displayed at random. Either apple, bear, cat, or dog\n *\n */\n/**\n * @method random\n * @param {Array} choices the array to choose from\n * @return {*} the random element from the array\n * @example\n */\np5.prototype.random = function(min, max) {\n var rand;\n\n if (seeded) {\n rand = lcg.rand();\n } else {\n rand = Math.random();\n }\n if (typeof min === 'undefined') {\n return rand;\n } else if (typeof max === 'undefined') {\n if (min instanceof Array) {\n return min[Math.floor(rand * min.length)];\n } else {\n return rand * min;\n }\n } else {\n if (min > max) {\n var tmp = min;\n min = max;\n max = tmp;\n }\n\n return rand * (max - min) + min;\n }\n};\n\n/**\n *\n * Returns a random number fitting a Gaussian, or\n * normal, distribution. There is theoretically no minimum or maximum\n * value that randomGaussian() might return. Rather, there is\n * just a very low probability that values far from the mean will be\n * returned; and a higher probability that numbers near the mean will\n * be returned.\n * \n * Takes either 0, 1 or 2 arguments.\n * If no args, returns a mean of 0 and standard deviation of 1.\n * If one arg, that arg is the mean (standard deviation is 1).\n * If two args, first is mean, second is standard deviation.\n *\n * @method randomGaussian\n * @param {Number} mean the mean\n * @param {Number} sd the standard deviation\n * @return {Number} the random number\n * @example\n * \n * \n * for (let y = 0; y < 100; y++) {\n * let x = randomGaussian(50, 15);\n * line(50, y, x, y);\n * }\n * \n * \n * \n * \n * let distribution = new Array(360);\n *\n * function setup() {\n * createCanvas(100, 100);\n * for (let i = 0; i < distribution.length; i++) {\n * distribution[i] = floor(randomGaussian(0, 15));\n * }\n * }\n *\n * function draw() {\n * background(204);\n *\n * translate(width / 2, width / 2);\n *\n * for (let i = 0; i < distribution.length; i++) {\n * rotate(TWO_PI / distribution.length);\n * stroke(0);\n * let dist = abs(distribution[i]);\n * line(0, 0, dist, 0);\n * }\n * }\n * \n * \n * @alt\n * 100 horizontal lines from center of canvas. height & side change each render\n * black lines radiate from center of canvas. size determined each render\n */\np5.prototype.randomGaussian = function(mean, sd) {\n var y1, x1, x2, w;\n if (previous) {\n y1 = y2;\n previous = false;\n } else {\n do {\n x1 = this.random(2) - 1;\n x2 = this.random(2) - 1;\n w = x1 * x1 + x2 * x2;\n } while (w >= 1);\n w = Math.sqrt(-2 * Math.log(w) / w);\n y1 = x1 * w;\n y2 = x2 * w;\n previous = true;\n }\n\n var m = mean || 0;\n var s = sd || 1;\n return y1 * s + m;\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],56:[function(_dereq_,module,exports){\n/**\n * @module Math\n * @submodule Trigonometry\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/*\n * all DEGREES/RADIANS conversion should be done in the p5 instance\n * if possible, using the p5._toRadians(), p5._fromRadians() methods.\n */\np5.prototype._angleMode = constants.RADIANS;\n\n/**\n * The inverse of cos(), returns the arc cosine of a value. This function\n * expects the values in the range of -1 to 1 and values are returned in\n * the range 0 to PI (3.1415927).\n *\n * @method acos\n * @param {Number} value the value whose arc cosine is to be returned\n * @return {Number} the arc cosine of the given value\n *\n * @example\n * \n * \n * let a = PI;\n * let c = cos(a);\n * let ac = acos(c);\n * // Prints: \"3.1415927 : -1.0 : 3.1415927\"\n * print(a + ' : ' + c + ' : ' + ac);\n * \n * \n *\n * \n * \n * let a = PI + PI / 4.0;\n * let c = cos(a);\n * let ac = acos(c);\n * // Prints: \"3.926991 : -0.70710665 : 2.3561943\"\n * print(a + ' : ' + c + ' : ' + ac);\n * \n * \n */\np5.prototype.acos = function(ratio) {\n return this._fromRadians(Math.acos(ratio));\n};\n\n/**\n * The inverse of sin(), returns the arc sine of a value. This function\n * expects the values in the range of -1 to 1 and values are returned\n * in the range -PI/2 to PI/2.\n *\n * @method asin\n * @param {Number} value the value whose arc sine is to be returned\n * @return {Number} the arc sine of the given value\n *\n * @example\n * \n * \n * let a = PI + PI / 3;\n * let s = sin(a);\n * let as = asin(s);\n * // Prints: \"1.0471976 : 0.86602545 : 1.0471976\"\n * print(a + ' : ' + s + ' : ' + as);\n * \n * \n *\n * \n * \n * let a = PI + PI / 3.0;\n * let s = sin(a);\n * let as = asin(s);\n * // Prints: \"4.1887903 : -0.86602545 : -1.0471976\"\n * print(a + ' : ' + s + ' : ' + as);\n * \n * \n *\n */\np5.prototype.asin = function(ratio) {\n return this._fromRadians(Math.asin(ratio));\n};\n\n/**\n * The inverse of tan(), returns the arc tangent of a value. This function\n * expects the values in the range of -Infinity to Infinity (exclusive) and\n * values are returned in the range -PI/2 to PI/2.\n *\n * @method atan\n * @param {Number} value the value whose arc tangent is to be returned\n * @return {Number} the arc tangent of the given value\n *\n * @example\n * \n * \n * let a = PI + PI / 3;\n * let t = tan(a);\n * let at = atan(t);\n * // Prints: \"1.0471976 : 1.7320509 : 1.0471976\"\n * print(a + ' : ' + t + ' : ' + at);\n * \n * \n *\n * \n * \n * let a = PI + PI / 3.0;\n * let t = tan(a);\n * let at = atan(t);\n * // Prints: \"4.1887903 : 1.7320513 : 1.0471977\"\n * print(a + ' : ' + t + ' : ' + at);\n * \n * \n *\n */\np5.prototype.atan = function(ratio) {\n return this._fromRadians(Math.atan(ratio));\n};\n\n/**\n * Calculates the angle (in radians) from a specified point to the coordinate\n * origin as measured from the positive x-axis. Values are returned as a\n * float in the range from PI to -PI. The atan2() function is most often used\n * for orienting geometry to the position of the cursor.\n * \n * Note: The y-coordinate of the point is the first parameter, and the\n * x-coordinate is the second parameter, due the the structure of calculating\n * the tangent.\n *\n * @method atan2\n * @param {Number} y y-coordinate of the point\n * @param {Number} x x-coordinate of the point\n * @return {Number} the arc tangent of the given point\n *\n * @example\n * \n * \n * function draw() {\n * background(204);\n * translate(width / 2, height / 2);\n * let a = atan2(mouseY - height / 2, mouseX - width / 2);\n * rotate(a);\n * rect(-30, -5, 60, 10);\n * }\n * \n * \n *\n * @alt\n * 60 by 10 rect at center of canvas rotates with mouse movements\n *\n */\np5.prototype.atan2 = function(y, x) {\n return this._fromRadians(Math.atan2(y, x));\n};\n\n/**\n * Calculates the cosine of an angle. This function takes into account the\n * current angleMode. Values are returned in the range -1 to 1.\n *\n * @method cos\n * @param {Number} angle the angle\n * @return {Number} the cosine of the angle\n *\n * @example\n * \n * \n * let a = 0.0;\n * let inc = TWO_PI / 25.0;\n * for (let i = 0; i < 25; i++) {\n * line(i * 4, 50, i * 4, 50 + cos(a) * 40.0);\n * a = a + inc;\n * }\n * \n * \n *\n * @alt\n * vertical black lines form wave patterns, extend-down on left and right side\n *\n */\np5.prototype.cos = function(angle) {\n return Math.cos(this._toRadians(angle));\n};\n\n/**\n * Calculates the sine of an angle. This function takes into account the\n * current angleMode. Values are returned in the range -1 to 1.\n *\n * @method sin\n * @param {Number} angle the angle\n * @return {Number} the sine of the angle\n *\n * @example\n * \n * \n * let a = 0.0;\n * let inc = TWO_PI / 25.0;\n * for (let i = 0; i < 25; i++) {\n * line(i * 4, 50, i * 4, 50 + sin(a) * 40.0);\n * a = a + inc;\n * }\n * \n * \n *\n * @alt\n * vertical black lines extend down and up from center to form wave pattern\n *\n */\np5.prototype.sin = function(angle) {\n return Math.sin(this._toRadians(angle));\n};\n\n/**\n * Calculates the tangent of an angle. This function takes into account\n * the current angleMode. Values are returned in the range -1 to 1.\n *\n * @method tan\n * @param {Number} angle the angle\n * @return {Number} the tangent of the angle\n *\n * @example\n * \n * \n * let a = 0.0;\n * let inc = TWO_PI / 50.0;\n * for (let i = 0; i < 100; i = i + 2) {\n * line(i, 50, i, 50 + tan(a) * 2.0);\n * a = a + inc;\n * }\n * \n *\n *\n * @alt\n * vertical black lines end down and up from center to form spike pattern\n *\n */\np5.prototype.tan = function(angle) {\n return Math.tan(this._toRadians(angle));\n};\n\n/**\n * Converts a radian measurement to its corresponding value in degrees.\n * Radians and degrees are two ways of measuring the same thing. There are\n * 360 degrees in a circle and 2*PI radians in a circle. For example,\n * 90° = PI/2 = 1.5707964. This function does not take into account the\n * current angleMode.\n *\n * @method degrees\n * @param {Number} radians the radians value to convert to degrees\n * @return {Number} the converted angle\n *\n *\n * @example\n * \n * \n * let rad = PI / 4;\n * let deg = degrees(rad);\n * print(rad + ' radians is ' + deg + ' degrees');\n * // Prints: 0.7853981633974483 radians is 45 degrees\n * \n * \n *\n */\np5.prototype.degrees = function(angle) {\n return angle * constants.RAD_TO_DEG;\n};\n\n/**\n * Converts a degree measurement to its corresponding value in radians.\n * Radians and degrees are two ways of measuring the same thing. There are\n * 360 degrees in a circle and 2*PI radians in a circle. For example,\n * 90° = PI/2 = 1.5707964. This function does not take into account the\n * current angleMode.\n *\n * @method radians\n * @param {Number} degrees the degree value to convert to radians\n * @return {Number} the converted angle\n *\n * @example\n * \n * \n * let deg = 45.0;\n * let rad = radians(deg);\n * print(deg + ' degrees is ' + rad + ' radians');\n * // Prints: 45 degrees is 0.7853981633974483 radians\n * \n * \n */\np5.prototype.radians = function(angle) {\n return angle * constants.DEG_TO_RAD;\n};\n\n/**\n * Sets the current mode of p5 to given mode. Default mode is RADIANS.\n *\n * @method angleMode\n * @param {Constant} mode either RADIANS or DEGREES\n *\n * @example\n * \n * \n * function draw() {\n * background(204);\n * angleMode(DEGREES); // Change the mode to DEGREES\n * let a = atan2(mouseY - height / 2, mouseX - width / 2);\n * translate(width / 2, height / 2);\n * push();\n * rotate(a);\n * rect(-20, -5, 40, 10); // Larger rectangle is rotating in degrees\n * pop();\n * angleMode(RADIANS); // Change the mode to RADIANS\n * rotate(a); // variable a stays the same\n * rect(-40, -5, 20, 10); // Smaller rectangle is rotating in radians\n * }\n * \n * \n *\n * @alt\n * 40 by 10 rect in center rotates with mouse moves. 20 by 10 rect moves faster.\n *\n *\n */\np5.prototype.angleMode = function(mode) {\n if (mode === constants.DEGREES || mode === constants.RADIANS) {\n this._angleMode = mode;\n }\n};\n\n/**\n * converts angles from the current angleMode to RADIANS\n *\n * @method _toRadians\n * @private\n * @param {Number} angle\n * @returns {Number}\n */\np5.prototype._toRadians = function(angle) {\n if (this._angleMode === constants.DEGREES) {\n return angle * constants.DEG_TO_RAD;\n }\n return angle;\n};\n\n/**\n * converts angles from the current angleMode to DEGREES\n *\n * @method _toDegrees\n * @private\n * @param {Number} angle\n * @returns {Number}\n */\np5.prototype._toDegrees = function(angle) {\n if (this._angleMode === constants.RADIANS) {\n return angle * constants.RAD_TO_DEG;\n }\n return angle;\n};\n\n/**\n * converts angles from RADIANS into the current angleMode\n *\n * @method _fromRadians\n * @private\n * @param {Number} angle\n * @returns {Number}\n */\np5.prototype._fromRadians = function(angle) {\n if (this._angleMode === constants.DEGREES) {\n return angle * constants.RAD_TO_DEG;\n }\n return angle;\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24}],57:[function(_dereq_,module,exports){\n/**\n * @module Typography\n * @submodule Attributes\n * @for p5\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Sets the current alignment for drawing text. Accepts two\n * arguments: horizAlign (LEFT, CENTER, or RIGHT) and\n * vertAlign (TOP, BOTTOM, CENTER, or BASELINE).\n *\n * The horizAlign parameter is in reference to the x value\n * of the text() function, while the vertAlign parameter is\n * in reference to the y value.\n *\n * So if you write textAlign(LEFT), you are aligning the left\n * edge of your text to the x value you give in text(). If you\n * write textAlign(RIGHT, TOP), you are aligning the right edge\n * of your text to the x value and the top of edge of the text\n * to the y value.\n *\n * @method textAlign\n * @param {Constant} horizAlign horizontal alignment, either LEFT,\n * CENTER, or RIGHT\n * @param {Constant} [vertAlign] vertical alignment, either TOP,\n * BOTTOM, CENTER, or BASELINE\n * @chainable\n * @example\n * \n * \n * textSize(16);\n * textAlign(RIGHT);\n * text('ABCD', 50, 30);\n * textAlign(CENTER);\n * text('EFGH', 50, 50);\n * textAlign(LEFT);\n * text('IJKL', 50, 70);\n * \n * \n *\n * \n * \n * textSize(16);\n * strokeWeight(0.5);\n *\n * line(0, 12, width, 12);\n * textAlign(CENTER, TOP);\n * text('TOP', 0, 12, width);\n *\n * line(0, 37, width, 37);\n * textAlign(CENTER, CENTER);\n * text('CENTER', 0, 37, width);\n *\n * line(0, 62, width, 62);\n * textAlign(CENTER, BASELINE);\n * text('BASELINE', 0, 62, width);\n *\n * line(0, 87, width, 87);\n * textAlign(CENTER, BOTTOM);\n * text('BOTTOM', 0, 87, width);\n * \n * \n *\n * @alt\n *Letters ABCD displayed at top right, EFGH at center and IJKL at bottom left.\n * The names of the four vertical alignments rendered each showing that alignment's placement relative to a horizontal line.\n *\n */\n/**\n * @method textAlign\n * @return {Object}\n */\np5.prototype.textAlign = function(horizAlign, vertAlign) {\n p5._validateParameters('textAlign', arguments);\n return this._renderer.textAlign.apply(this._renderer, arguments);\n};\n\n/**\n * Sets/gets the spacing, in pixels, between lines of text. This\n * setting will be used in all subsequent calls to the text() function.\n *\n * @method textLeading\n * @param {Number} leading the size in pixels for spacing between lines\n * @chainable\n *\n * @example\n * \n * \n * // Text to display. The \"\\n\" is a \"new line\" character\n * let lines = 'L1\\nL2\\nL3';\n * textSize(12);\n *\n * textLeading(10); // Set leading to 10\n * text(lines, 10, 25);\n *\n * textLeading(20); // Set leading to 20\n * text(lines, 40, 25);\n *\n * textLeading(30); // Set leading to 30\n * text(lines, 70, 25);\n * \n * \n *\n * @alt\n *set L1 L2 & L3 displayed vertically 3 times. spacing increases for each set\n */\n/**\n * @method textLeading\n * @return {Number}\n */\np5.prototype.textLeading = function(theLeading) {\n p5._validateParameters('textLeading', arguments);\n return this._renderer.textLeading.apply(this._renderer, arguments);\n};\n\n/**\n * Sets/gets the current font size. This size will be used in all subsequent\n * calls to the text() function. Font size is measured in pixels.\n *\n * @method textSize\n * @param {Number} theSize the size of the letters in units of pixels\n * @chainable\n *\n * @example\n * \n * \n * textSize(12);\n * text('Font Size 12', 10, 30);\n * textSize(14);\n * text('Font Size 14', 10, 60);\n * textSize(16);\n * text('Font Size 16', 10, 90);\n * \n * \n *\n * @alt\n *Font Size 12 displayed small, Font Size 14 medium & Font Size 16 large\n */\n/**\n * @method textSize\n * @return {Number}\n */\np5.prototype.textSize = function(theSize) {\n p5._validateParameters('textSize', arguments);\n return this._renderer.textSize.apply(this._renderer, arguments);\n};\n\n/**\n * Sets/gets the style of the text for system fonts to NORMAL, ITALIC, BOLD or BOLDITALIC.\n * Note: this may be is overridden by CSS styling. For non-system fonts\n * (opentype, truetype, etc.) please load styled fonts instead.\n *\n * @method textStyle\n * @param {Constant} theStyle styling for text, either NORMAL,\n * ITALIC, BOLD or BOLDITALIC\n * @chainable\n * @example\n * \n * \n * strokeWeight(0);\n * textSize(12);\n * textStyle(NORMAL);\n * text('Font Style Normal', 10, 15);\n * textStyle(ITALIC);\n * text('Font Style Italic', 10, 40);\n * textStyle(BOLD);\n * text('Font Style Bold', 10, 65);\n * textStyle(BOLDITALIC);\n * text('Font Style Bold Italic', 10, 90);\n * \n * \n *\n * @alt\n *words Font Style Normal displayed normally, Italic in italic, bold in bold and bold italic in bold italics.\n */\n/**\n * @method textStyle\n * @return {String}\n */\np5.prototype.textStyle = function(theStyle) {\n p5._validateParameters('textStyle', arguments);\n return this._renderer.textStyle.apply(this._renderer, arguments);\n};\n\n/**\n * Calculates and returns the width of any character or text string.\n *\n * @method textWidth\n * @param {String} theText the String of characters to measure\n * @return {Number}\n * @example\n * \n * \n * textSize(28);\n *\n * let aChar = 'P';\n * let cWidth = textWidth(aChar);\n * text(aChar, 0, 40);\n * line(cWidth, 0, cWidth, 50);\n *\n * let aString = 'p5.js';\n * let sWidth = textWidth(aString);\n * text(aString, 0, 85);\n * line(sWidth, 50, sWidth, 100);\n * \n * \n *\n * @alt\n *Letter P and p5.js are displayed with vertical lines at end. P is wide\n *\n */\np5.prototype.textWidth = function(theText) {\n p5._validateParameters('textWidth', arguments);\n if (theText.length === 0) {\n return 0;\n }\n return this._renderer.textWidth.apply(this._renderer, arguments);\n};\n\n/**\n * Returns the ascent of the current font at its current size. The ascent\n * represents the distance, in pixels, of the tallest character above\n * the baseline.\n * @method textAscent\n * @return {Number}\n * @example\n * \n * \n * let base = height * 0.75;\n * let scalar = 0.8; // Different for each font\n *\n * textSize(32); // Set initial text size\n * let asc = textAscent() * scalar; // Calc ascent\n * line(0, base - asc, width, base - asc);\n * text('dp', 0, base); // Draw text on baseline\n *\n * textSize(64); // Increase text size\n * asc = textAscent() * scalar; // Recalc ascent\n * line(40, base - asc, width, base - asc);\n * text('dp', 40, base); // Draw text on baseline\n * \n * \n */\np5.prototype.textAscent = function() {\n p5._validateParameters('textAscent', arguments);\n return this._renderer.textAscent();\n};\n\n/**\n * Returns the descent of the current font at its current size. The descent\n * represents the distance, in pixels, of the character with the longest\n * descender below the baseline.\n * @method textDescent\n * @return {Number}\n * @example\n * \n * \n * let base = height * 0.75;\n * let scalar = 0.8; // Different for each font\n *\n * textSize(32); // Set initial text size\n * let desc = textDescent() * scalar; // Calc ascent\n * line(0, base + desc, width, base + desc);\n * text('dp', 0, base); // Draw text on baseline\n *\n * textSize(64); // Increase text size\n * desc = textDescent() * scalar; // Recalc ascent\n * line(40, base + desc, width, base + desc);\n * text('dp', 40, base); // Draw text on baseline\n * \n * \n */\np5.prototype.textDescent = function() {\n p5._validateParameters('textDescent', arguments);\n return this._renderer.textDescent();\n};\n\n/**\n * Helper function to measure ascent and descent.\n */\np5.prototype._updateTextMetrics = function() {\n return this._renderer._updateTextMetrics();\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],58:[function(_dereq_,module,exports){\n/**\n * @module Typography\n * @submodule Loading & Displaying\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\nvar opentype = _dereq_('opentype.js');\n\n_dereq_('../core/error_helpers');\n\n/**\n * Loads an opentype font file (.otf, .ttf) from a file or a URL,\n * and returns a PFont Object. This method is asynchronous,\n * meaning it may not finish before the next line in your sketch\n * is executed.\n * \n * The path to the font should be relative to the HTML file\n * that links in your sketch. Loading fonts from a URL or other\n * remote location may be blocked due to your browser's built-in\n * security.\n *\n * @method loadFont\n * @param {String} path name of the file or url to load\n * @param {Function} [callback] function to be executed after\n * loadFont() completes\n * @param {Function} [onError] function to be executed if\n * an error occurs\n * @return {p5.Font} p5.Font object\n * @example\n *\n * Calling loadFont() inside preload() guarantees that the load\n * operation will have completed before setup() and draw() are called.\n *\n * \n * let myFont;\n * function preload() {\n * myFont = loadFont('assets/inconsolata.otf');\n * }\n *\n * function setup() {\n * fill('#ED225D');\n * textFont(myFont);\n * textSize(36);\n * text('p5*js', 10, 50);\n * }\n * \n *\n * Outside of preload(), you may supply a callback function to handle the\n * object:\n *\n * \n * function setup() {\n * loadFont('assets/inconsolata.otf', drawText);\n * }\n *\n * function drawText(font) {\n * fill('#ED225D');\n * textFont(font, 36);\n * text('p5*js', 10, 50);\n * }\n * \n *\n * You can also use the font filename string (without the file extension) to style other HTML\n * elements.\n *\n * \n * function preload() {\n * loadFont('assets/inconsolata.otf');\n * }\n *\n * function setup() {\n * let myDiv = createDiv('hello there');\n * myDiv.style('font-family', 'Inconsolata');\n * }\n * \n *\n * @alt\n * p5*js in p5's theme dark pink\n * p5*js in p5's theme dark pink\n *\n */\np5.prototype.loadFont = function(path, onSuccess, onError) {\n p5._validateParameters('loadFont', arguments);\n var p5Font = new p5.Font(this);\n\n var self = this;\n opentype.load(path, function(err, font) {\n if (err) {\n p5._friendlyFileLoadError(4, path);\n if (typeof onError !== 'undefined') {\n return onError(err);\n }\n console.error(err, path);\n return;\n }\n\n p5Font.font = font;\n\n if (typeof onSuccess !== 'undefined') {\n onSuccess(p5Font);\n }\n\n self._decrementPreload();\n\n // check that we have an acceptable font type\n var validFontTypes = ['ttf', 'otf', 'woff', 'woff2'],\n fileNoPath = path\n .split('\\\\')\n .pop()\n .split('/')\n .pop(),\n lastDotIdx = fileNoPath.lastIndexOf('.'),\n fontFamily,\n newStyle,\n fileExt = lastDotIdx < 1 ? null : fileNoPath.substr(lastDotIdx + 1);\n\n // if so, add it to the DOM (name-only) for use with p5.dom\n if (validFontTypes.indexOf(fileExt) > -1) {\n fontFamily = fileNoPath.substr(0, lastDotIdx);\n newStyle = document.createElement('style');\n newStyle.appendChild(\n document.createTextNode(\n '\\n@font-face {' +\n '\\nfont-family: ' +\n fontFamily +\n ';\\nsrc: url(' +\n path +\n ');\\n}\\n'\n )\n );\n document.head.appendChild(newStyle);\n }\n });\n\n return p5Font;\n};\n\n/**\n * Draws text to the screen. Displays the information specified in the first\n * parameter on the screen in the position specified by the additional\n * parameters. A default font will be used unless a font is set with the\n * textFont() function and a default size will be used unless a font is set\n * with textSize(). Change the color of the text with the fill() function.\n * Change the outline of the text with the stroke() and strokeWeight()\n * functions.\n * \n * The text displays in relation to the textAlign() function, which gives the\n * option to draw to the left, right, and center of the coordinates.\n * \n * The x2 and y2 parameters define a rectangular area to display within and\n * may only be used with string data. When these parameters are specified,\n * they are interpreted based on the current rectMode() setting. Text that\n * does not fit completely within the rectangle specified will not be drawn\n * to the screen. If x2 and y2 are not specified, the baseline alignment is the\n * default, which means that the text will be drawn upwards from x and y.\n * \n * WEBGL: Only opentype/truetype fonts are supported. You must load a font using the\n * loadFont() method (see the example above).\n * stroke() currently has no effect in webgl mode.\n *\n * @method text\n * @param {String|Object|Array|Number|Boolean} str the alphanumeric\n * symbols to be displayed\n * @param {Number} x x-coordinate of text\n * @param {Number} y y-coordinate of text\n * @param {Number} [x2] by default, the width of the text box,\n * see rectMode() for more info\n * @param {Number} [y2] by default, the height of the text box,\n * see rectMode() for more info\n * @chainable\n * @example\n * \n * \n * textSize(32);\n * text('word', 10, 30);\n * fill(0, 102, 153);\n * text('word', 10, 60);\n * fill(0, 102, 153, 51);\n * text('word', 10, 90);\n * \n * \n * \n * \n * let s = 'The quick brown fox jumped over the lazy dog.';\n * fill(50);\n * text(s, 10, 10, 70, 80); // Text wraps within text box\n * \n * \n *\n * \n * \n * let inconsolata;\n * function preload() {\n * inconsolata = loadFont('assets/inconsolata.otf');\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * textFont(inconsolata);\n * textSize(width / 3);\n * textAlign(CENTER, CENTER);\n * }\n * function draw() {\n * background(0);\n * let time = millis();\n * rotateX(time / 1000);\n * rotateZ(time / 1234);\n * text('p5.js', 0, 0);\n * }\n * \n * \n *\n * @alt\n *'word' displayed 3 times going from black, blue to translucent blue\n * The quick brown fox jumped over the lazy dog.\n * the text 'p5.js' spinning in 3d\n *\n */\np5.prototype.text = function(str, x, y, maxWidth, maxHeight) {\n p5._validateParameters('text', arguments);\n return !(this._renderer._doFill || this._renderer._doStroke)\n ? this\n : this._renderer.text.apply(this._renderer, arguments);\n};\n\n/**\n * Sets the current font that will be drawn with the text() function.\n * \n * WEBGL: Only fonts loaded via loadFont() are supported.\n *\n * @method textFont\n * @return {Object} the current font\n *\n * @example\n * \n * \n * fill(0);\n * textSize(12);\n * textFont('Georgia');\n * text('Georgia', 12, 30);\n * textFont('Helvetica');\n * text('Helvetica', 12, 60);\n * \n * \n * \n * \n * let fontRegular, fontItalic, fontBold;\n * function preload() {\n * fontRegular = loadFont('assets/Regular.otf');\n * fontItalic = loadFont('assets/Italic.ttf');\n * fontBold = loadFont('assets/Bold.ttf');\n * }\n * function setup() {\n * background(210);\n * fill(0)\n .strokeWeight(0)\n .textSize(10);\n * textFont(fontRegular);\n * text('Font Style Normal', 10, 30);\n * textFont(fontItalic);\n * text('Font Style Italic', 10, 50);\n * textFont(fontBold);\n * text('Font Style Bold', 10, 70);\n * }\n * \n * \n *\n * @alt\n *words Font Style Normal displayed normally, Italic in italic and bold in bold\n */\n/**\n * @method textFont\n * @param {Object|String} font a font loaded via loadFont(), or a String\n * representing a web safe font (a font\n * that is generally available across all systems)\n * @param {Number} [size] the font size to use\n * @chainable\n */\np5.prototype.textFont = function(theFont, theSize) {\n p5._validateParameters('textFont', arguments);\n if (arguments.length) {\n if (!theFont) {\n throw new Error('null font passed to textFont');\n }\n\n this._renderer._setProperty('_textFont', theFont);\n\n if (theSize) {\n this._renderer._setProperty('_textSize', theSize);\n this._renderer._setProperty(\n '_textLeading',\n theSize * constants._DEFAULT_LEADMULT\n );\n }\n\n return this._renderer._applyTextProperties();\n }\n\n return this._renderer._textFont;\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/error_helpers\":20,\"../core/main\":24,\"opentype.js\":10}],59:[function(_dereq_,module,exports){\n/**\n * This module defines the p5.Font class and functions for\n * drawing text to the display canvas.\n * @module Typography\n * @submodule Font\n * @requires core\n * @requires constants\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Base class for font handling\n * @class p5.Font\n * @param {p5} [pInst] pointer to p5 instance\n */\np5.Font = function(p) {\n this.parent = p;\n\n this.cache = {};\n\n /**\n * Underlying opentype font implementation\n * @property font\n */\n this.font = undefined;\n};\n\n/**\n * Returns a tight bounding box for the given text string using this\n * font (currently only supports single lines)\n *\n * @method textBounds\n * @param {String} line a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Number} [fontSize] font size to use (optional) Default is 12.\n * @param {Object} [options] opentype options (optional)\n * opentype fonts contains alignment and baseline options.\n * Default is 'LEFT' and 'alphabetic'\n *\n *\n * @return {Object} a rectangle object with properties: x, y, w, h\n *\n * @example\n * \n * \n * let font;\n * let textString = 'Lorem ipsum dolor sit amet.';\n * function preload() {\n * font = loadFont('./assets/Regular.otf');\n * }\n * function setup() {\n * background(210);\n *\n * let bbox = font.textBounds(textString, 10, 30, 12);\n * fill(255);\n * stroke(0);\n * rect(bbox.x, bbox.y, bbox.w, bbox.h);\n * fill(0);\n * noStroke();\n *\n * textFont(font);\n * textSize(12);\n * text(textString, 10, 30);\n * }\n * \n * \n *\n * @alt\n *words Lorem ipsum dol go off canvas and contained by white bounding box\n *\n */\np5.Font.prototype.textBounds = function(str, x, y, fontSize, opts) {\n x = x !== undefined ? x : 0;\n y = y !== undefined ? y : 0;\n\n // Check cache for existing bounds. Take into consideration the text alignment\n // settings. Default alignment should match opentype's origin: left-aligned &\n // alphabetic baseline.\n var p = (opts && opts.renderer && opts.renderer._pInst) || this.parent,\n ctx = p._renderer.drawingContext,\n alignment = ctx.textAlign || constants.LEFT,\n baseline = ctx.textBaseline || constants.BASELINE,\n cacheResults = false,\n result,\n key;\n\n fontSize = fontSize || p._renderer._textSize;\n\n // NOTE: cache disabled for now pending further discussion of #3436\n if (cacheResults) {\n key = cacheKey('textBounds', str, x, y, fontSize, alignment, baseline);\n result = this.cache[key];\n }\n\n if (!result) {\n var minX,\n minY,\n maxX,\n maxY,\n pos,\n xCoords = [],\n yCoords = [],\n scale = this._scale(fontSize);\n\n this.font.forEachGlyph(str, x, y, fontSize, opts, function(\n glyph,\n gX,\n gY,\n gFontSize\n ) {\n var gm = glyph.getMetrics();\n xCoords.push(gX + gm.xMin * scale);\n xCoords.push(gX + gm.xMax * scale);\n yCoords.push(gY + -gm.yMin * scale);\n yCoords.push(gY + -gm.yMax * scale);\n });\n\n minX = Math.min.apply(null, xCoords);\n minY = Math.min.apply(null, yCoords);\n maxX = Math.max.apply(null, xCoords);\n maxY = Math.max.apply(null, yCoords);\n\n result = {\n x: minX,\n y: minY,\n h: maxY - minY,\n w: maxX - minX,\n advance: minX - x\n };\n\n // Bounds are now calculated, so shift the x & y to match alignment settings\n pos = this._handleAlignment(\n p._renderer,\n str,\n result.x,\n result.y,\n result.w + result.advance\n );\n\n result.x = pos.x;\n result.y = pos.y;\n\n if (cacheResults) {\n this.cache[key] = result;\n }\n }\n\n return result;\n};\n\n/**\n * Computes an array of points following the path for specified text\n *\n * @method textToPoints\n * @param {String} txt a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Number} fontSize font size to use (optional)\n * @param {Object} [options] an (optional) object that can contain:\n *\n * sampleFactor - the ratio of path-length to number of samples\n * (default=.1); higher values yield more points and are therefore\n * more precise\n *\n * simplifyThreshold - if set to a non-zero value, collinear points will be\n * be removed from the polygon; the value represents the threshold angle to use\n * when determining whether two edges are collinear\n *\n * @return {Array} an array of points, each with x, y, alpha (the path angle)\n * @example\n * \n * \n * let font;\n * function preload() {\n * font = loadFont('assets/inconsolata.otf');\n * }\n *\n * let points;\n * let bounds;\n * function setup() {\n * createCanvas(100, 100);\n * stroke(0);\n * fill(255, 104, 204);\n *\n * points = font.textToPoints('p5', 0, 0, 10, {\n * sampleFactor: 5,\n * simplifyThreshold: 0\n * });\n * bounds = font.textBounds(' p5 ', 0, 0, 10);\n * }\n *\n * function draw() {\n * background(255);\n * beginShape();\n * translate(-bounds.x * width / bounds.w, -bounds.y * height / bounds.h);\n * for (let i = 0; i < points.length; i++) {\n * let p = points[i];\n * vertex(\n * p.x * width / bounds.w +\n * sin(20 * p.y / bounds.h + millis() / 1000) * width / 30,\n * p.y * height / bounds.h\n * );\n * }\n * endShape(CLOSE);\n * }\n * \n * \n *\n */\np5.Font.prototype.textToPoints = function(txt, x, y, fontSize, options) {\n var xoff = 0,\n result = [],\n glyphs = this._getGlyphs(txt);\n\n function isSpace(i) {\n return (\n (glyphs[i].name && glyphs[i].name === 'space') ||\n (txt.length === glyphs.length && txt[i] === ' ') ||\n (glyphs[i].index && glyphs[i].index === 3)\n );\n }\n\n fontSize = fontSize || this.parent._renderer._textSize;\n\n for (var i = 0; i < glyphs.length; i++) {\n if (!isSpace(i)) {\n // fix to #1817, #2069\n\n var gpath = glyphs[i].getPath(x, y, fontSize),\n paths = splitPaths(gpath.commands);\n\n for (var j = 0; j < paths.length; j++) {\n var pts = pathToPoints(paths[j], options);\n\n for (var k = 0; k < pts.length; k++) {\n pts[k].x += xoff;\n result.push(pts[k]);\n }\n }\n }\n\n xoff += glyphs[i].advanceWidth * this._scale(fontSize);\n }\n\n return result;\n};\n\n// ----------------------------- End API ------------------------------\n\n/**\n * Returns the set of opentype glyphs for the supplied string.\n *\n * Note that there is not a strict one-to-one mapping between characters\n * and glyphs, so the list of returned glyphs can be larger or smaller\n * than the length of the given string.\n *\n * @private\n * @param {String} str the string to be converted\n * @return {Array} the opentype glyphs\n */\np5.Font.prototype._getGlyphs = function(str) {\n return this.font.stringToGlyphs(str);\n};\n\n/**\n * Returns an opentype path for the supplied string and position.\n *\n * @private\n * @param {String} line a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Object} options opentype options (optional)\n * @return {Object} the opentype path\n */\np5.Font.prototype._getPath = function(line, x, y, options) {\n var p =\n (options && options.renderer && options.renderer._pInst) || this.parent,\n renderer = p._renderer,\n pos = this._handleAlignment(renderer, line, x, y);\n\n return this.font.getPath(line, pos.x, pos.y, renderer._textSize, options);\n};\n\n/*\n * Creates an SVG-formatted path-data string\n * (See http://www.w3.org/TR/SVG/paths.html#PathData)\n * from the given opentype path or string/position\n *\n * @param {Object} path an opentype path, OR the following:\n *\n * @param {String} line a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Object} options opentype options (optional), set options.decimals\n * to set the decimal precision of the path-data\n *\n * @return {Object} this p5.Font object\n */\np5.Font.prototype._getPathData = function(line, x, y, options) {\n var decimals = 3;\n\n // create path from string/position\n if (typeof line === 'string' && arguments.length > 2) {\n line = this._getPath(line, x, y, options);\n } else if (typeof x === 'object') {\n // handle options specified in 2nd arg\n options = x;\n }\n\n // handle svg arguments\n if (options && typeof options.decimals === 'number') {\n decimals = options.decimals;\n }\n\n return line.toPathData(decimals);\n};\n\n/*\n * Creates an SVG element, as a string,\n * from the given opentype path or string/position\n *\n * @param {Object} path an opentype path, OR the following:\n *\n * @param {String} line a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Object} options opentype options (optional), set options.decimals\n * to set the decimal precision of the path-data in the element,\n * options.fill to set the fill color for the element,\n * options.stroke to set the stroke color for the element,\n * options.strokeWidth to set the strokeWidth for the element.\n *\n * @return {Object} this p5.Font object\n */\np5.Font.prototype._getSVG = function(line, x, y, options) {\n var decimals = 3;\n\n // create path from string/position\n if (typeof line === 'string' && arguments.length > 2) {\n line = this._getPath(line, x, y, options);\n } else if (typeof x === 'object') {\n // handle options specified in 2nd arg\n options = x;\n }\n\n // handle svg arguments\n if (options) {\n if (typeof options.decimals === 'number') {\n decimals = options.decimals;\n }\n if (typeof options.strokeWidth === 'number') {\n line.strokeWidth = options.strokeWidth;\n }\n if (typeof options.fill !== 'undefined') {\n line.fill = options.fill;\n }\n if (typeof options.stroke !== 'undefined') {\n line.stroke = options.stroke;\n }\n }\n\n return line.toSVG(decimals);\n};\n\n/*\n * Renders an opentype path or string/position\n * to the current graphics context\n *\n * @param {Object} path an opentype path, OR the following:\n *\n * @param {String} line a line of text\n * @param {Number} x x-position\n * @param {Number} y y-position\n * @param {Object} options opentype options (optional)\n *\n * @return {p5.Font} this p5.Font object\n */\np5.Font.prototype._renderPath = function(line, x, y, options) {\n var pdata,\n pg = (options && options.renderer) || this.parent._renderer,\n ctx = pg.drawingContext;\n\n if (typeof line === 'object' && line.commands) {\n pdata = line.commands;\n } else {\n //pos = handleAlignment(p, ctx, line, x, y);\n pdata = this._getPath(line, x, y, options).commands;\n }\n\n ctx.beginPath();\n for (var i = 0; i < pdata.length; i += 1) {\n var cmd = pdata[i];\n if (cmd.type === 'M') {\n ctx.moveTo(cmd.x, cmd.y);\n } else if (cmd.type === 'L') {\n ctx.lineTo(cmd.x, cmd.y);\n } else if (cmd.type === 'C') {\n ctx.bezierCurveTo(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n } else if (cmd.type === 'Q') {\n ctx.quadraticCurveTo(cmd.x1, cmd.y1, cmd.x, cmd.y);\n } else if (cmd.type === 'Z') {\n ctx.closePath();\n }\n }\n\n // only draw stroke if manually set by user\n if (pg._doStroke && pg._strokeSet) {\n ctx.stroke();\n }\n\n if (pg._doFill) {\n // if fill hasn't been set by user, use default-text-fill\n if (!pg._fillSet) {\n pg._setFill(constants._DEFAULT_TEXT_FILL);\n }\n ctx.fill();\n }\n\n return this;\n};\n\np5.Font.prototype._textWidth = function(str, fontSize) {\n return this.font.getAdvanceWidth(str, fontSize);\n};\n\np5.Font.prototype._textAscent = function(fontSize) {\n return this.font.ascender * this._scale(fontSize);\n};\n\np5.Font.prototype._textDescent = function(fontSize) {\n return -this.font.descender * this._scale(fontSize);\n};\n\np5.Font.prototype._scale = function(fontSize) {\n return (\n 1 / this.font.unitsPerEm * (fontSize || this.parent._renderer._textSize)\n );\n};\n\np5.Font.prototype._handleAlignment = function(renderer, line, x, y, textWidth) {\n var fontSize = renderer._textSize;\n\n if (typeof textWidth === 'undefined') {\n textWidth = this._textWidth(line, fontSize);\n }\n\n switch (renderer._textAlign) {\n case constants.CENTER:\n x -= textWidth / 2;\n break;\n case constants.RIGHT:\n x -= textWidth;\n break;\n }\n\n switch (renderer._textBaseline) {\n case constants.TOP:\n y += this._textAscent(fontSize);\n break;\n case constants.CENTER:\n y += this._textAscent(fontSize) / 2;\n break;\n case constants.BOTTOM:\n y -= this._textDescent(fontSize);\n break;\n }\n\n return { x: x, y: y };\n};\n\n// path-utils\n\nfunction pathToPoints(cmds, options) {\n var opts = parseOpts(options, {\n sampleFactor: 0.1,\n simplifyThreshold: 0\n });\n\n var len = pointAtLength(cmds, 0, 1), // total-length\n t = len / (len * opts.sampleFactor),\n pts = [];\n\n for (var i = 0; i < len; i += t) {\n pts.push(pointAtLength(cmds, i));\n }\n\n if (opts.simplifyThreshold) {\n simplify(pts, opts.simplifyThreshold);\n }\n\n return pts;\n}\n\nfunction simplify(pts, angle) {\n angle = typeof angle === 'undefined' ? 0 : angle;\n\n var num = 0;\n for (var i = pts.length - 1; pts.length > 3 && i >= 0; --i) {\n if (collinear(at(pts, i - 1), at(pts, i), at(pts, i + 1), angle)) {\n // Remove the middle point\n pts.splice(i % pts.length, 1);\n num++;\n }\n }\n return num;\n}\n\nfunction splitPaths(cmds) {\n var paths = [],\n current;\n for (var i = 0; i < cmds.length; i++) {\n if (cmds[i].type === 'M') {\n if (current) {\n paths.push(current);\n }\n current = [];\n }\n current.push(cmdToArr(cmds[i]));\n }\n paths.push(current);\n\n return paths;\n}\n\nfunction cmdToArr(cmd) {\n var arr = [cmd.type];\n if (cmd.type === 'M' || cmd.type === 'L') {\n // moveto or lineto\n arr.push(cmd.x, cmd.y);\n } else if (cmd.type === 'C') {\n arr.push(cmd.x1, cmd.y1, cmd.x2, cmd.y2, cmd.x, cmd.y);\n } else if (cmd.type === 'Q') {\n arr.push(cmd.x1, cmd.y1, cmd.x, cmd.y);\n }\n // else if (cmd.type === 'Z') { /* no-op */ }\n return arr;\n}\n\nfunction parseOpts(options, defaults) {\n if (typeof options !== 'object') {\n options = defaults;\n } else {\n for (var key in defaults) {\n if (typeof options[key] === 'undefined') {\n options[key] = defaults[key];\n }\n }\n }\n return options;\n}\n\n//////////////////////// Helpers ////////////////////////////\n\nfunction at(v, i) {\n var s = v.length;\n return v[i < 0 ? i % s + s : i % s];\n}\n\nfunction collinear(a, b, c, thresholdAngle) {\n if (!thresholdAngle) {\n return areaTriangle(a, b, c) === 0;\n }\n\n if (typeof collinear.tmpPoint1 === 'undefined') {\n collinear.tmpPoint1 = [];\n collinear.tmpPoint2 = [];\n }\n\n var ab = collinear.tmpPoint1,\n bc = collinear.tmpPoint2;\n ab.x = b.x - a.x;\n ab.y = b.y - a.y;\n bc.x = c.x - b.x;\n bc.y = c.y - b.y;\n\n var dot = ab.x * bc.x + ab.y * bc.y,\n magA = Math.sqrt(ab.x * ab.x + ab.y * ab.y),\n magB = Math.sqrt(bc.x * bc.x + bc.y * bc.y),\n angle = Math.acos(dot / (magA * magB));\n\n return angle < thresholdAngle;\n}\n\nfunction areaTriangle(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);\n}\n\n// Portions of below code copyright 2008 Dmitry Baranovskiy (via MIT license)\n\nfunction findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\n var t1 = 1 - t,\n t13 = Math.pow(t1, 3),\n t12 = Math.pow(t1, 2),\n t2 = t * t,\n t3 = t2 * t,\n x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,\n y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,\n mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\n ax = t1 * p1x + t * c1x,\n ay = t1 * p1y + t * c1y,\n cx = t1 * c2x + t * p2x,\n cy = t1 * c2y + t * p2y,\n alpha = 90 - Math.atan2(mx - nx, my - ny) * 180 / Math.PI;\n\n if (mx > nx || my < ny) {\n alpha += 180;\n }\n\n return {\n x: x,\n y: y,\n m: { x: mx, y: my },\n n: { x: nx, y: ny },\n start: { x: ax, y: ay },\n end: { x: cx, y: cy },\n alpha: alpha\n };\n}\n\nfunction getPointAtSegmentLength(\n p1x,\n p1y,\n c1x,\n c1y,\n c2x,\n c2y,\n p2x,\n p2y,\n length\n) {\n return length == null\n ? bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y)\n : findDotsAtSegment(\n p1x,\n p1y,\n c1x,\n c1y,\n c2x,\n c2y,\n p2x,\n p2y,\n getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)\n );\n}\n\nfunction pointAtLength(path, length, istotal) {\n path = path2curve(path);\n var x,\n y,\n p,\n l,\n sp = '',\n subpaths = {},\n point,\n len = 0;\n for (var i = 0, ii = path.length; i < ii; i++) {\n p = path[i];\n if (p[0] === 'M') {\n x = +p[1];\n y = +p[2];\n } else {\n l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\n if (len + l > length) {\n if (!istotal) {\n point = getPointAtSegmentLength(\n x,\n y,\n p[1],\n p[2],\n p[3],\n p[4],\n p[5],\n p[6],\n length - len\n );\n return { x: point.x, y: point.y, alpha: point.alpha };\n }\n }\n len += l;\n x = +p[5];\n y = +p[6];\n }\n sp += p.shift() + p;\n }\n subpaths.end = sp;\n\n point = istotal\n ? len\n : findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);\n\n if (point.alpha) {\n point = { x: point.x, y: point.y, alpha: point.alpha };\n }\n\n return point;\n}\n\nfunction pathToAbsolute(pathArray) {\n var res = [],\n x = 0,\n y = 0,\n mx = 0,\n my = 0,\n start = 0;\n if (!pathArray) {\n // console.warn(\"Unexpected state: undefined pathArray\"); // shouldn't happen\n return res;\n }\n if (pathArray[0][0] === 'M') {\n x = +pathArray[0][1];\n y = +pathArray[0][2];\n mx = x;\n my = y;\n start++;\n res[0] = ['M', x, y];\n }\n\n var dots,\n crz =\n pathArray.length === 3 &&\n pathArray[0][0] === 'M' &&\n pathArray[1][0].toUpperCase() === 'R' &&\n pathArray[2][0].toUpperCase() === 'Z';\n\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\n res.push((r = []));\n pa = pathArray[i];\n if (pa[0] !== String.prototype.toUpperCase.call(pa[0])) {\n r[0] = String.prototype.toUpperCase.call(pa[0]);\n switch (r[0]) {\n case 'A':\n r[1] = pa[1];\n r[2] = pa[2];\n r[3] = pa[3];\n r[4] = pa[4];\n r[5] = pa[5];\n r[6] = +(pa[6] + x);\n r[7] = +(pa[7] + y);\n break;\n case 'V':\n r[1] = +pa[1] + y;\n break;\n case 'H':\n r[1] = +pa[1] + x;\n break;\n case 'R':\n dots = [x, y].concat(pa.slice(1));\n for (var j = 2, jj = dots.length; j < jj; j++) {\n dots[j] = +dots[j] + x;\n dots[++j] = +dots[j] + y;\n }\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n break;\n case 'M':\n mx = +pa[1] + x;\n my = +pa[2] + y;\n break;\n default:\n for (j = 1, jj = pa.length; j < jj; j++) {\n r[j] = +pa[j] + (j % 2 ? x : y);\n }\n }\n } else if (pa[0] === 'R') {\n dots = [x, y].concat(pa.slice(1));\n res.pop();\n res = res.concat(catmullRom2bezier(dots, crz));\n r = ['R'].concat(pa.slice(-2));\n } else {\n for (var k = 0, kk = pa.length; k < kk; k++) {\n r[k] = pa[k];\n }\n }\n switch (r[0]) {\n case 'Z':\n x = mx;\n y = my;\n break;\n case 'H':\n x = r[1];\n break;\n case 'V':\n y = r[1];\n break;\n case 'M':\n mx = r[r.length - 2];\n my = r[r.length - 1];\n break;\n default:\n x = r[r.length - 2];\n y = r[r.length - 1];\n }\n }\n return res;\n}\n\nfunction path2curve(path, path2) {\n var p = pathToAbsolute(path),\n p2 = path2 && pathToAbsolute(path2);\n var attrs = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null };\n var attrs2 = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null };\n var pcoms1 = []; // path commands of original path p\n var pcoms2 = []; // path commands of original path p2\n var ii;\n\n var processPath = function(path, d, pcom) {\n var nx,\n ny,\n tq = { T: 1, Q: 1 };\n if (!path) {\n return ['C', d.x, d.y, d.x, d.y, d.x, d.y];\n }\n if (!(path[0] in tq)) {\n d.qx = d.qy = null;\n }\n switch (path[0]) {\n case 'M':\n d.X = path[1];\n d.Y = path[2];\n break;\n case 'A':\n path = ['C'].concat(a2c.apply(0, [d.x, d.y].concat(path.slice(1))));\n break;\n case 'S':\n if (pcom === 'C' || pcom === 'S') {\n nx = d.x * 2 - d.bx;\n ny = d.y * 2 - d.by;\n } else {\n nx = d.x;\n ny = d.y;\n }\n path = ['C', nx, ny].concat(path.slice(1));\n break;\n case 'T':\n if (pcom === 'Q' || pcom === 'T') {\n d.qx = d.x * 2 - d.qx;\n d.qy = d.y * 2 - d.qy;\n } else {\n d.qx = d.x;\n d.qy = d.y;\n }\n path = ['C'].concat(q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\n break;\n case 'Q':\n d.qx = path[1];\n d.qy = path[2];\n path = ['C'].concat(\n q2c(d.x, d.y, path[1], path[2], path[3], path[4])\n );\n break;\n case 'L':\n path = ['C'].concat(l2c(d.x, d.y, path[1], path[2]));\n break;\n case 'H':\n path = ['C'].concat(l2c(d.x, d.y, path[1], d.y));\n break;\n case 'V':\n path = ['C'].concat(l2c(d.x, d.y, d.x, path[1]));\n break;\n case 'Z':\n path = ['C'].concat(l2c(d.x, d.y, d.X, d.Y));\n break;\n }\n return path;\n },\n fixArc = function(pp, i) {\n if (pp[i].length > 7) {\n pp[i].shift();\n var pi = pp[i];\n while (pi.length) {\n pcoms1[i] = 'A';\n if (p2) {\n pcoms2[i] = 'A';\n }\n pp.splice(i++, 0, ['C'].concat(pi.splice(0, 6)));\n }\n pp.splice(i, 1);\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n },\n fixM = function(path1, path2, a1, a2, i) {\n if (path1 && path2 && path1[i][0] === 'M' && path2[i][0] !== 'M') {\n path2.splice(i, 0, ['M', a2.x, a2.y]);\n a1.bx = 0;\n a1.by = 0;\n a1.x = path1[i][1];\n a1.y = path1[i][2];\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n }\n };\n\n var pfirst = ''; // temporary holder for original path command\n var pcom = ''; // holder for previous path command of original path\n\n ii = Math.max(p.length, (p2 && p2.length) || 0);\n for (var i = 0; i < ii; i++) {\n if (p[i]) {\n pfirst = p[i][0];\n } // save current path command\n\n if (pfirst !== 'C') {\n pcoms1[i] = pfirst; // Save current path command\n if (i) {\n pcom = pcoms1[i - 1];\n } // Get previous path command pcom\n }\n p[i] = processPath(p[i], attrs, pcom);\n\n if (pcoms1[i] !== 'A' && pfirst === 'C') {\n pcoms1[i] = 'C';\n }\n\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\n\n if (p2) {\n // the same procedures is done to p2\n if (p2[i]) {\n pfirst = p2[i][0];\n }\n if (pfirst !== 'C') {\n pcoms2[i] = pfirst;\n if (i) {\n pcom = pcoms2[i - 1];\n }\n }\n p2[i] = processPath(p2[i], attrs2, pcom);\n\n if (pcoms2[i] !== 'A' && pfirst === 'C') {\n pcoms2[i] = 'C';\n }\n\n fixArc(p2, i);\n }\n fixM(p, p2, attrs, attrs2, i);\n fixM(p2, p, attrs2, attrs, i);\n var seg = p[i],\n seg2 = p2 && p2[i],\n seglen = seg.length,\n seg2len = p2 && seg2.length;\n attrs.x = seg[seglen - 2];\n attrs.y = seg[seglen - 1];\n attrs.bx = parseFloat(seg[seglen - 4]) || attrs.x;\n attrs.by = parseFloat(seg[seglen - 3]) || attrs.y;\n attrs2.bx = p2 && (parseFloat(seg2[seg2len - 4]) || attrs2.x);\n attrs2.by = p2 && (parseFloat(seg2[seg2len - 3]) || attrs2.y);\n attrs2.x = p2 && seg2[seg2len - 2];\n attrs2.y = p2 && seg2[seg2len - 1];\n }\n\n return p2 ? [p, p2] : p;\n}\n\nfunction a2c(x1, y1, rx, ry, angle, lac, sweep_flag, x2, y2, recursive) {\n // for more information of where this Math came from visit:\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n var PI = Math.PI,\n _120 = PI * 120 / 180,\n f1,\n f2,\n cx,\n cy,\n rad = PI / 180 * (+angle || 0),\n res = [],\n xy,\n rotate = function(x, y, rad) {\n var X = x * Math.cos(rad) - y * Math.sin(rad),\n Y = x * Math.sin(rad) + y * Math.cos(rad);\n return { x: X, y: Y };\n };\n if (!recursive) {\n xy = rotate(x1, y1, -rad);\n x1 = xy.x;\n y1 = xy.y;\n xy = rotate(x2, y2, -rad);\n x2 = xy.x;\n y2 = xy.y;\n var x = (x1 - x2) / 2,\n y = (y1 - y2) / 2,\n h = x * x / (rx * rx) + y * y / (ry * ry);\n if (h > 1) {\n h = Math.sqrt(h);\n rx = h * rx;\n ry = h * ry;\n }\n var rx2 = rx * rx,\n ry2 = ry * ry;\n var k =\n (lac === sweep_flag ? -1 : 1) *\n Math.sqrt(\n Math.abs(\n (rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x)\n )\n );\n\n cx = k * rx * y / ry + (x1 + x2) / 2;\n cy = k * -ry * x / rx + (y1 + y2) / 2;\n f1 = Math.asin(((y1 - cy) / ry).toFixed(9));\n f2 = Math.asin(((y2 - cy) / ry).toFixed(9));\n\n f1 = x1 < cx ? PI - f1 : f1;\n f2 = x2 < cx ? PI - f2 : f2;\n\n if (f1 < 0) {\n f1 = PI * 2 + f1;\n }\n if (f2 < 0) {\n f2 = PI * 2 + f2;\n }\n\n if (sweep_flag && f1 > f2) {\n f1 = f1 - PI * 2;\n }\n if (!sweep_flag && f2 > f1) {\n f2 = f2 - PI * 2;\n }\n } else {\n f1 = recursive[0];\n f2 = recursive[1];\n cx = recursive[2];\n cy = recursive[3];\n }\n var df = f2 - f1;\n if (Math.abs(df) > _120) {\n var f2old = f2,\n x2old = x2,\n y2old = y2;\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\n x2 = cx + rx * Math.cos(f2);\n y2 = cy + ry * Math.sin(f2);\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [\n f2,\n f2old,\n cx,\n cy\n ]);\n }\n df = f2 - f1;\n var c1 = Math.cos(f1),\n s1 = Math.sin(f1),\n c2 = Math.cos(f2),\n s2 = Math.sin(f2),\n t = Math.tan(df / 4),\n hx = 4 / 3 * rx * t,\n hy = 4 / 3 * ry * t,\n m1 = [x1, y1],\n m2 = [x1 + hx * s1, y1 - hy * c1],\n m3 = [x2 + hx * s2, y2 - hy * c2],\n m4 = [x2, y2];\n m2[0] = 2 * m1[0] - m2[0];\n m2[1] = 2 * m1[1] - m2[1];\n if (recursive) {\n return [m2, m3, m4].concat(res);\n } else {\n res = [m2, m3, m4]\n .concat(res)\n .join()\n .split(',');\n var newres = [];\n for (var i = 0, ii = res.length; i < ii; i++) {\n newres[i] =\n i % 2\n ? rotate(res[i - 1], res[i], rad).y\n : rotate(res[i], res[i + 1], rad).x;\n }\n return newres;\n }\n}\n\n// http://schepers.cc/getting-to-the-point\nfunction catmullRom2bezier(crp, z) {\n var d = [];\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\n var p = [\n {\n x: +crp[i - 2],\n y: +crp[i - 1]\n },\n {\n x: +crp[i],\n y: +crp[i + 1]\n },\n {\n x: +crp[i + 2],\n y: +crp[i + 3]\n },\n {\n x: +crp[i + 4],\n y: +crp[i + 5]\n }\n ];\n if (z) {\n if (!i) {\n p[0] = {\n x: +crp[iLen - 2],\n y: +crp[iLen - 1]\n };\n } else if (iLen - 4 === i) {\n p[3] = {\n x: +crp[0],\n y: +crp[1]\n };\n } else if (iLen - 2 === i) {\n p[2] = {\n x: +crp[0],\n y: +crp[1]\n };\n p[3] = {\n x: +crp[2],\n y: +crp[3]\n };\n }\n } else {\n if (iLen - 4 === i) {\n p[3] = p[2];\n } else if (!i) {\n p[0] = {\n x: +crp[i],\n y: +crp[i + 1]\n };\n }\n }\n d.push([\n 'C',\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\n (p[1].y + 6 * p[2].y - p[3].y) / 6,\n p[2].x,\n p[2].y\n ]);\n }\n\n return d;\n}\n\nfunction l2c(x1, y1, x2, y2) {\n return [x1, y1, x2, y2, x2, y2];\n}\n\nfunction q2c(x1, y1, ax, ay, x2, y2) {\n var _13 = 1 / 3,\n _23 = 2 / 3;\n return [\n _13 * x1 + _23 * ax,\n _13 * y1 + _23 * ay,\n _13 * x2 + _23 * ax,\n _13 * y2 + _23 * ay,\n x2,\n y2\n ];\n}\n\nfunction bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\n if (z == null) {\n z = 1;\n }\n z = z > 1 ? 1 : z < 0 ? 0 : z;\n var z2 = z / 2;\n var n = 12;\n var Tvalues = [\n -0.1252,\n 0.1252,\n -0.3678,\n 0.3678,\n -0.5873,\n 0.5873,\n -0.7699,\n 0.7699,\n -0.9041,\n 0.9041,\n -0.9816,\n 0.9816\n ];\n\n var sum = 0;\n var Cvalues = [\n 0.2491,\n 0.2491,\n 0.2335,\n 0.2335,\n 0.2032,\n 0.2032,\n 0.1601,\n 0.1601,\n 0.1069,\n 0.1069,\n 0.0472,\n 0.0472\n ];\n\n for (var i = 0; i < n; i++) {\n var ct = z2 * Tvalues[i] + z2,\n xbase = base3(ct, x1, x2, x3, x4),\n ybase = base3(ct, y1, y2, y3, y4),\n comb = xbase * xbase + ybase * ybase;\n sum += Cvalues[i] * Math.sqrt(comb);\n }\n return z2 * sum;\n}\n\nfunction getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {\n if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {\n return;\n }\n var t = 1,\n step = t / 2,\n t2 = t - step,\n l,\n e = 0.01;\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\n while (Math.abs(l - ll) > e) {\n step /= 2;\n t2 += (l < ll ? 1 : -1) * step;\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\n }\n return t2;\n}\n\nfunction base3(t, p1, p2, p3, p4) {\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,\n t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\n return t * t2 - 3 * p1 + 3 * p2;\n}\n\nfunction cacheKey() {\n var hash = '';\n for (var i = arguments.length - 1; i >= 0; --i) {\n hash += '?' + arguments[i];\n }\n return hash;\n}\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24}],60:[function(_dereq_,module,exports){\n/**\n * @module Data\n * @submodule Array Functions\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Adds a value to the end of an array. Extends the length of\n * the array by one. Maps to Array.push().\n *\n * @method append\n * @deprecated Use array.push(value) instead.\n * @param {Array} array Array to append\n * @param {any} value to be added to the Array\n * @return {Array} the array that was appended to\n * @example\n * \n * function setup() {\n * var myArray = ['Mango', 'Apple', 'Papaya'];\n * print(myArray); // ['Mango', 'Apple', 'Papaya']\n *\n * append(myArray, 'Peach');\n * print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']\n * }\n * \n */\np5.prototype.append = function(array, value) {\n array.push(value);\n return array;\n};\n\n/**\n * Copies an array (or part of an array) to another array. The src array is\n * copied to the dst array, beginning at the position specified by\n * srcPosition and into the position specified by dstPosition. The number of\n * elements to copy is determined by length. Note that copying values\n * overwrites existing values in the destination array. To append values\n * instead of overwriting them, use concat().\n * \n * The simplified version with only two arguments, arrayCopy(src, dst),\n * copies an entire array to another of the same size. It is equivalent to\n * arrayCopy(src, 0, dst, 0, src.length).\n * \n * Using this function is far more efficient for copying array data than\n * iterating through a for() loop and copying each element individually.\n *\n * @method arrayCopy\n * @deprecated\n * @param {Array} src the source Array\n * @param {Integer} srcPosition starting position in the source Array\n * @param {Array} dst the destination Array\n * @param {Integer} dstPosition starting position in the destination Array\n * @param {Integer} length number of Array elements to be copied\n *\n * @example\n * \n * var src = ['A', 'B', 'C'];\n * var dst = [1, 2, 3];\n * var srcPosition = 1;\n * var dstPosition = 0;\n * var length = 2;\n *\n * print(src); // ['A', 'B', 'C']\n * print(dst); // [ 1 , 2 , 3 ]\n *\n * arrayCopy(src, srcPosition, dst, dstPosition, length);\n * print(dst); // ['B', 'C', 3]\n * \n */\n/**\n * @method arrayCopy\n * @deprecated Use arr1.copyWithin(arr2) instead.\n * @param {Array} src\n * @param {Array} dst\n * @param {Integer} [length]\n */\np5.prototype.arrayCopy = function(src, srcPosition, dst, dstPosition, length) {\n // the index to begin splicing from dst array\n var start;\n var end;\n\n if (typeof length !== 'undefined') {\n end = Math.min(length, src.length);\n start = dstPosition;\n src = src.slice(srcPosition, end + srcPosition);\n } else {\n if (typeof dst !== 'undefined') {\n // src, dst, length\n // rename so we don't get confused\n end = dst;\n end = Math.min(end, src.length);\n } else {\n // src, dst\n end = src.length;\n }\n\n start = 0;\n // rename so we don't get confused\n dst = srcPosition;\n src = src.slice(0, end);\n }\n\n // Since we are not returning the array and JavaScript is pass by reference\n // we must modify the actual values of the array\n // instead of reassigning arrays\n Array.prototype.splice.apply(dst, [start, end].concat(src));\n};\n\n/**\n * Concatenates two arrays, maps to Array.concat(). Does not modify the\n * input arrays.\n *\n * @method concat\n * @deprecated Use arr1.concat(arr2) instead.\n * @param {Array} a first Array to concatenate\n * @param {Array} b second Array to concatenate\n * @return {Array} concatenated array\n *\n * @example\n * \n * function setup() {\n * var arr1 = ['A', 'B', 'C'];\n * var arr2 = [1, 2, 3];\n *\n * print(arr1); // ['A','B','C']\n * print(arr2); // [1,2,3]\n *\n * var arr3 = concat(arr1, arr2);\n *\n * print(arr1); // ['A','B','C']\n * print(arr2); // [1, 2, 3]\n * print(arr3); // ['A','B','C', 1, 2, 3]\n * }\n * \n */\np5.prototype.concat = function(list0, list1) {\n return list0.concat(list1);\n};\n\n/**\n * Reverses the order of an array, maps to Array.reverse()\n *\n * @method reverse\n * @deprecated Use array.reverse() instead.\n * @param {Array} list Array to reverse\n * @return {Array} the reversed list\n * @example\n * \n * function setup() {\n * var myArray = ['A', 'B', 'C'];\n * print(myArray); // ['A','B','C']\n *\n * reverse(myArray);\n * print(myArray); // ['C','B','A']\n * }\n * \n */\np5.prototype.reverse = function(list) {\n return list.reverse();\n};\n\n/**\n * Decreases an array by one element and returns the shortened array,\n * maps to Array.pop().\n *\n * @method shorten\n * @deprecated Use array.pop() instead.\n * @param {Array} list Array to shorten\n * @return {Array} shortened Array\n * @example\n * \n * function setup() {\n * var myArray = ['A', 'B', 'C'];\n * print(myArray); // ['A', 'B', 'C']\n * var newArray = shorten(myArray);\n * print(myArray); // ['A','B','C']\n * print(newArray); // ['A','B']\n * }\n * \n */\np5.prototype.shorten = function(list) {\n list.pop();\n return list;\n};\n\n/**\n * Randomizes the order of the elements of an array. Implements\n * \n * Fisher-Yates Shuffle Algorithm.\n *\n * @method shuffle\n * @param {Array} array Array to shuffle\n * @param {Boolean} [bool] modify passed array\n * @return {Array} shuffled Array\n * @example\n * \n * function setup() {\n * var regularArr = ['ABC', 'def', createVector(), TAU, Math.E];\n * print(regularArr);\n * shuffle(regularArr, true); // force modifications to passed array\n * print(regularArr);\n *\n * // By default shuffle() returns a shuffled cloned array:\n * var newArr = shuffle(regularArr);\n * print(regularArr);\n * print(newArr);\n * }\n * \n */\np5.prototype.shuffle = function(arr, bool) {\n var isView = ArrayBuffer && ArrayBuffer.isView && ArrayBuffer.isView(arr);\n arr = bool || isView ? arr : arr.slice();\n\n var rnd,\n tmp,\n idx = arr.length;\n while (idx > 1) {\n rnd = (Math.random() * idx) | 0;\n\n tmp = arr[--idx];\n arr[idx] = arr[rnd];\n arr[rnd] = tmp;\n }\n\n return arr;\n};\n\n/**\n * Sorts an array of numbers from smallest to largest, or puts an array of\n * words in alphabetical order. The original array is not modified; a\n * re-ordered array is returned. The count parameter states the number of\n * elements to sort. For example, if there are 12 elements in an array and\n * count is set to 5, only the first 5 elements in the array will be sorted.\n *\n * @method sort\n * @deprecated Use array.sort() instead.\n * @param {Array} list Array to sort\n * @param {Integer} [count] number of elements to sort, starting from 0\n * @return {Array} the sorted list\n *\n * @example\n * \n * function setup() {\n * var words = ['banana', 'apple', 'pear', 'lime'];\n * print(words); // ['banana', 'apple', 'pear', 'lime']\n * var count = 4; // length of array\n *\n * words = sort(words, count);\n * print(words); // ['apple', 'banana', 'lime', 'pear']\n * }\n * \n * \n * function setup() {\n * var numbers = [2, 6, 1, 5, 14, 9, 8, 12];\n * print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]\n * var count = 5; // Less than the length of the array\n *\n * numbers = sort(numbers, count);\n * print(numbers); // [1,2,5,6,14,9,8,12]\n * }\n * \n */\np5.prototype.sort = function(list, count) {\n var arr = count ? list.slice(0, Math.min(count, list.length)) : list;\n var rest = count ? list.slice(Math.min(count, list.length)) : [];\n if (typeof arr[0] === 'string') {\n arr = arr.sort();\n } else {\n arr = arr.sort(function(a, b) {\n return a - b;\n });\n }\n return arr.concat(rest);\n};\n\n/**\n * Inserts a value or an array of values into an existing array. The first\n * parameter specifies the initial array to be modified, and the second\n * parameter defines the data to be inserted. The third parameter is an index\n * value which specifies the array position from which to insert data.\n * (Remember that array index numbering starts at zero, so the first position\n * is 0, the second position is 1, and so on.)\n *\n * @method splice\n * @deprecated Use array.splice() instead.\n * @param {Array} list Array to splice into\n * @param {any} value value to be spliced in\n * @param {Integer} position in the array from which to insert data\n * @return {Array} the list\n *\n * @example\n * \n * function setup() {\n * var myArray = [0, 1, 2, 3, 4];\n * var insArray = ['A', 'B', 'C'];\n * print(myArray); // [0, 1, 2, 3, 4]\n * print(insArray); // ['A','B','C']\n *\n * splice(myArray, insArray, 3);\n * print(myArray); // [0,1,2,'A','B','C',3,4]\n * }\n * \n */\np5.prototype.splice = function(list, value, index) {\n // note that splice returns spliced elements and not an array\n Array.prototype.splice.apply(list, [index, 0].concat(value));\n\n return list;\n};\n\n/**\n * Extracts an array of elements from an existing array. The list parameter\n * defines the array from which the elements will be copied, and the start\n * and count parameters specify which elements to extract. If no count is\n * given, elements will be extracted from the start to the end of the array.\n * When specifying the start, remember that the first array element is 0.\n * This function does not change the source array.\n *\n * @method subset\n * @deprecated Use array.slice() instead.\n * @param {Array} list Array to extract from\n * @param {Integer} start position to begin\n * @param {Integer} [count] number of values to extract\n * @return {Array} Array of extracted elements\n *\n * @example\n * \n * function setup() {\n * var myArray = [1, 2, 3, 4, 5];\n * print(myArray); // [1, 2, 3, 4, 5]\n *\n * var sub1 = subset(myArray, 0, 3);\n * var sub2 = subset(myArray, 2, 2);\n * print(sub1); // [1,2,3]\n * print(sub2); // [3,4]\n * }\n * \n */\np5.prototype.subset = function(list, start, count) {\n if (typeof count !== 'undefined') {\n return list.slice(start, start + count);\n } else {\n return list.slice(start, list.length);\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],61:[function(_dereq_,module,exports){\n/**\n * @module Data\n * @submodule Conversion\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Converts a string to its floating point representation. The contents of a\n * string must resemble a number, or NaN (not a number) will be returned.\n * For example, float(\"1234.56\") evaluates to 1234.56, but float(\"giraffe\")\n * will return NaN.\n *\n * When an array of values is passed in, then an array of floats of the same\n * length is returned.\n *\n * @method float\n * @param {String} str float string to parse\n * @return {Number} floating point representation of string\n * @example\n * \n * var str = '20';\n * var diameter = float(str);\n * ellipse(width / 2, height / 2, diameter, diameter);\n * \n * \n * print(float('10.31')); // 10.31\n * print(float('Infinity')); // Infinity\n * print(float('-Infinity')); // -Infinity\n * \n *\n * @alt\n * 20 by 20 white ellipse in the center of the canvas\n *\n */\np5.prototype.float = function(str) {\n if (str instanceof Array) {\n return str.map(parseFloat);\n }\n return parseFloat(str);\n};\n\n/**\n * Converts a boolean, string, or float to its integer representation.\n * When an array of values is passed in, then an int array of the same length\n * is returned.\n *\n * @method int\n * @param {String|Boolean|Number} n value to parse\n * @param {Integer} [radix] the radix to convert to (default: 10)\n * @return {Number} integer representation of value\n *\n * @example\n * \n * print(int('10')); // 10\n * print(int(10.31)); // 10\n * print(int(-10)); // -10\n * print(int(true)); // 1\n * print(int(false)); // 0\n * print(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]\n * print(int(Infinity)); // Infinity\n * print(int('-Infinity')); // -Infinity\n * \n */\n/**\n * @method int\n * @param {Array} ns values to parse\n * @return {Number[]} integer representation of values\n */\np5.prototype.int = function(n, radix) {\n radix = radix || 10;\n if (n === Infinity || n === 'Infinity') {\n return Infinity;\n } else if (n === -Infinity || n === '-Infinity') {\n return -Infinity;\n } else if (typeof n === 'string') {\n return parseInt(n, radix);\n } else if (typeof n === 'number') {\n return n | 0;\n } else if (typeof n === 'boolean') {\n return n ? 1 : 0;\n } else if (n instanceof Array) {\n return n.map(function(n) {\n return p5.prototype.int(n, radix);\n });\n }\n};\n\n/**\n * Converts a boolean, string or number to its string representation.\n * When an array of values is passed in, then an array of strings of the same\n * length is returned.\n *\n * @method str\n * @param {String|Boolean|Number|Array} n value to parse\n * @return {String} string representation of value\n * @example\n * \n * print(str('10')); // \"10\"\n * print(str(10.31)); // \"10.31\"\n * print(str(-10)); // \"-10\"\n * print(str(true)); // \"true\"\n * print(str(false)); // \"false\"\n * print(str([true, '10.3', 9.8])); // [ \"true\", \"10.3\", \"9.8\" ]\n * \n */\np5.prototype.str = function(n) {\n if (n instanceof Array) {\n return n.map(p5.prototype.str);\n } else {\n return String(n);\n }\n};\n\n/**\n * Converts a number or string to its boolean representation.\n * For a number, any non-zero value (positive or negative) evaluates to true,\n * while zero evaluates to false. For a string, the value \"true\" evaluates to\n * true, while any other value evaluates to false. When an array of number or\n * string values is passed in, then a array of booleans of the same length is\n * returned.\n *\n * @method boolean\n * @param {String|Boolean|Number|Array} n value to parse\n * @return {Boolean} boolean representation of value\n * @example\n * \n * print(boolean(0)); // false\n * print(boolean(1)); // true\n * print(boolean('true')); // true\n * print(boolean('abcd')); // false\n * print(boolean([0, 12, 'true'])); // [false, true, true]\n * \n */\np5.prototype.boolean = function(n) {\n if (typeof n === 'number') {\n return n !== 0;\n } else if (typeof n === 'string') {\n return n.toLowerCase() === 'true';\n } else if (typeof n === 'boolean') {\n return n;\n } else if (n instanceof Array) {\n return n.map(p5.prototype.boolean);\n }\n};\n\n/**\n * Converts a number, string representation of a number, or boolean to its byte\n * representation. A byte can be only a whole number between -128 and 127, so\n * when a value outside of this range is converted, it wraps around to the\n * corresponding byte representation. When an array of number, string or boolean\n * values is passed in, then an array of bytes the same length is returned.\n *\n * @method byte\n * @param {String|Boolean|Number} n value to parse\n * @return {Number} byte representation of value\n *\n * @example\n * \n * print(byte(127)); // 127\n * print(byte(128)); // -128\n * print(byte(23.4)); // 23\n * print(byte('23.4')); // 23\n * print(byte('hello')); // NaN\n * print(byte(true)); // 1\n * print(byte([0, 255, '100'])); // [0, -1, 100]\n * \n */\n/**\n * @method byte\n * @param {Array} ns values to parse\n * @return {Number[]} array of byte representation of values\n */\np5.prototype.byte = function(n) {\n var nn = p5.prototype.int(n, 10);\n if (typeof nn === 'number') {\n return (nn + 128) % 256 - 128;\n } else if (nn instanceof Array) {\n return nn.map(p5.prototype.byte);\n }\n};\n\n/**\n * Converts a number or string to its corresponding single-character\n * string representation. If a string parameter is provided, it is first\n * parsed as an integer and then translated into a single-character string.\n * When an array of number or string values is passed in, then an array of\n * single-character strings of the same length is returned.\n *\n * @method char\n * @param {String|Number} n value to parse\n * @return {String} string representation of value\n *\n * @example\n * \n * print(char(65)); // \"A\"\n * print(char('65')); // \"A\"\n * print(char([65, 66, 67])); // [ \"A\", \"B\", \"C\" ]\n * print(join(char([65, 66, 67]), '')); // \"ABC\"\n * \n */\n/**\n * @method char\n * @param {Array} ns values to parse\n * @return {String[]} array of string representation of values\n */\np5.prototype.char = function(n) {\n if (typeof n === 'number' && !isNaN(n)) {\n return String.fromCharCode(n);\n } else if (n instanceof Array) {\n return n.map(p5.prototype.char);\n } else if (typeof n === 'string') {\n return p5.prototype.char(parseInt(n, 10));\n }\n};\n\n/**\n * Converts a single-character string to its corresponding integer\n * representation. When an array of single-character string values is passed\n * in, then an array of integers of the same length is returned.\n *\n * @method unchar\n * @param {String} n value to parse\n * @return {Number} integer representation of value\n *\n * @example\n * \n * print(unchar('A')); // 65\n * print(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]\n * print(unchar(split('ABC', ''))); // [ 65, 66, 67 ]\n * \n */\n/**\n * @method unchar\n * @param {Array} ns values to parse\n * @return {Number[]} integer representation of values\n */\np5.prototype.unchar = function(n) {\n if (typeof n === 'string' && n.length === 1) {\n return n.charCodeAt(0);\n } else if (n instanceof Array) {\n return n.map(p5.prototype.unchar);\n }\n};\n\n/**\n * Converts a number to a string in its equivalent hexadecimal notation. If a\n * second parameter is passed, it is used to set the number of characters to\n * generate in the hexadecimal notation. When an array is passed in, an\n * array of strings in hexadecimal notation of the same length is returned.\n *\n * @method hex\n * @param {Number} n value to parse\n * @param {Number} [digits]\n * @return {String} hexadecimal string representation of value\n *\n * @example\n * \n * print(hex(255)); // \"000000FF\"\n * print(hex(255, 6)); // \"0000FF\"\n * print(hex([0, 127, 255], 6)); // [ \"000000\", \"00007F\", \"0000FF\" ]\n * print(Infinity); // \"FFFFFFFF\"\n * print(-Infinity); // \"00000000\"\n * \n */\n/**\n * @method hex\n * @param {Number[]} ns array of values to parse\n * @param {Number} [digits]\n * @return {String[]} hexadecimal string representation of values\n */\np5.prototype.hex = function(n, digits) {\n digits = digits === undefined || digits === null ? (digits = 8) : digits;\n if (n instanceof Array) {\n return n.map(function(n) {\n return p5.prototype.hex(n, digits);\n });\n } else if (n === Infinity || n === -Infinity) {\n var c = n === Infinity ? 'F' : '0';\n return c.repeat(digits);\n } else if (typeof n === 'number') {\n if (n < 0) {\n n = 0xffffffff + n + 1;\n }\n var hex = Number(n)\n .toString(16)\n .toUpperCase();\n while (hex.length < digits) {\n hex = '0' + hex;\n }\n if (hex.length >= digits) {\n hex = hex.substring(hex.length - digits, hex.length);\n }\n return hex;\n }\n};\n\n/**\n * Converts a string representation of a hexadecimal number to its equivalent\n * integer value. When an array of strings in hexadecimal notation is passed\n * in, an array of integers of the same length is returned.\n *\n * @method unhex\n * @param {String} n value to parse\n * @return {Number} integer representation of hexadecimal value\n *\n * @example\n * \n * print(unhex('A')); // 10\n * print(unhex('FF')); // 255\n * print(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]\n * \n */\n/**\n * @method unhex\n * @param {Array} ns values to parse\n * @return {Number[]} integer representations of hexadecimal value\n */\np5.prototype.unhex = function(n) {\n if (n instanceof Array) {\n return n.map(p5.prototype.unhex);\n } else {\n return parseInt('0x' + n, 16);\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],62:[function(_dereq_,module,exports){\n/**\n * @module Data\n * @submodule String Functions\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n_dereq_('../core/error_helpers');\n\n//return p5; //LM is this a mistake?\n\n/**\n * Combines an array of Strings into one String, each separated by the\n * character(s) used for the separator parameter. To join arrays of ints or\n * floats, it's necessary to first convert them to Strings using nf() or\n * nfs().\n *\n * @method join\n * @param {Array} list array of Strings to be joined\n * @param {String} separator String to be placed between each item\n * @return {String} joined String\n * @example\n * \n * \n * var array = ['Hello', 'world!'];\n * var separator = ' ';\n * var message = join(array, separator);\n * text(message, 5, 50);\n * \n * \n *\n * @alt\n * \"hello world!\" displayed middle left of canvas.\n *\n */\np5.prototype.join = function(list, separator) {\n p5._validateParameters('join', arguments);\n return list.join(separator);\n};\n\n/**\n * This function is used to apply a regular expression to a piece of text,\n * and return matching groups (elements found inside parentheses) as a\n * String array. If there are no matches, a null value will be returned.\n * If no groups are specified in the regular expression, but the sequence\n * matches, an array of length 1 (with the matched text as the first element\n * of the array) will be returned.\n * \n * To use the function, first check to see if the result is null. If the\n * result is null, then the sequence did not match at all. If the sequence\n * did match, an array is returned.\n * \n * If there are groups (specified by sets of parentheses) in the regular\n * expression, then the contents of each will be returned in the array.\n * Element [0] of a regular expression match returns the entire matching\n * string, and the match groups start at element [1] (the first group is [1],\n * the second [2], and so on).\n *\n * @method match\n * @param {String} str the String to be searched\n * @param {String} regexp the regexp to be used for matching\n * @return {String[]} Array of Strings found\n * @example\n * \n * \n * var string = 'Hello p5js*!';\n * var regexp = 'p5js\\\\*';\n * var m = match(string, regexp);\n * text(m, 5, 50);\n * \n * \n *\n * @alt\n * \"p5js*\" displayed middle left of canvas.\n *\n */\np5.prototype.match = function(str, reg) {\n p5._validateParameters('match', arguments);\n return str.match(reg);\n};\n\n/**\n * This function is used to apply a regular expression to a piece of text,\n * and return a list of matching groups (elements found inside parentheses)\n * as a two-dimensional String array. If there are no matches, a null value\n * will be returned. If no groups are specified in the regular expression,\n * but the sequence matches, a two dimensional array is still returned, but\n * the second dimension is only of length one.\n * \n * To use the function, first check to see if the result is null. If the\n * result is null, then the sequence did not match at all. If the sequence\n * did match, a 2D array is returned.\n * \n * If there are groups (specified by sets of parentheses) in the regular\n * expression, then the contents of each will be returned in the array.\n * Assuming a loop with counter variable i, element [i][0] of a regular\n * expression match returns the entire matching string, and the match groups\n * start at element [i][1] (the first group is [i][1], the second [i][2],\n * and so on).\n *\n * @method matchAll\n * @param {String} str the String to be searched\n * @param {String} regexp the regexp to be used for matching\n * @return {String[]} 2d Array of Strings found\n * @example\n * \n * \n * var string = 'Hello p5js*! Hello world!';\n * var regexp = 'Hello';\n * matchAll(string, regexp);\n * \n * \n */\np5.prototype.matchAll = function(str, reg) {\n p5._validateParameters('matchAll', arguments);\n var re = new RegExp(reg, 'g');\n var match = re.exec(str);\n var matches = [];\n while (match !== null) {\n matches.push(match);\n // matched text: match[0]\n // match start: match.index\n // capturing group n: match[n]\n match = re.exec(str);\n }\n return matches;\n};\n\n/**\n * Utility function for formatting numbers into strings. There are two\n * versions: one for formatting floats, and one for formatting ints.\n * The values for the digits, left, and right parameters should always\n * be positive integers.\n * (NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\n * if greater than the current length of the number.\n * For example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\n * (integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\n * the result will be 123.200.\n *\n * @method nf\n * @param {Number|String} num the Number to format\n * @param {Integer|String} [left] number of digits to the left of the\n * decimal point\n * @param {Integer|String} [right] number of digits to the right of the\n * decimal point\n * @return {String} formatted String\n *\n * @example\n * \n * \n * var myFont;\n * function preload() {\n * myFont = loadFont('assets/fonts/inconsolata.ttf');\n * }\n * function setup() {\n * background(200);\n * var num1 = 321;\n * var num2 = -1321;\n *\n * noStroke();\n * fill(0);\n * textFont(myFont);\n * textSize(22);\n *\n * text(nf(num1, 4, 2), 10, 30);\n * text(nf(num2, 4, 2), 10, 80);\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n * \n * \n *\n * @alt\n * \"0321.00\" middle top, -1321.00\" middle bottom canvas\n */\n/**\n * @method nf\n * @param {Array} nums the Numbers to format\n * @param {Integer|String} [left]\n * @param {Integer|String} [right]\n * @return {String[]} formatted Strings\n */\np5.prototype.nf = function(nums, left, right) {\n p5._validateParameters('nf', arguments);\n if (nums instanceof Array) {\n return nums.map(function(x) {\n return doNf(x, left, right);\n });\n } else {\n var typeOfFirst = Object.prototype.toString.call(nums);\n if (typeOfFirst === '[object Arguments]') {\n if (nums.length === 3) {\n return this.nf(nums[0], nums[1], nums[2]);\n } else if (nums.length === 2) {\n return this.nf(nums[0], nums[1]);\n } else {\n return this.nf(nums[0]);\n }\n } else {\n return doNf(nums, left, right);\n }\n }\n};\n\nfunction doNf(num, left, right) {\n var neg = num < 0;\n var n = neg ? num.toString().substring(1) : num.toString();\n var decimalInd = n.indexOf('.');\n var intPart = decimalInd !== -1 ? n.substring(0, decimalInd) : n;\n var decPart = decimalInd !== -1 ? n.substring(decimalInd + 1) : '';\n var str = neg ? '-' : '';\n if (typeof right !== 'undefined') {\n var decimal = '';\n if (decimalInd !== -1 || right - decPart.length > 0) {\n decimal = '.';\n }\n if (decPart.length > right) {\n decPart = decPart.substring(0, right);\n }\n for (var i = 0; i < left - intPart.length; i++) {\n str += '0';\n }\n str += intPart;\n str += decimal;\n str += decPart;\n for (var j = 0; j < right - decPart.length; j++) {\n str += '0';\n }\n return str;\n } else {\n for (var k = 0; k < Math.max(left - intPart.length, 0); k++) {\n str += '0';\n }\n str += n;\n return str;\n }\n}\n\n/**\n * Utility function for formatting numbers into strings and placing\n * appropriate commas to mark units of 1000. There are two versions: one\n * for formatting ints, and one for formatting an array of ints. The value\n * for the right parameter should always be a positive integer.\n *\n * @method nfc\n * @param {Number|String} num the Number to format\n * @param {Integer|String} [right] number of digits to the right of the\n * decimal point\n * @return {String} formatted String\n *\n * @example\n * \n * \n * function setup() {\n * background(200);\n * var num = 11253106.115;\n * var numArr = [1, 1, 2];\n *\n * noStroke();\n * fill(0);\n * textSize(12);\n *\n * // Draw formatted numbers\n * text(nfc(num, 4), 10, 30);\n * text(nfc(numArr, 2), 10, 80);\n *\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n * \n * \n *\n * @alt\n * \"11,253,106.115\" top middle and \"1.00,1.00,2.00\" displayed bottom mid\n */\n/**\n * @method nfc\n * @param {Array} nums the Numbers to format\n * @param {Integer|String} [right]\n * @return {String[]} formatted Strings\n */\np5.prototype.nfc = function(num, right) {\n p5._validateParameters('nfc', arguments);\n if (num instanceof Array) {\n return num.map(function(x) {\n return doNfc(x, right);\n });\n } else {\n return doNfc(num, right);\n }\n};\nfunction doNfc(num, right) {\n num = num.toString();\n var dec = num.indexOf('.');\n var rem = dec !== -1 ? num.substring(dec) : '';\n var n = dec !== -1 ? num.substring(0, dec) : num;\n n = n.toString().replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n if (right === 0) {\n rem = '';\n } else if (typeof right !== 'undefined') {\n if (right > rem.length) {\n rem += dec === -1 ? '.' : '';\n var len = right - rem.length + 1;\n for (var i = 0; i < len; i++) {\n rem += '0';\n }\n } else {\n rem = rem.substring(0, right + 1);\n }\n }\n return n + rem;\n}\n\n/**\n * Utility function for formatting numbers into strings. Similar to nf() but\n * puts a \"+\" in front of positive numbers and a \"-\" in front of negative\n * numbers. There are two versions: one for formatting floats, and one for\n * formatting ints. The values for left, and right parameters\n * should always be positive integers.\n *\n * @method nfp\n * @param {Number} num the Number to format\n * @param {Integer} [left] number of digits to the left of the decimal\n * point\n * @param {Integer} [right] number of digits to the right of the\n * decimal point\n * @return {String} formatted String\n *\n * @example\n * \n * \n * function setup() {\n * background(200);\n * var num1 = 11253106.115;\n * var num2 = -11253106.115;\n *\n * noStroke();\n * fill(0);\n * textSize(12);\n *\n * // Draw formatted numbers\n * text(nfp(num1, 4, 2), 10, 30);\n * text(nfp(num2, 4, 2), 10, 80);\n *\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n * \n * \n *\n * @alt\n * \"+11253106.11\" top middle and \"-11253106.11\" displayed bottom middle\n */\n/**\n * @method nfp\n * @param {Number[]} nums the Numbers to format\n * @param {Integer} [left]\n * @param {Integer} [right]\n * @return {String[]} formatted Strings\n */\np5.prototype.nfp = function() {\n p5._validateParameters('nfp', arguments);\n var nfRes = p5.prototype.nf.apply(this, arguments);\n if (nfRes instanceof Array) {\n return nfRes.map(addNfp);\n } else {\n return addNfp(nfRes);\n }\n};\n\nfunction addNfp(num) {\n return parseFloat(num) > 0 ? '+' + num.toString() : num.toString();\n}\n\n/**\n * Utility function for formatting numbers into strings. Similar to nf() but\n * puts an additional \"_\" (space) in front of positive numbers just in case to align it with negative\n * numbers which includes \"-\" (minus) sign.\n * The main usecase of nfs() can be seen when one wants to align the digits (place values) of a positive\n * number with some negative number (See the example to get a clear picture).\n * There are two versions: one for formatting float, and one for formatting int.\n * The values for the digits, left, and right parameters should always be positive integers.\n * (IMP): The result on the canvas basically the expected alignment can vary based on the typeface you are using.\n * (NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\n * if greater than the current length of the number.\n * For example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\n * (integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\n * the result will be 123.200.\n *\n * @method nfs\n * @param {Number} num the Number to format\n * @param {Integer} [left] number of digits to the left of the decimal\n * point\n * @param {Integer} [right] number of digits to the right of the\n * decimal point\n * @return {String} formatted String\n *\n * @example\n * \n * \n * var myFont;\n * function preload() {\n * myFont = loadFont('assets/fonts/inconsolata.ttf');\n * }\n * function setup() {\n * background(200);\n * var num1 = 321;\n * var num2 = -1321;\n *\n * noStroke();\n * fill(0);\n * textFont(myFont);\n * textSize(22);\n *\n * // nfs() aligns num1 (positive number) with num2 (negative number) by\n * // adding a blank space in front of the num1 (positive number)\n * // [left = 4] in num1 add one 0 in front, to align the digits with num2\n * // [right = 2] in num1 and num2 adds two 0's after both numbers\n * // To see the differences check the example of nf() too.\n * text(nfs(num1, 4, 2), 10, 30);\n * text(nfs(num2, 4, 2), 10, 80);\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n * \n * \n *\n * @alt\n * \"0321.00\" top middle and \"-1321.00\" displayed bottom middle\n */\n/**\n * @method nfs\n * @param {Array} nums the Numbers to format\n * @param {Integer} [left]\n * @param {Integer} [right]\n * @return {String[]} formatted Strings\n */\np5.prototype.nfs = function() {\n p5._validateParameters('nfs', arguments);\n var nfRes = p5.prototype.nf.apply(this, arguments);\n if (nfRes instanceof Array) {\n return nfRes.map(addNfs);\n } else {\n return addNfs(nfRes);\n }\n};\n\nfunction addNfs(num) {\n return parseFloat(num) > 0 ? ' ' + num.toString() : num.toString();\n}\n\n/**\n * The split() function maps to String.split(), it breaks a String into\n * pieces using a character or string as the delimiter. The delim parameter\n * specifies the character or characters that mark the boundaries between\n * each piece. A String[] array is returned that contains each of the pieces.\n *\n * The splitTokens() function works in a similar fashion, except that it\n * splits using a range of characters instead of a specific character or\n * sequence.\n *\n * @method split\n * @param {String} value the String to be split\n * @param {String} delim the String used to separate the data\n * @return {String[]} Array of Strings\n * @example\n * \n * \n * var names = 'Pat,Xio,Alex';\n * var splitString = split(names, ',');\n * text(splitString[0], 5, 30);\n * text(splitString[1], 5, 50);\n * text(splitString[2], 5, 70);\n * \n * \n *\n * @alt\n * \"pat\" top left, \"Xio\" mid left and \"Alex\" displayed bottom left\n *\n */\np5.prototype.split = function(str, delim) {\n p5._validateParameters('split', arguments);\n return str.split(delim);\n};\n\n/**\n * The splitTokens() function splits a String at one or many character\n * delimiters or \"tokens.\" The delim parameter specifies the character or\n * characters to be used as a boundary.\n * \n * If no delim characters are specified, any whitespace character is used to\n * split. Whitespace characters include tab (\\t), line feed (\\n), carriage\n * return (\\r), form feed (\\f), and space.\n *\n * @method splitTokens\n * @param {String} value the String to be split\n * @param {String} [delim] list of individual Strings that will be used as\n * separators\n * @return {String[]} Array of Strings\n * @example\n * \n * \n * function setup() {\n * var myStr = 'Mango, Banana, Lime';\n * var myStrArr = splitTokens(myStr, ',');\n *\n * print(myStrArr); // prints : [\"Mango\",\" Banana\",\" Lime\"]\n * }\n * \n * \n */\np5.prototype.splitTokens = function(value, delims) {\n p5._validateParameters('splitTokens', arguments);\n var d;\n if (typeof delims !== 'undefined') {\n var str = delims;\n var sqc = /\\]/g.exec(str);\n var sqo = /\\[/g.exec(str);\n if (sqo && sqc) {\n str = str.slice(0, sqc.index) + str.slice(sqc.index + 1);\n sqo = /\\[/g.exec(str);\n str = str.slice(0, sqo.index) + str.slice(sqo.index + 1);\n d = new RegExp('[\\\\[' + str + '\\\\]]', 'g');\n } else if (sqc) {\n str = str.slice(0, sqc.index) + str.slice(sqc.index + 1);\n d = new RegExp('[' + str + '\\\\]]', 'g');\n } else if (sqo) {\n str = str.slice(0, sqo.index) + str.slice(sqo.index + 1);\n d = new RegExp('[' + str + '\\\\[]', 'g');\n } else {\n d = new RegExp('[' + str + ']', 'g');\n }\n } else {\n d = /\\s/g;\n }\n return value.split(d).filter(function(n) {\n return n;\n });\n};\n\n/**\n * Removes whitespace characters from the beginning and end of a String. In\n * addition to standard whitespace characters such as space, carriage return,\n * and tab, this function also removes the Unicode \"nbsp\" character.\n *\n * @method trim\n * @param {String} str a String to be trimmed\n * @return {String} a trimmed String\n *\n * @example\n * \n * \n * var string = trim(' No new lines\\n ');\n * text(string + ' here', 2, 50);\n * \n * \n *\n * @alt\n * \"No new lines here\" displayed center canvas\n */\n/**\n * @method trim\n * @param {Array} strs an Array of Strings to be trimmed\n * @return {String[]} an Array of trimmed Strings\n */\np5.prototype.trim = function(str) {\n p5._validateParameters('trim', arguments);\n if (str instanceof Array) {\n return str.map(this.trim);\n } else {\n return str.trim();\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/error_helpers\":20,\"../core/main\":24}],63:[function(_dereq_,module,exports){\n/**\n * @module IO\n * @submodule Time & Date\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * p5.js communicates with the clock on your computer. The day() function\n * returns the current day as a value from 1 - 31.\n *\n * @method day\n * @return {Integer} the current day\n * @example\n * \n * \n * var d = day();\n * text('Current day: \\n' + d, 5, 50);\n * \n * \n *\n * @alt\n * Current day is displayed\n *\n */\np5.prototype.day = function() {\n return new Date().getDate();\n};\n\n/**\n * p5.js communicates with the clock on your computer. The hour() function\n * returns the current hour as a value from 0 - 23.\n *\n * @method hour\n * @return {Integer} the current hour\n * @example\n * \n * \n * var h = hour();\n * text('Current hour:\\n' + h, 5, 50);\n * \n * \n *\n * @alt\n * Current hour is displayed\n *\n */\np5.prototype.hour = function() {\n return new Date().getHours();\n};\n\n/**\n * p5.js communicates with the clock on your computer. The minute() function\n * returns the current minute as a value from 0 - 59.\n *\n * @method minute\n * @return {Integer} the current minute\n * @example\n * \n * \n * var m = minute();\n * text('Current minute: \\n' + m, 5, 50);\n * \n * \n *\n * @alt\n * Current minute is displayed\n *\n */\np5.prototype.minute = function() {\n return new Date().getMinutes();\n};\n\n/**\n * Returns the number of milliseconds (thousandths of a second) since\n * starting the program. This information is often used for timing events and\n * animation sequences.\n *\n * @method millis\n * @return {Number} the number of milliseconds since starting the program\n * @example\n * \n * \n * var millisecond = millis();\n * text('Milliseconds \\nrunning: \\n' + millisecond, 5, 40);\n * \n * \n *\n * @alt\n * number of milliseconds since program has started displayed\n *\n */\np5.prototype.millis = function() {\n return window.performance.now();\n};\n\n/**\n * p5.js communicates with the clock on your computer. The month() function\n * returns the current month as a value from 1 - 12.\n *\n * @method month\n * @return {Integer} the current month\n * @example\n * \n * \n * var m = month();\n * text('Current month: \\n' + m, 5, 50);\n * \n * \n *\n * @alt\n * Current month is displayed\n *\n */\np5.prototype.month = function() {\n return new Date().getMonth() + 1; //January is 0!\n};\n\n/**\n * p5.js communicates with the clock on your computer. The second() function\n * returns the current second as a value from 0 - 59.\n *\n * @method second\n * @return {Integer} the current second\n * @example\n * \n * \n * var s = second();\n * text('Current second: \\n' + s, 5, 50);\n * \n * \n *\n * @alt\n * Current second is displayed\n *\n */\np5.prototype.second = function() {\n return new Date().getSeconds();\n};\n\n/**\n * p5.js communicates with the clock on your computer. The year() function\n * returns the current year as an integer (2014, 2015, 2016, etc).\n *\n * @method year\n * @return {Integer} the current year\n * @example\n * \n * \n * var y = year();\n * text('Current year: \\n' + y, 5, 50);\n * \n * \n *\n * @alt\n * Current year is displayed\n *\n */\np5.prototype.year = function() {\n return new Date().getFullYear();\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],64:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule 3D Primitives\n * @for p5\n * @requires core\n * @requires p5.Geometry\n */\n\n'use strict';\nvar p5 = _dereq_('../core/main');\n_dereq_('./p5.Geometry');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Draw a plane with given a width and height\n * @method plane\n * @param {Number} [width] width of the plane\n * @param {Number} [height] height of the plane\n * @param {Integer} [detailX] Optional number of triangle\n * subdivisions in x-dimension\n * @param {Integer} [detailY] Optional number of triangle\n * subdivisions in y-dimension\n * @chainable\n * @example\n * \n * \n * // draw a plane\n * // with width 50 and height 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * plane(50, 50);\n * }\n * \n * \n *\n * @alt\n * Nothing displayed on canvas\n * Rotating interior view of a box with sides that change color.\n * 3d red and green gradient.\n * Rotating interior view of a cylinder with sides that change color.\n * Rotating view of a cylinder with sides that change color.\n * 3d red and green gradient.\n * rotating view of a multi-colored cylinder with concave sides.\n */\np5.prototype.plane = function(width, height, detailX, detailY) {\n this._assert3d('plane');\n p5._validateParameters('plane', arguments);\n if (typeof width === 'undefined') {\n width = 50;\n }\n if (typeof height === 'undefined') {\n height = width;\n }\n\n if (typeof detailX === 'undefined') {\n detailX = 1;\n }\n if (typeof detailY === 'undefined') {\n detailY = 1;\n }\n\n var gId = 'plane|' + detailX + '|' + detailY;\n\n if (!this._renderer.geometryInHash(gId)) {\n var _plane = function() {\n var u, v, p;\n for (var i = 0; i <= this.detailY; i++) {\n v = i / this.detailY;\n for (var j = 0; j <= this.detailX; j++) {\n u = j / this.detailX;\n p = new p5.Vector(u - 0.5, v - 0.5, 0);\n this.vertices.push(p);\n this.uvs.push(u, v);\n }\n }\n };\n var planeGeom = new p5.Geometry(detailX, detailY, _plane);\n planeGeom.computeFaces().computeNormals();\n if (detailX <= 1 && detailY <= 1) {\n planeGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw stroke on plane objects with more' +\n ' than 1 detailX or 1 detailY'\n );\n }\n this._renderer.createBuffers(gId, planeGeom);\n }\n\n this._renderer.drawBuffersScaled(gId, width, height, 1);\n return this;\n};\n\n/**\n * Draw a box with given width, height and depth\n * @method box\n * @param {Number} [width] width of the box\n * @param {Number} [Height] height of the box\n * @param {Number} [depth] depth of the box\n * @param {Integer} [detailX] Optional number of triangle\n * subdivisions in x-dimension\n * @param {Integer} [detailY] Optional number of triangle\n * subdivisions in y-dimension\n * @chainable\n * @example\n * \n * \n * // draw a spinning box\n * // with width, height and depth of 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(50);\n * }\n * \n * \n */\np5.prototype.box = function(width, height, depth, detailX, detailY) {\n this._assert3d('box');\n p5._validateParameters('box', arguments);\n if (typeof width === 'undefined') {\n width = 50;\n }\n if (typeof height === 'undefined') {\n height = width;\n }\n if (typeof depth === 'undefined') {\n depth = height;\n }\n\n var perPixelLighting =\n this._renderer.attributes && this._renderer.attributes.perPixelLighting;\n if (typeof detailX === 'undefined') {\n detailX = perPixelLighting ? 1 : 4;\n }\n if (typeof detailY === 'undefined') {\n detailY = perPixelLighting ? 1 : 4;\n }\n\n var gId = 'box|' + detailX + '|' + detailY;\n if (!this._renderer.geometryInHash(gId)) {\n var _box = function() {\n var cubeIndices = [\n [0, 4, 2, 6], // -1, 0, 0],// -x\n [1, 3, 5, 7], // +1, 0, 0],// +x\n [0, 1, 4, 5], // 0, -1, 0],// -y\n [2, 6, 3, 7], // 0, +1, 0],// +y\n [0, 2, 1, 3], // 0, 0, -1],// -z\n [4, 5, 6, 7] // 0, 0, +1] // +z\n ];\n //using strokeIndices instead of faces for strokes\n //to avoid diagonal stroke lines across face of box\n this.strokeIndices = [\n [0, 1],\n [1, 3],\n [3, 2],\n [6, 7],\n [8, 9],\n [9, 11],\n [14, 15],\n [16, 17],\n [17, 19],\n [18, 19],\n [20, 21],\n [22, 23]\n ];\n for (var i = 0; i < cubeIndices.length; i++) {\n var cubeIndex = cubeIndices[i];\n var v = i * 4;\n for (var j = 0; j < 4; j++) {\n var d = cubeIndex[j];\n //inspired by lightgl:\n //https://github.com/evanw/lightgl.js\n //octants:https://en.wikipedia.org/wiki/Octant_(solid_geometry)\n var octant = new p5.Vector(\n ((d & 1) * 2 - 1) / 2,\n ((d & 2) - 1) / 2,\n ((d & 4) / 2 - 1) / 2\n );\n this.vertices.push(octant);\n this.uvs.push(j & 1, (j & 2) / 2);\n }\n this.faces.push([v, v + 1, v + 2]);\n this.faces.push([v + 2, v + 1, v + 3]);\n }\n };\n var boxGeom = new p5.Geometry(detailX, detailY, _box);\n boxGeom.computeNormals();\n if (detailX <= 4 && detailY <= 4) {\n boxGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw stroke on box objects with more' +\n ' than 4 detailX or 4 detailY'\n );\n }\n //initialize our geometry buffer with\n //the key val pair:\n //geometry Id, Geom object\n this._renderer.createBuffers(gId, boxGeom);\n }\n this._renderer.drawBuffersScaled(gId, width, height, depth);\n\n return this;\n};\n\n/**\n * Draw a sphere with given radius\n * @method sphere\n * @param {Number} [radius] radius of circle\n * @param {Integer} [detailX] number of segments,\n * the more segments the smoother geometry\n * default is 24\n * @param {Integer} [detailY] number of segments,\n * the more segments the smoother geometry\n * default is 16\n * @chainable\n * @example\n * \n * \n * // draw a sphere with radius 40\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * sphere(40);\n * }\n * \n * \n */\np5.prototype.sphere = function(radius, detailX, detailY) {\n this._assert3d('sphere');\n p5._validateParameters('sphere', arguments);\n if (typeof radius === 'undefined') {\n radius = 50;\n }\n if (typeof detailX === 'undefined') {\n detailX = 24;\n }\n if (typeof detailY === 'undefined') {\n detailY = 16;\n }\n\n this.ellipsoid(radius, radius, radius, detailX, detailY);\n\n return this;\n};\n\n/**\n * @private\n * Helper function for creating both cones and cyllinders\n * Will only generate well-defined geometry when bottomRadius, height > 0\n * and topRadius >= 0\n * If topRadius == 0, topCap should be false\n */\nvar _truncatedCone = function(\n bottomRadius,\n topRadius,\n height,\n detailX,\n detailY,\n bottomCap,\n topCap\n) {\n bottomRadius = bottomRadius <= 0 ? 1 : bottomRadius;\n topRadius = topRadius < 0 ? 0 : topRadius;\n height = height <= 0 ? bottomRadius : height;\n detailX = detailX < 3 ? 3 : detailX;\n detailY = detailY < 1 ? 1 : detailY;\n bottomCap = bottomCap === undefined ? true : bottomCap;\n topCap = topCap === undefined ? topRadius !== 0 : topCap;\n var start = bottomCap ? -2 : 0;\n var end = detailY + (topCap ? 2 : 0);\n //ensure constant slant for interior vertex normals\n var slant = Math.atan2(bottomRadius - topRadius, height);\n var sinSlant = Math.sin(slant);\n var cosSlant = Math.cos(slant);\n var yy, ii, jj;\n for (yy = start; yy <= end; ++yy) {\n var v = yy / detailY;\n var y = height * v;\n var ringRadius;\n if (yy < 0) {\n //for the bottomCap edge\n y = 0;\n v = 0;\n ringRadius = bottomRadius;\n } else if (yy > detailY) {\n //for the topCap edge\n y = height;\n v = 1;\n ringRadius = topRadius;\n } else {\n //for the middle\n ringRadius = bottomRadius + (topRadius - bottomRadius) * v;\n }\n if (yy === -2 || yy === detailY + 2) {\n //center of bottom or top caps\n ringRadius = 0;\n }\n\n y -= height / 2; //shift coordiate origin to the center of object\n for (ii = 0; ii < detailX; ++ii) {\n var u = ii / detailX;\n var ur = 2 * Math.PI * u;\n var sur = Math.sin(ur);\n var cur = Math.cos(ur);\n\n //VERTICES\n this.vertices.push(new p5.Vector(sur * ringRadius, y, cur * ringRadius));\n\n //VERTEX NORMALS\n var vertexNormal;\n if (yy < 0) {\n vertexNormal = new p5.Vector(0, -1, 0);\n } else if (yy > detailY && topRadius) {\n vertexNormal = new p5.Vector(0, 1, 0);\n } else {\n vertexNormal = new p5.Vector(sur * cosSlant, sinSlant, cur * cosSlant);\n }\n this.vertexNormals.push(vertexNormal);\n //UVs\n this.uvs.push(u, v);\n }\n }\n\n var startIndex = 0;\n if (bottomCap) {\n for (jj = 0; jj < detailX; ++jj) {\n var nextjj = (jj + 1) % detailX;\n this.faces.push([\n startIndex + jj,\n startIndex + detailX + nextjj,\n startIndex + detailX + jj\n ]);\n }\n startIndex += detailX * 2;\n }\n for (yy = 0; yy < detailY; ++yy) {\n for (ii = 0; ii < detailX; ++ii) {\n var nextii = (ii + 1) % detailX;\n this.faces.push([\n startIndex + ii,\n startIndex + nextii,\n startIndex + detailX + nextii\n ]);\n this.faces.push([\n startIndex + ii,\n startIndex + detailX + nextii,\n startIndex + detailX + ii\n ]);\n }\n startIndex += detailX;\n }\n if (topCap) {\n startIndex += detailX;\n for (ii = 0; ii < detailX; ++ii) {\n this.faces.push([\n startIndex + ii,\n startIndex + (ii + 1) % detailX,\n startIndex + detailX\n ]);\n }\n }\n};\n\n/**\n * Draw a cylinder with given radius and height\n * @method cylinder\n * @param {Number} [radius] radius of the surface\n * @param {Number} [height] height of the cylinder\n * @param {Integer} [detailX] number of segments,\n * the more segments the smoother geometry\n * default is 24\n * @param {Integer} [detailY] number of segments in y-dimension,\n * the more segments the smoother geometry\n * default is 1\n * @param {Boolean} [bottomCap] whether to draw the bottom of the cylinder\n * @param {Boolean} [topCap] whether to draw the top of the cylinder\n * @chainable\n * @example\n * \n * \n * // draw a spinning cylinder\n * // with radius 20 and height 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateZ(frameCount * 0.01);\n * cylinder(20, 50);\n * }\n * \n * \n */\np5.prototype.cylinder = function(\n radius,\n height,\n detailX,\n detailY,\n bottomCap,\n topCap\n) {\n this._assert3d('cylinder');\n p5._validateParameters('cylinder', arguments);\n if (typeof radius === 'undefined') {\n radius = 50;\n }\n if (typeof height === 'undefined') {\n height = radius;\n }\n if (typeof detailX === 'undefined') {\n detailX = 24;\n }\n if (typeof detailY === 'undefined') {\n detailY = 1;\n }\n if (typeof topCap === 'undefined') {\n topCap = true;\n }\n if (typeof bottomCap === 'undefined') {\n bottomCap = true;\n }\n\n var gId =\n 'cylinder|' + detailX + '|' + detailY + '|' + bottomCap + '|' + topCap;\n if (!this._renderer.geometryInHash(gId)) {\n var cylinderGeom = new p5.Geometry(detailX, detailY);\n _truncatedCone.call(\n cylinderGeom,\n 1,\n 1,\n 1,\n detailX,\n detailY,\n bottomCap,\n topCap\n );\n // normals are computed in call to _truncatedCone\n if (detailX <= 24 && detailY <= 16) {\n cylinderGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw stroke on cylinder objects with more' +\n ' than 24 detailX or 16 detailY'\n );\n }\n this._renderer.createBuffers(gId, cylinderGeom);\n }\n\n this._renderer.drawBuffersScaled(gId, radius, height, radius);\n\n return this;\n};\n\n/**\n * Draw a cone with given radius and height\n * @method cone\n * @param {Number} [radius] radius of the bottom surface\n * @param {Number} [height] height of the cone\n * @param {Integer} [detailX] number of segments,\n * the more segments the smoother geometry\n * default is 24\n * @param {Integer} [detailY] number of segments,\n * the more segments the smoother geometry\n * default is 1\n * @param {Boolean} [cap] whether to draw the base of the cone\n * @chainable\n * @example\n * \n * \n * // draw a spinning cone\n * // with radius 40 and height 70\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateZ(frameCount * 0.01);\n * cone(40, 70);\n * }\n * \n * \n */\np5.prototype.cone = function(radius, height, detailX, detailY, cap) {\n this._assert3d('cone');\n p5._validateParameters('cone', arguments);\n if (typeof radius === 'undefined') {\n radius = 50;\n }\n if (typeof height === 'undefined') {\n height = radius;\n }\n if (typeof detailX === 'undefined') {\n detailX = 24;\n }\n if (typeof detailY === 'undefined') {\n detailY = 1;\n }\n if (typeof cap === 'undefined') {\n cap = true;\n }\n\n var gId = 'cone|' + detailX + '|' + detailY + '|' + cap;\n if (!this._renderer.geometryInHash(gId)) {\n var coneGeom = new p5.Geometry(detailX, detailY);\n _truncatedCone.call(coneGeom, 1, 0, 1, detailX, detailY, cap, false);\n if (detailX <= 24 && detailY <= 16) {\n coneGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw stroke on cone objects with more' +\n ' than 24 detailX or 16 detailY'\n );\n }\n this._renderer.createBuffers(gId, coneGeom);\n }\n\n this._renderer.drawBuffersScaled(gId, radius, height, radius);\n\n return this;\n};\n\n/**\n * Draw an ellipsoid with given radius\n * @method ellipsoid\n * @param {Number} [radiusx] x-radius of ellipsoid\n * @param {Number} [radiusy] y-radius of ellipsoid\n * @param {Number} [radiusz] z-radius of ellipsoid\n * @param {Integer} [detailX] number of segments,\n * the more segments the smoother geometry\n * default is 24. Avoid detail number above\n * 150, it may crash the browser.\n * @param {Integer} [detailY] number of segments,\n * the more segments the smoother geometry\n * default is 16. Avoid detail number above\n * 150, it may crash the browser.\n * @chainable\n * @example\n * \n * \n * // draw an ellipsoid\n * // with radius 30, 40 and 40.\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * ellipsoid(30, 40, 40);\n * }\n * \n * \n */\np5.prototype.ellipsoid = function(radiusX, radiusY, radiusZ, detailX, detailY) {\n this._assert3d('ellipsoid');\n p5._validateParameters('ellipsoid', arguments);\n if (typeof radiusX === 'undefined') {\n radiusX = 50;\n }\n if (typeof radiusY === 'undefined') {\n radiusY = radiusX;\n }\n if (typeof radiusZ === 'undefined') {\n radiusZ = radiusX;\n }\n\n if (typeof detailX === 'undefined') {\n detailX = 24;\n }\n if (typeof detailY === 'undefined') {\n detailY = 16;\n }\n\n var gId = 'ellipsoid|' + detailX + '|' + detailY;\n\n if (!this._renderer.geometryInHash(gId)) {\n var _ellipsoid = function() {\n for (var i = 0; i <= this.detailY; i++) {\n var v = i / this.detailY;\n var phi = Math.PI * v - Math.PI / 2;\n var cosPhi = Math.cos(phi);\n var sinPhi = Math.sin(phi);\n\n for (var j = 0; j <= this.detailX; j++) {\n var u = j / this.detailX;\n var theta = 2 * Math.PI * u;\n var cosTheta = Math.cos(theta);\n var sinTheta = Math.sin(theta);\n var p = new p5.Vector(cosPhi * sinTheta, sinPhi, cosPhi * cosTheta);\n this.vertices.push(p);\n this.vertexNormals.push(p);\n this.uvs.push(u, v);\n }\n }\n };\n var ellipsoidGeom = new p5.Geometry(detailX, detailY, _ellipsoid);\n ellipsoidGeom.computeFaces();\n if (detailX <= 24 && detailY <= 24) {\n ellipsoidGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw stroke on ellipsoids with more' +\n ' than 24 detailX or 24 detailY'\n );\n }\n this._renderer.createBuffers(gId, ellipsoidGeom);\n }\n\n this._renderer.drawBuffersScaled(gId, radiusX, radiusY, radiusZ);\n\n return this;\n};\n\n/**\n * Draw a torus with given radius and tube radius\n * @method torus\n * @param {Number} [radius] radius of the whole ring\n * @param {Number} [tubeRadius] radius of the tube\n * @param {Integer} [detailX] number of segments in x-dimension,\n * the more segments the smoother geometry\n * default is 24\n * @param {Integer} [detailY] number of segments in y-dimension,\n * the more segments the smoother geometry\n * default is 16\n * @chainable\n * @example\n * \n * \n * // draw a spinning torus\n * // with ring radius 30 and tube radius 15\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * torus(30, 15);\n * }\n * \n * \n */\np5.prototype.torus = function(radius, tubeRadius, detailX, detailY) {\n this._assert3d('torus');\n p5._validateParameters('torus', arguments);\n if (typeof radius === 'undefined') {\n radius = 50;\n } else if (!radius) {\n return; // nothing to draw\n }\n\n if (typeof tubeRadius === 'undefined') {\n tubeRadius = 10;\n } else if (!tubeRadius) {\n return; // nothing to draw\n }\n\n if (typeof detailX === 'undefined') {\n detailX = 24;\n }\n if (typeof detailY === 'undefined') {\n detailY = 16;\n }\n\n var tubeRatio = (tubeRadius / radius).toPrecision(4);\n var gId = 'torus|' + tubeRatio + '|' + detailX + '|' + detailY;\n\n if (!this._renderer.geometryInHash(gId)) {\n var _torus = function() {\n for (var i = 0; i <= this.detailY; i++) {\n var v = i / this.detailY;\n var phi = 2 * Math.PI * v;\n var cosPhi = Math.cos(phi);\n var sinPhi = Math.sin(phi);\n var r = 1 + tubeRatio * cosPhi;\n\n for (var j = 0; j <= this.detailX; j++) {\n var u = j / this.detailX;\n var theta = 2 * Math.PI * u;\n var cosTheta = Math.cos(theta);\n var sinTheta = Math.sin(theta);\n\n var p = new p5.Vector(r * cosTheta, r * sinTheta, tubeRatio * sinPhi);\n\n var n = new p5.Vector(cosPhi * cosTheta, cosPhi * sinTheta, sinPhi);\n\n this.vertices.push(p);\n this.vertexNormals.push(n);\n this.uvs.push(u, v);\n }\n }\n };\n var torusGeom = new p5.Geometry(detailX, detailY, _torus);\n torusGeom.computeFaces();\n if (detailX <= 24 && detailY <= 16) {\n torusGeom._makeTriangleEdges()._edgesToVertices();\n } else {\n console.log(\n 'Cannot draw strokes on torus object with more' +\n ' than 24 detailX or 16 detailY'\n );\n }\n this._renderer.createBuffers(gId, torusGeom);\n }\n this._renderer.drawBuffersScaled(gId, radius, radius, radius);\n\n return this;\n};\n\n///////////////////////\n/// 2D primitives\n/////////////////////////\n\n/**\n * Draws a point, a coordinate in space at the dimension of one pixel,\n * given x, y and z coordinates. The color of the point is determined\n * by the current stroke, while the point size is determined by current\n * stroke weight.\n * @private\n * @param {Number} x x-coordinate of point\n * @param {Number} y y-coordinate of point\n * @param {Number} z z-coordinate of point\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(50);\n * stroke(255);\n * strokeWeight(4);\n * point(25, 0);\n * strokeWeight(3);\n * point(-25, 0);\n * strokeWeight(2);\n * point(0, 25);\n * strokeWeight(1);\n * point(0, -25);\n * }\n * \n * \n */\np5.RendererGL.prototype.point = function(x, y, z) {\n if (typeof z === 'undefined') {\n z = 0;\n }\n\n var _vertex = [];\n _vertex.push(new p5.Vector(x, y, z));\n this._drawPoints(_vertex, this._pointVertexBuffer);\n\n return this;\n};\n\np5.RendererGL.prototype.triangle = function(args) {\n var x1 = args[0],\n y1 = args[1];\n var x2 = args[2],\n y2 = args[3];\n var x3 = args[4],\n y3 = args[5];\n\n var gId = 'tri';\n if (!this.geometryInHash(gId)) {\n var _triangle = function() {\n var vertices = [];\n vertices.push(new p5.Vector(0, 0, 0));\n vertices.push(new p5.Vector(0, 1, 0));\n vertices.push(new p5.Vector(1, 0, 0));\n this.strokeIndices = [[0, 1], [1, 2], [2, 0]];\n this.vertices = vertices;\n this.faces = [[0, 1, 2]];\n this.uvs = [0, 0, 0, 1, 1, 1];\n };\n var triGeom = new p5.Geometry(1, 1, _triangle);\n triGeom._makeTriangleEdges()._edgesToVertices();\n triGeom.computeNormals();\n this.createBuffers(gId, triGeom);\n }\n\n // only one triangle is cached, one point is at the origin, and the\n // two adjacent sides are tne unit vectors along the X & Y axes.\n //\n // this matrix multiplication transforms those two unit vectors\n // onto the required vector prior to rendering, and moves the\n // origin appropriately.\n var uMVMatrix = this.uMVMatrix.copy();\n try {\n // prettier-ignore\n var mult = new p5.Matrix([\n x2 - x1, y2 - y1, 0, 0, // the resulting unit X-axis\n x3 - x1, y3 - y1, 0, 0, // the resulting unit Y-axis\n 0, 0, 1, 0, // the resulting unit Z-axis (unchanged)\n x1, y1, 0, 1 // the resulting origin\n ]).mult(this.uMVMatrix);\n\n this.uMVMatrix = mult;\n\n this.drawBuffers(gId);\n } finally {\n this.uMVMatrix = uMVMatrix;\n }\n\n return this;\n};\n\np5.RendererGL.prototype.ellipse = function(args) {\n this.arc(\n args[0],\n args[1],\n args[2],\n args[3],\n 0,\n constants.TWO_PI,\n constants.OPEN,\n args[4]\n );\n};\n\np5.RendererGL.prototype.arc = function(args) {\n var x = arguments[0];\n var y = arguments[1];\n var width = arguments[2];\n var height = arguments[3];\n var start = arguments[4];\n var stop = arguments[5];\n var mode = arguments[6];\n var detail = arguments[7] || 25;\n\n var shape;\n var gId;\n\n // check if it is an ellipse or an arc\n if (Math.abs(stop - start) >= constants.TWO_PI) {\n shape = 'ellipse';\n gId = shape + '|' + detail + '|';\n } else {\n shape = 'arc';\n gId = shape + '|' + start + '|' + stop + '|' + mode + '|' + detail + '|';\n }\n\n if (!this.geometryInHash(gId)) {\n var _arc = function() {\n this.strokeIndices = [];\n\n // if the start and stop angles are not the same, push vertices to the array\n if (start.toFixed(10) !== stop.toFixed(10)) {\n // if the mode specified is PIE or null, push the mid point of the arc in vertices\n if (mode === constants.PIE || typeof mode === 'undefined') {\n this.vertices.push(new p5.Vector(0.5, 0.5, 0));\n this.uvs.push([0.5, 0.5]);\n }\n\n // vertices for the perimeter of the circle\n for (var i = 0; i <= detail; i++) {\n var u = i / detail;\n var theta = (stop - start) * u + start;\n\n var _x = 0.5 + Math.cos(theta) / 2;\n var _y = 0.5 + Math.sin(theta) / 2;\n\n this.vertices.push(new p5.Vector(_x, _y, 0));\n this.uvs.push([_x, _y]);\n\n if (i < detail - 1) {\n this.faces.push([0, i + 1, i + 2]);\n this.strokeIndices.push([i + 1, i + 2]);\n }\n }\n\n // check the mode specified in order to push vertices and faces, different for each mode\n switch (mode) {\n case constants.PIE:\n this.faces.push([\n 0,\n this.vertices.length - 2,\n this.vertices.length - 1\n ]);\n this.strokeIndices.push([0, 1]);\n this.strokeIndices.push([\n this.vertices.length - 2,\n this.vertices.length - 1\n ]);\n this.strokeIndices.push([0, this.vertices.length - 1]);\n break;\n\n case constants.CHORD:\n this.strokeIndices.push([0, 1]);\n this.strokeIndices.push([0, this.vertices.length - 1]);\n break;\n\n case constants.OPEN:\n this.strokeIndices.push([0, 1]);\n break;\n\n default:\n this.faces.push([\n 0,\n this.vertices.length - 2,\n this.vertices.length - 1\n ]);\n this.strokeIndices.push([\n this.vertices.length - 2,\n this.vertices.length - 1\n ]);\n }\n }\n };\n\n var arcGeom = new p5.Geometry(detail, 1, _arc);\n arcGeom.computeNormals();\n\n if (detail <= 50) {\n arcGeom._makeTriangleEdges()._edgesToVertices(arcGeom);\n } else {\n console.log('Cannot stroke ' + shape + ' with more than 50 detail');\n }\n\n this.createBuffers(gId, arcGeom);\n }\n\n var uMVMatrix = this.uMVMatrix.copy();\n\n try {\n this.uMVMatrix.translate([x, y, 0]);\n this.uMVMatrix.scale(width, height, 1);\n\n this.drawBuffers(gId);\n } finally {\n this.uMVMatrix = uMVMatrix;\n }\n\n return this;\n};\n\np5.RendererGL.prototype.rect = function(args) {\n var perPixelLighting = this._pInst._glAttributes.perPixelLighting;\n var x = args[0];\n var y = args[1];\n var width = args[2];\n var height = args[3];\n var detailX = args[4] || (perPixelLighting ? 1 : 24);\n var detailY = args[5] || (perPixelLighting ? 1 : 16);\n var gId = 'rect|' + detailX + '|' + detailY;\n if (!this.geometryInHash(gId)) {\n var _rect = function() {\n for (var i = 0; i <= this.detailY; i++) {\n var v = i / this.detailY;\n for (var j = 0; j <= this.detailX; j++) {\n var u = j / this.detailX;\n var p = new p5.Vector(u, v, 0);\n this.vertices.push(p);\n this.uvs.push(u, v);\n }\n }\n // using stroke indices to avoid stroke over face(s) of rectangle\n if (detailX > 0 && detailY > 0) {\n this.strokeIndices = [\n [0, detailX],\n [detailX, (detailX + 1) * (detailY + 1) - 1],\n [(detailX + 1) * (detailY + 1) - 1, (detailX + 1) * detailY],\n [(detailX + 1) * detailY, 0]\n ];\n }\n };\n var rectGeom = new p5.Geometry(detailX, detailY, _rect);\n rectGeom\n .computeFaces()\n .computeNormals()\n ._makeTriangleEdges()\n ._edgesToVertices();\n this.createBuffers(gId, rectGeom);\n }\n\n // only a single rectangle (of a given detail) is cached: a square with\n // opposite corners at (0,0) & (1,1).\n //\n // before rendering, this square is scaled & moved to the required location.\n var uMVMatrix = this.uMVMatrix.copy();\n try {\n this.uMVMatrix.translate([x, y, 0]);\n this.uMVMatrix.scale(width, height, 1);\n\n this.drawBuffers(gId);\n } finally {\n this.uMVMatrix = uMVMatrix;\n }\n return this;\n};\n\n// prettier-ignore\np5.RendererGL.prototype.quad = function(x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4) {\n var gId =\n 'quad|' +\n x1 +\n '|' +\n y1 +\n '|' +\n z1 +\n '|' +\n x2 +\n '|' +\n y2 +\n '|' +\n z2 +\n '|' +\n x3 +\n '|' +\n y3 +\n '|' +\n z3 +\n '|' +\n x4 +\n '|' +\n y4 +\n '|' +\n z4;\n if (!this.geometryInHash(gId)) {\n var _quad = function() {\n this.vertices.push(new p5.Vector(x1, y1, z1));\n this.vertices.push(new p5.Vector(x2, y2, z2));\n this.vertices.push(new p5.Vector(x3, y3, z3));\n this.vertices.push(new p5.Vector(x4, y4, z4));\n this.uvs.push(0, 0, 1, 0, 1, 1, 0, 1);\n this.strokeIndices = [[0, 1], [1, 2], [2, 3], [3, 0]];\n };\n var quadGeom = new p5.Geometry(2, 2, _quad);\n quadGeom\n .computeNormals()\n ._makeTriangleEdges()\n ._edgesToVertices();\n quadGeom.faces = [[0, 1, 2], [2, 3, 0]];\n this.createBuffers(gId, quadGeom);\n }\n this.drawBuffers(gId);\n return this;\n};\n\n//this implementation of bezier curve\n//is based on Bernstein polynomial\n// pretier-ignore\np5.RendererGL.prototype.bezier = function(\n x1,\n y1,\n z1, // x2\n x2, // y2\n y2, // x3\n z2, // y3\n x3, // x4\n y3, // y4\n z3,\n x4,\n y4,\n z4\n) {\n if (arguments.length === 8) {\n y4 = y3;\n x4 = x3;\n y3 = z2;\n x3 = y2;\n y2 = x2;\n x2 = z1;\n z1 = z2 = z3 = z4 = 0;\n }\n var bezierDetail = this._pInst._bezierDetail || 20; //value of Bezier detail\n this.beginShape();\n for (var i = 0; i <= bezierDetail; i++) {\n var c1 = Math.pow(1 - i / bezierDetail, 3);\n var c2 = 3 * (i / bezierDetail) * Math.pow(1 - i / bezierDetail, 2);\n var c3 = 3 * Math.pow(i / bezierDetail, 2) * (1 - i / bezierDetail);\n var c4 = Math.pow(i / bezierDetail, 3);\n this.vertex(\n x1 * c1 + x2 * c2 + x3 * c3 + x4 * c4,\n y1 * c1 + y2 * c2 + y3 * c3 + y4 * c4,\n z1 * c1 + z2 * c2 + z3 * c3 + z4 * c4\n );\n }\n this.endShape();\n return this;\n};\n\n// pretier-ignore\np5.RendererGL.prototype.curve = function(\n x1,\n y1,\n z1, // x2\n x2, // y2\n y2, // x3\n z2, // y3\n x3, // x4\n y3, // y4\n z3,\n x4,\n y4,\n z4\n) {\n if (arguments.length === 8) {\n x4 = x3;\n y4 = y3;\n x3 = y2;\n y3 = x2;\n x2 = z1;\n y2 = x2;\n z1 = z2 = z3 = z4 = 0;\n }\n var curveDetail = this._pInst._curveDetail;\n this.beginShape();\n for (var i = 0; i <= curveDetail; i++) {\n var c1 = Math.pow(i / curveDetail, 3) * 0.5;\n var c2 = Math.pow(i / curveDetail, 2) * 0.5;\n var c3 = i / curveDetail * 0.5;\n var c4 = 0.5;\n var vx =\n c1 * (-x1 + 3 * x2 - 3 * x3 + x4) +\n c2 * (2 * x1 - 5 * x2 + 4 * x3 - x4) +\n c3 * (-x1 + x3) +\n c4 * (2 * x2);\n var vy =\n c1 * (-y1 + 3 * y2 - 3 * y3 + y4) +\n c2 * (2 * y1 - 5 * y2 + 4 * y3 - y4) +\n c3 * (-y1 + y3) +\n c4 * (2 * y2);\n var vz =\n c1 * (-z1 + 3 * z2 - 3 * z3 + z4) +\n c2 * (2 * z1 - 5 * z2 + 4 * z3 - z4) +\n c3 * (-z1 + z3) +\n c4 * (2 * z2);\n this.vertex(vx, vy, vz);\n }\n this.endShape();\n return this;\n};\n\n/**\n * Draw a line given two points\n * @private\n * @param {Number} x0 x-coordinate of first vertex\n * @param {Number} y0 y-coordinate of first vertex\n * @param {Number} z0 z-coordinate of first vertex\n * @param {Number} x1 x-coordinate of second vertex\n * @param {Number} y1 y-coordinate of second vertex\n * @param {Number} z1 z-coordinate of second vertex\n * @chainable\n * @example\n * \n * \n * //draw a line\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * // Use fill instead of stroke to change the color of shape.\n * fill(255, 0, 0);\n * line(10, 10, 0, 60, 60, 20);\n * }\n * \n * \n */\np5.RendererGL.prototype.line = function() {\n if (arguments.length === 6) {\n this.beginShape();\n this.vertex(arguments[0], arguments[1], arguments[2]);\n this.vertex(arguments[3], arguments[4], arguments[5]);\n this.endShape();\n } else if (arguments.length === 4) {\n this.beginShape();\n this.vertex(arguments[0], arguments[1], 0);\n this.vertex(arguments[2], arguments[3], 0);\n this.endShape();\n }\n return this;\n};\n\np5.RendererGL.prototype.bezierVertex = function() {\n if (this.immediateMode._bezierVertex.length === 0) {\n throw Error('vertex() must be used once before calling bezierVertex()');\n } else {\n var w_x = [];\n var w_y = [];\n var w_z = [];\n var t, _x, _y, _z, i;\n var argLength = arguments.length;\n\n t = 0;\n\n if (\n this._lookUpTableBezier.length === 0 ||\n this._lutBezierDetail !== this._pInst._curveDetail\n ) {\n this._lookUpTableBezier = [];\n this._lutBezierDetail = this._pInst._curveDetail;\n var step = 1 / this._lutBezierDetail;\n var start = 0;\n var end = 1;\n var j = 0;\n while (start < 1) {\n t = parseFloat(start.toFixed(6));\n this._lookUpTableBezier[j] = this._bezierCoefficients(t);\n if (end.toFixed(6) === step.toFixed(6)) {\n t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));\n ++j;\n this._lookUpTableBezier[j] = this._bezierCoefficients(t);\n break;\n }\n start += step;\n end -= step;\n ++j;\n }\n }\n\n var LUTLength = this._lookUpTableBezier.length;\n\n if (argLength === 6) {\n this.isBezier = true;\n\n w_x = [\n this.immediateMode._bezierVertex[0],\n arguments[0],\n arguments[2],\n arguments[4]\n ];\n w_y = [\n this.immediateMode._bezierVertex[1],\n arguments[1],\n arguments[3],\n arguments[5]\n ];\n\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableBezier[i][0] +\n w_x[1] * this._lookUpTableBezier[i][1] +\n w_x[2] * this._lookUpTableBezier[i][2] +\n w_x[3] * this._lookUpTableBezier[i][3];\n _y =\n w_y[0] * this._lookUpTableBezier[i][0] +\n w_y[1] * this._lookUpTableBezier[i][1] +\n w_y[2] * this._lookUpTableBezier[i][2] +\n w_y[3] * this._lookUpTableBezier[i][3];\n this.vertex(_x, _y);\n }\n this.immediateMode._bezierVertex[0] = arguments[4];\n this.immediateMode._bezierVertex[1] = arguments[5];\n } else if (argLength === 9) {\n this.isBezier = true;\n\n w_x = [\n this.immediateMode._bezierVertex[0],\n arguments[0],\n arguments[3],\n arguments[6]\n ];\n w_y = [\n this.immediateMode._bezierVertex[1],\n arguments[1],\n arguments[4],\n arguments[7]\n ];\n w_z = [\n this.immediateMode._bezierVertex[2],\n arguments[2],\n arguments[5],\n arguments[8]\n ];\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableBezier[i][0] +\n w_x[1] * this._lookUpTableBezier[i][1] +\n w_x[2] * this._lookUpTableBezier[i][2] +\n w_x[3] * this._lookUpTableBezier[i][3];\n _y =\n w_y[0] * this._lookUpTableBezier[i][0] +\n w_y[1] * this._lookUpTableBezier[i][1] +\n w_y[2] * this._lookUpTableBezier[i][2] +\n w_y[3] * this._lookUpTableBezier[i][3];\n _z =\n w_z[0] * this._lookUpTableBezier[i][0] +\n w_z[1] * this._lookUpTableBezier[i][1] +\n w_z[2] * this._lookUpTableBezier[i][2] +\n w_z[3] * this._lookUpTableBezier[i][3];\n this.vertex(_x, _y, _z);\n }\n this.immediateMode._bezierVertex[0] = arguments[6];\n this.immediateMode._bezierVertex[1] = arguments[7];\n this.immediateMode._bezierVertex[2] = arguments[8];\n }\n }\n};\n\np5.RendererGL.prototype.quadraticVertex = function() {\n if (this.immediateMode._quadraticVertex.length === 0) {\n throw Error('vertex() must be used once before calling quadraticVertex()');\n } else {\n var w_x = [];\n var w_y = [];\n var w_z = [];\n var t, _x, _y, _z, i;\n var argLength = arguments.length;\n\n t = 0;\n\n if (\n this._lookUpTableQuadratic.length === 0 ||\n this._lutQuadraticDetail !== this._pInst._curveDetail\n ) {\n this._lookUpTableQuadratic = [];\n this._lutQuadraticDetail = this._pInst._curveDetail;\n var step = 1 / this._lutQuadraticDetail;\n var start = 0;\n var end = 1;\n var j = 0;\n while (start < 1) {\n t = parseFloat(start.toFixed(6));\n this._lookUpTableQuadratic[j] = this._quadraticCoefficients(t);\n if (end.toFixed(6) === step.toFixed(6)) {\n t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));\n ++j;\n this._lookUpTableQuadratic[j] = this._quadraticCoefficients(t);\n break;\n }\n start += step;\n end -= step;\n ++j;\n }\n }\n\n var LUTLength = this._lookUpTableQuadratic.length;\n\n if (argLength === 4) {\n this.isQuadratic = true;\n\n w_x = [\n this.immediateMode._quadraticVertex[0],\n arguments[0],\n arguments[2]\n ];\n w_y = [\n this.immediateMode._quadraticVertex[1],\n arguments[1],\n arguments[3]\n ];\n\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableQuadratic[i][0] +\n w_x[1] * this._lookUpTableQuadratic[i][1] +\n w_x[2] * this._lookUpTableQuadratic[i][2];\n _y =\n w_y[0] * this._lookUpTableQuadratic[i][0] +\n w_y[1] * this._lookUpTableQuadratic[i][1] +\n w_y[2] * this._lookUpTableQuadratic[i][2];\n this.vertex(_x, _y);\n }\n\n this.immediateMode._quadraticVertex[0] = arguments[2];\n this.immediateMode._quadraticVertex[1] = arguments[3];\n } else if (argLength === 6) {\n this.isQuadratic = true;\n\n w_x = [\n this.immediateMode._quadraticVertex[0],\n arguments[0],\n arguments[3]\n ];\n w_y = [\n this.immediateMode._quadraticVertex[1],\n arguments[1],\n arguments[4]\n ];\n w_z = [\n this.immediateMode._quadraticVertex[2],\n arguments[2],\n arguments[5]\n ];\n\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableQuadratic[i][0] +\n w_x[1] * this._lookUpTableQuadratic[i][1] +\n w_x[2] * this._lookUpTableQuadratic[i][2];\n _y =\n w_y[0] * this._lookUpTableQuadratic[i][0] +\n w_y[1] * this._lookUpTableQuadratic[i][1] +\n w_y[2] * this._lookUpTableQuadratic[i][2];\n _z =\n w_z[0] * this._lookUpTableQuadratic[i][0] +\n w_z[1] * this._lookUpTableQuadratic[i][1] +\n w_z[2] * this._lookUpTableQuadratic[i][2];\n this.vertex(_x, _y, _z);\n }\n\n this.immediateMode._quadraticVertex[0] = arguments[3];\n this.immediateMode._quadraticVertex[1] = arguments[4];\n this.immediateMode._quadraticVertex[2] = arguments[5];\n }\n }\n};\n\np5.RendererGL.prototype.curveVertex = function() {\n var w_x = [];\n var w_y = [];\n var w_z = [];\n var t, _x, _y, _z, i;\n t = 0;\n var argLength = arguments.length;\n\n if (\n this._lookUpTableBezier.length === 0 ||\n this._lutBezierDetail !== this._pInst._curveDetail\n ) {\n this._lookUpTableBezier = [];\n this._lutBezierDetail = this._pInst._curveDetail;\n var step = 1 / this._lutBezierDetail;\n var start = 0;\n var end = 1;\n var j = 0;\n while (start < 1) {\n t = parseFloat(start.toFixed(6));\n this._lookUpTableBezier[j] = this._bezierCoefficients(t);\n if (end.toFixed(6) === step.toFixed(6)) {\n t = parseFloat(end.toFixed(6)) + parseFloat(start.toFixed(6));\n ++j;\n this._lookUpTableBezier[j] = this._bezierCoefficients(t);\n break;\n }\n start += step;\n end -= step;\n ++j;\n }\n }\n\n var LUTLength = this._lookUpTableBezier.length;\n\n if (argLength === 2) {\n this.immediateMode._curveVertex.push(arguments[0]);\n this.immediateMode._curveVertex.push(arguments[1]);\n if (this.immediateMode._curveVertex.length === 8) {\n this.isCurve = true;\n w_x = this._bezierToCatmull([\n this.immediateMode._curveVertex[0],\n this.immediateMode._curveVertex[2],\n this.immediateMode._curveVertex[4],\n this.immediateMode._curveVertex[6]\n ]);\n w_y = this._bezierToCatmull([\n this.immediateMode._curveVertex[1],\n this.immediateMode._curveVertex[3],\n this.immediateMode._curveVertex[5],\n this.immediateMode._curveVertex[7]\n ]);\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableBezier[i][0] +\n w_x[1] * this._lookUpTableBezier[i][1] +\n w_x[2] * this._lookUpTableBezier[i][2] +\n w_x[3] * this._lookUpTableBezier[i][3];\n _y =\n w_y[0] * this._lookUpTableBezier[i][0] +\n w_y[1] * this._lookUpTableBezier[i][1] +\n w_y[2] * this._lookUpTableBezier[i][2] +\n w_y[3] * this._lookUpTableBezier[i][3];\n this.vertex(_x, _y);\n }\n for (i = 0; i < argLength; i++) {\n this.immediateMode._curveVertex.shift();\n }\n }\n } else if (argLength === 3) {\n this.immediateMode._curveVertex.push(arguments[0]);\n this.immediateMode._curveVertex.push(arguments[1]);\n this.immediateMode._curveVertex.push(arguments[2]);\n if (this.immediateMode._curveVertex.length === 12) {\n this.isCurve = true;\n w_x = this._bezierToCatmull([\n this.immediateMode._curveVertex[0],\n this.immediateMode._curveVertex[3],\n this.immediateMode._curveVertex[6],\n this.immediateMode._curveVertex[9]\n ]);\n w_y = this._bezierToCatmull([\n this.immediateMode._curveVertex[1],\n this.immediateMode._curveVertex[4],\n this.immediateMode._curveVertex[7],\n this.immediateMode._curveVertex[10]\n ]);\n w_z = this._bezierToCatmull([\n this.immediateMode._curveVertex[2],\n this.immediateMode._curveVertex[5],\n this.immediateMode._curveVertex[8],\n this.immediateMode._curveVertex[11]\n ]);\n for (i = 0; i < LUTLength; i++) {\n _x =\n w_x[0] * this._lookUpTableBezier[i][0] +\n w_x[1] * this._lookUpTableBezier[i][1] +\n w_x[2] * this._lookUpTableBezier[i][2] +\n w_x[3] * this._lookUpTableBezier[i][3];\n _y =\n w_y[0] * this._lookUpTableBezier[i][0] +\n w_y[1] * this._lookUpTableBezier[i][1] +\n w_y[2] * this._lookUpTableBezier[i][2] +\n w_y[3] * this._lookUpTableBezier[i][3];\n _z =\n w_z[0] * this._lookUpTableBezier[i][0] +\n w_z[1] * this._lookUpTableBezier[i][1] +\n w_z[2] * this._lookUpTableBezier[i][2] +\n w_z[3] * this._lookUpTableBezier[i][3];\n this.vertex(_x, _y, _z);\n }\n for (i = 0; i < argLength; i++) {\n this.immediateMode._curveVertex.shift();\n }\n }\n }\n};\n\np5.RendererGL.prototype.image = function(\n img,\n sx,\n sy,\n sWidth,\n sHeight,\n dx,\n dy,\n dWidth,\n dHeight\n) {\n this._pInst.push();\n\n this._pInst.texture(img);\n this._pInst.textureMode(constants.NORMAL);\n\n var u0 = 0;\n if (sx <= img.width) {\n u0 = sx / img.width;\n }\n\n var u1 = 1;\n if (sx + sWidth <= img.width) {\n u1 = (sx + sWidth) / img.width;\n }\n\n var v0 = 0;\n if (sy <= img.height) {\n v0 = sy / img.height;\n }\n\n var v1 = 1;\n if (sy + sHeight <= img.height) {\n v1 = (sy + sHeight) / img.height;\n }\n\n this.beginShape();\n this.vertex(dx, dy, 0, u0, v0);\n this.vertex(dx + dWidth, dy, 0, u1, v0);\n this.vertex(dx + dWidth, dy + dHeight, 0, u1, v1);\n this.vertex(dx, dy + dHeight, 0, u0, v1);\n this.endShape(constants.CLOSE);\n\n this._pInst.pop();\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24,\"./p5.Geometry\":70}],65:[function(_dereq_,module,exports){\n/**\n * @module Lights, Camera\n * @submodule Interaction\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Allows movement around a 3D sketch using a mouse or trackpad. Left-clicking\n * and dragging will rotate the camera position about the center of the sketch,\n * right-clicking and dragging will pan the camera position without rotation,\n * and using the mouse wheel (scrolling) will move the camera closer or further\n * from the center of the sketch. This function can be called with parameters\n * dictating sensitivity to mouse movement along the X and Y axes. Calling\n * this function without parameters is equivalent to calling orbitControl(1,1).\n * To reverse direction of movement in either axis, enter a negative number\n * for sensitivity.\n * @method orbitControl\n * @for p5\n * @param {Number} [sensitivityX] sensitivity to mouse movement along X axis\n * @param {Number} [sensitivityY] sensitivity to mouse movement along Y axis\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * rotateY(0.5);\n * box(30, 50);\n * }\n * \n * \n *\n * @alt\n * Camera orbits around a box when mouse is hold-clicked & then moved.\n */\n\n// implementation based on three.js 'orbitControls':\n// https://github.com/mrdoob/three.js/blob/dev/examples/js/controls/OrbitControls.js\np5.prototype.orbitControl = function(sensitivityX, sensitivityY) {\n this._assert3d('orbitControl');\n p5._validateParameters('orbitControl', arguments);\n\n // If the mouse is not in bounds of the canvas, disable all behaviors:\n var mouseInCanvas =\n this.mouseX < this.width &&\n this.mouseX > 0 &&\n this.mouseY < this.height &&\n this.mouseY > 0;\n if (!mouseInCanvas) return;\n\n var cam = this._renderer._curCamera;\n\n if (typeof sensitivityX === 'undefined') {\n sensitivityX = 1;\n }\n if (typeof sensitivityY === 'undefined') {\n sensitivityY = sensitivityX;\n }\n\n // default right-mouse and mouse-wheel behaviors (context menu and scrolling,\n // respectively) are disabled here to allow use of those events for panning and\n // zooming\n\n // disable context menu for canvas element and add 'contextMenuDisabled'\n // flag to p5 instance\n if (this.contextMenuDisabled !== true) {\n this.canvas.oncontextmenu = function() {\n return false;\n };\n this._setProperty('contextMenuDisabled', true);\n }\n\n // disable default scrolling behavior on the canvas element and add\n // 'wheelDefaultDisabled' flag to p5 instance\n if (this.wheelDefaultDisabled !== true) {\n this.canvas.onwheel = function() {\n return false;\n };\n this._setProperty('wheelDefaultDisabled', true);\n }\n\n var scaleFactor = this.height < this.width ? this.height : this.width;\n\n // ZOOM if there is a change in mouseWheelDelta\n if (this._mouseWheelDeltaY !== this._pmouseWheelDeltaY) {\n // zoom according to direction of mouseWheelDeltaY rather than value\n if (this._mouseWheelDeltaY > 0) {\n this._renderer._curCamera._orbit(0, 0, 0.5 * scaleFactor);\n } else {\n this._renderer._curCamera._orbit(0, 0, -0.5 * scaleFactor);\n }\n }\n\n if (this.mouseIsPressed) {\n // ORBIT BEHAVIOR\n if (this.mouseButton === this.LEFT) {\n var deltaTheta =\n -sensitivityX * (this.mouseX - this.pmouseX) / scaleFactor;\n var deltaPhi = sensitivityY * (this.mouseY - this.pmouseY) / scaleFactor;\n this._renderer._curCamera._orbit(deltaTheta, deltaPhi, 0);\n } else if (this.mouseButton === this.RIGHT) {\n // PANNING BEHAVIOR along X/Z camera axes and restricted to X/Z plane\n // in world space\n var local = cam._getLocalAxes();\n\n // normalize portions along X/Z axes\n var xmag = Math.sqrt(local.x[0] * local.x[0] + local.x[2] * local.x[2]);\n if (xmag !== 0) {\n local.x[0] /= xmag;\n local.x[2] /= xmag;\n }\n\n // normalize portions along X/Z axes\n var ymag = Math.sqrt(local.y[0] * local.y[0] + local.y[2] * local.y[2]);\n if (ymag !== 0) {\n local.y[0] /= ymag;\n local.y[2] /= ymag;\n }\n\n // move along those vectors by amount controlled by mouseX, pmouseY\n var dx = -1 * sensitivityX * (this.mouseX - this.pmouseX);\n var dz = -1 * sensitivityY * (this.mouseY - this.pmouseY);\n\n // restrict movement to XZ plane in world space\n cam.setPosition(\n cam.eyeX + dx * local.x[0] + dz * local.z[0],\n cam.eyeY,\n cam.eyeZ + dx * local.x[2] + dz * local.z[2]\n );\n }\n }\n return this;\n};\n\n/**\n * debugMode() helps visualize 3D space by adding a grid to indicate where the\n * ‘ground’ is in a sketch and an axes icon which indicates the +X, +Y, and +Z\n * directions. This function can be called without parameters to create a\n * default grid and axes icon, or it can be called according to the examples\n * above to customize the size and position of the grid and/or axes icon. The\n * grid is drawn using the most recently set stroke color and weight. To\n * specify these parameters, add a call to stroke() and strokeWeight()\n * just before the end of the draw() loop.\n *\n * By default, the grid will run through the origin (0,0,0) of the sketch\n * along the XZ plane\n * and the axes icon will be offset from the origin. Both the grid and axes\n * icon will be sized according to the current canvas size. Note that because the\n * grid runs parallel to the default camera view, it is often helpful to use\n * debugMode along with orbitControl to allow full view of the grid.\n * @method debugMode\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode();\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * // Press the spacebar to turn debugMode off!\n * if (keyIsDown(32)) {\n * noDebugMode();\n * }\n * }\n * \n * \n * @alt\n * a 3D box is centered on a grid in a 3D sketch. an icon\n * indicates the direction of each axis: a red line points +X,\n * a green line +Y, and a blue line +Z. the grid and icon disappear when the\n * spacebar is pressed.\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(GRID);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n * \n * \n * @alt\n * a 3D box is centered on a grid in a 3D sketch.\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(AXES);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n * \n * \n * @alt\n * a 3D box is centered in a 3D sketch. an icon\n * indicates the direction of each axis: a red line points +X,\n * a green line +Y, and a blue line +Z.\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(GRID, 100, 10, 0, 0, 0);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n * \n * \n * @alt\n * a 3D box is centered on a grid in a 3D sketch\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);\n * }\n *\n * function draw() {\n * noStroke();\n * background(200);\n * orbitControl();\n * box(15, 30);\n * // set the stroke color and weight for the grid!\n * stroke(255, 0, 150);\n * strokeWeight(0.8);\n * }\n * \n * \n * @alt\n * a 3D box is centered on a grid in a 3D sketch. an icon\n * indicates the direction of each axis: a red line points +X,\n * a green line +Y, and a blue line +Z.\n */\n\n/**\n * @method debugMode\n * @param {Constant} mode either GRID or AXES\n */\n\n/**\n * @method debugMode\n * @param {Constant} mode\n * @param {Number} [gridSize] size of one side of the grid\n * @param {Number} [gridDivisions] number of divisions in the grid\n * @param {Number} [xOff] X axis offset from origin (0,0,0)\n * @param {Number} [yOff] Y axis offset from origin (0,0,0)\n * @param {Number} [zOff] Z axis offset from origin (0,0,0)\n */\n\n/**\n * @method debugMode\n * @param {Constant} mode\n * @param {Number} [axesSize] size of axes icon\n * @param {Number} [xOff]\n * @param {Number} [yOff]\n * @param {Number} [zOff]\n */\n\n/**\n * @method debugMode\n * @param {Number} [gridSize]\n * @param {Number} [gridDivisions]\n * @param {Number} [gridXOff]\n * @param {Number} [gridYOff]\n * @param {Number} [gridZOff]\n * @param {Number} [axesSize]\n * @param {Number} [axesXOff]\n * @param {Number} [axesYOff]\n * @param {Number} [axesZOff]\n */\n\np5.prototype.debugMode = function() {\n this._assert3d('debugMode');\n p5._validateParameters('debugMode', arguments);\n\n // start by removing existing 'post' registered debug methods\n for (var i = this._registeredMethods.post.length - 1; i >= 0; i--) {\n // test for equality...\n if (\n this._registeredMethods.post[i].toString() === this._grid().toString() ||\n this._registeredMethods.post[i].toString() === this._axesIcon().toString()\n ) {\n this._registeredMethods.post.splice(i, 1);\n }\n }\n\n // then add new debugMode functions according to the argument list\n if (arguments[0] === constants.GRID) {\n this.registerMethod(\n 'post',\n this._grid.call(\n this,\n arguments[1],\n arguments[2],\n arguments[3],\n arguments[4],\n arguments[5]\n )\n );\n } else if (arguments[0] === constants.AXES) {\n this.registerMethod(\n 'post',\n this._axesIcon.call(\n this,\n arguments[1],\n arguments[2],\n arguments[3],\n arguments[4]\n )\n );\n } else {\n this.registerMethod(\n 'post',\n this._grid.call(\n this,\n arguments[0],\n arguments[1],\n arguments[2],\n arguments[3],\n arguments[4]\n )\n );\n this.registerMethod(\n 'post',\n this._axesIcon.call(\n this,\n arguments[5],\n arguments[6],\n arguments[7],\n arguments[8]\n )\n );\n }\n};\n\n/**\n * Turns off debugMode() in a 3D sketch.\n * @method noDebugMode\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode();\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * // Press the spacebar to turn debugMode off!\n * if (keyIsDown(32)) {\n * noDebugMode();\n * }\n * }\n * \n * \n * @alt\n * a 3D box is centered on a grid in a 3D sketch. an icon\n * indicates the direction of each axis: a red line points +X,\n * a green line +Y, and a blue line +Z. the grid and icon disappear when the\n * spacebar is pressed.\n */\np5.prototype.noDebugMode = function() {\n this._assert3d('noDebugMode');\n\n // start by removing existing 'post' registered debug methods\n for (var i = this._registeredMethods.post.length - 1; i >= 0; i--) {\n // test for equality...\n if (\n this._registeredMethods.post[i].toString() === this._grid().toString() ||\n this._registeredMethods.post[i].toString() === this._axesIcon().toString()\n ) {\n this._registeredMethods.post.splice(i, 1);\n }\n }\n};\n\n/**\n * For use with debugMode\n * @private\n * @method _grid\n * @param {Number} [size] size of grid sides\n * @param {Number} [div] number of grid divisions\n * @param {Number} [xOff] offset of grid center from origin in X axis\n * @param {Number} [yOff] offset of grid center from origin in Y axis\n * @param {Number} [zOff] offset of grid center from origin in Z axis\n */\np5.prototype._grid = function(size, numDivs, xOff, yOff, zOff) {\n if (typeof size === 'undefined') {\n size = this.width / 2;\n }\n if (typeof numDivs === 'undefined') {\n // ensure at least 2 divisions\n numDivs = Math.round(size / 30) < 4 ? 4 : Math.round(size / 30);\n }\n if (typeof xOff === 'undefined') {\n xOff = 0;\n }\n if (typeof yOff === 'undefined') {\n yOff = 0;\n }\n if (typeof zOff === 'undefined') {\n zOff = 0;\n }\n\n var spacing = size / numDivs;\n var halfSize = size / 2;\n\n return function() {\n this.push();\n this.stroke(\n this._renderer.curStrokeColor[0] * 255,\n this._renderer.curStrokeColor[1] * 255,\n this._renderer.curStrokeColor[2] * 255\n );\n this._renderer.uMVMatrix.set(\n this._renderer._curCamera.cameraMatrix.mat4[0],\n this._renderer._curCamera.cameraMatrix.mat4[1],\n this._renderer._curCamera.cameraMatrix.mat4[2],\n this._renderer._curCamera.cameraMatrix.mat4[3],\n this._renderer._curCamera.cameraMatrix.mat4[4],\n this._renderer._curCamera.cameraMatrix.mat4[5],\n this._renderer._curCamera.cameraMatrix.mat4[6],\n this._renderer._curCamera.cameraMatrix.mat4[7],\n this._renderer._curCamera.cameraMatrix.mat4[8],\n this._renderer._curCamera.cameraMatrix.mat4[9],\n this._renderer._curCamera.cameraMatrix.mat4[10],\n this._renderer._curCamera.cameraMatrix.mat4[11],\n this._renderer._curCamera.cameraMatrix.mat4[12],\n this._renderer._curCamera.cameraMatrix.mat4[13],\n this._renderer._curCamera.cameraMatrix.mat4[14],\n this._renderer._curCamera.cameraMatrix.mat4[15]\n );\n\n // Lines along X axis\n for (var q = 0; q <= numDivs; q++) {\n this.beginShape(this.LINES);\n this.vertex(-halfSize + xOff, yOff, q * spacing - halfSize + zOff);\n this.vertex(+halfSize + xOff, yOff, q * spacing - halfSize + zOff);\n this.endShape();\n }\n\n // Lines along Z axis\n for (var i = 0; i <= numDivs; i++) {\n this.beginShape(this.LINES);\n this.vertex(i * spacing - halfSize + xOff, yOff, -halfSize + zOff);\n this.vertex(i * spacing - halfSize + xOff, yOff, +halfSize + zOff);\n this.endShape();\n }\n\n this.pop();\n };\n};\n\n/**\n * For use with debugMode\n * @private\n * @method _axesIcon\n * @param {Number} [size] size of axes icon lines\n * @param {Number} [xOff] offset of icon from origin in X axis\n * @param {Number} [yOff] offset of icon from origin in Y axis\n * @param {Number} [zOff] offset of icon from origin in Z axis\n */\np5.prototype._axesIcon = function(size, xOff, yOff, zOff) {\n if (typeof size === 'undefined') {\n size = this.width / 20 > 40 ? this.width / 20 : 40;\n }\n if (typeof xOff === 'undefined') {\n xOff = -this.width / 4;\n }\n if (typeof yOff === 'undefined') {\n yOff = xOff;\n }\n if (typeof zOff === 'undefined') {\n zOff = xOff;\n }\n\n return function() {\n this.push();\n this._renderer.uMVMatrix.set(\n this._renderer._curCamera.cameraMatrix.mat4[0],\n this._renderer._curCamera.cameraMatrix.mat4[1],\n this._renderer._curCamera.cameraMatrix.mat4[2],\n this._renderer._curCamera.cameraMatrix.mat4[3],\n this._renderer._curCamera.cameraMatrix.mat4[4],\n this._renderer._curCamera.cameraMatrix.mat4[5],\n this._renderer._curCamera.cameraMatrix.mat4[6],\n this._renderer._curCamera.cameraMatrix.mat4[7],\n this._renderer._curCamera.cameraMatrix.mat4[8],\n this._renderer._curCamera.cameraMatrix.mat4[9],\n this._renderer._curCamera.cameraMatrix.mat4[10],\n this._renderer._curCamera.cameraMatrix.mat4[11],\n this._renderer._curCamera.cameraMatrix.mat4[12],\n this._renderer._curCamera.cameraMatrix.mat4[13],\n this._renderer._curCamera.cameraMatrix.mat4[14],\n this._renderer._curCamera.cameraMatrix.mat4[15]\n );\n\n // X axis\n this.strokeWeight(2);\n this.stroke(255, 0, 0);\n this.beginShape(this.LINES);\n this.vertex(xOff, yOff, zOff);\n this.vertex(xOff + size, yOff, zOff);\n this.endShape();\n // Y axis\n this.stroke(0, 255, 0);\n this.beginShape(this.LINES);\n this.vertex(xOff, yOff, zOff);\n this.vertex(xOff, yOff + size, zOff);\n this.endShape();\n // Z axis\n this.stroke(0, 0, 255);\n this.beginShape(this.LINES);\n this.vertex(xOff, yOff, zOff);\n this.vertex(xOff, yOff, zOff + size);\n this.endShape();\n this.pop();\n };\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24}],66:[function(_dereq_,module,exports){\n/**\n * @module Lights, Camera\n * @submodule Lights\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Creates an ambient light with a color\n *\n * @method ambientLight\n * @param {Number} v1 red or hue value relative to\n * the current color range\n * @param {Number} v2 green or saturation value\n * relative to the current color range\n * @param {Number} v3 blue or brightness value\n * relative to the current color range\n * @param {Number} [alpha] the alpha value\n * @chainable\n *\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * ambientLight(150);\n * ambientMaterial(250);\n * noStroke();\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * evenly distributed light across a sphere\n *\n */\n\n/**\n * @method ambientLight\n * @param {String} value a color string\n * @chainable\n */\n\n/**\n * @method ambientLight\n * @param {Number} gray a gray value\n * @param {Number} [alpha]\n * @chainable\n */\n\n/**\n * @method ambientLight\n * @param {Number[]} values an array containing the red,green,blue &\n * and alpha components of the color\n * @chainable\n */\n\n/**\n * @method ambientLight\n * @param {p5.Color} color the ambient light color\n * @chainable\n */\np5.prototype.ambientLight = function(v1, v2, v3, a) {\n this._assert3d('ambientLight');\n p5._validateParameters('ambientLight', arguments);\n var color = this.color.apply(this, arguments);\n\n this._renderer.ambientLightColors.push(\n color._array[0],\n color._array[1],\n color._array[2]\n );\n\n this._renderer._enableLighting = true;\n\n return this;\n};\n\n/**\n * Creates a directional light with a color and a direction\n * @method directionalLight\n * @param {Number} v1 red or hue value (depending on the current\n * color mode),\n * @param {Number} v2 green or saturation value\n * @param {Number} v3 blue or brightness value\n * @param {p5.Vector} position the direction of the light\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * //move your mouse to change light direction\n * let dirX = (mouseX / width - 0.5) * 2;\n * let dirY = (mouseY / height - 0.5) * 2;\n * directionalLight(250, 250, 250, -dirX, -dirY, -1);\n * noStroke();\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * light source on canvas changeable with mouse position\n *\n */\n\n/**\n * @method directionalLight\n * @param {Number[]|String|p5.Color} color color Array, CSS color string,\n * or p5.Color value\n * @param {Number} x x axis direction\n * @param {Number} y y axis direction\n * @param {Number} z z axis direction\n * @chainable\n */\n\n/**\n * @method directionalLight\n * @param {Number[]|String|p5.Color} color\n * @param {p5.Vector} position\n * @chainable\n */\n\n/**\n * @method directionalLight\n * @param {Number} v1\n * @param {Number} v2\n * @param {Number} v3\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @chainable\n */\np5.prototype.directionalLight = function(v1, v2, v3, x, y, z) {\n this._assert3d('directionalLight');\n p5._validateParameters('directionalLight', arguments);\n\n //@TODO: check parameters number\n var color;\n if (v1 instanceof p5.Color) {\n color = v1;\n } else {\n color = this.color(v1, v2, v3);\n }\n\n var _x, _y, _z;\n var v = arguments[arguments.length - 1];\n if (typeof v === 'number') {\n _x = arguments[arguments.length - 3];\n _y = arguments[arguments.length - 2];\n _z = arguments[arguments.length - 1];\n } else {\n _x = v.x;\n _y = v.y;\n _z = v.z;\n }\n\n // normalize direction\n var l = Math.sqrt(_x * _x + _y * _y + _z * _z);\n this._renderer.directionalLightDirections.push(_x / l, _y / l, _z / l);\n\n this._renderer.directionalLightColors.push(\n color._array[0],\n color._array[1],\n color._array[2]\n );\n\n this._renderer._enableLighting = true;\n\n return this;\n};\n\n/**\n * Creates a point light with a color and a light position\n * @method pointLight\n * @param {Number} v1 red or hue value (depending on the current\n * color mode),\n * @param {Number} v2 green or saturation value\n * @param {Number} v3 blue or brightness value\n * @param {Number} x x axis position\n * @param {Number} y y axis position\n * @param {Number} z z axis position\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * //move your mouse to change light position\n * let locX = mouseX - width / 2;\n * let locY = mouseY - height / 2;\n * // to set the light position,\n * // think of the world's coordinate as:\n * // -width/2,-height/2 -------- width/2,-height/2\n * // | |\n * // | 0,0 |\n * // | |\n * // -width/2,height/2--------width/2,height/2\n * pointLight(250, 250, 250, locX, locY, 50);\n * noStroke();\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * spot light on canvas changes position with mouse\n *\n */\n\n/**\n * @method pointLight\n * @param {Number} v1\n * @param {Number} v2\n * @param {Number} v3\n * @param {p5.Vector} position the position of the light\n * @chainable\n */\n\n/**\n * @method pointLight\n * @param {Number[]|String|p5.Color} color color Array, CSS color string,\n * or p5.Color value\n * @param {Number} x\n * @param {Number} y\n * @param {Number} z\n * @chainable\n */\n\n/**\n * @method pointLight\n * @param {Number[]|String|p5.Color} color\n * @param {p5.Vector} position\n * @chainable\n */\np5.prototype.pointLight = function(v1, v2, v3, x, y, z) {\n this._assert3d('pointLight');\n p5._validateParameters('pointLight', arguments);\n\n //@TODO: check parameters number\n var color;\n if (v1 instanceof p5.Color) {\n color = v1;\n } else {\n color = this.color(v1, v2, v3);\n }\n\n var _x, _y, _z;\n var v = arguments[arguments.length - 1];\n if (typeof v === 'number') {\n _x = arguments[arguments.length - 3];\n _y = arguments[arguments.length - 2];\n _z = arguments[arguments.length - 1];\n } else {\n _x = v.x;\n _y = v.y;\n _z = v.z;\n }\n\n this._renderer.pointLightPositions.push(_x, _y, _z);\n this._renderer.pointLightColors.push(\n color._array[0],\n color._array[1],\n color._array[2]\n );\n\n this._renderer._enableLighting = true;\n\n return this;\n};\n\n/**\n * Sets the default ambient and directional light. The defaults are ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1). Lights need to be included in the draw() to remain persistent in a looping program. Placing them in the setup() of a looping program will cause them to only have an effect the first time through the loop.\n * @method lights\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * lights();\n * rotateX(millis() / 1000);\n * rotateY(millis() / 1000);\n * rotateZ(millis() / 1000);\n * box();\n * }\n * \n * \n *\n * @alt\n * the light is partially ambient and partially directional\n */\np5.prototype.lights = function() {\n this._assert3d('lights');\n this.ambientLight(128, 128, 128);\n this.directionalLight(128, 128, 128, 0, 0, -1);\n return this;\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24}],67:[function(_dereq_,module,exports){\n/**\n * @module Shape\n * @submodule 3D Models\n * @for p5\n * @requires core\n * @requires p5.Geometry\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n_dereq_('./p5.Geometry');\n\n/**\n * Load a 3d model from an OBJ file.\n * \n * One of the limitations of the OBJ format is that it doesn't have a built-in\n * sense of scale. This means that models exported from different programs might\n * be very different sizes. If your model isn't displaying, try calling\n * loadModel() with the normalized parameter set to true. This will resize the\n * model to a scale appropriate for p5. You can also make additional changes to\n * the final size of your model with the scale() function.\n *\n * @method loadModel\n * @param {String} path Path of the model to be loaded\n * @param {Boolean} normalize If true, scale the model to a\n * standardized size when loading\n * @param {function(p5.Geometry)} [successCallback] Function to be called\n * once the model is loaded. Will be passed\n * the 3D model object.\n * @param {function(Event)} [failureCallback] called with event error if\n * the image fails to load.\n * @return {p5.Geometry} the p5.Geometry object\n *\n * @example\n * \n * \n * //draw a spinning octahedron\n * let octahedron;\n *\n * function preload() {\n * octahedron = loadModel('assets/octahedron.obj');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * model(octahedron);\n * }\n * \n * \n *\n * @alt\n * Vertically rotating 3-d octahedron.\n *\n * @example\n * \n * \n * //draw a spinning teapot\n * let teapot;\n *\n * function preload() {\n * // Load model with normalise parameter set to true\n * teapot = loadModel('assets/teapot.obj', true);\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * scale(0.4); // Scaled to make model fit into canvas\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * normalMaterial(); // For effect\n * model(teapot);\n * }\n * \n * \n *\n * @alt\n * Vertically rotating 3-d teapot with red, green and blue gradient.\n */\n/**\n * @method loadModel\n * @param {String} path\n * @param {function(p5.Geometry)} [successCallback]\n * @param {function(Event)} [failureCallback]\n * @return {p5.Geometry} the p5.Geometry object\n */\np5.prototype.loadModel = function(path) {\n p5._validateParameters('loadModel', arguments);\n var normalize;\n var successCallback;\n var failureCallback;\n if (typeof arguments[1] === 'boolean') {\n normalize = arguments[1];\n successCallback = arguments[2];\n failureCallback = arguments[3];\n } else {\n normalize = false;\n successCallback = arguments[1];\n failureCallback = arguments[2];\n }\n\n var model = new p5.Geometry();\n model.gid = path + '|' + normalize;\n var self = this;\n this.loadStrings(\n path,\n function(strings) {\n parseObj(model, strings);\n\n if (normalize) {\n model.normalize();\n }\n\n self._decrementPreload();\n if (typeof successCallback === 'function') {\n successCallback(model);\n }\n }.bind(this),\n failureCallback\n );\n\n return model;\n};\n\n/**\n * Parse OBJ lines into model. For reference, this is what a simple model of a\n * square might look like:\n *\n * v -0.5 -0.5 0.5\n * v -0.5 -0.5 -0.5\n * v -0.5 0.5 -0.5\n * v -0.5 0.5 0.5\n *\n * f 4 3 2 1\n */\nfunction parseObj(model, lines) {\n // OBJ allows a face to specify an index for a vertex (in the above example),\n // but it also allows you to specify a custom combination of vertex, UV\n // coordinate, and vertex normal. So, \"3/4/3\" would mean, \"use vertex 3 with\n // UV coordinate 4 and vertex normal 3\". In WebGL, every vertex with different\n // parameters must be a different vertex, so loadedVerts is used to\n // temporarily store the parsed vertices, normals, etc., and indexedVerts is\n // used to map a specific combination (keyed on, for example, the string\n // \"3/4/3\"), to the actual index of the newly created vertex in the final\n // object.\n var loadedVerts = {\n v: [],\n vt: [],\n vn: []\n };\n var indexedVerts = {};\n\n for (var line = 0; line < lines.length; ++line) {\n // Each line is a separate object (vertex, face, vertex normal, etc)\n // For each line, split it into tokens on whitespace. The first token\n // describes the type.\n var tokens = lines[line].trim().split(/\\b\\s+/);\n\n if (tokens.length > 0) {\n if (tokens[0] === 'v' || tokens[0] === 'vn') {\n // Check if this line describes a vertex or vertex normal.\n // It will have three numeric parameters.\n var vertex = new p5.Vector(\n parseFloat(tokens[1]),\n parseFloat(tokens[2]),\n parseFloat(tokens[3])\n );\n loadedVerts[tokens[0]].push(vertex);\n } else if (tokens[0] === 'vt') {\n // Check if this line describes a texture coordinate.\n // It will have two numeric parameters.\n var texVertex = [parseFloat(tokens[1]), parseFloat(tokens[2])];\n loadedVerts[tokens[0]].push(texVertex);\n } else if (tokens[0] === 'f') {\n // Check if this line describes a face.\n // OBJ faces can have more than three points. Triangulate points.\n for (var tri = 3; tri < tokens.length; ++tri) {\n var face = [];\n\n var vertexTokens = [1, tri - 1, tri];\n\n for (var tokenInd = 0; tokenInd < vertexTokens.length; ++tokenInd) {\n // Now, convert the given token into an index\n var vertString = tokens[vertexTokens[tokenInd]];\n var vertIndex = 0;\n\n // TODO: Faces can technically use negative numbers to refer to the\n // previous nth vertex. I haven't seen this used in practice, but\n // it might be good to implement this in the future.\n\n if (indexedVerts[vertString] !== undefined) {\n vertIndex = indexedVerts[vertString];\n } else {\n var vertParts = vertString.split('/');\n for (var i = 0; i < vertParts.length; i++) {\n vertParts[i] = parseInt(vertParts[i]) - 1;\n }\n\n vertIndex = indexedVerts[vertString] = model.vertices.length;\n model.vertices.push(loadedVerts.v[vertParts[0]].copy());\n if (loadedVerts.vt[vertParts[1]]) {\n model.uvs.push(loadedVerts.vt[vertParts[1]].slice());\n } else {\n model.uvs.push([0, 0]);\n }\n\n if (loadedVerts.vn[vertParts[2]]) {\n model.vertexNormals.push(loadedVerts.vn[vertParts[2]].copy());\n }\n }\n\n face.push(vertIndex);\n }\n\n if (\n face[0] !== face[1] &&\n face[0] !== face[2] &&\n face[1] !== face[2]\n ) {\n model.faces.push(face);\n }\n }\n }\n }\n }\n // If the model doesn't have normals, compute the normals\n if (model.vertexNormals.length === 0) {\n model.computeNormals();\n }\n\n return model;\n}\n\n/**\n * Render a 3d model to the screen.\n *\n * @method model\n * @param {p5.Geometry} model Loaded 3d model to be rendered\n * @example\n * \n * \n * //draw a spinning octahedron\n * let octahedron;\n *\n * function preload() {\n * octahedron = loadModel('assets/octahedron.obj');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * model(octahedron);\n * }\n * \n * \n *\n * @alt\n * Vertically rotating 3-d octahedron.\n *\n */\np5.prototype.model = function(model) {\n this._assert3d('model');\n p5._validateParameters('model', arguments);\n if (model.vertices.length > 0) {\n if (!this._renderer.geometryInHash(model.gid)) {\n model._makeTriangleEdges()._edgesToVertices();\n this._renderer.createBuffers(model.gid, model);\n }\n\n this._renderer.drawBuffers(model.gid);\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/main\":24,\"./p5.Geometry\":70}],68:[function(_dereq_,module,exports){\n/**\n * @module Lights, Camera\n * @submodule Material\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n_dereq_('./p5.Texture');\n\n/**\n * Loads a custom shader from the provided vertex and fragment\n * shader paths. The shader files are loaded asynchronously in the\n * background, so this method should be used in preload().\n *\n * For now, there are three main types of shaders. p5 will automatically\n * supply appropriate vertices, normals, colors, and lighting attributes\n * if the parameters defined in the shader match the names.\n *\n * @method loadShader\n * @param {String} vertFilename path to file containing vertex shader\n * source code\n * @param {String} fragFilename path to file containing fragment shader\n * source code\n * @param {function} [callback] callback to be executed after loadShader\n * completes. On success, the Shader object is passed as the first argument.\n * @param {function} [errorCallback] callback to be executed when an error\n * occurs inside loadShader. On error, the error is passed as the first\n * argument.\n * @return {p5.Shader} a shader object created from the provided\n * vertex and fragment shader files.\n *\n * @example\n * \n * \n * let mandel;\n * function preload() {\n * // load the shader definitions from files\n * mandel = loadShader('assets/shader.vert', 'assets/shader.frag');\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * // use the shader\n * shader(mandel);\n * noStroke();\n * mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n * }\n *\n * function draw() {\n * mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n * quad(-1, -1, 1, -1, 1, 1, -1, 1);\n * }\n * \n * \n *\n * @alt\n * zooming Mandelbrot set. a colorful, infinitely detailed fractal.\n */\np5.prototype.loadShader = function(\n vertFilename,\n fragFilename,\n callback,\n errorCallback\n) {\n p5._validateParameters('loadShader', arguments);\n if (!errorCallback) {\n errorCallback = console.error;\n }\n\n var loadedShader = new p5.Shader();\n\n var self = this;\n var loadedFrag = false;\n var loadedVert = false;\n\n var onLoad = function() {\n self._decrementPreload();\n if (callback) {\n callback(loadedShader);\n }\n };\n\n this.loadStrings(\n vertFilename,\n function(result) {\n loadedShader._vertSrc = result.join('\\n');\n loadedVert = true;\n if (loadedFrag) {\n onLoad();\n }\n },\n errorCallback\n );\n\n this.loadStrings(\n fragFilename,\n function(result) {\n loadedShader._fragSrc = result.join('\\n');\n loadedFrag = true;\n if (loadedVert) {\n onLoad();\n }\n },\n errorCallback\n );\n\n return loadedShader;\n};\n\n/**\n * @method createShader\n * @param {String} vertSrc source code for the vertex shader\n * @param {String} fragSrc source code for the fragment shader\n * @returns {p5.Shader} a shader object created from the provided\n * vertex and fragment shaders.\n *\n * @example\n * \n * \n * // the 'varying's are shared between both vertex & fragment shaders\n * let varying = 'precision highp float; varying vec2 vPos;';\n *\n * // the vertex shader is called for each vertex\n * let vs =\n * varying +\n * 'attribute vec3 aPosition;' +\n * 'void main() { vPos = (gl_Position = vec4(aPosition,1.0)).xy; }';\n *\n * // the fragment shader is called for each pixel\n * let fs =\n * varying +\n * 'uniform vec2 p;' +\n * 'uniform float r;' +\n * 'const int I = 500;' +\n * 'void main() {' +\n * ' vec2 c = p + vPos * r, z = c;' +\n * ' float n = 0.0;' +\n * ' for (int i = I; i > 0; i --) {' +\n * ' if(z.x*z.x+z.y*z.y > 4.0) {' +\n * ' n = float(i)/float(I);' +\n * ' break;' +\n * ' }' +\n * ' z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;' +\n * ' }' +\n * ' gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);' +\n * '}';\n *\n * let mandel;\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n *\n * // create and initialize the shader\n * mandel = createShader(vs, fs);\n * shader(mandel);\n * noStroke();\n *\n * // 'p' is the center point of the Mandelbrot image\n * mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n * }\n *\n * function draw() {\n * // 'r' is the size of the image in Mandelbrot-space\n * mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n * quad(-1, -1, 1, -1, 1, 1, -1, 1);\n * }\n * \n * \n *\n * @alt\n * zooming Mandelbrot set. a colorful, infinitely detailed fractal.\n */\np5.prototype.createShader = function(vertSrc, fragSrc) {\n this._assert3d('createShader');\n p5._validateParameters('createShader', arguments);\n return new p5.Shader(this._renderer, vertSrc, fragSrc);\n};\n\n/**\n * The shader() function lets the user provide a custom shader\n * to fill in shapes in WEBGL mode. Users can create their\n * own shaders by loading vertex and fragment shaders with\n * loadShader().\n *\n * @method shader\n * @chainable\n * @param {p5.Shader} [s] the desired p5.Shader to use for rendering\n * shapes.\n */\np5.prototype.shader = function(s) {\n this._assert3d('shader');\n p5._validateParameters('shader', arguments);\n\n if (s._renderer === undefined) {\n s._renderer = this._renderer;\n }\n\n if (s.isStrokeShader()) {\n this._renderer.userStrokeShader = s;\n } else {\n this._renderer.userFillShader = s;\n this._renderer._useNormalMaterial = false;\n }\n\n s.init();\n\n return this;\n};\n\n/**\n * This function restores the default shaders in WEBGL mode. Code that runs\n * after resetShader() will not be affected by previously defined\n * shaders. Should be run after shader().\n *\n * @method resetShader\n * @chainable\n */\np5.prototype.resetShader = function() {\n this._renderer.userFillShader = this._renderer.userStrokeShader = null;\n return this;\n};\n\n/**\n * Normal material for geometry. You can view all\n * possible materials in this\n * example.\n * @method normalMaterial\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * normalMaterial();\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * Red, green and blue gradient.\n *\n */\np5.prototype.normalMaterial = function() {\n this._assert3d('normalMaterial');\n p5._validateParameters('normalMaterial', arguments);\n this._renderer.drawMode = constants.FILL;\n this._renderer._useSpecularMaterial = false;\n this._renderer._useNormalMaterial = true;\n this._renderer.curFillColor = [1, 1, 1, 1];\n this._renderer._setProperty('_doFill', true);\n this.noStroke();\n return this;\n};\n\n/**\n * Texture for geometry. You can view other possible materials in this\n * example.\n * @method texture\n * @param {p5.Image|p5.MediaElement|p5.Graphics} tex 2-dimensional graphics\n * to render as texture\n * @chainable\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * rotateZ(frameCount * 0.01);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * //pass image as texture\n * texture(img);\n * box(200, 200, 200);\n * }\n * \n * \n *\n * \n * \n * let pg;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * pg = createGraphics(200, 200);\n * pg.textSize(75);\n * }\n *\n * function draw() {\n * background(0);\n * pg.background(255);\n * pg.text('hello!', 0, 100);\n * //pass image as texture\n * texture(pg);\n * rotateX(0.5);\n * noStroke();\n * plane(50);\n * }\n * \n * \n *\n * \n * \n * let vid;\n * function preload() {\n * vid = createVideo('assets/fingers.mov');\n * vid.hide();\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * //pass video frame as texture\n * texture(vid);\n * rect(-40, -40, 80, 80);\n * }\n *\n * function mousePressed() {\n * vid.loop();\n * }\n * \n * \n *\n * @alt\n * Rotating view of many images umbrella and grid roof on a 3d plane\n * black canvas\n * black canvas\n *\n */\np5.prototype.texture = function(tex) {\n this._assert3d('texture');\n p5._validateParameters('texture', arguments);\n\n this._renderer.drawMode = constants.TEXTURE;\n this._renderer._useSpecularMaterial = false;\n this._renderer._useNormalMaterial = false;\n this._renderer._tex = tex;\n this._renderer._setProperty('_doFill', true);\n\n return this;\n};\n\n/**\n * Sets the coordinate space for texture mapping. The default mode is IMAGE\n * which refers to the actual coordinates of the image.\n * NORMAL refers to a normalized space of values ranging from 0 to 1.\n * This function only works in WEBGL mode.\n *\n * With IMAGE, if an image is 100 x 200 pixels, mapping the image onto the entire\n * size of a quad would require the points (0,0) (100, 0) (100,200) (0,200).\n * The same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).\n * @method textureMode\n * @param {Constant} mode either IMAGE or NORMAL\n * @example\n * \n * \n * let img;\n *\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * texture(img);\n * textureMode(NORMAL);\n * beginShape();\n * vertex(-50, -50, 0, 0);\n * vertex(50, -50, 1, 0);\n * vertex(50, 50, 1, 1);\n * vertex(-50, 50, 0, 1);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * the underside of a white umbrella and gridded ceiling above\n *\n * \n * \n * let img;\n *\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * texture(img);\n * textureMode(NORMAL);\n * beginShape();\n * vertex(-50, -50, 0, 0);\n * vertex(50, -50, img.width, 0);\n * vertex(50, 50, img.width, img.height);\n * vertex(-50, 50, 0, img.height);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * the underside of a white umbrella and gridded ceiling above\n *\n */\np5.prototype.textureMode = function(mode) {\n if (mode !== constants.IMAGE && mode !== constants.NORMAL) {\n console.warn(\n 'You tried to set ' + mode + ' textureMode only supports IMAGE & NORMAL '\n );\n } else {\n this._renderer.textureMode = mode;\n }\n};\n\n/**\n * Sets the global texture wrapping mode. This controls how textures behave\n * when their uv's go outside of the 0 - 1 range. There are three options:\n * CLAMP, REPEAT, and MIRROR.\n *\n * CLAMP causes the pixels at the edge of the texture to extend to the bounds\n * REPEAT causes the texture to tile repeatedly until reaching the bounds\n * MIRROR works similarly to REPEAT but it flips the texture with every new tile\n *\n * REPEAT & MIRROR are only available if the texture\n * is a power of two size (128, 256, 512, 1024, etc.).\n *\n * This method will affect all textures in your sketch until a subsequent\n * textureWrap call is made.\n *\n * If only one argument is provided, it will be applied to both the\n * horizontal and vertical axes.\n * @method textureWrap\n * @param {Constant} wrapX either CLAMP, REPEAT, or MIRROR\n * @param {Constant} [wrapY] either CLAMP, REPEAT, or MIRROR\n * @example\n * \n * \n * let img;\n * function preload() {\n * img = loadImage('assets/rockies128.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * textureWrap(MIRROR);\n * }\n *\n * function draw() {\n * background(0);\n *\n * let dX = mouseX;\n * let dY = mouseY;\n *\n * let u = lerp(1.0, 2.0, dX);\n * let v = lerp(1.0, 2.0, dY);\n *\n * scale(width / 2);\n *\n * texture(img);\n *\n * beginShape(TRIANGLES);\n * vertex(-1, -1, 0, 0, 0);\n * vertex(1, -1, 0, u, 0);\n * vertex(1, 1, 0, u, v);\n *\n * vertex(1, 1, 0, u, v);\n * vertex(-1, 1, 0, 0, v);\n * vertex(-1, -1, 0, 0, 0);\n * endShape();\n * }\n * \n * \n *\n * @alt\n * an image of the rocky mountains repeated in mirrored tiles\n *\n */\np5.prototype.textureWrap = function(wrapX, wrapY) {\n wrapY = wrapY || wrapX;\n\n this._renderer.textureWrapX = wrapX;\n this._renderer.textureWrapY = wrapY;\n\n var textures = this._renderer.textures;\n for (var i = 0; i < textures.length; i++) {\n textures[i].setWrapMode(wrapX, wrapY);\n }\n};\n\n/**\n * Ambient material for geometry with a given color. You can view all\n * possible materials in this\n * example.\n * @method ambientMaterial\n * @param {Number} v1 gray value, red or hue value\n * (depending on the current color mode),\n * @param {Number} [v2] green or saturation value\n * @param {Number} [v3] blue or brightness value\n * @param {Number} [a] opacity\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * ambientLight(200);\n * ambientMaterial(70, 130, 230);\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * radiating light source from top right of canvas\n *\n */\n/**\n * @method ambientMaterial\n * @param {Number[]|String|p5.Color} color color, color Array, or CSS color string\n * @chainable\n */\np5.prototype.ambientMaterial = function(v1, v2, v3, a) {\n this._assert3d('ambientMaterial');\n p5._validateParameters('ambientMaterial', arguments);\n\n var color = p5.prototype.color.apply(this, arguments);\n this._renderer.curFillColor = color._array;\n this._renderer._useSpecularMaterial = false;\n this._renderer._useNormalMaterial = false;\n this._renderer._enableLighting = true;\n this._renderer._tex = null;\n\n return this;\n};\n\n/**\n * Specular material for geometry with a given color. You can view all\n * possible materials in this\n * example.\n * @method specularMaterial\n * @param {Number} v1 gray value, red or hue value\n * (depending on the current color mode),\n * @param {Number} [v2] green or saturation value\n * @param {Number} [v3] blue or brightness value\n * @param {Number} [a] opacity\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * ambientLight(50);\n * pointLight(250, 250, 250, 100, 100, 30);\n * specularMaterial(250);\n * sphere(40);\n * }\n * \n * \n *\n * @alt\n * diffused radiating light source from top right of canvas\n *\n */\n/**\n * @method specularMaterial\n * @param {Number[]|String|p5.Color} color color Array, or CSS color string\n * @chainable\n */\np5.prototype.specularMaterial = function(v1, v2, v3, a) {\n this._assert3d('specularMaterial');\n p5._validateParameters('specularMaterial', arguments);\n\n var color = p5.prototype.color.apply(this, arguments);\n this._renderer.curFillColor = color._array;\n this._renderer._useSpecularMaterial = true;\n this._renderer._useNormalMaterial = false;\n this._renderer._enableLighting = true;\n this._renderer._tex = null;\n\n return this;\n};\n\n/**\n * Sets the amount of gloss in the surface of shapes.\n * Used in combination with specularMaterial() in setting\n * the material properties of shapes. The default and minimum value is 1.\n * @method shininess\n * @param {Number} shine Degree of Shininess.\n * Defaults to 1.\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * let locX = mouseX - width / 2;\n * let locY = mouseY - height / 2;\n * ambientLight(60, 60, 60);\n * pointLight(255, 255, 255, locX, locY, 50);\n * specularMaterial(250);\n * translate(-25, 0, 0);\n * shininess(1);\n * sphere(20);\n * translate(50, 0, 0);\n * shininess(20);\n * sphere(20);\n * }\n * \n * \n * @alt\n * Shininess on Camera changes position with mouse\n */\np5.prototype.shininess = function(shine) {\n this._assert3d('shininess');\n p5._validateParameters('shininess', arguments);\n\n if (shine < 1) {\n shine = 1;\n }\n this._renderer._useShininess = shine;\n return this;\n};\n\n/**\n * @private blends colors according to color components.\n * If alpha value is less than 1, we need to enable blending\n * on our gl context. Otherwise opaque objects need to a depthMask.\n * @param {Number[]} color [description]\n * @return {Number[]]} Normalized numbers array\n */\np5.RendererGL.prototype._applyColorBlend = function(colors) {\n var gl = this.GL;\n\n var isTexture = this.drawMode === constants.TEXTURE;\n if (isTexture || colors[colors.length - 1] < 1.0) {\n gl.depthMask(isTexture);\n gl.enable(gl.BLEND);\n this._applyBlendMode();\n } else {\n gl.depthMask(true);\n gl.disable(gl.BLEND);\n }\n return colors;\n};\n\n/**\n * @private sets blending in gl context to curBlendMode\n * @param {Number[]} color [description]\n * @return {Number[]]} Normalized numbers array\n */\np5.RendererGL.prototype._applyBlendMode = function() {\n var gl = this.GL;\n switch (this.curBlendMode) {\n case constants.BLEND:\n case constants.ADD:\n gl.blendEquation(gl.FUNC_ADD);\n gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);\n break;\n case constants.MULTIPLY:\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n gl.blendFuncSeparate(gl.ZERO, gl.SRC_COLOR, gl.ONE, gl.ONE);\n break;\n case constants.SCREEN:\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n gl.blendFuncSeparate(gl.ONE_MINUS_DST_COLOR, gl.ONE, gl.ONE, gl.ONE);\n break;\n case constants.EXCLUSION:\n gl.blendEquationSeparate(gl.FUNC_ADD, gl.FUNC_ADD);\n gl.blendFuncSeparate(\n gl.ONE_MINUS_DST_COLOR,\n gl.ONE_MINUS_SRC_COLOR,\n gl.ONE,\n gl.ONE\n );\n break;\n case constants.REPLACE:\n gl.blendEquation(gl.FUNC_ADD);\n gl.blendFunc(gl.ONE, gl.ZERO);\n break;\n case constants.SUBTRACT:\n gl.blendEquationSeparate(gl.FUNC_REVERSE_SUBTRACT, gl.FUNC_ADD);\n gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE, gl.ONE, gl.ONE);\n break;\n case constants.DARKEST:\n if (this.blendExt) {\n gl.blendEquationSeparate(this.blendExt.MIN_EXT, gl.FUNC_ADD);\n gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE);\n } else {\n console.warn(\n 'blendMode(DARKEST) does not work in your browser in WEBGL mode.'\n );\n }\n break;\n case constants.LIGHTEST:\n if (this.blendExt) {\n gl.blendEquationSeparate(this.blendExt.MAX_EXT, gl.FUNC_ADD);\n gl.blendFuncSeparate(gl.ONE, gl.ONE, gl.ONE, gl.ONE);\n } else {\n console.warn(\n 'blendMode(LIGHTEST) does not work in your browser in WEBGL mode.'\n );\n }\n break;\n default:\n console.error(\n 'Oops! Somehow RendererGL set curBlendMode to an unsupported mode.'\n );\n break;\n }\n};\n\nmodule.exports = p5;\n\n},{\"../core/constants\":18,\"../core/main\":24,\"./p5.Texture\":76}],69:[function(_dereq_,module,exports){\n/**\n * @module Lights, Camera\n * @submodule Camera\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n////////////////////////////////////////////////////////////////////////////////\n// p5.Prototype Methods\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Sets the camera position for a 3D sketch. Parameters for this function define\n * the position for the camera, the center of the sketch (where the camera is\n * pointing), and an up direction (the orientation of the camera).\n *\n * When called with no arguments, this function creates a default camera\n * equivalent to\n * camera(0, 0, (height/2.0) / tan(PI*30.0 / 180.0), 0, 0, 0, 0, 1, 0);\n * @method camera\n * @for p5\n * @param {Number} [x] camera position value on x axis\n * @param {Number} [y] camera position value on y axis\n * @param {Number} [z] camera position value on z axis\n * @param {Number} [centerX] x coordinate representing center of the sketch\n * @param {Number} [centerY] y coordinate representing center of the sketch\n * @param {Number} [centerZ] z coordinate representing center of the sketch\n * @param {Number} [upX] x component of direction 'up' from camera\n * @param {Number} [upY] y component of direction 'up' from camera\n * @param {Number} [upZ] z component of direction 'up' from camera\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(204);\n * //move the camera away from the plane by a sin wave\n * camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\n * plane(10, 10);\n * }\n * \n * \n *\n * @alt\n * White square repeatedly grows to fill canvas and then shrinks.\n *\n */\np5.prototype.camera = function() {\n this._assert3d('camera');\n p5._validateParameters('camera', arguments);\n this._renderer._curCamera.camera.apply(this._renderer._curCamera, arguments);\n return this;\n};\n\n/**\n * Sets a perspective projection for the camera in a 3D sketch. This projection\n * represents depth through foreshortening: objects that are close to the camera\n * appear their actual size while those that are further away from the camera\n * appear smaller. The parameters to this function define the viewing frustum\n * (the truncated pyramid within which objects are seen by the camera) through\n * vertical field of view, aspect ratio (usually width/height), and near and far\n * clipping planes.\n *\n * When called with no arguments, the defaults\n * provided are equivalent to\n * perspective(PI/3.0, width/height, eyeZ/10.0, eyeZ*10.0), where eyeZ\n * is equal to ((height/2.0) / tan(PI*60.0/360.0));\n * @method perspective\n * @for p5\n * @param {Number} [fovy] camera frustum vertical field of view,\n * from bottom to top of view, in angleMode units\n * @param {Number} [aspect] camera frustum aspect ratio\n * @param {Number} [near] frustum near plane length\n * @param {Number} [far] frustum far plane length\n * @chainable\n * @example\n * \n * \n * //drag the mouse to look around!\n * //you will see there's a vanishing point\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * perspective(PI / 3.0, width / height, 0.1, 500);\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * normalMaterial();\n *\n * rotateX(-0.3);\n * rotateY(-0.2);\n * translate(0, 0, -50);\n *\n * push();\n * translate(-15, 0, sin(frameCount / 30) * 95);\n * box(30);\n * pop();\n * push();\n * translate(15, 0, sin(frameCount / 30 + PI) * 95);\n * box(30);\n * pop();\n * }\n * \n * \n *\n * @alt\n * two colored 3D boxes move back and forth, rotating as mouse is dragged.\n *\n */\np5.prototype.perspective = function() {\n this._assert3d('perspective');\n p5._validateParameters('perspective', arguments);\n this._renderer._curCamera.perspective.apply(\n this._renderer._curCamera,\n arguments\n );\n return this;\n};\n\n/**\n * Sets an orthographic projection for the camera in a 3D sketch and defines a\n * box-shaped viewing frustum within which objects are seen. In this projection,\n * all objects with the same dimension appear the same size, regardless of\n * whether they are near or far from the camera. The parameters to this\n * function specify the viewing frustum where left and right are the minimum and\n * maximum x values, top and bottom are the minimum and maximum y values, and near\n * and far are the minimum and maximum z values. If no parameters are given, the\n * default is used: ortho(-width/2, width/2, -height/2, height/2).\n * @method ortho\n * @for p5\n * @param {Number} [left] camera frustum left plane\n * @param {Number} [right] camera frustum right plane\n * @param {Number} [bottom] camera frustum bottom plane\n * @param {Number} [top] camera frustum top plane\n * @param {Number} [near] camera frustum near plane\n * @param {Number} [far] camera frustum far plane\n * @chainable\n * @example\n * \n * \n * //drag the mouse to look around!\n * //there's no vanishing point\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * normalMaterial();\n *\n * rotateX(0.2);\n * rotateY(-0.2);\n * push();\n * translate(-15, 0, sin(frameCount / 30) * 65);\n * box(30);\n * pop();\n * push();\n * translate(15, 0, sin(frameCount / 30 + PI) * 65);\n * box(30);\n * pop();\n * }\n * \n * \n *\n * @alt\n * two 3D boxes move back and forth along same plane, rotating as mouse is dragged.\n *\n */\np5.prototype.ortho = function() {\n this._assert3d('ortho');\n p5._validateParameters('ortho', arguments);\n this._renderer._curCamera.ortho.apply(this._renderer._curCamera, arguments);\n return this;\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// p5.Camera\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Creates a new p5.Camera object and tells the\n * renderer to use that camera.\n * Returns the p5.Camera object.\n * @method createCamera\n * @return {p5.Camera} The newly created camera object.\n * @for p5\n */\np5.prototype.createCamera = function() {\n this._assert3d('createCamera');\n var _cam = new p5.Camera(this._renderer);\n\n // compute default camera settings, then set a default camera\n _cam._computeCameraDefaultSettings();\n _cam._setDefaultCamera();\n\n // set renderer current camera to the new camera\n this._renderer._curCamera = _cam;\n\n return _cam;\n};\n\n/**\n * This class describes a camera for use in p5's\n * \n * WebGL mode. It contains camera position, orientation, and projection\n * information necessary for rendering a 3D scene.\n *\n * New p5.Camera objects can be made through the\n * createCamera() function and controlled through\n * the methods described below. A camera created in this way will use a default\n * position in the scene and a default perspective projection until these\n * properties are changed through the various methods available. It is possible\n * to create multiple cameras, in which case the current camera\n * can be set through the setCamera() method.\n *\n *\n * Note:\n * The methods below operate in two coordinate systems: the 'world' coordinate\n * system describe positions in terms of their relationship to the origin along\n * the X, Y and Z axes whereas the camera's 'local' coordinate system\n * describes positions from the camera's point of view: left-right, up-down,\n * and forward-backward. The move() method,\n * for instance, moves the camera along its own axes, whereas the\n * setPosition()\n * method sets the camera's position in world-space.\n *\n *\n * @class p5.Camera\n * @param {rendererGL} rendererGL instance of WebGL renderer\n * @example\n * \n * \n * let cam;\n * let delta = 0.01;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * // set initial pan angle\n * cam.pan(-0.8);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // pan camera according to angle 'delta'\n * cam.pan(delta);\n *\n * // every 160 frames, switch direction\n * if (frameCount % 160 === 0) {\n * delta *= -1;\n * }\n *\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n * \n * \n *\n * @alt\n * camera view pans left and right across a series of rotating 3D boxes.\n *\n */\np5.Camera = function(renderer) {\n this._renderer = renderer;\n\n this.cameraType = 'default';\n\n this.cameraMatrix = new p5.Matrix();\n this.projMatrix = new p5.Matrix();\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Camera Projection Methods\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Sets a perspective projection for a p5.Camera object and sets parameters\n * for that projection according to perspective()\n * syntax.\n * @method perspective\n * @for p5.Camera\n */\np5.Camera.prototype.perspective = function(fovy, aspect, near, far) {\n if (typeof fovy === 'undefined') {\n fovy = this.defaultCameraFOV;\n // this avoids issue where setting angleMode(DEGREES) before calling\n // perspective leads to a smaller than expected FOV (because\n // _computeCameraDefaultSettings computes in radians)\n this.cameraFOV = fovy;\n } else {\n this.cameraFOV = this._renderer._pInst._toRadians(fovy);\n }\n if (typeof aspect === 'undefined') {\n aspect = this.defaultAspectRatio;\n }\n if (typeof near === 'undefined') {\n near = this.defaultCameraNear;\n }\n if (typeof far === 'undefined') {\n far = this.defaultCameraFar;\n }\n\n if (near <= 0.0001) {\n near = 0.01;\n console.log(\n 'Avoid perspective near plane values close to or below 0. ' +\n 'Setting value to 0.01.'\n );\n }\n\n if (far < near) {\n console.log(\n 'Perspective far plane value is less than near plane value. ' +\n 'Nothing will be shown.'\n );\n }\n\n this.aspectRatio = aspect;\n this.cameraNear = near;\n this.cameraFar = far;\n\n this.projMatrix = p5.Matrix.identity();\n\n var f = 1.0 / Math.tan(this.cameraFOV / 2);\n var nf = 1.0 / (this.cameraNear - this.cameraFar);\n\n // prettier-ignore\n this.projMatrix.set(f / aspect, 0, 0, 0,\n 0, -f, 0, 0,\n 0, 0, (far + near) * nf, -1,\n 0, 0, (2 * far * near) * nf, 0);\n\n if (this._isActive()) {\n this._renderer.uPMatrix.set(\n this.projMatrix.mat4[0],\n this.projMatrix.mat4[1],\n this.projMatrix.mat4[2],\n this.projMatrix.mat4[3],\n this.projMatrix.mat4[4],\n this.projMatrix.mat4[5],\n this.projMatrix.mat4[6],\n this.projMatrix.mat4[7],\n this.projMatrix.mat4[8],\n this.projMatrix.mat4[9],\n this.projMatrix.mat4[10],\n this.projMatrix.mat4[11],\n this.projMatrix.mat4[12],\n this.projMatrix.mat4[13],\n this.projMatrix.mat4[14],\n this.projMatrix.mat4[15]\n );\n }\n\n this.cameraType = 'custom';\n};\n\n/**\n * Sets an orthographic projection for a p5.Camera object and sets parameters\n * for that projection according to ortho() syntax.\n * @method ortho\n * @for p5.Camera\n */\np5.Camera.prototype.ortho = function(left, right, bottom, top, near, far) {\n if (left === undefined) left = -this._renderer.width / 2;\n if (right === undefined) right = +this._renderer.width / 2;\n if (bottom === undefined) bottom = -this._renderer.height / 2;\n if (top === undefined) top = +this._renderer.height / 2;\n if (near === undefined) near = 0;\n if (far === undefined)\n far = Math.max(this._renderer.width, this._renderer.height);\n\n var w = right - left;\n var h = top - bottom;\n var d = far - near;\n\n var x = +2.0 / w;\n var y = +2.0 / h;\n var z = -2.0 / d;\n\n var tx = -(right + left) / w;\n var ty = -(top + bottom) / h;\n var tz = -(far + near) / d;\n\n this.projMatrix = p5.Matrix.identity();\n\n // prettier-ignore\n this.projMatrix.set( x, 0, 0, 0,\n 0, -y, 0, 0,\n 0, 0, z, 0,\n tx, ty, tz, 1);\n\n if (this._isActive()) {\n this._renderer.uPMatrix.set(\n this.projMatrix.mat4[0],\n this.projMatrix.mat4[1],\n this.projMatrix.mat4[2],\n this.projMatrix.mat4[3],\n this.projMatrix.mat4[4],\n this.projMatrix.mat4[5],\n this.projMatrix.mat4[6],\n this.projMatrix.mat4[7],\n this.projMatrix.mat4[8],\n this.projMatrix.mat4[9],\n this.projMatrix.mat4[10],\n this.projMatrix.mat4[11],\n this.projMatrix.mat4[12],\n this.projMatrix.mat4[13],\n this.projMatrix.mat4[14],\n this.projMatrix.mat4[15]\n );\n }\n\n this.cameraType = 'custom';\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Camera Orientation Methods\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Rotate camera view about arbitrary axis defined by x,y,z\n * based on http://learnwebgl.brown37.net/07_cameras/camera_rotating_motion.html\n * @method _rotateView\n * @private\n */\np5.Camera.prototype._rotateView = function(a, x, y, z) {\n var centerX = this.centerX;\n var centerY = this.centerY;\n var centerZ = this.centerZ;\n\n // move center by eye position such that rotation happens around eye position\n centerX -= this.eyeX;\n centerY -= this.eyeY;\n centerZ -= this.eyeZ;\n\n var rotation = p5.Matrix.identity(this._renderer._pInst);\n rotation.rotate(this._renderer._pInst._toRadians(a), x, y, z);\n\n // prettier-ignore\n var rotatedCenter = [\n centerX * rotation.mat4[0]+ centerY * rotation.mat4[4]+ centerZ * rotation.mat4[8],\n centerX * rotation.mat4[1]+ centerY * rotation.mat4[5]+ centerZ * rotation.mat4[9],\n centerX * rotation.mat4[2]+ centerY * rotation.mat4[6]+ centerZ * rotation.mat4[10]\n ]\n\n // add eye position back into center\n rotatedCenter[0] += this.eyeX;\n rotatedCenter[1] += this.eyeY;\n rotatedCenter[2] += this.eyeZ;\n\n this.camera(\n this.eyeX,\n this.eyeY,\n this.eyeZ,\n rotatedCenter[0],\n rotatedCenter[1],\n rotatedCenter[2],\n this.upX,\n this.upY,\n this.upZ\n );\n};\n\n/**\n * Panning rotates the camera view to the left and right.\n * @method pan\n * @param {Number} angle amount to rotate camera in current\n * angleMode units.\n * Greater than 0 values rotate counterclockwise (to the left).\n * @example\n * \n * \n * let cam;\n * let delta = 0.01;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * // set initial pan angle\n * cam.pan(-0.8);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // pan camera according to angle 'delta'\n * cam.pan(delta);\n *\n * // every 160 frames, switch direction\n * if (frameCount % 160 === 0) {\n * delta *= -1;\n * }\n *\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n * \n * \n *\n * @alt\n * camera view pans left and right across a series of rotating 3D boxes.\n *\n */\np5.Camera.prototype.pan = function(amount) {\n var local = this._getLocalAxes();\n this._rotateView(amount, local.y[0], local.y[1], local.y[2]);\n};\n\n/**\n * Tilting rotates the camera view up and down.\n * @method tilt\n * @param {Number} angle amount to rotate camera in current\n * angleMode units.\n * Greater than 0 values rotate counterclockwise (to the left).\n * @example\n * \n * \n * let cam;\n * let delta = 0.01;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * // set initial tilt\n * cam.tilt(-0.8);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // pan camera according to angle 'delta'\n * cam.tilt(delta);\n *\n * // every 160 frames, switch direction\n * if (frameCount % 160 === 0) {\n * delta *= -1;\n * }\n *\n * rotateY(frameCount * 0.01);\n * translate(0, -100, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * }\n * \n * \n *\n * @alt\n * camera view tilts up and down across a series of rotating 3D boxes.\n */\np5.Camera.prototype.tilt = function(amount) {\n var local = this._getLocalAxes();\n this._rotateView(amount, local.x[0], local.x[1], local.x[2]);\n};\n\n/**\n * Reorients the camera to look at a position in world space.\n * @method lookAt\n * @for p5.Camera\n * @param {Number} x x position of a point in world space\n * @param {Number} y y position of a point in world space\n * @param {Number} z z position of a point in world space\n * @example\n * \n * \n * let cam;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // look at a new random point every 60 frames\n * if (frameCount % 60 === 0) {\n * cam.lookAt(random(-100, 100), random(-50, 50), 0);\n * }\n *\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n * \n * \n *\n * @alt\n * camera view of rotating 3D cubes changes to look at a new random\n * point every second .\n */\np5.Camera.prototype.lookAt = function(x, y, z) {\n this.camera(\n this.eyeX,\n this.eyeY,\n this.eyeZ,\n x,\n y,\n z,\n this.upX,\n this.upY,\n this.upZ\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Camera Position Methods\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Sets a camera's position and orientation. This is equivalent to calling\n * camera() on a p5.Camera object.\n * @method camera\n * @for p5.Camera\n */\np5.Camera.prototype.camera = function(\n eyeX,\n eyeY,\n eyeZ,\n centerX,\n centerY,\n centerZ,\n upX,\n upY,\n upZ\n) {\n if (typeof eyeX === 'undefined') {\n eyeX = this.defaultEyeX;\n eyeY = this.defaultEyeY;\n eyeZ = this.defaultEyeZ;\n centerX = eyeX;\n centerY = eyeY;\n centerZ = 0;\n upX = 0;\n upY = 1;\n upZ = 0;\n }\n\n this.eyeX = eyeX;\n this.eyeY = eyeY;\n this.eyeZ = eyeZ;\n\n this.centerX = centerX;\n this.centerY = centerY;\n this.centerZ = centerZ;\n\n this.upX = upX;\n this.upY = upY;\n this.upZ = upZ;\n\n var local = this._getLocalAxes();\n\n // the camera affects the model view matrix, insofar as it\n // inverse translates the world to the eye position of the camera\n // and rotates it.\n // prettier-ignore\n this.cameraMatrix.set(local.x[0], local.y[0], local.z[0], 0,\n local.x[1], local.y[1], local.z[1], 0,\n local.x[2], local.y[2], local.z[2], 0,\n 0, 0, 0, 1);\n\n var tx = -eyeX;\n var ty = -eyeY;\n var tz = -eyeZ;\n\n this.cameraMatrix.translate([tx, ty, tz]);\n\n if (this._isActive()) {\n this._renderer.uMVMatrix.set(\n this.cameraMatrix.mat4[0],\n this.cameraMatrix.mat4[1],\n this.cameraMatrix.mat4[2],\n this.cameraMatrix.mat4[3],\n this.cameraMatrix.mat4[4],\n this.cameraMatrix.mat4[5],\n this.cameraMatrix.mat4[6],\n this.cameraMatrix.mat4[7],\n this.cameraMatrix.mat4[8],\n this.cameraMatrix.mat4[9],\n this.cameraMatrix.mat4[10],\n this.cameraMatrix.mat4[11],\n this.cameraMatrix.mat4[12],\n this.cameraMatrix.mat4[13],\n this.cameraMatrix.mat4[14],\n this.cameraMatrix.mat4[15]\n );\n }\n return this;\n};\n\n/**\n * Move camera along its local axes while maintaining current camera orientation.\n * @method move\n * @param {Number} x amount to move along camera's left-right axis\n * @param {Number} y amount to move along camera's up-down axis\n * @param {Number} z amount to move along camera's forward-backward axis\n * @example\n * \n * \n * // see the camera move along its own axes while maintaining its orientation\n * let cam;\n * let delta = 0.5;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // move the camera along its local axes\n * cam.move(delta, delta, 0);\n *\n * // every 100 frames, switch direction\n * if (frameCount % 150 === 0) {\n * delta *= -1;\n * }\n *\n * translate(-10, -10, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * }\n * \n * \n *\n * @alt\n * camera view moves along a series of 3D boxes, maintaining the same\n * orientation throughout the move\n */\np5.Camera.prototype.move = function(x, y, z) {\n var local = this._getLocalAxes();\n\n // scale local axes by movement amounts\n // based on http://learnwebgl.brown37.net/07_cameras/camera_linear_motion.html\n var dx = [local.x[0] * x, local.x[1] * x, local.x[2] * x];\n var dy = [local.y[0] * y, local.y[1] * y, local.y[2] * y];\n var dz = [local.z[0] * z, local.z[1] * z, local.z[2] * z];\n\n this.camera(\n this.eyeX + dx[0] + dy[0] + dz[0],\n this.eyeY + dx[1] + dy[1] + dz[1],\n this.eyeZ + dx[2] + dy[2] + dz[2],\n this.centerX + dx[0] + dy[0] + dz[0],\n this.centerY + dx[1] + dy[1] + dz[1],\n this.centerZ + dx[2] + dy[2] + dz[2],\n 0,\n 1,\n 0\n );\n};\n\n/**\n * Set camera position in world-space while maintaining current camera\n * orientation.\n * @method setPosition\n * @param {Number} x x position of a point in world space\n * @param {Number} y y position of a point in world space\n * @param {Number} z z position of a point in world space\n * @example\n * \n * \n * // press '1' '2' or '3' keys to set camera position\n *\n * let cam;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // '1' key\n * if (keyIsDown(49)) {\n * cam.setPosition(30, 0, 80);\n * }\n * // '2' key\n * if (keyIsDown(50)) {\n * cam.setPosition(0, 0, 80);\n * }\n * // '3' key\n * if (keyIsDown(51)) {\n * cam.setPosition(-30, 0, 80);\n * }\n *\n * box(20);\n * }\n * \n * \n *\n * @alt\n * camera position changes as the user presses keys, altering view of a 3D box\n */\np5.Camera.prototype.setPosition = function(x, y, z) {\n var diffX = x - this.eyeX;\n var diffY = y - this.eyeY;\n var diffZ = z - this.eyeZ;\n\n this.camera(\n x,\n y,\n z,\n this.centerX + diffX,\n this.centerY + diffY,\n this.centerZ + diffZ,\n 0,\n 1,\n 0\n );\n};\n\n////////////////////////////////////////////////////////////////////////////////\n// Camera Helper Methods\n////////////////////////////////////////////////////////////////////////////////\n\n// @TODO: combine this function with _setDefaultCamera to compute these values\n// as-needed\np5.Camera.prototype._computeCameraDefaultSettings = function() {\n this.defaultCameraFOV = 60 / 180 * Math.PI;\n this.defaultAspectRatio = this._renderer.width / this._renderer.height;\n this.defaultEyeX = 0;\n this.defaultEyeY = 0;\n this.defaultEyeZ =\n this._renderer.height / 2.0 / Math.tan(this.defaultCameraFOV / 2.0);\n this.defaultCenterX = 0;\n this.defaultCenterY = 0;\n this.defaultCenterZ = 0;\n this.defaultCameraNear = this.defaultEyeZ * 0.1;\n this.defaultCameraFar = this.defaultEyeZ * 10;\n};\n\n//detect if user didn't set the camera\n//then call this function below\np5.Camera.prototype._setDefaultCamera = function() {\n this.cameraFOV = this.defaultCameraFOV;\n this.aspectRatio = this.defaultAspectRatio;\n this.eyeX = this.defaultEyeX;\n this.eyeY = this.defaultEyeY;\n this.eyeZ = this.defaultEyeZ;\n this.centerX = this.defaultCenterX;\n this.centerY = this.defaultCenterY;\n this.centerZ = this.defaultCenterZ;\n this.upX = 0;\n this.upY = 1;\n this.upZ = 0;\n this.cameraNear = this.defaultCameraNear;\n this.cameraFar = this.defaultCameraFar;\n\n this.perspective();\n this.camera();\n\n this.cameraType = 'default';\n};\n\np5.Camera.prototype._resize = function() {\n // If we're using the default camera, update the aspect ratio\n if (this.cameraType === 'default') {\n this._computeCameraDefaultSettings();\n this._setDefaultCamera();\n } else {\n this.perspective(\n this.cameraFOV,\n this._renderer.width / this._renderer.height\n );\n }\n};\n\n/**\n * Returns a copy of a camera.\n * @method copy\n * @private\n */\np5.Camera.prototype.copy = function() {\n var _cam = new p5.Camera(this._renderer);\n _cam.cameraFOV = this.cameraFOV;\n _cam.aspectRatio = this.aspectRatio;\n _cam.eyeX = this.eyeX;\n _cam.eyeY = this.eyeY;\n _cam.eyeZ = this.eyeZ;\n _cam.centerX = this.centerX;\n _cam.centerY = this.centerY;\n _cam.centerZ = this.centerZ;\n _cam.cameraNear = this.cameraNear;\n _cam.cameraFar = this.cameraFar;\n\n _cam.cameraType = this.cameraType;\n\n _cam.cameraMatrix = this.cameraMatrix.copy();\n _cam.projMatrix = this.projMatrix.copy();\n\n return _cam;\n};\n\n/**\n * Returns a camera's local axes: left-right, up-down, and forward-backward,\n * as defined by vectors in world-space.\n * @method _getLocalAxes\n * @private\n */\np5.Camera.prototype._getLocalAxes = function() {\n // calculate camera local Z vector\n var z0 = this.eyeX - this.centerX;\n var z1 = this.eyeY - this.centerY;\n var z2 = this.eyeZ - this.centerZ;\n\n // normalize camera local Z vector\n var eyeDist = Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\n if (eyeDist !== 0) {\n z0 /= eyeDist;\n z1 /= eyeDist;\n z2 /= eyeDist;\n }\n\n // calculate camera Y vector\n var y0 = this.upX;\n var y1 = this.upY;\n var y2 = this.upZ;\n\n // compute camera local X vector as up vector (local Y) cross local Z\n var x0 = y1 * z2 - y2 * z1;\n var x1 = -y0 * z2 + y2 * z0;\n var x2 = y0 * z1 - y1 * z0;\n\n // recompute y = z cross x\n y0 = z1 * x2 - z2 * x1;\n y1 = -z0 * x2 + z2 * x0;\n y2 = z0 * x1 - z1 * x0;\n\n // cross product gives area of parallelogram, which is < 1.0 for\n // non-perpendicular unit-length vectors; so normalize x, y here:\n var xmag = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\n if (xmag !== 0) {\n x0 /= xmag;\n x1 /= xmag;\n x2 /= xmag;\n }\n\n var ymag = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\n if (ymag !== 0) {\n y0 /= ymag;\n y1 /= ymag;\n y2 /= ymag;\n }\n\n return {\n x: [x0, x1, x2],\n y: [y0, y1, y2],\n z: [z0, z1, z2]\n };\n};\n\n/**\n * Orbits the camera about center point. For use with orbitControl().\n * @method _orbit\n * @private\n * @param {Number} dTheta change in spherical coordinate theta\n * @param {Number} dPhi change in spherical coordinate phi\n * @param {Number} dRadius change in radius\n */\np5.Camera.prototype._orbit = function(dTheta, dPhi, dRadius) {\n var diffX = this.eyeX - this.centerX;\n var diffY = this.eyeY - this.centerY;\n var diffZ = this.eyeZ - this.centerZ;\n\n // get spherical coorinates for current camera position about origin\n var camRadius = Math.sqrt(diffX * diffX + diffY * diffY + diffZ * diffZ);\n // from https://github.com/mrdoob/three.js/blob/dev/src/math/Spherical.js#L72-L73\n var camTheta = Math.atan2(diffX, diffZ); // equatorial angle\n var camPhi = Math.acos(Math.max(-1, Math.min(1, diffY / camRadius))); // polar angle\n\n // add change\n camTheta += dTheta;\n camPhi += dPhi;\n camRadius += dRadius;\n\n // prevent zooming through the center:\n if (camRadius < 0) {\n camRadius = 0.1;\n }\n\n // prevent rotation over the zenith / under bottom\n if (camPhi > Math.PI) {\n camPhi = Math.PI;\n } else if (camPhi <= 0) {\n camPhi = 0.001;\n }\n\n // from https://github.com/mrdoob/three.js/blob/dev/src/math/Vector3.js#L628-L632\n var _x = Math.sin(camPhi) * camRadius * Math.sin(camTheta);\n var _y = Math.cos(camPhi) * camRadius;\n var _z = Math.sin(camPhi) * camRadius * Math.cos(camTheta);\n\n this.camera(\n _x + this.centerX,\n _y + this.centerY,\n _z + this.centerZ,\n this.centerX,\n this.centerY,\n this.centerZ,\n 0,\n 1,\n 0\n );\n};\n\n/**\n * Returns true if camera is currently attached to renderer.\n * @method _isActive\n * @private\n */\np5.Camera.prototype._isActive = function() {\n return this === this._renderer._curCamera;\n};\n\n/**\n * Sets rendererGL's current camera to a p5.Camera object. Allows switching\n * between multiple cameras.\n * @method setCamera\n * @param {p5.Camera} cam p5.Camera object\n * @for p5\n * @example\n * \n * \n * let cam1, cam2;\n * let currentCamera;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n *\n * cam1 = createCamera();\n * cam2 = createCamera();\n * cam2.setPosition(30, 0, 50);\n * cam2.lookAt(0, 0, 0);\n * cam2.ortho();\n *\n * // set variable for previously active camera:\n * currentCamera = 1;\n * }\n *\n * function draw() {\n * background(200);\n *\n * // camera 1:\n * cam1.lookAt(0, 0, 0);\n * cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);\n *\n * // every 100 frames, switch between the two cameras\n * if (frameCount % 100 === 0) {\n * if (currentCamera === 1) {\n * setCamera(cam1);\n * currentCamera = 0;\n * } else {\n * setCamera(cam2);\n * currentCamera = 1;\n * }\n * }\n *\n * drawBoxes();\n * }\n *\n * function drawBoxes() {\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n * \n * \n *\n * @alt\n * Canvas switches between two camera views, each showing a series of spinning\n * 3D boxes.\n */\np5.prototype.setCamera = function(cam) {\n this._renderer._curCamera = cam;\n\n // set the projection matrix (which is not normally updated each frame)\n this._renderer.uPMatrix.set(\n cam.projMatrix.mat4[0],\n cam.projMatrix.mat4[1],\n cam.projMatrix.mat4[2],\n cam.projMatrix.mat4[3],\n cam.projMatrix.mat4[4],\n cam.projMatrix.mat4[5],\n cam.projMatrix.mat4[6],\n cam.projMatrix.mat4[7],\n cam.projMatrix.mat4[8],\n cam.projMatrix.mat4[9],\n cam.projMatrix.mat4[10],\n cam.projMatrix.mat4[11],\n cam.projMatrix.mat4[12],\n cam.projMatrix.mat4[13],\n cam.projMatrix.mat4[14],\n cam.projMatrix.mat4[15]\n );\n};\n\nmodule.exports = p5.Camera;\n\n},{\"../core/main\":24}],70:[function(_dereq_,module,exports){\n//some of the functions are adjusted from Three.js(http://threejs.org)\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n/**\n * p5 Geometry class\n * @class p5.Geometry\n * @constructor\n * @param {Integer} [detailX] number of vertices on horizontal surface\n * @param {Integer} [detailY] number of vertices on horizontal surface\n * @param {function} [callback] function to call upon object instantiation.\n *\n */\np5.Geometry = function(detailX, detailY, callback) {\n //an array containing every vertex\n //@type [p5.Vector]\n this.vertices = [];\n\n //an array containing every vertex for stroke drawing\n this.lineVertices = [];\n\n //an array 1 normal per lineVertex with\n //final position representing which direction to\n //displace for strokeWeight\n //[[0,0,-1,1], [0,1,0,-1] ...];\n this.lineNormals = [];\n\n //an array containing 1 normal per vertex\n //@type [p5.Vector]\n //[p5.Vector, p5.Vector, p5.Vector,p5.Vector, p5.Vector, p5.Vector,...]\n this.vertexNormals = [];\n //an array containing each three vertex indices that form a face\n //[[0, 1, 2], [2, 1, 3], ...]\n this.faces = [];\n //a 2D array containing uvs for every vertex\n //[[0.0,0.0],[1.0,0.0], ...]\n this.uvs = [];\n // a 2D array containing edge connectivity pattern for create line vertices\n //based on faces for most objects;\n this.edges = [];\n this.detailX = detailX !== undefined ? detailX : 1;\n this.detailY = detailY !== undefined ? detailY : 1;\n if (callback instanceof Function) {\n callback.call(this);\n }\n return this; // TODO: is this a constructor?\n};\n\n/**\n * @method computeFaces\n * @chainable\n */\np5.Geometry.prototype.computeFaces = function() {\n this.faces.length = 0;\n var sliceCount = this.detailX + 1;\n var a, b, c, d;\n for (var i = 0; i < this.detailY; i++) {\n for (var j = 0; j < this.detailX; j++) {\n a = i * sliceCount + j; // + offset;\n b = i * sliceCount + j + 1; // + offset;\n c = (i + 1) * sliceCount + j + 1; // + offset;\n d = (i + 1) * sliceCount + j; // + offset;\n this.faces.push([a, b, d]);\n this.faces.push([d, b, c]);\n }\n }\n return this;\n};\n\np5.Geometry.prototype._getFaceNormal = function(faceId) {\n //This assumes that vA->vB->vC is a counter-clockwise ordering\n var face = this.faces[faceId];\n var vA = this.vertices[face[0]];\n var vB = this.vertices[face[1]];\n var vC = this.vertices[face[2]];\n var ab = p5.Vector.sub(vB, vA);\n var ac = p5.Vector.sub(vC, vA);\n var n = p5.Vector.cross(ab, ac);\n var ln = p5.Vector.mag(n);\n var sinAlpha = ln / (p5.Vector.mag(ab) * p5.Vector.mag(ac));\n if (sinAlpha === 0 || isNaN(sinAlpha)) {\n console.warn(\n 'p5.Geometry.prototype._getFaceNormal:',\n 'face has colinear sides or a repeated vertex'\n );\n return n;\n }\n if (sinAlpha > 1) sinAlpha = 1; // handle float rounding error\n return n.mult(Math.asin(sinAlpha) / ln);\n};\n/**\n * computes smooth normals per vertex as an average of each\n * face.\n * @method computeNormals\n * @chainable\n */\np5.Geometry.prototype.computeNormals = function() {\n var vertexNormals = this.vertexNormals;\n var vertices = this.vertices;\n var faces = this.faces;\n var iv;\n\n // initialize the vertexNormals array with empty vectors\n vertexNormals.length = 0;\n for (iv = 0; iv < vertices.length; ++iv) {\n vertexNormals.push(new p5.Vector());\n }\n\n // loop through all the faces adding its normal to the normal\n // of each of its vertices\n for (var f = 0; f < faces.length; ++f) {\n var face = faces[f];\n var faceNormal = this._getFaceNormal(f);\n\n // all three vertices get the normal added\n for (var fv = 0; fv < 3; ++fv) {\n var vertexIndex = face[fv];\n vertexNormals[vertexIndex].add(faceNormal);\n }\n }\n\n // normalize the normals\n for (iv = 0; iv < vertices.length; ++iv) {\n vertexNormals[iv].normalize();\n }\n\n return this;\n};\n\n/**\n * Averages the vertex normals. Used in curved\n * surfaces\n * @method averageNormals\n * @chainable\n */\np5.Geometry.prototype.averageNormals = function() {\n for (var i = 0; i <= this.detailY; i++) {\n var offset = this.detailX + 1;\n var temp = p5.Vector.add(\n this.vertexNormals[i * offset],\n this.vertexNormals[i * offset + this.detailX]\n );\n\n temp = p5.Vector.div(temp, 2);\n this.vertexNormals[i * offset] = temp;\n this.vertexNormals[i * offset + this.detailX] = temp;\n }\n return this;\n};\n\n/**\n * Averages pole normals. Used in spherical primitives\n * @method averagePoleNormals\n * @chainable\n */\np5.Geometry.prototype.averagePoleNormals = function() {\n //average the north pole\n var sum = new p5.Vector(0, 0, 0);\n for (var i = 0; i < this.detailX; i++) {\n sum.add(this.vertexNormals[i]);\n }\n sum = p5.Vector.div(sum, this.detailX);\n\n for (i = 0; i < this.detailX; i++) {\n this.vertexNormals[i] = sum;\n }\n\n //average the south pole\n sum = new p5.Vector(0, 0, 0);\n for (\n i = this.vertices.length - 1;\n i > this.vertices.length - 1 - this.detailX;\n i--\n ) {\n sum.add(this.vertexNormals[i]);\n }\n sum = p5.Vector.div(sum, this.detailX);\n\n for (\n i = this.vertices.length - 1;\n i > this.vertices.length - 1 - this.detailX;\n i--\n ) {\n this.vertexNormals[i] = sum;\n }\n return this;\n};\n\n/**\n * Create a 2D array for establishing stroke connections\n * @private\n * @chainable\n */\np5.Geometry.prototype._makeTriangleEdges = function() {\n this.edges.length = 0;\n if (Array.isArray(this.strokeIndices)) {\n for (var i = 0, max = this.strokeIndices.length; i < max; i++) {\n this.edges.push(this.strokeIndices[i]);\n }\n } else {\n for (var j = 0; j < this.faces.length; j++) {\n this.edges.push([this.faces[j][0], this.faces[j][1]]);\n this.edges.push([this.faces[j][1], this.faces[j][2]]);\n this.edges.push([this.faces[j][2], this.faces[j][0]]);\n }\n }\n return this;\n};\n\n/**\n * Create 4 vertices for each stroke line, two at the beginning position\n * and two at the end position. These vertices are displaced relative to\n * that line's normal on the GPU\n * @private\n * @chainable\n */\np5.Geometry.prototype._edgesToVertices = function() {\n this.lineVertices.length = 0;\n this.lineNormals.length = 0;\n\n for (var i = 0; i < this.edges.length; i++) {\n var begin = this.vertices[this.edges[i][0]];\n var end = this.vertices[this.edges[i][1]];\n var dir = end\n .copy()\n .sub(begin)\n .normalize();\n var a = begin.array();\n var b = begin.array();\n var c = end.array();\n var d = end.array();\n var dirAdd = dir.array();\n var dirSub = dir.array();\n // below is used to displace the pair of vertices at beginning and end\n // in opposite directions\n dirAdd.push(1);\n dirSub.push(-1);\n this.lineNormals.push(dirAdd, dirSub, dirAdd, dirAdd, dirSub, dirSub);\n this.lineVertices.push(a, b, c, c, b, d);\n }\n return this;\n};\n\n/**\n * Modifies all vertices to be centered within the range -100 to 100.\n * @method normalize\n * @chainable\n */\np5.Geometry.prototype.normalize = function() {\n if (this.vertices.length > 0) {\n // Find the corners of our bounding box\n var maxPosition = this.vertices[0].copy();\n var minPosition = this.vertices[0].copy();\n\n for (var i = 0; i < this.vertices.length; i++) {\n maxPosition.x = Math.max(maxPosition.x, this.vertices[i].x);\n minPosition.x = Math.min(minPosition.x, this.vertices[i].x);\n maxPosition.y = Math.max(maxPosition.y, this.vertices[i].y);\n minPosition.y = Math.min(minPosition.y, this.vertices[i].y);\n maxPosition.z = Math.max(maxPosition.z, this.vertices[i].z);\n minPosition.z = Math.min(minPosition.z, this.vertices[i].z);\n }\n\n var center = p5.Vector.lerp(maxPosition, minPosition, 0.5);\n var dist = p5.Vector.sub(maxPosition, minPosition);\n var longestDist = Math.max(Math.max(dist.x, dist.y), dist.z);\n var scale = 200 / longestDist;\n\n for (i = 0; i < this.vertices.length; i++) {\n this.vertices[i].sub(center);\n this.vertices[i].mult(scale);\n }\n }\n return this;\n};\n\nmodule.exports = p5.Geometry;\n\n},{\"../core/main\":24}],71:[function(_dereq_,module,exports){\n/**\n * @requires constants\n * @todo see methods below needing further implementation.\n * future consideration: implement SIMD optimizations\n * when browser compatibility becomes available\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/\n * Reference/Global_Objects/SIMD\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\nvar GLMAT_ARRAY_TYPE = Array;\nvar isMatrixArray = function(x) {\n return x instanceof Array;\n};\nif (typeof Float32Array !== 'undefined') {\n GLMAT_ARRAY_TYPE = Float32Array;\n isMatrixArray = function(x) {\n return x instanceof Array || x instanceof Float32Array;\n };\n}\n\n/**\n * A class to describe a 4x4 matrix\n * for model and view matrix manipulation in the p5js webgl renderer.\n * @class p5.Matrix\n * @private\n * @constructor\n * @param {Array} [mat4] array literal of our 4x4 matrix\n */\np5.Matrix = function() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n\n // This is default behavior when object\n // instantiated using createMatrix()\n // @todo implement createMatrix() in core/math.js\n if (args.length && args[args.length - 1] instanceof p5) {\n this.p5 = args[args.length - 1];\n }\n\n if (args[0] === 'mat3') {\n this.mat3 = Array.isArray(args[1])\n ? args[1]\n : new GLMAT_ARRAY_TYPE([1, 0, 0, 0, 1, 0, 0, 0, 1]);\n } else {\n this.mat4 = Array.isArray(args[0])\n ? args[0]\n : new GLMAT_ARRAY_TYPE([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);\n }\n return this;\n};\n\n/**\n * Sets the x, y, and z component of the vector using two or three separate\n * variables, the data from a p5.Matrix, or the values from a float array.\n *\n * @method set\n * @param {p5.Matrix|Float32Array|Number[]} [inMatrix] the input p5.Matrix or\n * an Array of length 16\n * @chainable\n */\n/**\n * @method set\n * @param {Number[]} elements 16 numbers passed by value to avoid\n * array copying.\n * @chainable\n */\np5.Matrix.prototype.set = function(inMatrix) {\n if (inMatrix instanceof p5.Matrix) {\n this.mat4 = inMatrix.mat4;\n return this;\n } else if (isMatrixArray(inMatrix)) {\n this.mat4 = inMatrix;\n return this;\n } else if (arguments.length === 16) {\n this.mat4[0] = arguments[0];\n this.mat4[1] = arguments[1];\n this.mat4[2] = arguments[2];\n this.mat4[3] = arguments[3];\n this.mat4[4] = arguments[4];\n this.mat4[5] = arguments[5];\n this.mat4[6] = arguments[6];\n this.mat4[7] = arguments[7];\n this.mat4[8] = arguments[8];\n this.mat4[9] = arguments[9];\n this.mat4[10] = arguments[10];\n this.mat4[11] = arguments[11];\n this.mat4[12] = arguments[12];\n this.mat4[13] = arguments[13];\n this.mat4[14] = arguments[14];\n this.mat4[15] = arguments[15];\n }\n return this;\n};\n\n/**\n * Gets a copy of the vector, returns a p5.Matrix object.\n *\n * @method get\n * @return {p5.Matrix} the copy of the p5.Matrix object\n */\np5.Matrix.prototype.get = function() {\n return new p5.Matrix(this.mat4, this.p5);\n};\n\n/**\n * return a copy of a matrix\n * @method copy\n * @return {p5.Matrix} the result matrix\n */\np5.Matrix.prototype.copy = function() {\n var copied = new p5.Matrix(this.p5);\n copied.mat4[0] = this.mat4[0];\n copied.mat4[1] = this.mat4[1];\n copied.mat4[2] = this.mat4[2];\n copied.mat4[3] = this.mat4[3];\n copied.mat4[4] = this.mat4[4];\n copied.mat4[5] = this.mat4[5];\n copied.mat4[6] = this.mat4[6];\n copied.mat4[7] = this.mat4[7];\n copied.mat4[8] = this.mat4[8];\n copied.mat4[9] = this.mat4[9];\n copied.mat4[10] = this.mat4[10];\n copied.mat4[11] = this.mat4[11];\n copied.mat4[12] = this.mat4[12];\n copied.mat4[13] = this.mat4[13];\n copied.mat4[14] = this.mat4[14];\n copied.mat4[15] = this.mat4[15];\n return copied;\n};\n\n/**\n * return an identity matrix\n * @method identity\n * @return {p5.Matrix} the result matrix\n */\np5.Matrix.identity = function(pInst) {\n return new p5.Matrix(pInst);\n};\n\n/**\n * transpose according to a given matrix\n * @method transpose\n * @param {p5.Matrix|Float32Array|Number[]} a the matrix to be\n * based on to transpose\n * @chainable\n */\np5.Matrix.prototype.transpose = function(a) {\n var a01, a02, a03, a12, a13, a23;\n if (a instanceof p5.Matrix) {\n a01 = a.mat4[1];\n a02 = a.mat4[2];\n a03 = a.mat4[3];\n a12 = a.mat4[6];\n a13 = a.mat4[7];\n a23 = a.mat4[11];\n\n this.mat4[0] = a.mat4[0];\n this.mat4[1] = a.mat4[4];\n this.mat4[2] = a.mat4[8];\n this.mat4[3] = a.mat4[12];\n this.mat4[4] = a01;\n this.mat4[5] = a.mat4[5];\n this.mat4[6] = a.mat4[9];\n this.mat4[7] = a.mat4[13];\n this.mat4[8] = a02;\n this.mat4[9] = a12;\n this.mat4[10] = a.mat4[10];\n this.mat4[11] = a.mat4[14];\n this.mat4[12] = a03;\n this.mat4[13] = a13;\n this.mat4[14] = a23;\n this.mat4[15] = a.mat4[15];\n } else if (isMatrixArray(a)) {\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a12 = a[6];\n a13 = a[7];\n a23 = a[11];\n\n this.mat4[0] = a[0];\n this.mat4[1] = a[4];\n this.mat4[2] = a[8];\n this.mat4[3] = a[12];\n this.mat4[4] = a01;\n this.mat4[5] = a[5];\n this.mat4[6] = a[9];\n this.mat4[7] = a[13];\n this.mat4[8] = a02;\n this.mat4[9] = a12;\n this.mat4[10] = a[10];\n this.mat4[11] = a[14];\n this.mat4[12] = a03;\n this.mat4[13] = a13;\n this.mat4[14] = a23;\n this.mat4[15] = a[15];\n }\n return this;\n};\n\n/**\n * invert matrix according to a give matrix\n * @method invert\n * @param {p5.Matrix|Float32Array|Number[]} a the matrix to be\n * based on to invert\n * @chainable\n */\np5.Matrix.prototype.invert = function(a) {\n var a00, a01, a02, a03, a10, a11, a12, a13;\n var a20, a21, a22, a23, a30, a31, a32, a33;\n if (a instanceof p5.Matrix) {\n a00 = a.mat4[0];\n a01 = a.mat4[1];\n a02 = a.mat4[2];\n a03 = a.mat4[3];\n a10 = a.mat4[4];\n a11 = a.mat4[5];\n a12 = a.mat4[6];\n a13 = a.mat4[7];\n a20 = a.mat4[8];\n a21 = a.mat4[9];\n a22 = a.mat4[10];\n a23 = a.mat4[11];\n a30 = a.mat4[12];\n a31 = a.mat4[13];\n a32 = a.mat4[14];\n a33 = a.mat4[15];\n } else if (isMatrixArray(a)) {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n a30 = a[12];\n a31 = a[13];\n a32 = a[14];\n a33 = a[15];\n }\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32;\n\n // Calculate the determinant\n var det =\n b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n\n this.mat4[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n this.mat4[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n this.mat4[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n this.mat4[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n this.mat4[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n this.mat4[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n this.mat4[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n this.mat4[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n this.mat4[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n this.mat4[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n this.mat4[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n this.mat4[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n this.mat4[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n this.mat4[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n this.mat4[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n this.mat4[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n\n return this;\n};\n\n/**\n * Inverts a 3x3 matrix\n * @method invert3x3\n * @chainable\n */\np5.Matrix.prototype.invert3x3 = function() {\n var a00 = this.mat3[0];\n var a01 = this.mat3[1];\n var a02 = this.mat3[2];\n var a10 = this.mat3[3];\n var a11 = this.mat3[4];\n var a12 = this.mat3[5];\n var a20 = this.mat3[6];\n var a21 = this.mat3[7];\n var a22 = this.mat3[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20;\n\n // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n this.mat3[0] = b01 * det;\n this.mat3[1] = (-a22 * a01 + a02 * a21) * det;\n this.mat3[2] = (a12 * a01 - a02 * a11) * det;\n this.mat3[3] = b11 * det;\n this.mat3[4] = (a22 * a00 - a02 * a20) * det;\n this.mat3[5] = (-a12 * a00 + a02 * a10) * det;\n this.mat3[6] = b21 * det;\n this.mat3[7] = (-a21 * a00 + a01 * a20) * det;\n this.mat3[8] = (a11 * a00 - a01 * a10) * det;\n return this;\n};\n\n/**\n * transposes a 3x3 p5.Matrix by a mat3\n * @method transpose3x3\n * @param {Number[]} mat3 1-dimensional array\n * @chainable\n */\np5.Matrix.prototype.transpose3x3 = function(mat3) {\n var a01 = mat3[1],\n a02 = mat3[2],\n a12 = mat3[5];\n this.mat3[1] = mat3[3];\n this.mat3[2] = mat3[6];\n this.mat3[3] = a01;\n this.mat3[5] = mat3[7];\n this.mat3[6] = a02;\n this.mat3[7] = a12;\n return this;\n};\n\n/**\n * converts a 4x4 matrix to its 3x3 inverse tranform\n * commonly used in MVMatrix to NMatrix conversions.\n * @method invertTranspose\n * @param {p5.Matrix} mat4 the matrix to be based on to invert\n * @chainable\n * @todo finish implementation\n */\np5.Matrix.prototype.inverseTranspose = function(matrix) {\n if (this.mat3 === undefined) {\n console.error('sorry, this function only works with mat3');\n } else {\n //convert mat4 -> mat3\n this.mat3[0] = matrix.mat4[0];\n this.mat3[1] = matrix.mat4[1];\n this.mat3[2] = matrix.mat4[2];\n this.mat3[3] = matrix.mat4[4];\n this.mat3[4] = matrix.mat4[5];\n this.mat3[5] = matrix.mat4[6];\n this.mat3[6] = matrix.mat4[8];\n this.mat3[7] = matrix.mat4[9];\n this.mat3[8] = matrix.mat4[10];\n }\n\n var inverse = this.invert3x3();\n // check inverse succeded\n if (inverse) {\n inverse.transpose3x3(this.mat3);\n } else {\n // in case of singularity, just zero the matrix\n for (var i = 0; i < 9; i++) {\n this.mat3[i] = 0;\n }\n }\n return this;\n};\n\n/**\n * inspired by Toji's mat4 determinant\n * @method determinant\n * @return {Number} Determinant of our 4x4 matrix\n */\np5.Matrix.prototype.determinant = function() {\n var d00 = this.mat4[0] * this.mat4[5] - this.mat4[1] * this.mat4[4],\n d01 = this.mat4[0] * this.mat4[6] - this.mat4[2] * this.mat4[4],\n d02 = this.mat4[0] * this.mat4[7] - this.mat4[3] * this.mat4[4],\n d03 = this.mat4[1] * this.mat4[6] - this.mat4[2] * this.mat4[5],\n d04 = this.mat4[1] * this.mat4[7] - this.mat4[3] * this.mat4[5],\n d05 = this.mat4[2] * this.mat4[7] - this.mat4[3] * this.mat4[6],\n d06 = this.mat4[8] * this.mat4[13] - this.mat4[9] * this.mat4[12],\n d07 = this.mat4[8] * this.mat4[14] - this.mat4[10] * this.mat4[12],\n d08 = this.mat4[8] * this.mat4[15] - this.mat4[11] * this.mat4[12],\n d09 = this.mat4[9] * this.mat4[14] - this.mat4[10] * this.mat4[13],\n d10 = this.mat4[9] * this.mat4[15] - this.mat4[11] * this.mat4[13],\n d11 = this.mat4[10] * this.mat4[15] - this.mat4[11] * this.mat4[14];\n\n // Calculate the determinant\n return d00 * d11 - d01 * d10 + d02 * d09 + d03 * d08 - d04 * d07 + d05 * d06;\n};\n\n/**\n * multiply two mat4s\n * @method mult\n * @param {p5.Matrix|Float32Array|Number[]} multMatrix The matrix\n * we want to multiply by\n * @chainable\n */\np5.Matrix.prototype.mult = function(multMatrix) {\n var _src;\n\n if (multMatrix === this || multMatrix === this.mat4) {\n _src = this.copy().mat4; // only need to allocate in this rare case\n } else if (multMatrix instanceof p5.Matrix) {\n _src = multMatrix.mat4;\n } else if (isMatrixArray(multMatrix)) {\n _src = multMatrix;\n } else if (arguments.length === 16) {\n _src = arguments;\n } else {\n return; // nothing to do.\n }\n\n // each row is used for the multiplier\n var b0 = this.mat4[0],\n b1 = this.mat4[1],\n b2 = this.mat4[2],\n b3 = this.mat4[3];\n this.mat4[0] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];\n this.mat4[1] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];\n this.mat4[2] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];\n this.mat4[3] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];\n\n b0 = this.mat4[4];\n b1 = this.mat4[5];\n b2 = this.mat4[6];\n b3 = this.mat4[7];\n this.mat4[4] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];\n this.mat4[5] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];\n this.mat4[6] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];\n this.mat4[7] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];\n\n b0 = this.mat4[8];\n b1 = this.mat4[9];\n b2 = this.mat4[10];\n b3 = this.mat4[11];\n this.mat4[8] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];\n this.mat4[9] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];\n this.mat4[10] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];\n this.mat4[11] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];\n\n b0 = this.mat4[12];\n b1 = this.mat4[13];\n b2 = this.mat4[14];\n b3 = this.mat4[15];\n this.mat4[12] = b0 * _src[0] + b1 * _src[4] + b2 * _src[8] + b3 * _src[12];\n this.mat4[13] = b0 * _src[1] + b1 * _src[5] + b2 * _src[9] + b3 * _src[13];\n this.mat4[14] = b0 * _src[2] + b1 * _src[6] + b2 * _src[10] + b3 * _src[14];\n this.mat4[15] = b0 * _src[3] + b1 * _src[7] + b2 * _src[11] + b3 * _src[15];\n\n return this;\n};\n\np5.Matrix.prototype.apply = function(multMatrix) {\n var _src;\n\n if (multMatrix === this || multMatrix === this.mat4) {\n _src = this.copy().mat4; // only need to allocate in this rare case\n } else if (multMatrix instanceof p5.Matrix) {\n _src = multMatrix.mat4;\n } else if (isMatrixArray(multMatrix)) {\n _src = multMatrix;\n } else if (arguments.length === 16) {\n _src = arguments;\n } else {\n return; // nothing to do.\n }\n\n var mat4 = this.mat4;\n\n // each row is used for the multiplier\n var m0 = mat4[0];\n var m4 = mat4[4];\n var m8 = mat4[8];\n var m12 = mat4[12];\n mat4[0] = _src[0] * m0 + _src[1] * m4 + _src[2] * m8 + _src[3] * m12;\n mat4[4] = _src[4] * m0 + _src[5] * m4 + _src[6] * m8 + _src[7] * m12;\n mat4[8] = _src[8] * m0 + _src[9] * m4 + _src[10] * m8 + _src[11] * m12;\n mat4[12] = _src[12] * m0 + _src[13] * m4 + _src[14] * m8 + _src[15] * m12;\n\n var m1 = mat4[1];\n var m5 = mat4[5];\n var m9 = mat4[9];\n var m13 = mat4[13];\n mat4[1] = _src[0] * m1 + _src[1] * m5 + _src[2] * m9 + _src[3] * m13;\n mat4[5] = _src[4] * m1 + _src[5] * m5 + _src[6] * m9 + _src[7] * m13;\n mat4[9] = _src[8] * m1 + _src[9] * m5 + _src[10] * m9 + _src[11] * m13;\n mat4[13] = _src[12] * m1 + _src[13] * m5 + _src[14] * m9 + _src[15] * m13;\n\n var m2 = mat4[2];\n var m6 = mat4[6];\n var m10 = mat4[10];\n var m14 = mat4[14];\n mat4[2] = _src[0] * m2 + _src[1] * m6 + _src[2] * m10 + _src[3] * m14;\n mat4[6] = _src[4] * m2 + _src[5] * m6 + _src[6] * m10 + _src[7] * m14;\n mat4[10] = _src[8] * m2 + _src[9] * m6 + _src[10] * m10 + _src[11] * m14;\n mat4[14] = _src[12] * m2 + _src[13] * m6 + _src[14] * m10 + _src[15] * m14;\n\n var m3 = mat4[3];\n var m7 = mat4[7];\n var m11 = mat4[11];\n var m15 = mat4[15];\n mat4[3] = _src[0] * m3 + _src[1] * m7 + _src[2] * m11 + _src[3] * m15;\n mat4[7] = _src[4] * m3 + _src[5] * m7 + _src[6] * m11 + _src[7] * m15;\n mat4[11] = _src[8] * m3 + _src[9] * m7 + _src[10] * m11 + _src[11] * m15;\n mat4[15] = _src[12] * m3 + _src[13] * m7 + _src[14] * m11 + _src[15] * m15;\n\n return this;\n};\n\n/**\n * scales a p5.Matrix by scalars or a vector\n * @method scale\n * @param {p5.Vector|Float32Array|Number[]} s vector to scale by\n * @chainable\n */\np5.Matrix.prototype.scale = function(x, y, z) {\n if (x instanceof p5.Vector) {\n // x is a vector, extract the components from it.\n y = x.y;\n z = x.z;\n x = x.x; // must be last\n } else if (x instanceof Array) {\n // x is an array, extract the components from it.\n y = x[1];\n z = x[2];\n x = x[0]; // must be last\n }\n\n this.mat4[0] *= x;\n this.mat4[1] *= x;\n this.mat4[2] *= x;\n this.mat4[3] *= x;\n this.mat4[4] *= y;\n this.mat4[5] *= y;\n this.mat4[6] *= y;\n this.mat4[7] *= y;\n this.mat4[8] *= z;\n this.mat4[9] *= z;\n this.mat4[10] *= z;\n this.mat4[11] *= z;\n\n return this;\n};\n\n/**\n * rotate our Matrix around an axis by the given angle.\n * @method rotate\n * @param {Number} a The angle of rotation in radians\n * @param {p5.Vector|Number[]} axis the axis(es) to rotate around\n * @chainable\n * inspired by Toji's gl-matrix lib, mat4 rotation\n */\np5.Matrix.prototype.rotate = function(a, x, y, z) {\n if (x instanceof p5.Vector) {\n // x is a vector, extract the components from it.\n y = x.y;\n z = x.z;\n x = x.x; //must be last\n } else if (x instanceof Array) {\n // x is an array, extract the components from it.\n y = x[1];\n z = x[2];\n x = x[0]; //must be last\n }\n\n var len = Math.sqrt(x * x + y * y + z * z);\n x *= 1 / len;\n y *= 1 / len;\n z *= 1 / len;\n\n var a00 = this.mat4[0];\n var a01 = this.mat4[1];\n var a02 = this.mat4[2];\n var a03 = this.mat4[3];\n var a10 = this.mat4[4];\n var a11 = this.mat4[5];\n var a12 = this.mat4[6];\n var a13 = this.mat4[7];\n var a20 = this.mat4[8];\n var a21 = this.mat4[9];\n var a22 = this.mat4[10];\n var a23 = this.mat4[11];\n\n //sin,cos, and tan of respective angle\n var sA = Math.sin(a);\n var cA = Math.cos(a);\n var tA = 1 - cA;\n // Construct the elements of the rotation matrix\n var b00 = x * x * tA + cA;\n var b01 = y * x * tA + z * sA;\n var b02 = z * x * tA - y * sA;\n var b10 = x * y * tA - z * sA;\n var b11 = y * y * tA + cA;\n var b12 = z * y * tA + x * sA;\n var b20 = x * z * tA + y * sA;\n var b21 = y * z * tA - x * sA;\n var b22 = z * z * tA + cA;\n\n // rotation-specific matrix multiplication\n this.mat4[0] = a00 * b00 + a10 * b01 + a20 * b02;\n this.mat4[1] = a01 * b00 + a11 * b01 + a21 * b02;\n this.mat4[2] = a02 * b00 + a12 * b01 + a22 * b02;\n this.mat4[3] = a03 * b00 + a13 * b01 + a23 * b02;\n this.mat4[4] = a00 * b10 + a10 * b11 + a20 * b12;\n this.mat4[5] = a01 * b10 + a11 * b11 + a21 * b12;\n this.mat4[6] = a02 * b10 + a12 * b11 + a22 * b12;\n this.mat4[7] = a03 * b10 + a13 * b11 + a23 * b12;\n this.mat4[8] = a00 * b20 + a10 * b21 + a20 * b22;\n this.mat4[9] = a01 * b20 + a11 * b21 + a21 * b22;\n this.mat4[10] = a02 * b20 + a12 * b21 + a22 * b22;\n this.mat4[11] = a03 * b20 + a13 * b21 + a23 * b22;\n\n return this;\n};\n\n/**\n * @todo finish implementing this method!\n * translates\n * @method translate\n * @param {Number[]} v vector to translate by\n * @chainable\n */\np5.Matrix.prototype.translate = function(v) {\n var x = v[0],\n y = v[1],\n z = v[2] || 0;\n this.mat4[12] += this.mat4[0] * x + this.mat4[4] * y + this.mat4[8] * z;\n this.mat4[13] += this.mat4[1] * x + this.mat4[5] * y + this.mat4[9] * z;\n this.mat4[14] += this.mat4[2] * x + this.mat4[6] * y + this.mat4[10] * z;\n this.mat4[15] += this.mat4[3] * x + this.mat4[7] * y + this.mat4[11] * z;\n};\n\np5.Matrix.prototype.rotateX = function(a) {\n this.rotate(a, 1, 0, 0);\n};\np5.Matrix.prototype.rotateY = function(a) {\n this.rotate(a, 0, 1, 0);\n};\np5.Matrix.prototype.rotateZ = function(a) {\n this.rotate(a, 0, 0, 1);\n};\n\n/**\n * sets the perspective matrix\n * @method perspective\n * @param {Number} fovy [description]\n * @param {Number} aspect [description]\n * @param {Number} near near clipping plane\n * @param {Number} far far clipping plane\n * @chainable\n */\np5.Matrix.prototype.perspective = function(fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2),\n nf = 1 / (near - far);\n\n this.mat4[0] = f / aspect;\n this.mat4[1] = 0;\n this.mat4[2] = 0;\n this.mat4[3] = 0;\n this.mat4[4] = 0;\n this.mat4[5] = f;\n this.mat4[6] = 0;\n this.mat4[7] = 0;\n this.mat4[8] = 0;\n this.mat4[9] = 0;\n this.mat4[10] = (far + near) * nf;\n this.mat4[11] = -1;\n this.mat4[12] = 0;\n this.mat4[13] = 0;\n this.mat4[14] = 2 * far * near * nf;\n this.mat4[15] = 0;\n\n return this;\n};\n\n/**\n * sets the ortho matrix\n * @method ortho\n * @param {Number} left [description]\n * @param {Number} right [description]\n * @param {Number} bottom [description]\n * @param {Number} top [description]\n * @param {Number} near near clipping plane\n * @param {Number} far far clipping plane\n * @chainable\n */\np5.Matrix.prototype.ortho = function(left, right, bottom, top, near, far) {\n var lr = 1 / (left - right),\n bt = 1 / (bottom - top),\n nf = 1 / (near - far);\n this.mat4[0] = -2 * lr;\n this.mat4[1] = 0;\n this.mat4[2] = 0;\n this.mat4[3] = 0;\n this.mat4[4] = 0;\n this.mat4[5] = -2 * bt;\n this.mat4[6] = 0;\n this.mat4[7] = 0;\n this.mat4[8] = 0;\n this.mat4[9] = 0;\n this.mat4[10] = 2 * nf;\n this.mat4[11] = 0;\n this.mat4[12] = (left + right) * lr;\n this.mat4[13] = (top + bottom) * bt;\n this.mat4[14] = (far + near) * nf;\n this.mat4[15] = 1;\n\n return this;\n};\n\n/**\n * PRIVATE\n */\n// matrix methods adapted from:\n// https://developer.mozilla.org/en-US/docs/Web/WebGL/\n// gluPerspective\n//\n// function _makePerspective(fovy, aspect, znear, zfar){\n// var ymax = znear * Math.tan(fovy * Math.PI / 360.0);\n// var ymin = -ymax;\n// var xmin = ymin * aspect;\n// var xmax = ymax * aspect;\n// return _makeFrustum(xmin, xmax, ymin, ymax, znear, zfar);\n// }\n\n////\n//// glFrustum\n////\n//function _makeFrustum(left, right, bottom, top, znear, zfar){\n// var X = 2*znear/(right-left);\n// var Y = 2*znear/(top-bottom);\n// var A = (right+left)/(right-left);\n// var B = (top+bottom)/(top-bottom);\n// var C = -(zfar+znear)/(zfar-znear);\n// var D = -2*zfar*znear/(zfar-znear);\n// var frustrumMatrix =[\n// X, 0, A, 0,\n// 0, Y, B, 0,\n// 0, 0, C, D,\n// 0, 0, -1, 0\n//];\n//return frustrumMatrix;\n// }\n\n// function _setMVPMatrices(){\n////an identity matrix\n////@TODO use the p5.Matrix class to abstract away our MV matrices and\n///other math\n//var _mvMatrix =\n//[\n// 1.0,0.0,0.0,0.0,\n// 0.0,1.0,0.0,0.0,\n// 0.0,0.0,1.0,0.0,\n// 0.0,0.0,0.0,1.0\n//];\n\nmodule.exports = p5.Matrix;\n\n},{\"../core/main\":24}],72:[function(_dereq_,module,exports){\n/**\n * Welcome to RendererGL Immediate Mode.\n * Immediate mode is used for drawing custom shapes\n * from a set of vertices. Immediate Mode is activated\n * when you call beginShape() & de-activated when you call endShape().\n * Immediate mode is a style of programming borrowed\n * from OpenGL's (now-deprecated) immediate mode.\n * It differs from p5.js' default, Retained Mode, which caches\n * geometries and buffers on the CPU to reduce the number of webgl\n * draw calls. Retained mode is more efficient & performative,\n * however, Immediate Mode is useful for sketching quick\n * geometric ideas.\n */\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Begin shape drawing. This is a helpful way of generating\n * custom shapes quickly. However in WEBGL mode, application\n * performance will likely drop as a result of too many calls to\n * beginShape() / endShape(). As a high performance alternative,\n * please use p5.js geometry primitives.\n * @private\n * @method beginShape\n * @param {Number} mode webgl primitives mode. beginShape supports the\n * following modes:\n * POINTS,LINES,LINE_STRIP,LINE_LOOP,TRIANGLES,\n * TRIANGLE_STRIP,and TRIANGLE_FAN.\n * @chainable\n */\np5.RendererGL.prototype.beginShape = function(mode) {\n //default shape mode is line_strip\n this.immediateMode.shapeMode =\n mode !== undefined ? mode : constants.LINE_STRIP;\n //if we haven't yet initialized our\n //immediateMode vertices & buffers, create them now!\n if (this.immediateMode.vertices === undefined) {\n this.immediateMode.vertices = [];\n this.immediateMode.edges = [];\n this.immediateMode.lineVertices = [];\n this.immediateMode.vertexColors = [];\n this.immediateMode.lineNormals = [];\n this.immediateMode.uvCoords = [];\n this.immediateMode.vertexBuffer = this.GL.createBuffer();\n this.immediateMode.colorBuffer = this.GL.createBuffer();\n this.immediateMode.uvBuffer = this.GL.createBuffer();\n this.immediateMode.lineVertexBuffer = this.GL.createBuffer();\n this.immediateMode.lineNormalBuffer = this.GL.createBuffer();\n this.immediateMode.pointVertexBuffer = this.GL.createBuffer();\n this.immediateMode._bezierVertex = [];\n this.immediateMode._quadraticVertex = [];\n this.immediateMode._curveVertex = [];\n } else {\n this.immediateMode.vertices.length = 0;\n this.immediateMode.edges.length = 0;\n this.immediateMode.lineVertices.length = 0;\n this.immediateMode.lineNormals.length = 0;\n this.immediateMode.vertexColors.length = 0;\n this.immediateMode.uvCoords.length = 0;\n }\n this.isImmediateDrawing = true;\n return this;\n};\n/**\n * adds a vertex to be drawn in a custom Shape.\n * @private\n * @method vertex\n * @param {Number} x x-coordinate of vertex\n * @param {Number} y y-coordinate of vertex\n * @param {Number} z z-coordinate of vertex\n * @chainable\n * @TODO implement handling of p5.Vector args\n */\np5.RendererGL.prototype.vertex = function(x, y) {\n var z, u, v;\n\n // default to (x, y) mode: all other arugments assumed to be 0.\n z = u = v = 0;\n\n if (arguments.length === 3) {\n // (x, y, z) mode: (u, v) assumed to be 0.\n z = arguments[2];\n } else if (arguments.length === 4) {\n // (x, y, u, v) mode: z assumed to be 0.\n u = arguments[2];\n v = arguments[3];\n } else if (arguments.length === 5) {\n // (x, y, z, u, v) mode\n z = arguments[2];\n u = arguments[3];\n v = arguments[4];\n }\n var vert = new p5.Vector(x, y, z);\n this.immediateMode.vertices.push(vert);\n var vertexColor = this.curFillColor || [0.5, 0.5, 0.5, 1.0];\n this.immediateMode.vertexColors.push(\n vertexColor[0],\n vertexColor[1],\n vertexColor[2],\n vertexColor[3]\n );\n\n if (this.textureMode === constants.IMAGE) {\n if (this._tex !== null) {\n if (this._tex.width > 0 && this._tex.height > 0) {\n u /= this._tex.width;\n v /= this._tex.height;\n }\n } else if (this._tex === null && arguments.length >= 4) {\n // Only throw this warning if custom uv's have been provided\n console.warn(\n 'You must first call texture() before using' +\n ' vertex() with image based u and v coordinates'\n );\n }\n }\n\n this.immediateMode.uvCoords.push(u, v);\n\n this.immediateMode._bezierVertex[0] = x;\n this.immediateMode._bezierVertex[1] = y;\n this.immediateMode._bezierVertex[2] = z;\n\n this.immediateMode._quadraticVertex[0] = x;\n this.immediateMode._quadraticVertex[1] = y;\n this.immediateMode._quadraticVertex[2] = z;\n\n return this;\n};\n\n/**\n * End shape drawing and render vertices to screen.\n * @chainable\n */\np5.RendererGL.prototype.endShape = function(\n mode,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n) {\n if (this.immediateMode.shapeMode === constants.POINTS) {\n this._drawPoints(\n this.immediateMode.vertices,\n this.immediateMode.pointVertexBuffer\n );\n } else if (this.immediateMode.vertices.length > 1) {\n if (this._doStroke && this.drawMode !== constants.TEXTURE) {\n if (this.immediateMode.shapeMode === constants.TRIANGLE_STRIP) {\n var i;\n for (i = 0; i < this.immediateMode.vertices.length - 2; i++) {\n this.immediateMode.edges.push([i, i + 1]);\n this.immediateMode.edges.push([i, i + 2]);\n }\n this.immediateMode.edges.push([i, i + 1]);\n } else if (this.immediateMode.shapeMode === constants.TRIANGLES) {\n for (i = 0; i < this.immediateMode.vertices.length - 2; i = i + 3) {\n this.immediateMode.edges.push([i, i + 1]);\n this.immediateMode.edges.push([i + 1, i + 2]);\n this.immediateMode.edges.push([i + 2, i]);\n }\n } else if (this.immediateMode.shapeMode === constants.LINES) {\n for (i = 0; i < this.immediateMode.vertices.length - 1; i = i + 2) {\n this.immediateMode.edges.push([i, i + 1]);\n }\n } else {\n for (i = 0; i < this.immediateMode.vertices.length - 1; i++) {\n this.immediateMode.edges.push([i, i + 1]);\n }\n }\n if (mode === constants.CLOSE) {\n this.immediateMode.edges.push([\n this.immediateMode.vertices.length - 1,\n 0\n ]);\n }\n\n p5.Geometry.prototype._edgesToVertices.call(this.immediateMode);\n this._drawStrokeImmediateMode();\n }\n\n if (this._doFill && this.immediateMode.shapeMode !== constants.LINES) {\n if (this.isBezier || this.isQuadratic || this.isCurve) {\n var contours = [\n new Float32Array(this._vToNArray(this.immediateMode.vertices))\n ];\n var polyTriangles = this._triangulate(contours);\n this.immediateMode.vertices = [];\n for (\n var j = 0, polyTriLength = polyTriangles.length;\n j < polyTriLength;\n j = j + 3\n ) {\n this.vertex(\n polyTriangles[j],\n polyTriangles[j + 1],\n polyTriangles[j + 2]\n );\n }\n }\n this._drawFillImmediateMode(\n mode,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n );\n }\n }\n //clear out our vertexPositions & colors arrays\n //after rendering\n this.immediateMode.vertices.length = 0;\n this.immediateMode.vertexColors.length = 0;\n this.immediateMode.uvCoords.length = 0;\n this.isImmediateDrawing = false;\n this.isBezier = false;\n this.isQuadratic = false;\n this.isCurve = false;\n this.immediateMode._bezierVertex.length = 0;\n this.immediateMode._quadraticVertex.length = 0;\n\n this.immediateMode._curveVertex.length = 0;\n\n return this;\n};\n\np5.RendererGL.prototype._drawFillImmediateMode = function(\n mode,\n isCurve,\n isBezier,\n isQuadratic,\n isContour,\n shapeKind\n) {\n var gl = this.GL;\n var shader = this._getImmediateFillShader();\n this._setFillUniforms(shader);\n\n // initialize the fill shader's 'aPosition' buffer\n if (shader.attributes.aPosition) {\n //vertex position Attribute\n this._bindBuffer(\n this.immediateMode.vertexBuffer,\n gl.ARRAY_BUFFER,\n this._vToNArray(this.immediateMode.vertices),\n Float32Array,\n gl.DYNAMIC_DRAW\n );\n\n shader.enableAttrib(\n shader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // initialize the fill shader's 'aVertexColor' buffer\n if (this.drawMode === constants.FILL && shader.attributes.aVertexColor) {\n this._bindBuffer(\n this.immediateMode.colorBuffer,\n gl.ARRAY_BUFFER,\n this.immediateMode.vertexColors,\n Float32Array,\n gl.DYNAMIC_DRAW\n );\n\n shader.enableAttrib(\n shader.attributes.aVertexColor.location,\n 4,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // initialize the fill shader's 'aTexCoord' buffer\n if (this.drawMode === constants.TEXTURE && shader.attributes.aTexCoord) {\n //texture coordinate Attribute\n this._bindBuffer(\n this.immediateMode.uvBuffer,\n gl.ARRAY_BUFFER,\n this.immediateMode.uvCoords,\n Float32Array,\n gl.DYNAMIC_DRAW\n );\n\n shader.enableAttrib(\n shader.attributes.aTexCoord.location,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n //if (true || mode) {\n if (this.drawMode === constants.FILL || this.drawMode === constants.TEXTURE) {\n switch (this.immediateMode.shapeMode) {\n case constants.LINE_STRIP:\n case constants.LINES:\n case constants.TRIANGLES:\n this.immediateMode.shapeMode =\n this.isBezier ||\n this.isQuadratic ||\n this.isCurve ||\n this.immediateMode.shapeMode === constants.TRIANGLES\n ? constants.TRIANGLES\n : constants.TRIANGLE_FAN;\n break;\n }\n } else {\n switch (this.immediateMode.shapeMode) {\n case constants.LINE_STRIP:\n case constants.LINES:\n this.immediateMode.shapeMode = constants.LINE_LOOP;\n break;\n }\n }\n //}\n //QUADS & QUAD_STRIP are not supported primitives modes\n //in webgl.\n if (\n this.immediateMode.shapeMode === constants.QUADS ||\n this.immediateMode.shapeMode === constants.QUAD_STRIP\n ) {\n throw new Error(\n 'sorry, ' +\n this.immediateMode.shapeMode +\n ' not yet implemented in webgl mode.'\n );\n } else {\n this._applyColorBlend(this.curFillColor);\n gl.enable(gl.BLEND);\n gl.drawArrays(\n this.immediateMode.shapeMode,\n 0,\n this.immediateMode.vertices.length\n );\n\n this._pixelsState._pixelsDirty = true;\n }\n // todo / optimizations? leave bound until another shader is set?\n shader.unbindShader();\n};\n\np5.RendererGL.prototype._drawStrokeImmediateMode = function() {\n var gl = this.GL;\n var shader = this._getImmediateStrokeShader();\n this._setStrokeUniforms(shader);\n\n // initialize the stroke shader's 'aPosition' buffer\n if (shader.attributes.aPosition) {\n this._bindBuffer(\n this.immediateMode.lineVertexBuffer,\n gl.ARRAY_BUFFER,\n this._flatten(this.immediateMode.lineVertices),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n shader.enableAttrib(\n shader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // initialize the stroke shader's 'aDirection' buffer\n if (shader.attributes.aDirection) {\n this._bindBuffer(\n this.immediateMode.lineNormalBuffer,\n gl.ARRAY_BUFFER,\n this._flatten(this.immediateMode.lineNormals),\n Float32Array,\n gl.STATIC_DRAW\n );\n shader.enableAttrib(\n shader.attributes.aDirection.location,\n 4,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n this._applyColorBlend(this.curStrokeColor);\n gl.drawArrays(gl.TRIANGLES, 0, this.immediateMode.lineVertices.length);\n\n this._pixelsState._pixelsDirty = true;\n\n shader.unbindShader();\n};\n\nmodule.exports = p5.RendererGL;\n\n},{\"../core/constants\":18,\"../core/main\":24}],73:[function(_dereq_,module,exports){\n//Retained Mode. The default mode for rendering 3D primitives\n//in WEBGL.\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\nvar hashCount = 0;\n/**\n * _initBufferDefaults\n * @private\n * @description initializes buffer defaults. runs each time a new geometry is\n * registered\n * @param {String} gId key of the geometry object\n */\np5.RendererGL.prototype._initBufferDefaults = function(gId) {\n this._freeBuffers(gId);\n\n //@TODO remove this limit on hashes in gHash\n hashCount++;\n if (hashCount > 1000) {\n var key = Object.keys(this.gHash)[0];\n delete this.gHash[key];\n hashCount--;\n }\n\n //create a new entry in our gHash\n this.gHash[gId] = {};\n};\n\np5.RendererGL.prototype._freeBuffers = function(gId) {\n var geometry = this.gHash[gId];\n if (!geometry) {\n return;\n }\n\n delete this.gHash[gId];\n hashCount--;\n\n var gl = this.GL;\n geometry.vertexBuffer && gl.deleteBuffer(geometry.vertexBuffer);\n geometry.normalBuffer && gl.deleteBuffer(geometry.normalBuffer);\n geometry.lineNormalBuffer && gl.deleteBuffer(geometry.lineNormalBuffer);\n geometry.uvBuffer && gl.deleteBuffer(geometry.uvBuffer);\n geometry.indexBuffer && gl.deleteBuffer(geometry.indexBuffer);\n geometry.lineVertexBuffer && gl.deleteBuffer(geometry.lineVertexBuffer);\n};\n/**\n * createBuffers description\n * @private\n * @param {String} gId key of the geometry object\n * @param {p5.Geometry} obj contains geometry data\n */\np5.RendererGL.prototype.createBuffers = function(gId, obj) {\n var gl = this.GL;\n //initialize the gl buffers for our geom groups\n this._initBufferDefaults(gId);\n\n var geometry = this.gHash[gId];\n\n geometry.numberOfItems = obj.faces.length * 3;\n geometry.lineVertexCount = obj.lineVertices.length;\n\n var strokeShader = this._getRetainedStrokeShader();\n strokeShader.bindShader();\n\n // initialize the stroke shader's 'aPosition' buffer, if used\n if (strokeShader.attributes.aPosition) {\n geometry.lineVertexBuffer = gl.createBuffer();\n\n this._bindBuffer(\n geometry.lineVertexBuffer,\n gl.ARRAY_BUFFER,\n this._flatten(obj.lineVertices),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n strokeShader.enableAttrib(\n strokeShader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // initialize the stroke shader's 'aDirection' buffer, if used\n if (strokeShader.attributes.aDirection) {\n geometry.lineNormalBuffer = gl.createBuffer();\n\n this._bindBuffer(\n geometry.lineNormalBuffer,\n gl.ARRAY_BUFFER,\n this._flatten(obj.lineNormals),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n strokeShader.enableAttrib(\n strokeShader.attributes.aDirection.location,\n 4,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n strokeShader.unbindShader();\n\n var fillShader = this._getRetainedFillShader();\n fillShader.bindShader();\n\n // initialize the fill shader's 'aPosition' buffer, if used\n if (fillShader.attributes.aPosition) {\n geometry.vertexBuffer = gl.createBuffer();\n\n // allocate space for vertex positions\n this._bindBuffer(\n geometry.vertexBuffer,\n gl.ARRAY_BUFFER,\n this._vToNArray(obj.vertices),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n fillShader.enableAttrib(\n fillShader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // allocate space for faces\n geometry.indexBuffer = gl.createBuffer();\n this._bindBuffer(\n geometry.indexBuffer,\n gl.ELEMENT_ARRAY_BUFFER,\n this._flatten(obj.faces),\n Uint16Array,\n gl.STATIC_DRAW\n );\n\n // initialize the fill shader's 'aNormal' buffer, if used\n if (fillShader.attributes.aNormal) {\n geometry.normalBuffer = gl.createBuffer();\n\n // allocate space for normals\n this._bindBuffer(\n geometry.normalBuffer,\n gl.ARRAY_BUFFER,\n this._vToNArray(obj.vertexNormals),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n fillShader.enableAttrib(\n fillShader.attributes.aNormal.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // initialize the fill shader's 'aTexCoord' buffer, if used\n if (fillShader.attributes.aTexCoord) {\n geometry.uvBuffer = gl.createBuffer();\n\n // tex coords\n this._bindBuffer(\n geometry.uvBuffer,\n gl.ARRAY_BUFFER,\n this._flatten(obj.uvs),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n fillShader.enableAttrib(\n fillShader.attributes.aTexCoord.location,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n fillShader.unbindShader();\n return geometry;\n};\n\n/**\n * Draws buffers given a geometry key ID\n * @private\n * @param {String} gId ID in our geom hash\n * @chainable\n */\np5.RendererGL.prototype.drawBuffers = function(gId) {\n var gl = this.GL;\n var geometry = this.gHash[gId];\n\n if (this._doStroke && geometry.lineVertexCount > 0) {\n var strokeShader = this._getRetainedStrokeShader();\n this._setStrokeUniforms(strokeShader);\n\n // bind the stroke shader's 'aPosition' buffer\n if (geometry.lineVertexBuffer) {\n this._bindBuffer(geometry.lineVertexBuffer, gl.ARRAY_BUFFER);\n strokeShader.enableAttrib(\n strokeShader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // bind the stroke shader's 'aDirection' buffer\n if (geometry.lineNormalBuffer) {\n this._bindBuffer(geometry.lineNormalBuffer, gl.ARRAY_BUFFER);\n strokeShader.enableAttrib(\n strokeShader.attributes.aDirection.location,\n 4,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n this._applyColorBlend(this.curStrokeColor);\n this._drawArrays(gl.TRIANGLES, gId);\n strokeShader.unbindShader();\n }\n\n if (this._doFill !== false) {\n var fillShader = this._getRetainedFillShader();\n this._setFillUniforms(fillShader);\n\n // bind the fill shader's 'aPosition' buffer\n if (geometry.vertexBuffer) {\n //vertex position buffer\n this._bindBuffer(geometry.vertexBuffer, gl.ARRAY_BUFFER);\n fillShader.enableAttrib(\n fillShader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n if (geometry.indexBuffer) {\n //vertex index buffer\n this._bindBuffer(geometry.indexBuffer, gl.ELEMENT_ARRAY_BUFFER);\n }\n\n // bind the fill shader's 'aNormal' buffer\n if (geometry.normalBuffer) {\n this._bindBuffer(geometry.normalBuffer, gl.ARRAY_BUFFER);\n fillShader.enableAttrib(\n fillShader.attributes.aNormal.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n // bind the fill shader's 'aTexCoord' buffer\n if (geometry.uvBuffer) {\n // uv buffer\n this._bindBuffer(geometry.uvBuffer, gl.ARRAY_BUFFER);\n fillShader.enableAttrib(\n fillShader.attributes.aTexCoord.location,\n 2,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n }\n\n this._applyColorBlend(this.curFillColor);\n this._drawElements(gl.TRIANGLES, gId);\n fillShader.unbindShader();\n }\n return this;\n};\n\n/**\n * Calls drawBuffers() with a scaled model/view matrix.\n *\n * This is used by various 3d primitive methods (in primitives.js, eg. plane,\n * box, torus, etc...) to allow caching of un-scaled geometries. Those\n * geometries are generally created with unit-length dimensions, cached as\n * such, and then scaled appropriately in this method prior to rendering.\n *\n * @private\n * @method drawBuffersScaled\n * @param {String} gId ID in our geom hash\n * @param {Number} scaleX the amount to scale in the X direction\n * @param {Number} scaleY the amount to scale in the Y direction\n * @param {Number} scaleZ the amount to scale in the Z direction\n */\np5.RendererGL.prototype.drawBuffersScaled = function(\n gId,\n scaleX,\n scaleY,\n scaleZ\n) {\n var uMVMatrix = this.uMVMatrix.copy();\n try {\n this.uMVMatrix.scale(scaleX, scaleY, scaleZ);\n this.drawBuffers(gId);\n } finally {\n this.uMVMatrix = uMVMatrix;\n }\n};\n\np5.RendererGL.prototype._drawArrays = function(drawMode, gId) {\n this.GL.drawArrays(drawMode, 0, this.gHash[gId].lineVertexCount);\n this._pixelsState._pixelsDirty = true;\n return this;\n};\n\np5.RendererGL.prototype._drawElements = function(drawMode, gId) {\n this.GL.drawElements(\n drawMode,\n this.gHash[gId].numberOfItems,\n this.GL.UNSIGNED_SHORT,\n 0\n );\n this._pixelsState._pixelsDirty = true;\n};\n\np5.RendererGL.prototype._drawPoints = function(vertices, vertexBuffer) {\n var gl = this.GL;\n var pointShader = this._getImmediatePointShader();\n this._setPointUniforms(pointShader);\n\n this._bindBuffer(\n vertexBuffer,\n gl.ARRAY_BUFFER,\n this._vToNArray(vertices),\n Float32Array,\n gl.STATIC_DRAW\n );\n\n pointShader.enableAttrib(\n pointShader.attributes.aPosition.location,\n 3,\n gl.FLOAT,\n false,\n 0,\n 0\n );\n\n gl.drawArrays(gl.Points, 0, vertices.length);\n\n pointShader.unbindShader();\n this._pixelsState._pixelsDirty = true;\n};\n\nmodule.exports = p5.RendererGL;\n\n},{\"../core/main\":24}],74:[function(_dereq_,module,exports){\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\nvar libtess = _dereq_('libtess');\n_dereq_('./p5.Shader');\n_dereq_('./p5.Camera');\n_dereq_('../core/p5.Renderer');\n_dereq_('./p5.Matrix');\n\n\nvar defaultShaders = {\n immediateVert: \"attribute vec3 aPosition;\\nattribute vec4 aVertexColor;\\n\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nuniform float uResolution;\\nuniform float uPointSize;\\n\\nvarying vec4 vColor;\\nvoid main(void) {\\n vec4 positionVec4 = vec4(aPosition, 1.0);\\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n vColor = aVertexColor;\\n gl_PointSize = uPointSize;\\n}\\n\",\n vertexColorVert: \"attribute vec3 aPosition;\\nattribute vec4 aVertexColor;\\n\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\n\\nvarying vec4 vColor;\\n\\nvoid main(void) {\\n vec4 positionVec4 = vec4(aPosition, 1.0);\\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n vColor = aVertexColor;\\n}\\n\",\n vertexColorFrag: \"precision mediump float;\\nvarying vec4 vColor;\\nvoid main(void) {\\n gl_FragColor = vColor;\\n}\",\n normalVert: \"attribute vec3 aPosition;\\nattribute vec3 aNormal;\\nattribute vec2 aTexCoord;\\n\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nuniform mat3 uNormalMatrix;\\n\\nvarying vec3 vVertexNormal;\\nvarying highp vec2 vVertTexCoord;\\n\\nvoid main(void) {\\n vec4 positionVec4 = vec4(aPosition, 1.0);\\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n vVertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\\n vVertTexCoord = aTexCoord;\\n}\\n\",\n normalFrag: \"precision mediump float;\\nvarying vec3 vVertexNormal;\\nvoid main(void) {\\n gl_FragColor = vec4(vVertexNormal, 1.0);\\n}\",\n basicFrag: \"precision mediump float;\\nvarying vec3 vVertexNormal;\\nuniform vec4 uMaterialColor;\\nvoid main(void) {\\n gl_FragColor = uMaterialColor;\\n}\",\n lightVert: \"attribute vec3 aPosition;\\nattribute vec3 aNormal;\\nattribute vec2 aTexCoord;\\n\\nuniform mat4 uViewMatrix;\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nuniform mat3 uNormalMatrix;\\nuniform int uAmbientLightCount;\\nuniform int uDirectionalLightCount;\\nuniform int uPointLightCount;\\n\\nuniform vec3 uAmbientColor[8];\\nuniform vec3 uLightingDirection[8];\\nuniform vec3 uDirectionalColor[8];\\nuniform vec3 uPointLightLocation[8];\\nuniform vec3 uPointLightColor[8];\\nuniform bool uSpecular;\\nuniform float uShininess;\\n\\nvarying vec3 vVertexNormal;\\nvarying vec2 vVertTexCoord;\\nvarying vec3 vLightWeighting;\\n\\nvoid main(void){\\n\\n vec4 positionVec4 = vec4(aPosition, 1.0);\\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n\\n vec3 vertexNormal = normalize(vec3( uNormalMatrix * aNormal ));\\n vVertexNormal = vertexNormal;\\n vVertTexCoord = aTexCoord;\\n\\n vec4 mvPosition = uModelViewMatrix * vec4(aPosition, 1.0);\\n vec3 eyeDirection = normalize(-mvPosition.xyz);\\n\\n float specularFactor = 2.0;\\n float diffuseFactor = 0.3;\\n\\n vec3 ambientLightFactor = vec3(0.0);\\n\\n for (int i = 0; i < 8; i++) {\\n if (uAmbientLightCount == i) break;\\n ambientLightFactor += uAmbientColor[i];\\n }\\n\\n\\n vec3 directionalLightFactor = vec3(0.0);\\n\\n for (int j = 0; j < 8; j++) {\\n if (uDirectionalLightCount == j) break;\\n vec3 dir = uLightingDirection[j];\\n float directionalLightWeighting = max(dot(vertexNormal, -dir), 0.0);\\n directionalLightFactor += uDirectionalColor[j] * directionalLightWeighting;\\n }\\n\\n\\n vec3 pointLightFactor = vec3(0.0);\\n\\n for (int k = 0; k < 8; k++) {\\n if (uPointLightCount == k) break;\\n vec3 loc = (uViewMatrix * vec4(uPointLightLocation[k], 1.0)).xyz;\\n vec3 lightDirection = normalize(loc - mvPosition.xyz);\\n\\n float directionalLightWeighting = max(dot(vertexNormal, lightDirection), 0.0);\\n\\n float specularLightWeighting = 0.0;\\n if (uSpecular ){\\n vec3 reflectionDirection = reflect(-lightDirection, vertexNormal);\\n specularLightWeighting = pow(max(dot(reflectionDirection, eyeDirection), 0.0), uShininess);\\n }\\n\\n pointLightFactor += uPointLightColor[k] * (specularFactor * specularLightWeighting\\n + directionalLightWeighting * diffuseFactor);\\n }\\n\\n vLightWeighting = ambientLightFactor + directionalLightFactor + pointLightFactor;\\n}\\n\",\n lightTextureFrag: \"precision mediump float;\\n\\nuniform vec4 uMaterialColor;\\nuniform sampler2D uSampler;\\nuniform bool isTexture;\\nuniform bool uUseLighting;\\n\\nvarying vec3 vLightWeighting;\\nvarying highp vec2 vVertTexCoord;\\n\\nvoid main(void) {\\n gl_FragColor = isTexture ? texture2D(uSampler, vVertTexCoord) : uMaterialColor;\\n if (uUseLighting)\\n gl_FragColor.rgb *= vLightWeighting;\\n}\",\n phongVert: \"precision mediump float;\\n\\nattribute vec3 aPosition;\\nattribute vec3 aNormal;\\nattribute vec2 aTexCoord;\\n\\nuniform vec3 uAmbientColor[8];\\n\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nuniform mat3 uNormalMatrix;\\nuniform int uAmbientLightCount;\\n\\nvarying vec3 vNormal;\\nvarying vec2 vTexCoord;\\nvarying vec3 vViewPosition;\\nvarying vec3 vAmbientColor;\\n\\nvoid main(void){\\n\\n vec4 viewModelPosition = uModelViewMatrix * vec4(aPosition, 1.0);\\n\\n // Pass varyings to fragment shader\\n vViewPosition = viewModelPosition.xyz;\\n gl_Position = uProjectionMatrix * viewModelPosition; \\n\\n vNormal = normalize(uNormalMatrix * normalize(aNormal));\\n vTexCoord = aTexCoord;\\n\\n vAmbientColor = vec3(0.0);\\n for (int i = 0; i < 8; i++) {\\n if (uAmbientLightCount == i) break;\\n vAmbientColor += uAmbientColor[i];\\n }\\n}\\n\",\n phongFrag: \"precision mediump float;\\n\\n//uniform mat4 uModelViewMatrix;\\nuniform mat4 uViewMatrix;\\n\\nuniform vec4 uMaterialColor;\\nuniform sampler2D uSampler;\\nuniform bool isTexture;\\nuniform bool uUseLighting;\\n\\nuniform vec3 uLightingDirection[8];\\nuniform vec3 uDirectionalColor[8];\\nuniform vec3 uPointLightLocation[8];\\nuniform vec3 uPointLightColor[8];\\nuniform bool uSpecular;\\nuniform float uShininess;\\n\\nuniform int uDirectionalLightCount;\\nuniform int uPointLightCount;\\n\\nvarying vec3 vNormal;\\nvarying vec2 vTexCoord;\\nvarying vec3 vViewPosition;\\nvarying vec3 vAmbientColor;\\n\\nvec3 V;\\nvec3 N;\\n\\nconst float specularFactor = 2.0;\\nconst float diffuseFactor = 0.73;\\n\\nstruct LightResult {\\n\\tfloat specular;\\n\\tfloat diffuse;\\n};\\n\\nfloat phongSpecular(\\n vec3 lightDirection,\\n vec3 viewDirection,\\n vec3 surfaceNormal,\\n float shininess) {\\n\\n vec3 R = normalize(reflect(-lightDirection, surfaceNormal)); \\n return pow(max(0.0, dot(R, viewDirection)), shininess);\\n}\\n\\nfloat lambertDiffuse(\\n vec3 lightDirection,\\n vec3 surfaceNormal) {\\n return max(0.0, dot(-lightDirection, surfaceNormal));\\n}\\n\\nLightResult light(vec3 lightVector) {\\n\\n vec3 L = normalize(lightVector);\\n\\n //compute our diffuse & specular terms\\n LightResult lr;\\n if (uSpecular)\\n lr.specular = phongSpecular(L, V, N, uShininess);\\n lr.diffuse = lambertDiffuse(L, N);\\n return lr;\\n}\\n\\nvoid main(void) {\\n\\n V = normalize(vViewPosition);\\n N = vNormal;\\n\\n vec3 diffuse = vec3(0.0);\\n float specular = 0.0;\\n\\n for (int j = 0; j < 8; j++) {\\n if (uDirectionalLightCount == j) break;\\n\\n LightResult result = light(uLightingDirection[j]);\\n diffuse += result.diffuse * uDirectionalColor[j];\\n specular += result.specular;\\n }\\n\\n for (int k = 0; k < 8; k++) {\\n if (uPointLightCount == k) break;\\n\\n vec3 lightPosition = (uViewMatrix * vec4(uPointLightLocation[k], 1.0)).xyz;\\n vec3 lightVector = vViewPosition - lightPosition;\\n\\t\\n //calculate attenuation\\n float lightDistance = length(lightVector);\\n float falloff = 500.0 / (lightDistance + 500.0);\\n\\n LightResult result = light(lightVector);\\n diffuse += result.diffuse * falloff * uPointLightColor[k];\\n specular += result.specular * falloff;\\n }\\n\\n gl_FragColor = isTexture ? texture2D(uSampler, vTexCoord) : uMaterialColor;\\n gl_FragColor.rgb = gl_FragColor.rgb * (diffuse * diffuseFactor + vAmbientColor) + specular * specularFactor;\\n}\",\n fontVert: \"precision mediump float;\\n\\nattribute vec3 aPosition;\\nattribute vec2 aTexCoord;\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\n\\nuniform vec4 uGlyphRect;\\nuniform float uGlyphOffset;\\n\\nvarying vec2 vTexCoord;\\nvarying float w;\\n\\nvoid main() {\\n vec4 positionVec4 = vec4(aPosition, 1.0);\\n\\n // scale by the size of the glyph's rectangle\\n positionVec4.xy *= uGlyphRect.zw - uGlyphRect.xy;\\n\\n // move to the corner of the glyph\\n positionVec4.xy += uGlyphRect.xy;\\n\\n // move to the letter's line offset\\n positionVec4.x += uGlyphOffset;\\n \\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n vTexCoord = aTexCoord;\\n w = gl_Position.w;\\n}\\n\",\n fontFrag: \"#extension GL_OES_standard_derivatives : enable\\nprecision mediump float;\\n\\n#if 0\\n // simulate integer math using floats\\n\\t#define int float\\n\\t#define ivec2 vec2\\n\\t#define INT(x) float(x)\\n\\n\\tint ifloor(float v) { return floor(v); }\\n\\tivec2 ifloor(vec2 v) { return floor(v); }\\n\\n#else\\n // use native integer math\\n\\tprecision mediump int;\\n\\t#define INT(x) x\\n\\n\\tint ifloor(float v) { return int(v); }\\n\\tint ifloor(int v) { return v; }\\n\\tivec2 ifloor(vec2 v) { return ivec2(v); }\\n\\n#endif\\n\\nuniform sampler2D uSamplerStrokes;\\nuniform sampler2D uSamplerRowStrokes;\\nuniform sampler2D uSamplerRows;\\nuniform sampler2D uSamplerColStrokes;\\nuniform sampler2D uSamplerCols;\\n\\nuniform ivec2 uStrokeImageSize;\\nuniform ivec2 uCellsImageSize;\\nuniform ivec2 uGridImageSize;\\n\\nuniform ivec2 uGridOffset;\\nuniform ivec2 uGridSize;\\nuniform vec4 uMaterialColor;\\n\\nvarying vec2 vTexCoord;\\n\\n// some helper functions\\nint round(float v) { return ifloor(v + 0.5); }\\nivec2 round(vec2 v) { return ifloor(v + 0.5); }\\nfloat saturate(float v) { return clamp(v, 0.0, 1.0); }\\nvec2 saturate(vec2 v) { return clamp(v, 0.0, 1.0); }\\n\\nint mul(float v1, int v2) {\\n return ifloor(v1 * float(v2));\\n}\\n\\nivec2 mul(vec2 v1, ivec2 v2) {\\n return ifloor(v1 * vec2(v2) + 0.5);\\n}\\n\\n// unpack a 16-bit integer from a float vec2\\nint getInt16(vec2 v) {\\n ivec2 iv = round(v * 255.0);\\n return iv.x * INT(128) + iv.y;\\n}\\n\\nvec2 pixelScale;\\nvec2 coverage = vec2(0.0);\\nvec2 weight = vec2(0.5);\\nconst float minDistance = 1.0/8192.0;\\nconst float hardness = 1.05; // amount of antialias\\n\\n// the maximum number of curves in a glyph\\nconst int N = INT(250);\\n\\n// retrieves an indexed pixel from a sampler\\nvec4 getTexel(sampler2D sampler, int pos, ivec2 size) {\\n int width = size.x;\\n int y = ifloor(pos / width);\\n int x = pos - y * width; // pos % width\\n\\n return texture2D(sampler, (vec2(x, y) + 0.5) / vec2(size));\\n}\\n\\nvoid calulateCrossings(vec2 p0, vec2 p1, vec2 p2, out vec2 C1, out vec2 C2) {\\n\\n // get the coefficients of the quadratic in t\\n vec2 a = p0 - p1 * 2.0 + p2;\\n vec2 b = p0 - p1;\\n vec2 c = p0 - vTexCoord;\\n\\n // found out which values of 't' it crosses the axes\\n vec2 surd = sqrt(max(vec2(0.0), b * b - a * c));\\n vec2 t1 = ((b - surd) / a).yx;\\n vec2 t2 = ((b + surd) / a).yx;\\n\\n // approximate straight lines to avoid rounding errors\\n if (abs(a.y) < 0.001)\\n t1.x = t2.x = c.y / (2.0 * b.y);\\n\\n if (abs(a.x) < 0.001)\\n t1.y = t2.y = c.x / (2.0 * b.x);\\n\\n // plug into quadratic formula to find the corrdinates of the crossings\\n C1 = ((a * t1 - b * 2.0) * t1 + c) * pixelScale;\\n C2 = ((a * t2 - b * 2.0) * t2 + c) * pixelScale;\\n}\\n\\nvoid coverageX(vec2 p0, vec2 p1, vec2 p2) {\\n\\n vec2 C1, C2;\\n calulateCrossings(p0, p1, p2, C1, C2);\\n\\n // determine on which side of the x-axis the points lie\\n bool y0 = p0.y > vTexCoord.y;\\n bool y1 = p1.y > vTexCoord.y;\\n bool y2 = p2.y > vTexCoord.y;\\n\\n // could web be under the curve (after t1)?\\n if (y1 ? !y2 : y0) {\\n // add the coverage for t1\\n coverage.x += saturate(C1.x + 0.5);\\n // calculate the anti-aliasing for t1\\n weight.x = min(weight.x, abs(C1.x));\\n }\\n\\n // are we outside the curve (after t2)?\\n if (y1 ? !y0 : y2) {\\n // subtract the coverage for t2\\n coverage.x -= saturate(C2.x + 0.5);\\n // calculate the anti-aliasing for t2\\n weight.x = min(weight.x, abs(C2.x));\\n }\\n}\\n\\n// this is essentially the same as coverageX, but with the axes swapped\\nvoid coverageY(vec2 p0, vec2 p1, vec2 p2) {\\n\\n vec2 C1, C2;\\n calulateCrossings(p0, p1, p2, C1, C2);\\n\\n bool x0 = p0.x > vTexCoord.x;\\n bool x1 = p1.x > vTexCoord.x;\\n bool x2 = p2.x > vTexCoord.x;\\n\\n if (x1 ? !x2 : x0) {\\n coverage.y -= saturate(C1.y + 0.5);\\n weight.y = min(weight.y, abs(C1.y));\\n }\\n\\n if (x1 ? !x0 : x2) {\\n coverage.y += saturate(C2.y + 0.5);\\n weight.y = min(weight.y, abs(C2.y));\\n }\\n}\\n\\nvoid main() {\\n\\n // calculate the pixel scale based on screen-coordinates\\n pixelScale = hardness / fwidth(vTexCoord);\\n\\n // which grid cell is this pixel in?\\n ivec2 gridCoord = ifloor(vTexCoord * vec2(uGridSize));\\n\\n // intersect curves in this row\\n {\\n // the index into the row info bitmap\\n int rowIndex = gridCoord.y + uGridOffset.y;\\n // fetch the info texel\\n vec4 rowInfo = getTexel(uSamplerRows, rowIndex, uGridImageSize);\\n // unpack the rowInfo\\n int rowStrokeIndex = getInt16(rowInfo.xy);\\n int rowStrokeCount = getInt16(rowInfo.zw);\\n\\n for (int iRowStroke = INT(0); iRowStroke < N; iRowStroke++) {\\n if (iRowStroke >= rowStrokeCount)\\n break;\\n\\n // each stroke is made up of 3 points: the start and control point\\n // and the start of the next curve.\\n // fetch the indices of this pair of strokes:\\n vec4 strokeIndices = getTexel(uSamplerRowStrokes, rowStrokeIndex++, uCellsImageSize);\\n\\n // unpack the stroke index\\n int strokePos = getInt16(strokeIndices.xy);\\n\\n // fetch the two strokes\\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\\n\\n // calculate the coverage\\n coverageX(stroke0.xy, stroke0.zw, stroke1.xy);\\n }\\n }\\n\\n // intersect curves in this column\\n {\\n int colIndex = gridCoord.x + uGridOffset.x;\\n vec4 colInfo = getTexel(uSamplerCols, colIndex, uGridImageSize);\\n int colStrokeIndex = getInt16(colInfo.xy);\\n int colStrokeCount = getInt16(colInfo.zw);\\n \\n for (int iColStroke = INT(0); iColStroke < N; iColStroke++) {\\n if (iColStroke >= colStrokeCount)\\n break;\\n\\n vec4 strokeIndices = getTexel(uSamplerColStrokes, colStrokeIndex++, uCellsImageSize);\\n\\n int strokePos = getInt16(strokeIndices.xy);\\n vec4 stroke0 = getTexel(uSamplerStrokes, strokePos + INT(0), uStrokeImageSize);\\n vec4 stroke1 = getTexel(uSamplerStrokes, strokePos + INT(1), uStrokeImageSize);\\n coverageY(stroke0.xy, stroke0.zw, stroke1.xy);\\n }\\n }\\n\\n weight = saturate(1.0 - weight * 2.0);\\n float distance = max(weight.x + weight.y, minDistance); // manhattan approx.\\n float antialias = abs(dot(coverage, weight) / distance);\\n float cover = min(abs(coverage.x), abs(coverage.y));\\n gl_FragColor = uMaterialColor;\\n gl_FragColor.a *= saturate(max(antialias, cover));\\n}\",\n lineVert: \"/*\\n Part of the Processing project - http://processing.org\\n Copyright (c) 2012-15 The Processing Foundation\\n Copyright (c) 2004-12 Ben Fry and Casey Reas\\n Copyright (c) 2001-04 Massachusetts Institute of Technology\\n This library is free software; you can redistribute it and/or\\n modify it under the terms of the GNU Lesser General Public\\n License as published by the Free Software Foundation, version 2.1.\\n This library is distributed in the hope that it will be useful,\\n but WITHOUT ANY WARRANTY; without even the implied warranty of\\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\\n Lesser General Public License for more details.\\n You should have received a copy of the GNU Lesser General\\n Public License along with this library; if not, write to the\\n Free Software Foundation, Inc., 59 Temple Place, Suite 330,\\n Boston, MA 02111-1307 USA\\n*/\\n\\n#define PROCESSING_LINE_SHADER\\n\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nuniform float uStrokeWeight;\\n\\nuniform vec4 uViewport;\\n\\n// using a scale <1 moves the lines towards the camera\\n// in order to prevent popping effects due to half of\\n// the line disappearing behind the geometry faces.\\nvec3 scale = vec3(0.9995);\\n\\nattribute vec4 aPosition;\\nattribute vec4 aDirection;\\n \\nvoid main() {\\n vec4 posp = uModelViewMatrix * aPosition;\\n vec4 posq = uModelViewMatrix * (aPosition + vec4(aDirection.xyz, 0));\\n\\n // Moving vertices slightly toward the camera\\n // to avoid depth-fighting with the fill triangles.\\n // Discussed here:\\n // http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=252848 \\n posp.xyz = posp.xyz * scale;\\n posq.xyz = posq.xyz * scale;\\n\\n vec4 p = uProjectionMatrix * posp;\\n vec4 q = uProjectionMatrix * posq;\\n\\n // formula to convert from clip space (range -1..1) to screen space (range 0..[width or height])\\n // screen_p = (p.xy/p.w + <1,1>) * 0.5 * uViewport.zw\\n\\n // prevent division by W by transforming the tangent formula (div by 0 causes\\n // the line to disappear, see https://github.com/processing/processing/issues/5183)\\n // t = screen_q - screen_p\\n //\\n // tangent is normalized and we don't care which aDirection it points to (+-)\\n // t = +- normalize( screen_q - screen_p )\\n // t = +- normalize( (q.xy/q.w+<1,1>)*0.5*uViewport.zw - (p.xy/p.w+<1,1>)*0.5*uViewport.zw )\\n //\\n // extract common factor, <1,1> - <1,1> cancels out\\n // t = +- normalize( (q.xy/q.w - p.xy/p.w) * 0.5 * uViewport.zw )\\n //\\n // convert to common divisor\\n // t = +- normalize( ((q.xy*p.w - p.xy*q.w) / (p.w*q.w)) * 0.5 * uViewport.zw )\\n //\\n // remove the common scalar divisor/factor, not needed due to normalize and +-\\n // (keep uViewport - can't remove because it has different components for x and y\\n // and corrects for aspect ratio, see https://github.com/processing/processing/issues/5181)\\n // t = +- normalize( (q.xy*p.w - p.xy*q.w) * uViewport.zw )\\n\\n vec2 tangent = normalize((q.xy*p.w - p.xy*q.w) * uViewport.zw);\\n\\n // flip tangent to normal (it's already normalized)\\n vec2 normal = vec2(-tangent.y, tangent.x);\\n\\n float thickness = aDirection.w * uStrokeWeight;\\n vec2 offset = normal * thickness / 2.0;\\n\\n // Perspective ---\\n // convert from world to clip by multiplying with projection scaling factor\\n // to get the right thickness (see https://github.com/processing/processing/issues/5182)\\n // invert Y, projections in Processing invert Y\\n vec2 perspScale = (uProjectionMatrix * vec4(1, -1, 0, 0)).xy;\\n\\n // No Perspective ---\\n // multiply by W (to cancel out division by W later in the pipeline) and\\n // convert from screen to clip (derived from clip to screen above)\\n vec2 noPerspScale = p.w / (0.5 * uViewport.zw);\\n\\n //gl_Position.xy = p.xy + offset.xy * mix(noPerspScale, perspScale, float(perspective > 0));\\n gl_Position.xy = p.xy + offset.xy * perspScale;\\n gl_Position.zw = p.zw;\\n}\\n\",\n lineFrag: \"precision mediump float;\\nprecision mediump int;\\n\\nuniform vec4 uMaterialColor;\\n\\nvoid main() {\\n gl_FragColor = uMaterialColor;\\n}\",\n pointVert: \"attribute vec3 aPosition;\\nuniform float uPointSize;\\nvarying float vStrokeWeight;\\nuniform mat4 uModelViewMatrix;\\nuniform mat4 uProjectionMatrix;\\nvoid main() {\\n\\tvec4 positionVec4 = vec4(aPosition, 1.0);\\n\\tgl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\\n\\tgl_PointSize = uPointSize;\\n\\tvStrokeWeight = uPointSize;\\n}\",\n pointFrag: \"precision mediump float;\\nprecision mediump int;\\nuniform vec4 uMaterialColor;\\nvarying float vStrokeWeight;\\n\\nvoid main(){\\n\\tfloat mask = 0.0;\\n\\n\\t// make a circular mask using the gl_PointCoord (goes from 0 - 1 on a point)\\n // might be able to get a nicer edge on big strokeweights with smoothstep but slightly less performant\\n\\n\\tmask = step(0.98, length(gl_PointCoord * 2.0 - 1.0));\\n\\n\\t// if strokeWeight is 1 or less lets just draw a square\\n\\t// this prevents weird artifacting from carving circles when our points are really small\\n\\t// if strokeWeight is larger than 1, we just use it as is\\n\\n\\tmask = mix(0.0, mask, clamp(floor(vStrokeWeight - 0.5),0.0,1.0));\\n\\n\\t// throw away the borders of the mask\\n // otherwise we get weird alpha blending issues\\n\\n\\tif(mask > 0.98){\\n discard;\\n \\t}\\n\\n \\tgl_FragColor = vec4(uMaterialColor.rgb * (1.0 - mask), uMaterialColor.a) ;\\n}\"\n};\n\n/**\n * 3D graphics class\n * @private\n * @class p5.RendererGL\n * @constructor\n * @extends p5.Renderer\n * @todo extend class to include public method for offscreen\n * rendering (FBO).\n *\n */\np5.RendererGL = function(elt, pInst, isMainCanvas, attr) {\n p5.Renderer.call(this, elt, pInst, isMainCanvas);\n this._setAttributeDefaults(pInst);\n this._initContext();\n this.isP3D = true; //lets us know we're in 3d mode\n this.GL = this.drawingContext;\n\n // lights\n\n this._enableLighting = false;\n\n this.ambientLightColors = [];\n this.directionalLightDirections = [];\n this.directionalLightColors = [];\n\n this.pointLightPositions = [];\n this.pointLightColors = [];\n\n this.curFillColor = [1, 1, 1, 1];\n this.curStrokeColor = [0, 0, 0, 1];\n this.curBlendMode = constants.BLEND;\n this.blendExt = this.GL.getExtension('EXT_blend_minmax');\n\n this._useSpecularMaterial = false;\n this._useNormalMaterial = false;\n this._useShininess = 1;\n\n /**\n * model view, projection, & normal\n * matrices\n */\n this.uMVMatrix = new p5.Matrix();\n this.uPMatrix = new p5.Matrix();\n this.uNMatrix = new p5.Matrix('mat3');\n\n // Camera\n this._curCamera = new p5.Camera(this);\n this._curCamera._computeCameraDefaultSettings();\n this._curCamera._setDefaultCamera();\n\n //Geometry & Material hashes\n this.gHash = {};\n\n this._defaultLightShader = undefined;\n this._defaultImmediateModeShader = undefined;\n this._defaultNormalShader = undefined;\n this._defaultColorShader = undefined;\n this._defaultPointShader = undefined;\n\n this._pointVertexBuffer = this.GL.createBuffer();\n\n this.userFillShader = undefined;\n this.userStrokeShader = undefined;\n this.userPointShader = undefined;\n\n //Imediate Mode\n //default drawing is done in Retained Mode\n this.isImmediateDrawing = false;\n this.immediateMode = {};\n\n this.pointSize = 5.0; //default point size\n this.curStrokeWeight = 1;\n\n // array of textures created in this gl context via this.getTexture(src)\n this.textures = [];\n\n this.textureMode = constants.IMAGE;\n // default wrap settings\n this.textureWrapX = constants.CLAMP;\n this.textureWrapY = constants.CLAMP;\n this._tex = null;\n this._curveTightness = 6;\n\n // lookUpTable for coefficients needed to be calculated for bezierVertex, same are used for curveVertex\n this._lookUpTableBezier = [];\n // lookUpTable for coefficients needed to be calculated for quadraticVertex\n this._lookUpTableQuadratic = [];\n\n // current curveDetail in the Bezier lookUpTable\n this._lutBezierDetail = 0;\n // current curveDetail in the Quadratic lookUpTable\n this._lutQuadraticDetail = 0;\n\n this._tessy = this._initTessy();\n\n this.fontInfos = {};\n\n return this;\n};\n\np5.RendererGL.prototype = Object.create(p5.Renderer.prototype);\n\n//////////////////////////////////////////////\n// Setting\n//////////////////////////////////////////////\n\np5.RendererGL.prototype._setAttributeDefaults = function(pInst) {\n var defaults = {\n alpha: false,\n depth: true,\n stencil: true,\n antialias: false,\n premultipliedAlpha: false,\n preserveDrawingBuffer: true,\n perPixelLighting: false\n };\n if (pInst._glAttributes === null) {\n pInst._glAttributes = defaults;\n } else {\n pInst._glAttributes = Object.assign(defaults, pInst._glAttributes);\n }\n return;\n};\n\np5.RendererGL.prototype._initContext = function() {\n try {\n this.drawingContext =\n this.canvas.getContext('webgl', this._pInst._glAttributes) ||\n this.canvas.getContext('experimental-webgl', this._pInst._glAttributes);\n if (this.drawingContext === null) {\n throw new Error('Error creating webgl context');\n } else {\n console.log('p5.RendererGL: enabled webgl context');\n var gl = this.drawingContext;\n gl.enable(gl.DEPTH_TEST);\n gl.depthFunc(gl.LEQUAL);\n gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight);\n this._viewport = this.drawingContext.getParameter(\n this.drawingContext.VIEWPORT\n );\n }\n } catch (er) {\n throw er;\n }\n};\n\n//This is helper function to reset the context anytime the attributes\n//are changed with setAttributes()\n\np5.RendererGL.prototype._resetContext = function(options, callback) {\n var w = this.width;\n var h = this.height;\n var defaultId = this.canvas.id;\n var c = this.canvas;\n if (c) {\n c.parentNode.removeChild(c);\n }\n c = document.createElement('canvas');\n c.id = defaultId;\n if (this._pInst._userNode) {\n this._pInst._userNode.appendChild(c);\n } else {\n document.body.appendChild(c);\n }\n this._pInst.canvas = c;\n\n var renderer = new p5.RendererGL(this._pInst.canvas, this._pInst, true);\n this._pInst._setProperty('_renderer', renderer);\n renderer.resize(w, h);\n renderer._applyDefaults();\n this._pInst._elements.push(renderer);\n\n if (typeof callback === 'function') {\n //setTimeout with 0 forces the task to the back of the queue, this ensures that\n //we finish switching out the renderer\n setTimeout(function() {\n callback.apply(window._renderer, options);\n }, 0);\n }\n};\n/**\n * @module Rendering\n * @submodule Rendering\n * @for p5\n */\n/**\n * Set attributes for the WebGL Drawing context.\n * This is a way of adjusting how the WebGL\n * renderer works to fine-tune the display and performance.\n * \n * Note that this will reinitialize the drawing context\n * if called after the WebGL canvas is made.\n * \n * If an object is passed as the parameter, all attributes\n * not declared in the object will be set to defaults.\n * \n * The available attributes are:\n * \n * alpha - indicates if the canvas contains an alpha buffer\n * default is false\n * \n * depth - indicates whether the drawing buffer has a depth buffer\n * of at least 16 bits - default is true\n * \n * stencil - indicates whether the drawing buffer has a stencil buffer\n * of at least 8 bits\n * \n * antialias - indicates whether or not to perform anti-aliasing\n * default is false\n * \n * premultipliedAlpha - indicates that the page compositor will assume\n * the drawing buffer contains colors with pre-multiplied alpha\n * default is false\n * \n * preserveDrawingBuffer - if true the buffers will not be cleared and\n * and will preserve their values until cleared or overwritten by author\n * (note that p5 clears automatically on draw loop)\n * default is true\n * \n * perPixelLighting - if true, per-pixel lighting will be used in the\n * lighting shader.\n * default is false\n * \n * @method setAttributes\n * @for p5\n * @param {String} key Name of attribute\n * @param {Boolean} value New value of named attribute\n * @example\n * \n * \n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(255);\n * push();\n * rotateZ(frameCount * 0.02);\n * rotateX(frameCount * 0.02);\n * rotateY(frameCount * 0.02);\n * fill(0, 0, 0);\n * box(50);\n * pop();\n * }\n * \n * \n * \n * Now with the antialias attribute set to true.\n * \n * \n * \n * function setup() {\n * setAttributes('antialias', true);\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(255);\n * push();\n * rotateZ(frameCount * 0.02);\n * rotateX(frameCount * 0.02);\n * rotateY(frameCount * 0.02);\n * fill(0, 0, 0);\n * box(50);\n * pop();\n * }\n * \n * \n *\n * \n * \n * // press the mouse button to enable perPixelLighting\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noStroke();\n * fill(255);\n * }\n *\n * var lights = [\n * { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\n * { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\n * { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\n * { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\n * { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\n * { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\n * ];\n *\n * function draw() {\n * var t = millis() / 1000 + 1000;\n * background(0);\n * directionalLight(color('#222'), 1, 1, 1);\n *\n * for (var i = 0; i < lights.length; i++) {\n * var light = lights[i];\n * pointLight(\n * color(light.c),\n * p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\n * );\n * }\n *\n * specularMaterial(255);\n * sphere(width * 0.1);\n *\n * rotateX(t * 0.77);\n * rotateY(t * 0.83);\n * rotateZ(t * 0.91);\n * torus(width * 0.3, width * 0.07, 24, 10);\n * }\n *\n * function mousePressed() {\n * setAttributes('perPixelLighting', true);\n * noStroke();\n * fill(255);\n * }\n * function mouseReleased() {\n * setAttributes('perPixelLighting', false);\n * noStroke();\n * fill(255);\n * }\n * \n * \n *\n * @alt a rotating cube with smoother edges\n */\n/**\n * @method setAttributes\n * @for p5\n * @param {Object} obj object with key-value pairs\n */\n\np5.prototype.setAttributes = function(key, value) {\n var unchanged = true;\n if (typeof value !== 'undefined') {\n //first time modifying the attributes\n if (this._glAttributes === null) {\n this._glAttributes = {};\n }\n if (this._glAttributes[key] !== value) {\n //changing value of previously altered attribute\n this._glAttributes[key] = value;\n unchanged = false;\n }\n //setting all attributes with some change\n } else if (key instanceof Object) {\n if (this._glAttributes !== key) {\n this._glAttributes = key;\n unchanged = false;\n }\n }\n //@todo_FES\n if (!this._renderer.isP3D || unchanged) {\n return;\n }\n\n if (!this._setupDone) {\n for (var x in this._renderer.gHash) {\n if (this._renderer.gHash.hasOwnProperty(x)) {\n console.error(\n 'Sorry, Could not set the attributes, you need to call setAttributes() ' +\n 'before calling the other drawing methods in setup()'\n );\n return;\n }\n }\n }\n\n this.push();\n this._renderer._resetContext();\n this.pop();\n\n if (this._renderer._curCamera) {\n this._renderer._curCamera._renderer = this._renderer;\n }\n};\n\n/**\n * @class p5.RendererGL\n */\n\np5.RendererGL.prototype._update = function() {\n // reset model view and apply initial camera transform\n // (containing only look at info; no projection).\n this.uMVMatrix.set(\n this._curCamera.cameraMatrix.mat4[0],\n this._curCamera.cameraMatrix.mat4[1],\n this._curCamera.cameraMatrix.mat4[2],\n this._curCamera.cameraMatrix.mat4[3],\n this._curCamera.cameraMatrix.mat4[4],\n this._curCamera.cameraMatrix.mat4[5],\n this._curCamera.cameraMatrix.mat4[6],\n this._curCamera.cameraMatrix.mat4[7],\n this._curCamera.cameraMatrix.mat4[8],\n this._curCamera.cameraMatrix.mat4[9],\n this._curCamera.cameraMatrix.mat4[10],\n this._curCamera.cameraMatrix.mat4[11],\n this._curCamera.cameraMatrix.mat4[12],\n this._curCamera.cameraMatrix.mat4[13],\n this._curCamera.cameraMatrix.mat4[14],\n this._curCamera.cameraMatrix.mat4[15]\n );\n\n // reset light data for new frame.\n\n this.ambientLightColors.length = 0;\n this.directionalLightDirections.length = 0;\n this.directionalLightColors.length = 0;\n\n this.pointLightPositions.length = 0;\n this.pointLightColors.length = 0;\n\n this._enableLighting = false;\n};\n\n/**\n * [background description]\n */\np5.RendererGL.prototype.background = function() {\n var _col = this._pInst.color.apply(this._pInst, arguments);\n var _r = _col.levels[0] / 255;\n var _g = _col.levels[1] / 255;\n var _b = _col.levels[2] / 255;\n var _a = _col.levels[3] / 255;\n this.GL.clearColor(_r, _g, _b, _a);\n this.GL.depthMask(true);\n this.GL.clear(this.GL.COLOR_BUFFER_BIT | this.GL.DEPTH_BUFFER_BIT);\n this._pixelsState._pixelsDirty = true;\n};\n\n//////////////////////////////////////////////\n// COLOR\n//////////////////////////////////////////////\n/**\n * Basic fill material for geometry with a given color\n * @method fill\n * @class p5.RendererGL\n * @param {Number|Number[]|String|p5.Color} v1 gray value,\n * red or hue value (depending on the current color mode),\n * or color Array, or CSS color string\n * @param {Number} [v2] green or saturation value\n * @param {Number} [v3] blue or brightness value\n * @param {Number} [a] opacity\n * @chainable\n * @example\n * \n * \n * function setup() {\n * createCanvas(200, 200, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * fill(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(75, 75, 75);\n * }\n * \n * \n *\n * @alt\n * black canvas with purple cube spinning\n *\n */\np5.RendererGL.prototype.fill = function(v1, v2, v3, a) {\n //see material.js for more info on color blending in webgl\n var color = p5.prototype.color.apply(this._pInst, arguments);\n this.curFillColor = color._array;\n this.drawMode = constants.FILL;\n this._useNormalMaterial = false;\n this._tex = null;\n};\n\n/**\n * Basic stroke material for geometry with a given color\n * @method stroke\n * @param {Number|Number[]|String|p5.Color} v1 gray value,\n * red or hue value (depending on the current color mode),\n * or color Array, or CSS color string\n * @param {Number} [v2] green or saturation value\n * @param {Number} [v3] blue or brightness value\n * @param {Number} [a] opacity\n * @example\n * \n * \n * function setup() {\n * createCanvas(200, 200, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * stroke(240, 150, 150);\n * fill(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(75, 75, 75);\n * }\n * \n * \n *\n * @alt\n * black canvas with purple cube with pink outline spinning\n *\n */\np5.RendererGL.prototype.stroke = function(r, g, b, a) {\n //@todo allow transparency in stroking currently doesn't have\n //any impact and causes problems with specularMaterial\n arguments[3] = 255;\n var color = p5.prototype.color.apply(this._pInst, arguments);\n this.curStrokeColor = color._array;\n};\n\np5.RendererGL.prototype.strokeCap = function(cap) {\n // @TODO : to be implemented\n console.error('Sorry, strokeCap() is not yet implemented in WEBGL mode');\n};\n\np5.RendererGL.prototype.blendMode = function(mode) {\n if (\n mode === constants.DARKEST ||\n mode === constants.LIGHTEST ||\n mode === constants.ADD ||\n mode === constants.BLEND ||\n mode === constants.SUBTRACT ||\n mode === constants.SCREEN ||\n mode === constants.EXCLUSION ||\n mode === constants.REPLACE ||\n mode === constants.MULTIPLY\n )\n this.curBlendMode = mode;\n else if (\n mode === constants.BURN ||\n mode === constants.OVERLAY ||\n mode === constants.HARD_LIGHT ||\n mode === constants.SOFT_LIGHT ||\n mode === constants.DODGE\n ) {\n console.warn(\n 'BURN, OVERLAY, HARD_LIGHT, SOFT_LIGHT, and DODGE only work for blendMode in 2D mode.'\n );\n }\n};\n\n/**\n * Change weight of stroke\n * @method strokeWeight\n * @param {Number} stroke weight to be used for drawing\n * @example\n * \n * \n * function setup() {\n * createCanvas(200, 400, WEBGL);\n * setAttributes('antialias', true);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * translate(0, -100, 0);\n * stroke(240, 150, 150);\n * fill(100, 100, 240);\n * push();\n * strokeWeight(8);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * sphere(75);\n * pop();\n * push();\n * translate(0, 200, 0);\n * strokeWeight(1);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * sphere(75);\n * pop();\n * }\n * \n * \n *\n * @alt\n * black canvas with two purple rotating spheres with pink\n * outlines the sphere on top has much heavier outlines,\n *\n */\np5.RendererGL.prototype.strokeWeight = function(w) {\n if (this.curStrokeWeight !== w) {\n this.pointSize = w;\n this.curStrokeWeight = w;\n }\n};\n\n// x,y are canvas-relative (pre-scaled by _pixelDensity)\np5.RendererGL.prototype._getPixel = function(x, y) {\n var pixelsState = this._pixelsState;\n var imageData, index;\n if (pixelsState._pixelsDirty) {\n imageData = new Uint8Array(4);\n // prettier-ignore\n this.drawingContext.readPixels(\n x, y, 1, 1,\n this.drawingContext.RGBA, this.drawingContext.UNSIGNED_BYTE,\n imageData\n );\n index = 0;\n } else {\n imageData = pixelsState.pixels;\n index = (Math.floor(x) + Math.floor(y) * this.canvas.width) * 4;\n }\n return [\n imageData[index + 0],\n imageData[index + 1],\n imageData[index + 2],\n imageData[index + 3]\n ];\n};\n\n/**\n * Loads the pixels data for this canvas into the pixels[] attribute.\n * Note that updatePixels() and set() do not work.\n * Any pixel manipulation must be done directly to the pixels[] array.\n *\n * @private\n * @method loadPixels\n *\n */\n\np5.RendererGL.prototype.loadPixels = function() {\n var pixelsState = this._pixelsState;\n if (!pixelsState._pixelsDirty) return;\n pixelsState._pixelsDirty = false;\n\n //@todo_FES\n if (this._pInst._glAttributes.preserveDrawingBuffer !== true) {\n console.log(\n 'loadPixels only works in WebGL when preserveDrawingBuffer ' + 'is true.'\n );\n return;\n }\n\n //if there isn't a renderer-level temporary pixels buffer\n //make a new one\n var pixels = pixelsState.pixels;\n var len = this.GL.drawingBufferWidth * this.GL.drawingBufferHeight * 4;\n if (!(pixels instanceof Uint8Array) || pixels.length !== len) {\n pixels = new Uint8Array(len);\n this._pixelsState._setProperty('pixels', pixels);\n }\n\n var pd = this._pInst._pixelDensity;\n // prettier-ignore\n this.GL.readPixels(\n 0, 0, this.width * pd, this.height * pd,\n this.GL.RGBA, this.GL.UNSIGNED_BYTE,\n pixels\n );\n};\n\n//////////////////////////////////////////////\n// HASH | for geometry\n//////////////////////////////////////////////\n\np5.RendererGL.prototype.geometryInHash = function(gId) {\n return this.gHash[gId] !== undefined;\n};\n\n/**\n * [resize description]\n * @private\n * @param {Number} w [description]\n * @param {Number} h [description]\n */\np5.RendererGL.prototype.resize = function(w, h) {\n p5.Renderer.prototype.resize.call(this, w, h);\n this.GL.viewport(\n 0,\n 0,\n this.GL.drawingBufferWidth,\n this.GL.drawingBufferHeight\n );\n this._viewport = this.GL.getParameter(this.GL.VIEWPORT);\n\n this._curCamera._resize();\n\n //resize pixels buffer\n var pixelsState = this._pixelsState;\n pixelsState._pixelsDirty = true;\n if (typeof pixelsState.pixels !== 'undefined') {\n pixelsState._setProperty(\n 'pixels',\n new Uint8Array(\n this.GL.drawingBufferWidth * this.GL.drawingBufferHeight * 4\n )\n );\n }\n};\n\n/**\n * clears color and depth buffers\n * with r,g,b,a\n * @private\n * @param {Number} r normalized red val.\n * @param {Number} g normalized green val.\n * @param {Number} b normalized blue val.\n * @param {Number} a normalized alpha val.\n */\np5.RendererGL.prototype.clear = function() {\n var _r = arguments[0] || 0;\n var _g = arguments[1] || 0;\n var _b = arguments[2] || 0;\n var _a = arguments[3] || 0;\n this.GL.clearColor(_r, _g, _b, _a);\n this.GL.clear(this.GL.COLOR_BUFFER_BIT | this.GL.DEPTH_BUFFER_BIT);\n this._pixelsState._pixelsDirty = true;\n};\n\np5.RendererGL.prototype.applyMatrix = function(a, b, c, d, e, f) {\n if (arguments.length === 16) {\n p5.Matrix.prototype.apply.apply(this.uMVMatrix, arguments);\n } else {\n // prettier-ignore\n this.uMVMatrix.apply([\n a, b, 0, 0,\n c, d, 0, 0,\n 0, 0, 1, 0,\n e, f, 0, 1,\n ]);\n }\n};\n\n/**\n * [translate description]\n * @private\n * @param {Number} x [description]\n * @param {Number} y [description]\n * @param {Number} z [description]\n * @chainable\n * @todo implement handle for components or vector as args\n */\np5.RendererGL.prototype.translate = function(x, y, z) {\n if (x instanceof p5.Vector) {\n z = x.z;\n y = x.y;\n x = x.x;\n }\n this.uMVMatrix.translate([x, y, z]);\n return this;\n};\n\n/**\n * Scales the Model View Matrix by a vector\n * @private\n * @param {Number | p5.Vector | Array} x [description]\n * @param {Number} [y] y-axis scalar\n * @param {Number} [z] z-axis scalar\n * @chainable\n */\np5.RendererGL.prototype.scale = function(x, y, z) {\n this.uMVMatrix.scale(x, y, z);\n return this;\n};\n\np5.RendererGL.prototype.rotate = function(rad, axis) {\n if (typeof axis === 'undefined') {\n return this.rotateZ(rad);\n }\n p5.Matrix.prototype.rotate.apply(this.uMVMatrix, arguments);\n return this;\n};\n\np5.RendererGL.prototype.rotateX = function(rad) {\n this.rotate(rad, 1, 0, 0);\n return this;\n};\n\np5.RendererGL.prototype.rotateY = function(rad) {\n this.rotate(rad, 0, 1, 0);\n return this;\n};\n\np5.RendererGL.prototype.rotateZ = function(rad) {\n this.rotate(rad, 0, 0, 1);\n return this;\n};\n\np5.RendererGL.prototype.push = function() {\n // get the base renderer style\n var style = p5.Renderer.prototype.push.apply(this);\n\n // add webgl-specific style properties\n var properties = style.properties;\n\n properties.uMVMatrix = this.uMVMatrix.copy();\n properties.uPMatrix = this.uPMatrix.copy();\n properties._curCamera = this._curCamera;\n\n // make a copy of the current camera for the push state\n // this preserves any references stored using 'createCamera'\n this._curCamera = this._curCamera.copy();\n\n properties.ambientLightColors = this.ambientLightColors.slice();\n\n properties.directionalLightDirections = this.directionalLightDirections.slice();\n properties.directionalLightColors = this.directionalLightColors.slice();\n\n properties.pointLightPositions = this.pointLightPositions.slice();\n properties.pointLightColors = this.pointLightColors.slice();\n\n properties.userFillShader = this.userFillShader;\n properties.userStrokeShader = this.userStrokeShader;\n properties.userPointShader = this.userPointShader;\n\n properties.pointSize = this.pointSize;\n properties.curStrokeWeight = this.curStrokeWeight;\n properties.curStrokeColor = this.curStrokeColor;\n properties.curFillColor = this.curFillColor;\n\n properties._useSpecularMaterial = this._useSpecularMaterial;\n properties._useShininess = this._useShininess;\n\n properties._enableLighting = this._enableLighting;\n properties._useNormalMaterial = this._useNormalMaterial;\n properties._tex = this._tex;\n properties.drawMode = this.drawMode;\n\n return style;\n};\n\np5.RendererGL.prototype.resetMatrix = function() {\n this.uMVMatrix = p5.Matrix.identity(this._pInst);\n return this;\n};\n\n//////////////////////////////////////////////\n// SHADER\n//////////////////////////////////////////////\n\n/*\n * shaders are created and cached on a per-renderer basis,\n * on the grounds that each renderer will have its own gl context\n * and the shader must be valid in that context.\n */\n\np5.RendererGL.prototype._getImmediateStrokeShader = function() {\n // select the stroke shader to use\n var stroke = this.userStrokeShader;\n if (!stroke || !stroke.isStrokeShader()) {\n return this._getLineShader();\n }\n return stroke;\n};\n\np5.RendererGL.prototype._getRetainedStrokeShader =\n p5.RendererGL.prototype._getImmediateStrokeShader;\n\n/*\n * selects which fill shader should be used based on renderer state,\n * for use with begin/endShape and immediate vertex mode.\n */\np5.RendererGL.prototype._getImmediateFillShader = function() {\n if (this._useNormalMaterial) {\n return this._getNormalShader();\n }\n\n var fill = this.userFillShader;\n if (this._enableLighting) {\n if (!fill || !fill.isLightShader()) {\n return this._getLightShader();\n }\n } else if (this._tex) {\n if (!fill || !fill.isTextureShader()) {\n return this._getLightShader();\n }\n } else if (!fill /*|| !fill.isColorShader()*/) {\n return this._getImmediateModeShader();\n }\n return fill;\n};\n\n/*\n * selects which fill shader should be used based on renderer state\n * for retained mode.\n */\np5.RendererGL.prototype._getRetainedFillShader = function() {\n if (this._useNormalMaterial) {\n return this._getNormalShader();\n }\n\n var fill = this.userFillShader;\n if (this._enableLighting) {\n if (!fill || !fill.isLightShader()) {\n return this._getLightShader();\n }\n } else if (this._tex) {\n if (!fill || !fill.isTextureShader()) {\n return this._getLightShader();\n }\n } else if (!fill /* || !fill.isColorShader()*/) {\n return this._getColorShader();\n }\n return fill;\n};\n\np5.RendererGL.prototype._getImmediatePointShader = function() {\n // select the point shader to use\n var point = this.userPointShader;\n if (!point || !point.isPointShader()) {\n return this._getPointShader();\n }\n return point;\n};\n\np5.RendererGL.prototype._getRetainedLineShader =\n p5.RendererGL.prototype._getImmediateLineShader;\n\np5.RendererGL.prototype._getLightShader = function() {\n if (!this._defaultLightShader) {\n if (this._pInst._glAttributes.perPixelLighting) {\n this._defaultLightShader = new p5.Shader(\n this,\n defaultShaders.phongVert,\n defaultShaders.phongFrag\n );\n } else {\n this._defaultLightShader = new p5.Shader(\n this,\n defaultShaders.lightVert,\n defaultShaders.lightTextureFrag\n );\n }\n }\n\n return this._defaultLightShader;\n};\n\np5.RendererGL.prototype._getImmediateModeShader = function() {\n if (!this._defaultImmediateModeShader) {\n this._defaultImmediateModeShader = new p5.Shader(\n this,\n defaultShaders.immediateVert,\n defaultShaders.vertexColorFrag\n );\n }\n\n return this._defaultImmediateModeShader;\n};\n\np5.RendererGL.prototype._getNormalShader = function() {\n if (!this._defaultNormalShader) {\n this._defaultNormalShader = new p5.Shader(\n this,\n defaultShaders.normalVert,\n defaultShaders.normalFrag\n );\n }\n\n return this._defaultNormalShader;\n};\n\np5.RendererGL.prototype._getColorShader = function() {\n if (!this._defaultColorShader) {\n this._defaultColorShader = new p5.Shader(\n this,\n defaultShaders.normalVert,\n defaultShaders.basicFrag\n );\n }\n\n return this._defaultColorShader;\n};\n\np5.RendererGL.prototype._getPointShader = function() {\n if (!this._defaultPointShader) {\n this._defaultPointShader = new p5.Shader(\n this,\n defaultShaders.pointVert,\n defaultShaders.pointFrag\n );\n }\n return this._defaultPointShader;\n};\n\np5.RendererGL.prototype._getLineShader = function() {\n if (!this._defaultLineShader) {\n this._defaultLineShader = new p5.Shader(\n this,\n defaultShaders.lineVert,\n defaultShaders.lineFrag\n );\n }\n\n return this._defaultLineShader;\n};\n\np5.RendererGL.prototype._getFontShader = function() {\n if (!this._defaultFontShader) {\n this.GL.getExtension('OES_standard_derivatives');\n this._defaultFontShader = new p5.Shader(\n this,\n defaultShaders.fontVert,\n defaultShaders.fontFrag\n );\n }\n return this._defaultFontShader;\n};\n\np5.RendererGL.prototype._getEmptyTexture = function() {\n if (!this._emptyTexture) {\n // a plain white texture RGBA, full alpha, single pixel.\n var im = new p5.Image(1, 1);\n im.set(0, 0, 255);\n this._emptyTexture = new p5.Texture(this, im);\n }\n return this._emptyTexture;\n};\n\np5.RendererGL.prototype.getTexture = function(img) {\n var textures = this.textures;\n for (var it = 0; it < textures.length; ++it) {\n var texture = textures[it];\n if (texture.src === img) return texture;\n }\n\n var tex = new p5.Texture(this, img);\n textures.push(tex);\n return tex;\n};\n\np5.RendererGL.prototype._setStrokeUniforms = function(strokeShader) {\n strokeShader.bindShader();\n\n // set the uniform values\n strokeShader.setUniform('uMaterialColor', this.curStrokeColor);\n strokeShader.setUniform('uStrokeWeight', this.curStrokeWeight);\n};\n\np5.RendererGL.prototype._setFillUniforms = function(fillShader) {\n fillShader.bindShader();\n\n // TODO: optimize\n fillShader.setUniform('uMaterialColor', this.curFillColor);\n fillShader.setUniform('isTexture', !!this._tex);\n if (this._tex) {\n fillShader.setUniform('uSampler', this._tex);\n }\n fillShader.setUniform('uSpecular', this._useSpecularMaterial);\n fillShader.setUniform('uShininess', this._useShininess);\n\n fillShader.setUniform('uUseLighting', this._enableLighting);\n\n var pointLightCount = this.pointLightColors.length / 3;\n fillShader.setUniform('uPointLightCount', pointLightCount);\n fillShader.setUniform('uPointLightLocation', this.pointLightPositions);\n fillShader.setUniform('uPointLightColor', this.pointLightColors);\n\n var directionalLightCount = this.directionalLightColors.length / 3;\n fillShader.setUniform('uDirectionalLightCount', directionalLightCount);\n fillShader.setUniform('uLightingDirection', this.directionalLightDirections);\n fillShader.setUniform('uDirectionalColor', this.directionalLightColors);\n\n // TODO: sum these here...\n var ambientLightCount = this.ambientLightColors.length / 3;\n fillShader.setUniform('uAmbientLightCount', ambientLightCount);\n fillShader.setUniform('uAmbientColor', this.ambientLightColors);\n fillShader.bindTextures();\n};\n\np5.RendererGL.prototype._setPointUniforms = function(pointShader) {\n pointShader.bindShader();\n\n // set the uniform values\n pointShader.setUniform('uMaterialColor', this.curStrokeColor);\n // @todo is there an instance where this isn't stroke weight?\n // should be they be same var?\n pointShader.setUniform('uPointSize', this.pointSize);\n};\n\n/* Binds a buffer to the drawing context\n * when passed more than two arguments it also updates or initializes\n * the data associated with the buffer\n */\np5.RendererGL.prototype._bindBuffer = function(\n buffer,\n target,\n values,\n type,\n usage\n) {\n this.GL.bindBuffer(target, buffer);\n if (values !== undefined) {\n var data = new type(values);\n this.GL.bufferData(target, data, usage);\n }\n};\n\n///////////////////////////////\n//// UTILITY FUNCTIONS\n//////////////////////////////\n/**\n * turn a two dimensional array into one dimensional array\n * @private\n * @param {Array} arr 2-dimensional array\n * @return {Array} 1-dimensional array\n * [[1, 2, 3],[4, 5, 6]] -> [1, 2, 3, 4, 5, 6]\n */\np5.RendererGL.prototype._flatten = function(arr) {\n //when empty, return empty\n if (arr.length === 0) {\n return [];\n } else if (arr.length > 20000) {\n //big models , load slower to avoid stack overflow\n //faster non-recursive flatten via axelduch\n //stackoverflow.com/questions/27266550/how-to-flatten-nested-array-in-javascript\n var toString = Object.prototype.toString;\n var arrayTypeStr = '[object Array]';\n var result = [];\n var nodes = arr.slice();\n var node;\n node = nodes.pop();\n do {\n if (toString.call(node) === arrayTypeStr) {\n nodes.push.apply(nodes, node);\n } else {\n result.push(node);\n }\n } while (nodes.length && (node = nodes.pop()) !== undefined);\n result.reverse(); // we reverse result to restore the original order\n return result;\n } else {\n //otherwise if model within limits for browser\n //use faster recursive loading\n return [].concat.apply([], arr);\n }\n};\n\n/**\n * turn a p5.Vector Array into a one dimensional number array\n * @private\n * @param {p5.Vector[]} arr an array of p5.Vector\n * @return {Number[]} a one dimensional array of numbers\n * [p5.Vector(1, 2, 3), p5.Vector(4, 5, 6)] ->\n * [1, 2, 3, 4, 5, 6]\n */\np5.RendererGL.prototype._vToNArray = function(arr) {\n return this._flatten(\n arr.map(function(item) {\n return [item.x, item.y, item.z];\n })\n );\n};\n\n/**\n * ensures that p5 is using a 3d renderer. throws an error if not.\n */\np5.prototype._assert3d = function(name) {\n if (!this._renderer.isP3D)\n throw new Error(\n name +\n \"() is only supported in WEBGL mode. If you'd like to use 3D graphics\" +\n ' and WebGL, see https://p5js.org/examples/form-3d-primitives.html' +\n ' for more information.'\n );\n};\n\n// function to initialize GLU Tesselator\n\np5.RendererGL.prototype._initTessy = function initTesselator() {\n // function called for each vertex of tesselator output\n function vertexCallback(data, polyVertArray) {\n polyVertArray[polyVertArray.length] = data[0];\n polyVertArray[polyVertArray.length] = data[1];\n polyVertArray[polyVertArray.length] = data[2];\n }\n\n function begincallback(type) {\n if (type !== libtess.primitiveType.GL_TRIANGLES) {\n console.log('expected TRIANGLES but got type: ' + type);\n }\n }\n\n function errorcallback(errno) {\n console.log('error callback');\n console.log('error number: ' + errno);\n }\n // callback for when segments intersect and must be split\n function combinecallback(coords, data, weight) {\n return [coords[0], coords[1], coords[2]];\n }\n\n function edgeCallback(flag) {\n // don't really care about the flag, but need no-strip/no-fan behavior\n }\n\n var tessy = new libtess.GluTesselator();\n tessy.gluTessCallback(libtess.gluEnum.GLU_TESS_VERTEX_DATA, vertexCallback);\n tessy.gluTessCallback(libtess.gluEnum.GLU_TESS_BEGIN, begincallback);\n tessy.gluTessCallback(libtess.gluEnum.GLU_TESS_ERROR, errorcallback);\n tessy.gluTessCallback(libtess.gluEnum.GLU_TESS_COMBINE, combinecallback);\n tessy.gluTessCallback(libtess.gluEnum.GLU_TESS_EDGE_FLAG, edgeCallback);\n\n return tessy;\n};\n\np5.RendererGL.prototype._triangulate = function(contours) {\n // libtess will take 3d verts and flatten to a plane for tesselation\n // since only doing 2d tesselation here, provide z=1 normal to skip\n // iterating over verts only to get the same answer.\n // comment out to test normal-generation code\n this._tessy.gluTessNormal(0, 0, 1);\n\n var triangleVerts = [];\n this._tessy.gluTessBeginPolygon(triangleVerts);\n\n for (var i = 0; i < contours.length; i++) {\n this._tessy.gluTessBeginContour();\n var contour = contours[i];\n for (var j = 0; j < contour.length; j += 3) {\n var coords = [contour[j], contour[j + 1], contour[j + 2]];\n this._tessy.gluTessVertex(coords, coords);\n }\n this._tessy.gluTessEndContour();\n }\n\n // finish polygon\n this._tessy.gluTessEndPolygon();\n\n return triangleVerts;\n};\n\n// function to calculate BezierVertex Coefficients\np5.RendererGL.prototype._bezierCoefficients = function(t) {\n var t2 = t * t;\n var t3 = t2 * t;\n var mt = 1 - t;\n var mt2 = mt * mt;\n var mt3 = mt2 * mt;\n return [mt3, 3 * mt2 * t, 3 * mt * t2, t3];\n};\n\n// function to calculate QuadraticVertex Coefficients\np5.RendererGL.prototype._quadraticCoefficients = function(t) {\n var t2 = t * t;\n var mt = 1 - t;\n var mt2 = mt * mt;\n return [mt2, 2 * mt * t, t2];\n};\n\n// function to convert Bezier coordinates to Catmull Rom Splines\np5.RendererGL.prototype._bezierToCatmull = function(w) {\n var p1 = w[1];\n var p2 = w[1] + (w[2] - w[0]) / this._curveTightness;\n var p3 = w[2] - (w[3] - w[1]) / this._curveTightness;\n var p4 = w[2];\n var p = [p1, p2, p3, p4];\n return p;\n};\n\nmodule.exports = p5.RendererGL;\n\n},{\"../core/constants\":18,\"../core/main\":24,\"../core/p5.Renderer\":27,\"./p5.Camera\":69,\"./p5.Matrix\":71,\"./p5.Shader\":75,\"libtess\":9}],75:[function(_dereq_,module,exports){\n/**\n * This module defines the p5.Shader class\n * @module Lights, Camera\n * @submodule Shaders\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\n\n/**\n * Shader class for WEBGL Mode\n * @class p5.Shader\n * @param {p5.RendererGL} renderer an instance of p5.RendererGL that\n * will provide the GL context for this new p5.Shader\n * @param {String} vertSrc source code for the vertex shader (as a string)\n * @param {String} fragSrc source code for the fragment shader (as a string)\n */\np5.Shader = function(renderer, vertSrc, fragSrc) {\n // TODO: adapt this to not take ids, but rather,\n // to take the source for a vertex and fragment shader\n // to enable custom shaders at some later date\n this._renderer = renderer;\n this._vertSrc = vertSrc;\n this._fragSrc = fragSrc;\n this._vertShader = -1;\n this._fragShader = -1;\n this._glProgram = 0;\n this._loadedAttributes = false;\n this.attributes = {};\n this._loadedUniforms = false;\n this.uniforms = {};\n this._bound = false;\n this.samplers = [];\n};\n\n/**\n * Creates, compiles, and links the shader based on its\n * sources for the vertex and fragment shaders (provided\n * to the constructor). Populates known attributes and\n * uniforms from the shader.\n * @method init\n * @chainable\n * @private\n */\np5.Shader.prototype.init = function() {\n if (this._glProgram === 0 /* or context is stale? */) {\n var gl = this._renderer.GL;\n\n // @todo: once custom shading is allowed,\n // friendly error messages should be used here to share\n // compiler and linker errors.\n\n //set up the shader by\n // 1. creating and getting a gl id for the shader program,\n // 2. compliling its vertex & fragment sources,\n // 3. linking the vertex and fragment shaders\n this._vertShader = gl.createShader(gl.VERTEX_SHADER);\n //load in our default vertex shader\n gl.shaderSource(this._vertShader, this._vertSrc);\n gl.compileShader(this._vertShader);\n // if our vertex shader failed compilation?\n if (!gl.getShaderParameter(this._vertShader, gl.COMPILE_STATUS)) {\n console.error(\n 'Yikes! An error occurred compiling the vertex shader:' +\n gl.getShaderInfoLog(this._vertShader)\n );\n return null;\n }\n\n this._fragShader = gl.createShader(gl.FRAGMENT_SHADER);\n //load in our material frag shader\n gl.shaderSource(this._fragShader, this._fragSrc);\n gl.compileShader(this._fragShader);\n // if our frag shader failed compilation?\n if (!gl.getShaderParameter(this._fragShader, gl.COMPILE_STATUS)) {\n console.error(\n 'Darn! An error occurred compiling the fragment shader:' +\n gl.getShaderInfoLog(this._fragShader)\n );\n return null;\n }\n\n this._glProgram = gl.createProgram();\n gl.attachShader(this._glProgram, this._vertShader);\n gl.attachShader(this._glProgram, this._fragShader);\n gl.linkProgram(this._glProgram);\n if (!gl.getProgramParameter(this._glProgram, gl.LINK_STATUS)) {\n console.error(\n 'Snap! Error linking shader program: ' +\n gl.getProgramInfoLog(this._glProgram)\n );\n }\n\n this._loadAttributes();\n this._loadUniforms();\n }\n return this;\n};\n\n/**\n * Queries the active attributes for this shader and loads\n * their names and locations into the attributes array.\n * @method _loadAttributes\n * @private\n */\np5.Shader.prototype._loadAttributes = function() {\n if (this._loadedAttributes) {\n return;\n }\n\n this.attributes = {};\n\n var gl = this._renderer.GL;\n\n var numAttributes = gl.getProgramParameter(\n this._glProgram,\n gl.ACTIVE_ATTRIBUTES\n );\n for (var i = 0; i < numAttributes; ++i) {\n var attributeInfo = gl.getActiveAttrib(this._glProgram, i);\n var name = attributeInfo.name;\n var location = gl.getAttribLocation(this._glProgram, name);\n var attribute = {};\n attribute.name = name;\n attribute.location = location;\n attribute.type = attributeInfo.type;\n attribute.size = attributeInfo.size;\n this.attributes[name] = attribute;\n }\n\n this._loadedAttributes = true;\n};\n\n/**\n * Queries the active uniforms for this shader and loads\n * their names and locations into the uniforms array.\n * @method _loadUniforms\n * @private\n */\np5.Shader.prototype._loadUniforms = function() {\n if (this._loadedUniforms) {\n return;\n }\n\n var gl = this._renderer.GL;\n\n // Inspect shader and cache uniform info\n var numUniforms = gl.getProgramParameter(this._glProgram, gl.ACTIVE_UNIFORMS);\n\n var samplerIndex = 0;\n for (var i = 0; i < numUniforms; ++i) {\n var uniformInfo = gl.getActiveUniform(this._glProgram, i);\n var uniform = {};\n uniform.location = gl.getUniformLocation(this._glProgram, uniformInfo.name);\n uniform.size = uniformInfo.size;\n var uniformName = uniformInfo.name;\n //uniforms thats are arrays have their name returned as\n //someUniform[0] which is a bit silly so we trim it\n //off here. The size property tells us that its an array\n //so we dont lose any information by doing this\n if (uniformInfo.size > 1) {\n uniformName = uniformName.substring(0, uniformName.indexOf('[0]'));\n }\n uniform.name = uniformName;\n uniform.type = uniformInfo.type;\n if (uniform.type === gl.SAMPLER_2D) {\n uniform.samplerIndex = samplerIndex;\n samplerIndex++;\n this.samplers.push(uniform);\n }\n this.uniforms[uniformName] = uniform;\n }\n this._loadedUniforms = true;\n};\n\np5.Shader.prototype.compile = function() {\n // TODO\n};\n\n/**\n * initializes (if needed) and binds the shader program.\n * @method bindShader\n * @private\n */\np5.Shader.prototype.bindShader = function() {\n this.init();\n if (!this._bound) {\n this.useProgram();\n this._bound = true;\n\n this._setMatrixUniforms();\n\n this.setUniform('uViewport', this._renderer._viewport);\n }\n};\n\n/**\n * @method unbindShader\n * @chainable\n * @private\n */\np5.Shader.prototype.unbindShader = function() {\n if (this._bound) {\n this.unbindTextures();\n //this._renderer.GL.useProgram(0); ??\n this._bound = false;\n }\n return this;\n};\n\np5.Shader.prototype.bindTextures = function() {\n var gl = this._renderer.GL;\n for (var i = 0; i < this.samplers.length; i++) {\n var uniform = this.samplers[i];\n var tex = uniform.texture;\n if (tex === undefined) {\n // user hasn't yet supplied a texture for this slot.\n // (or there may not be one--maybe just lighting),\n // so we supply a default texture instead.\n tex = this._renderer._getEmptyTexture();\n }\n gl.activeTexture(gl.TEXTURE0 + uniform.samplerIndex);\n tex.bindTexture();\n tex.update();\n gl.uniform1i(uniform.location, uniform.samplerIndex);\n }\n};\n\np5.Shader.prototype.updateTextures = function() {\n for (var i = 0; i < this.samplers.length; i++) {\n var uniform = this.samplers[i];\n var tex = uniform.texture;\n if (tex) {\n tex.update();\n }\n }\n};\n\np5.Shader.prototype.unbindTextures = function() {\n // TODO: migrate stuff from material.js here\n // - OR - have material.js define this function\n};\n\np5.Shader.prototype._setMatrixUniforms = function() {\n this.setUniform('uProjectionMatrix', this._renderer.uPMatrix.mat4);\n this.setUniform('uModelViewMatrix', this._renderer.uMVMatrix.mat4);\n this.setUniform('uViewMatrix', this._renderer._curCamera.cameraMatrix.mat4);\n if (this.uniforms.uNormalMatrix) {\n this._renderer.uNMatrix.inverseTranspose(this._renderer.uMVMatrix);\n this.setUniform('uNormalMatrix', this._renderer.uNMatrix.mat3);\n }\n};\n\n/**\n * @method useProgram\n * @chainable\n * @private\n */\np5.Shader.prototype.useProgram = function() {\n var gl = this._renderer.GL;\n gl.useProgram(this._glProgram);\n return this;\n};\n\n/**\n * Wrapper around gl.uniform functions.\n * As we store uniform info in the shader we can use that\n * to do type checking on the supplied data and call\n * the appropriate function.\n * @method setUniform\n * @chainable\n * @param {String} uniformName the name of the uniform in the\n * shader program\n * @param {Object|Number|Boolean|Number[]} data the data to be associated\n * with that uniform; type varies (could be a single numerical value, array,\n * matrix, or texture / sampler reference)\n */\np5.Shader.prototype.setUniform = function(uniformName, data) {\n //@todo update all current gl.uniformXX calls\n\n var uniform = this.uniforms[uniformName];\n if (!uniform) {\n return;\n }\n\n var location = uniform.location;\n\n var gl = this._renderer.GL;\n this.useProgram();\n\n switch (uniform.type) {\n case gl.BOOL:\n if (data === true) {\n gl.uniform1i(location, 1);\n } else {\n gl.uniform1i(location, 0);\n }\n break;\n case gl.INT:\n if (uniform.size > 1) {\n data.length && gl.uniform1iv(location, data);\n } else {\n gl.uniform1i(location, data);\n }\n break;\n case gl.FLOAT:\n if (uniform.size > 1) {\n data.length && gl.uniform1fv(location, data);\n } else {\n gl.uniform1f(location, data);\n }\n break;\n case gl.FLOAT_MAT3:\n gl.uniformMatrix3fv(location, false, data);\n break;\n case gl.FLOAT_MAT4:\n gl.uniformMatrix4fv(location, false, data);\n break;\n case gl.FLOAT_VEC2:\n if (uniform.size > 1) {\n data.length && gl.uniform2fv(location, data);\n } else {\n gl.uniform2f(location, data[0], data[1]);\n }\n break;\n case gl.FLOAT_VEC3:\n if (uniform.size > 1) {\n data.length && gl.uniform3fv(location, data);\n } else {\n gl.uniform3f(location, data[0], data[1], data[2]);\n }\n break;\n case gl.FLOAT_VEC4:\n if (uniform.size > 1) {\n data.length && gl.uniform4fv(location, data);\n } else {\n gl.uniform4f(location, data[0], data[1], data[2], data[3]);\n }\n break;\n case gl.INT_VEC2:\n if (uniform.size > 1) {\n data.length && gl.uniform2iv(location, data);\n } else {\n gl.uniform2i(location, data[0], data[1]);\n }\n break;\n case gl.INT_VEC3:\n if (uniform.size > 1) {\n data.length && gl.uniform3iv(location, data);\n } else {\n gl.uniform3i(location, data[0], data[1], data[2]);\n }\n break;\n case gl.INT_VEC4:\n if (uniform.size > 1) {\n data.length && gl.uniform4iv(location, data);\n } else {\n gl.uniform4i(location, data[0], data[1], data[2], data[3]);\n }\n break;\n case gl.SAMPLER_2D:\n gl.activeTexture(gl.TEXTURE0 + uniform.samplerIndex);\n uniform.texture = this._renderer.getTexture(data);\n gl.uniform1i(uniform.location, uniform.samplerIndex);\n break;\n //@todo complete all types\n }\n return this;\n};\n\n/* NONE OF THIS IS FAST OR EFFICIENT BUT BEAR WITH ME\n *\n * these shader \"type\" query methods are used by various\n * facilities of the renderer to determine if changing\n * the shader type for the required action (for example,\n * do we need to load the default lighting shader if the\n * current shader cannot handle lighting?)\n *\n **/\n\np5.Shader.prototype.isLightShader = function() {\n return (\n this.attributes.aNormal !== undefined ||\n this.uniforms.uUseLighting !== undefined ||\n this.uniforms.uAmbientLightCount !== undefined ||\n this.uniforms.uDirectionalLightCount !== undefined ||\n this.uniforms.uPointLightCount !== undefined ||\n this.uniforms.uAmbientColor !== undefined ||\n this.uniforms.uDirectionalColor !== undefined ||\n this.uniforms.uPointLightLocation !== undefined ||\n this.uniforms.uPointLightColor !== undefined ||\n this.uniforms.uLightingDirection !== undefined ||\n this.uniforms.uSpecular !== undefined\n );\n};\n\np5.Shader.prototype.isTextureShader = function() {\n return this.samplerIndex > 0;\n};\n\np5.Shader.prototype.isColorShader = function() {\n return (\n this.attributes.aVertexColor !== undefined ||\n this.uniforms.uMaterialColor !== undefined\n );\n};\n\np5.Shader.prototype.isTexLightShader = function() {\n return this.isLightShader() && this.isTextureShader();\n};\n\np5.Shader.prototype.isStrokeShader = function() {\n return this.uniforms.uStrokeWeight !== undefined;\n};\n\n/**\n * @method enableAttrib\n * @chainable\n * @private\n */\np5.Shader.prototype.enableAttrib = function(\n loc,\n size,\n type,\n normalized,\n stride,\n offset\n) {\n var gl = this._renderer.GL;\n if (loc !== -1) {\n gl.enableVertexAttribArray(loc);\n gl.vertexAttribPointer(loc, size, type, normalized, stride, offset);\n }\n return this;\n};\n\nmodule.exports = p5.Shader;\n\n},{\"../core/main\":24}],76:[function(_dereq_,module,exports){\n/**\n * This module defines the p5.Texture class\n * @module Lights, Camera\n * @submodule Material\n * @for p5\n * @requires core\n */\n\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n\n/**\n * Texture class for WEBGL Mode\n * @private\n * @class p5.Texture\n * @param {p5.RendererGL} renderer an instance of p5.RendererGL that\n * will provide the GL context for this new p5.Texture\n * @param {p5.Image|p5.Graphics|p5.Element|p5.MediaElement|ImageData} [obj] the\n * object containing the image data to store in the texture.\n */\np5.Texture = function(renderer, obj) {\n this._renderer = renderer;\n\n var gl = this._renderer.GL;\n\n this.src = obj;\n this.glTex = undefined;\n this.glTarget = gl.TEXTURE_2D;\n this.glFormat = gl.RGBA;\n this.mipmaps = false;\n this.glMinFilter = gl.LINEAR;\n this.glMagFilter = gl.LINEAR;\n this.glWrapS = gl.CLAMP_TO_EDGE;\n this.glWrapT = gl.CLAMP_TO_EDGE;\n\n // used to determine if this texture might need constant updating\n // because it is a video or gif.\n this.isSrcMediaElement =\n typeof p5.MediaElement !== 'undefined' && obj instanceof p5.MediaElement;\n this._videoPrevUpdateTime = 0;\n this.isSrcHTMLElement =\n typeof p5.Element !== 'undefined' &&\n obj instanceof p5.Element &&\n !(obj instanceof p5.Graphics);\n this.isSrcP5Image = obj instanceof p5.Image;\n this.isSrcP5Graphics = obj instanceof p5.Graphics;\n this.isImageData =\n typeof ImageData !== 'undefined' && obj instanceof ImageData;\n\n var textureData = this._getTextureDataFromSource();\n this.width = textureData.width;\n this.height = textureData.height;\n\n this.init(textureData);\n return this;\n};\n\np5.Texture.prototype._getTextureDataFromSource = function() {\n var textureData;\n if (this.isSrcP5Image) {\n // param is a p5.Image\n textureData = this.src.canvas;\n } else if (\n this.isSrcMediaElement ||\n this.isSrcP5Graphics ||\n this.isSrcHTMLElement\n ) {\n // if param is a video HTML element\n textureData = this.src.elt;\n } else if (this.isImageData) {\n textureData = this.src;\n }\n return textureData;\n};\n\n/**\n * Initializes common texture parameters, creates a gl texture,\n * tries to upload the texture for the first time if data is\n * already available.\n * @private\n * @method init\n */\np5.Texture.prototype.init = function(data) {\n var gl = this._renderer.GL;\n this.glTex = gl.createTexture();\n\n this.glWrapS = this._renderer.textureWrapX;\n this.glWrapT = this._renderer.textureWrapY;\n\n this.setWrapMode(this.glWrapS, this.glWrapT);\n this.bindTexture();\n\n //gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, this.glMagFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this.glMinFilter);\n\n if (\n this.width === 0 ||\n this.height === 0 ||\n (this.isSrcMediaElement && !this.src.loadedmetadata)\n ) {\n // assign a 1x1 empty texture initially, because data is not yet ready,\n // so that no errors occur in gl console!\n var tmpdata = new Uint8Array([1, 1, 1, 1]);\n gl.texImage2D(\n this.glTarget,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n this.glFormat,\n gl.UNSIGNED_BYTE,\n tmpdata\n );\n } else {\n // data is ready: just push the texture!\n gl.texImage2D(\n this.glTarget,\n 0,\n this.glFormat,\n this.glFormat,\n gl.UNSIGNED_BYTE,\n data\n );\n }\n};\n\n/**\n * Checks if the source data for this texture has changed (if it's\n * easy to do so) and reuploads the texture if necessary. If it's not\n * possible or to expensive to do a calculation to determine wheter or\n * not the data has occurred, this method simply re-uploads the texture.\n * @method update\n */\np5.Texture.prototype.update = function() {\n var data = this.src;\n if (data.width === 0 || data.height === 0) {\n return false; // nothing to do!\n }\n\n var textureData = this._getTextureDataFromSource();\n var updated = false;\n\n var gl = this._renderer.GL;\n // pull texture from data, make sure width & height are appropriate\n if (textureData.width !== this.width || textureData.height !== this.height) {\n updated = true;\n\n // make sure that if the width and height of this.src have changed\n // for some reason, we update our metadata and upload the texture again\n this.width = textureData.width;\n this.height = textureData.height;\n\n if (this.isSrcP5Image) {\n data.setModified(false);\n } else if (this.isSrcMediaElement || this.isSrcHTMLElement) {\n // on the first frame the metadata comes in, the size will be changed\n // from 0 to actual size, but pixels may not be available.\n // flag for update in a future frame.\n // if we don't do this, a paused video, for example, may not\n // send the first frame to texture memory.\n data.setModified(true);\n }\n } else if (this.isSrcP5Image) {\n // for an image, we only update if the modified field has been set,\n // for example, by a call to p5.Image.set\n if (data.isModified()) {\n updated = true;\n data.setModified(false);\n }\n } else if (this.isSrcMediaElement) {\n // for a media element (video), we'll check if the current time in\n // the video frame matches the last time. if it doesn't match, the\n // video has advanced or otherwise been taken to a new frame,\n // and we need to upload it.\n if (data.isModified()) {\n // p5.MediaElement may have also had set/updatePixels, etc. called\n // on it and should be updated, or may have been set for the first\n // time!\n updated = true;\n data.setModified(false);\n } else if (data.loadedmetadata) {\n // if the meta data has been loaded, we can ask the video\n // what it's current position (in time) is.\n if (this._videoPrevUpdateTime !== data.time()) {\n // update the texture in gpu mem only if the current\n // video timestamp does not match the timestamp of the last\n // time we uploaded this texture (and update the time we\n // last uploaded, too)\n this._videoPrevUpdateTime = data.time();\n updated = true;\n }\n }\n } else if (this.isImageData) {\n if (data._dirty) {\n data._dirty = false;\n updated = true;\n }\n } else {\n /* data instanceof p5.Graphics, probably */\n // there is not enough information to tell if the texture can be\n // conditionally updated; so to be safe, we just go ahead and upload it.\n updated = true;\n }\n\n if (updated) {\n this.bindTexture();\n gl.texImage2D(\n this.glTarget,\n 0,\n this.glFormat,\n this.glFormat,\n gl.UNSIGNED_BYTE,\n textureData\n );\n }\n\n return updated;\n};\n\n/**\n * Binds the texture to the appropriate GL target.\n * @method bindTexture\n */\np5.Texture.prototype.bindTexture = function() {\n // bind texture using gl context + glTarget and\n // generated gl texture object\n var gl = this._renderer.GL;\n gl.bindTexture(this.glTarget, this.glTex);\n\n return this;\n};\n\n/**\n * Unbinds the texture from the appropriate GL target.\n * @method unbindTexture\n */\np5.Texture.prototype.unbindTexture = function() {\n // unbind per above, disable texturing on glTarget\n var gl = this._renderer.GL;\n gl.bindTexture(this.glTarget, null);\n};\n\n/**\n * Sets how a texture is be interpolated when upscaled or downscaled.\n * Nearest filtering uses nearest neighbor scaling when interpolating\n * Linear filtering uses WebGL's linear scaling when interpolating\n * @method setInterpolation\n * @param {String} downScale Specifies the texture filtering when\n * textures are shrunk. Options are LINEAR or NEAREST\n * @param {String} upScale Specifies the texture filtering when\n * textures are magnified. Options are LINEAR or NEAREST\n * @todo implement mipmapping filters\n */\np5.Texture.prototype.setInterpolation = function(downScale, upScale) {\n var gl = this._renderer.GL;\n\n if (downScale === constants.NEAREST) {\n this.glMinFilter = gl.NEAREST;\n } else {\n this.glMinFilter = gl.LINEAR;\n }\n\n if (upScale === constants.NEAREST) {\n this.glMagFilter = gl.NEAREST;\n } else {\n this.glMagFilter = gl.LINEAR;\n }\n\n this.bindTexture();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, this.glMinFilter);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, this.glMagFilter);\n this.unbindTexture();\n};\n\n/**\n * Sets the texture wrapping mode. This controls how textures behave\n * when their uv's go outside of the 0 - 1 range. There are three options:\n * CLAMP, REPEAT, and MIRROR. REPEAT & MIRROR are only available if the texture\n * is a power of two size (128, 256, 512, 1024, etc.).\n * @method setWrapMode\n * @param {String} wrapX Controls the horizontal texture wrapping behavior\n * @param {String} wrapY Controls the vertical texture wrapping behavior\n */\np5.Texture.prototype.setWrapMode = function(wrapX, wrapY) {\n var gl = this._renderer.GL;\n\n // for webgl 1 we need to check if the texture is power of two\n // if it isn't we will set the wrap mode to CLAMP\n // webgl2 will support npot REPEAT and MIRROR but we don't check for it yet\n var isPowerOfTwo = function(x) {\n return (x & (x - 1)) === 0;\n };\n\n var widthPowerOfTwo = isPowerOfTwo(this.width);\n var heightPowerOfTwo = isPowerOfTwo(this.height);\n\n if (wrapX === constants.REPEAT) {\n if (widthPowerOfTwo && heightPowerOfTwo) {\n this.glWrapS = gl.REPEAT;\n } else {\n console.warn(\n 'You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead'\n );\n this.glWrapS = gl.CLAMP_TO_EDGE;\n }\n } else if (wrapX === constants.MIRROR) {\n if (widthPowerOfTwo && heightPowerOfTwo) {\n this.glWrapS = gl.MIRRORED_REPEAT;\n } else {\n console.warn(\n 'You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead'\n );\n this.glWrapS = gl.CLAMP_TO_EDGE;\n }\n } else {\n // falling back to default if didn't get a proper mode\n this.glWrapS = gl.CLAMP_TO_EDGE;\n }\n\n if (wrapY === constants.REPEAT) {\n if (widthPowerOfTwo && heightPowerOfTwo) {\n this.glWrapT = gl.REPEAT;\n } else {\n console.warn(\n 'You tried to set the wrap mode to REPEAT but the texture size is not a power of two. Setting to CLAMP instead'\n );\n this.glWrapT = gl.CLAMP_TO_EDGE;\n }\n } else if (wrapY === constants.MIRROR) {\n if (widthPowerOfTwo && heightPowerOfTwo) {\n this.glWrapT = gl.MIRRORED_REPEAT;\n } else {\n console.warn(\n 'You tried to set the wrap mode to MIRROR but the texture size is not a power of two. Setting to CLAMP instead'\n );\n this.glWrapT = gl.CLAMP_TO_EDGE;\n }\n } else {\n // falling back to default if didn't get a proper mode\n this.glWrapT = gl.CLAMP_TO_EDGE;\n }\n\n this.bindTexture();\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, this.glWrapS);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, this.glWrapT);\n this.unbindTexture();\n};\n\nmodule.exports = p5.Texture;\n\n},{\"../core/constants\":18,\"../core/main\":24}],77:[function(_dereq_,module,exports){\n'use strict';\n\nvar p5 = _dereq_('../core/main');\nvar constants = _dereq_('../core/constants');\n_dereq_('./p5.Shader');\n_dereq_('./p5.RendererGL');\n\n// Text/Typography\n// @TODO:\np5.RendererGL.prototype._applyTextProperties = function() {\n //@TODO finish implementation\n //console.error('text commands not yet implemented in webgl');\n};\n\np5.RendererGL.prototype.textWidth = function(s) {\n if (this._isOpenType()) {\n return this._textFont._textWidth(s, this._textSize);\n }\n\n return 0; // TODO: error\n};\n\n// rendering constants\n\n// the number of rows/columns dividing each glyph\nvar charGridWidth = 9;\nvar charGridHeight = charGridWidth;\n\n// size of the image holding the bezier stroke info\nvar strokeImageWidth = 64;\nvar strokeImageHeight = 64;\n\n// size of the image holding the stroke indices for each row/col\nvar gridImageWidth = 64;\nvar gridImageHeight = 64;\n\n// size of the image holding the offset/length of each row/col stripe\nvar cellImageWidth = 64;\nvar cellImageHeight = 64;\n\n/**\n * @private\n * @class ImageInfos\n * @param {Integer} width\n * @param {Integer} height\n *\n * the ImageInfos class holds a list of ImageDatas of a given size.\n */\nfunction ImageInfos(width, height) {\n this.width = width;\n this.height = height;\n this.infos = []; // the list of images\n\n /**\n *\n * @method findImage\n * @param {Integer} space\n * @return {Object} contains the ImageData, and pixel index into that\n * ImageData where the free space was allocated.\n *\n * finds free space of a given size in the ImageData list\n */\n this.findImage = function(space) {\n var imageSize = this.width * this.height;\n if (space > imageSize)\n throw new Error('font is too complex to render in 3D');\n\n // search through the list of images, looking for one with\n // anough unused space.\n var imageInfo, imageData;\n for (var ii = this.infos.length - 1; ii >= 0; --ii) {\n var imageInfoTest = this.infos[ii];\n if (imageInfoTest.index + space < imageSize) {\n // found one\n imageInfo = imageInfoTest;\n imageData = imageInfoTest.imageData;\n break;\n }\n }\n\n if (!imageInfo) {\n try {\n // create a new image\n imageData = new ImageData(this.width, this.height);\n } catch (err) {\n // for browsers that don't support ImageData constructors (ie IE11)\n // create an ImageData using the old method\n var canvas = document.getElementsByTagName('canvas')[0];\n var created = !canvas;\n if (!canvas) {\n // create a temporary canvas\n canvas = document.createElement('canvas');\n canvas.style.display = 'none';\n document.body.appendChild(canvas);\n }\n var ctx = canvas.getContext('2d');\n if (ctx) {\n imageData = ctx.createImageData(this.width, this.height);\n }\n if (created) {\n // distroy the temporary canvas, if necessary\n document.body.removeChild(canvas);\n }\n }\n // construct & dd the new image info\n imageInfo = { index: 0, imageData: imageData };\n this.infos.push(imageInfo);\n }\n\n var index = imageInfo.index;\n imageInfo.index += space; // move to the start of the next image\n imageData._dirty = true;\n return { imageData: imageData, index: index };\n };\n}\n\n/**\n * @function setPixel\n * @param {Object} imageInfo\n * @param {Number} r\n * @param {Number} g\n * @param {Number} b\n * @param {Number} a\n *\n * writes the next pixel into an indexed ImageData\n */\nfunction setPixel(imageInfo, r, g, b, a) {\n var imageData = imageInfo.imageData;\n var pixels = imageData.data;\n var index = imageInfo.index++ * 4;\n pixels[index++] = r;\n pixels[index++] = g;\n pixels[index++] = b;\n pixels[index++] = a;\n}\n\nvar SQRT3 = Math.sqrt(3);\n\n/**\n * @private\n * @class FontInfo\n * @param {Object} font an opentype.js font object\n *\n * contains cached images and glyph information for an opentype font\n */\nvar FontInfo = function(font) {\n this.font = font;\n // the bezier curve coordinates\n this.strokeImageInfos = new ImageInfos(strokeImageWidth, strokeImageHeight);\n // lists of curve indices for each row/column slice\n this.colDimImageInfos = new ImageInfos(gridImageWidth, gridImageHeight);\n this.rowDimImageInfos = new ImageInfos(gridImageWidth, gridImageHeight);\n // the offset & length of each row/col slice in the glyph\n this.colCellImageInfos = new ImageInfos(cellImageWidth, cellImageHeight);\n this.rowCellImageInfos = new ImageInfos(cellImageWidth, cellImageHeight);\n\n // the cached information for each glyph\n this.glyphInfos = {};\n\n /**\n * @method getGlyphInfo\n * @param {Glyph} glyph the x positions of points in the curve\n * @returns {Object} the glyphInfo for that glyph\n *\n * calculates rendering info for a glyph, including the curve information,\n * row & column stripes compiled into textures.\n */\n\n this.getGlyphInfo = function(glyph) {\n // check the cache\n var gi = this.glyphInfos[glyph.index];\n if (gi) return gi;\n\n // get the bounding box of the glyph from opentype.js\n var bb = glyph.getBoundingBox();\n var xMin = bb.x1;\n var yMin = bb.y1;\n var gWidth = bb.x2 - xMin;\n var gHeight = bb.y2 - yMin;\n var cmds = glyph.path.commands;\n // don't bother rendering invisible glyphs\n if (gWidth === 0 || gHeight === 0 || !cmds.length) {\n return (this.glyphInfos[glyph.index] = {});\n }\n\n var i;\n var strokes = []; // the strokes in this glyph\n var rows = []; // the indices of strokes in each row\n var cols = []; // the indices of strokes in each column\n for (i = charGridWidth - 1; i >= 0; --i) cols.push([]);\n for (i = charGridHeight - 1; i >= 0; --i) rows.push([]);\n\n /**\n * @function push\n * @param {Number[]} xs the x positions of points in the curve\n * @param {Number[]} ys the y positions of points in the curve\n * @param {Object} v the curve information\n *\n * adds a curve to the rows & columns that it intersects with\n */\n function push(xs, ys, v) {\n var index = strokes.length; // the index of this stroke\n strokes.push(v); // add this stroke to the list\n\n /**\n * @function minMax\n * @param {Number[]} rg the list of values to compare\n * @param {Number} min the initial minimum value\n * @param {Number} max the initial maximum value\n *\n * find the minimum & maximum value in a list of values\n */\n function minMax(rg, min, max) {\n for (var i = rg.length; i-- > 0; ) {\n var v = rg[i];\n if (min > v) min = v;\n if (max < v) max = v;\n }\n return { min: min, max: max };\n }\n\n // loop through the rows & columns that the curve intersects\n // adding the curve to those slices\n var mmX = minMax(xs, 1, 0);\n var ixMin = Math.max(Math.floor(mmX.min * charGridWidth), 0);\n var ixMax = Math.min(Math.ceil(mmX.max * charGridWidth), charGridWidth);\n for (var iCol = ixMin; iCol < ixMax; ++iCol) cols[iCol].push(index);\n\n var mmY = minMax(ys, 1, 0);\n var iyMin = Math.max(Math.floor(mmY.min * charGridHeight), 0);\n var iyMax = Math.min(Math.ceil(mmY.max * charGridHeight), charGridHeight);\n for (var iRow = iyMin; iRow < iyMax; ++iRow) rows[iRow].push(index);\n }\n\n /**\n * @function clamp\n * @param {Number} v the value to clamp\n * @param {Number} min the minimum value\n * @param {Number} max the maxmimum value\n *\n * clamps a value between a minimum & maximum value\n */\n function clamp(v, min, max) {\n if (v < min) return min;\n if (v > max) return max;\n return v;\n }\n\n /**\n * @function byte\n * @param {Number} v the value to scale\n *\n * converts a floating-point number in the range 0-1 to a byte 0-255\n */\n function byte(v) {\n return clamp(255 * v, 0, 255);\n }\n\n /**\n * @private\n * @class Cubic\n * @param {Number} p0 the start point of the curve\n * @param {Number} c0 the first control point\n * @param {Number} c1 the second control point\n * @param {Number} p1 the end point\n *\n * a cubic curve\n */\n function Cubic(p0, c0, c1, p1) {\n this.p0 = p0;\n this.c0 = c0;\n this.c1 = c1;\n this.p1 = p1;\n\n /**\n * @method toQuadratic\n * @return {Object} the quadratic approximation\n *\n * converts the cubic to a quadtratic approximation by\n * picking an appropriate quadratic control point\n */\n this.toQuadratic = function() {\n return {\n x: this.p0.x,\n y: this.p0.y,\n x1: this.p1.x,\n y1: this.p1.y,\n cx: ((this.c0.x + this.c1.x) * 3 - (this.p0.x + this.p1.x)) / 4,\n cy: ((this.c0.y + this.c1.y) * 3 - (this.p0.y + this.p1.y)) / 4\n };\n };\n\n /**\n * @method quadError\n * @return {Number} the error\n *\n * calculates the magnitude of error of this curve's\n * quadratic approximation.\n */\n this.quadError = function() {\n return (\n p5.Vector.sub(\n p5.Vector.sub(this.p1, this.p0),\n p5.Vector.mult(p5.Vector.sub(this.c1, this.c0), 3)\n ).mag() / 2\n );\n };\n\n /**\n * @method split\n * @param {Number} t the value (0-1) at which to split\n * @return {Cubic} the second part of the curve\n *\n * splits the cubic into two parts at a point 't' along the curve.\n * this cubic keeps its start point and its end point becomes the\n * point at 't'. the 'end half is returned.\n */\n this.split = function(t) {\n var m1 = p5.Vector.lerp(this.p0, this.c0, t);\n var m2 = p5.Vector.lerp(this.c0, this.c1, t);\n var mm1 = p5.Vector.lerp(m1, m2, t);\n\n this.c1 = p5.Vector.lerp(this.c1, this.p1, t);\n this.c0 = p5.Vector.lerp(m2, this.c1, t);\n var pt = p5.Vector.lerp(mm1, this.c0, t);\n var part1 = new Cubic(this.p0, m1, mm1, pt);\n this.p0 = pt;\n return part1;\n };\n\n /**\n * @method splitInflections\n * @return {Cubic[]} the non-inflecting pieces of this cubic\n *\n * returns an array containing 0, 1 or 2 cubics split resulting\n * from splitting this cubic at its inflection points.\n * this cubic is (potentially) altered and returned in the list.\n */\n this.splitInflections = function() {\n var a = p5.Vector.sub(this.c0, this.p0);\n var b = p5.Vector.sub(p5.Vector.sub(this.c1, this.c0), a);\n var c = p5.Vector.sub(\n p5.Vector.sub(p5.Vector.sub(this.p1, this.c1), a),\n p5.Vector.mult(b, 2)\n );\n\n var cubics = [];\n\n // find the derivative coefficients\n var A = b.x * c.y - b.y * c.x;\n if (A !== 0) {\n var B = a.x * c.y - a.y * c.x;\n var C = a.x * b.y - a.y * b.x;\n var disc = B * B - 4 * A * C;\n if (disc >= 0) {\n if (A < 0) {\n A = -A;\n B = -B;\n C = -C;\n }\n\n var Q = Math.sqrt(disc);\n var t0 = (-B - Q) / (2 * A); // the first inflection point\n var t1 = (-B + Q) / (2 * A); // the second inflection point\n\n // test if the first inflection point lies on the curve\n if (t0 > 0 && t0 < 1) {\n // split at the first inflection point\n cubics.push(this.split(t0));\n // scale t2 into the second part\n t1 = 1 - (1 - t1) / (1 - t0);\n }\n\n // test if the second inflection point lies on the curve\n if (t1 > 0 && t1 < 1) {\n // split at the second inflection point\n cubics.push(this.split(t1));\n }\n }\n }\n\n cubics.push(this);\n return cubics;\n };\n }\n\n /**\n * @function cubicToQuadratics\n * @param {Number} x0\n * @param {Number} y0\n * @param {Number} cx0\n * @param {Number} cy0\n * @param {Number} cx1\n * @param {Number} cy1\n * @param {Number} x1\n * @param {Number} y1\n * @returns {Cubic[]} an array of cubics whose quadratic approximations\n * closely match the civen cubic.\n *\n * converts a cubic curve to a list of quadratics.\n */\n function cubicToQuadratics(x0, y0, cx0, cy0, cx1, cy1, x1, y1) {\n // create the Cubic object and split it at its inflections\n var cubics = new Cubic(\n new p5.Vector(x0, y0),\n new p5.Vector(cx0, cy0),\n new p5.Vector(cx1, cy1),\n new p5.Vector(x1, y1)\n ).splitInflections();\n\n var qs = []; // the final list of quadratics\n var precision = 30 / SQRT3;\n\n // for each of the non-inflected pieces of the original cubic\n for (var i = 0; i < cubics.length; i++) {\n var cubic = cubics[i];\n\n // the cubic is iteratively split in 3 pieces:\n // the first piece is accumulated in 'qs', the result.\n // the last piece is accumulated in 'tail', temporarily.\n // the middle piece is repeatedly split again, while necessary.\n var tail = [];\n\n var t3;\n for (;;) {\n // calculate this cubic's precision\n t3 = precision / cubic.quadError();\n if (t3 >= 0.5 * 0.5 * 0.5) {\n break; // not too bad, we're done\n }\n\n // find a split point based on the error\n var t = Math.pow(t3, 1.0 / 3.0);\n // split the cubic in 3\n var start = cubic.split(t);\n var middle = cubic.split(1 - t / (1 - t));\n\n qs.push(start); // the first part\n tail.push(cubic); // the last part\n cubic = middle; // iterate on the middle piece\n }\n\n if (t3 < 1) {\n // a little excess error, split the middle in two\n qs.push(cubic.split(0.5));\n }\n // add the middle piece to the result\n qs.push(cubic);\n\n // finally add the tail, reversed, onto the result\n Array.prototype.push.apply(qs, tail.reverse());\n }\n\n return qs;\n }\n\n /**\n * @function pushLine\n * @param {Number} x0\n * @param {Number} y0\n * @param {Number} x1\n * @param {Number} y1\n *\n * add a straight line to the row/col grid of a glyph\n */\n function pushLine(x0, y0, x1, y1) {\n var mx = (x0 + x1) / 2;\n var my = (y0 + y1) / 2;\n push([x0, x1], [y0, y1], { x: x0, y: y0, cx: mx, cy: my });\n }\n\n /**\n * @function samePoint\n * @param {Number} x0\n * @param {Number} y0\n * @param {Number} x1\n * @param {Number} y1\n * @return {Boolean} true if the two points are sufficiently close\n *\n * tests if two points are close enough to be considered the same\n */\n function samePoint(x0, y0, x1, y1) {\n return Math.abs(x1 - x0) < 0.00001 && Math.abs(y1 - y0) < 0.00001;\n }\n\n var x0, y0, xs, ys;\n for (var iCmd = 0; iCmd < cmds.length; ++iCmd) {\n var cmd = cmds[iCmd];\n // scale the coordinates to the range 0-1\n var x1 = (cmd.x - xMin) / gWidth;\n var y1 = (cmd.y - yMin) / gHeight;\n\n // don't bother if this point is the same as the last\n if (samePoint(x0, y0, x1, y1)) continue;\n\n switch (cmd.type) {\n case 'M': // move\n xs = x1;\n ys = y1;\n break;\n case 'L': // line\n pushLine(x0, y0, x1, y1);\n break;\n case 'Q': // quadratic\n var cx = (cmd.x1 - xMin) / gWidth;\n var cy = (cmd.y1 - yMin) / gHeight;\n push([x0, x1, cx], [y0, y1, cy], { x: x0, y: y0, cx: cx, cy: cy });\n break;\n case 'Z': // end\n if (!samePoint(x0, y0, xs, ys)) {\n // add an extra line closing the loop, if necessary\n pushLine(x0, y0, xs, ys);\n strokes.push({ x: xs, y: ys });\n } else {\n strokes.push({ x: x0, y: y0 });\n }\n break;\n case 'C': // cubic\n var cx1 = (cmd.x1 - xMin) / gWidth;\n var cy1 = (cmd.y1 - yMin) / gHeight;\n var cx2 = (cmd.x2 - xMin) / gWidth;\n var cy2 = (cmd.y2 - yMin) / gHeight;\n var qs = cubicToQuadratics(x0, y0, cx1, cy1, cx2, cy2, x1, y1);\n for (var iq = 0; iq < qs.length; iq++) {\n var q = qs[iq].toQuadratic();\n push([q.x, q.x1, q.cx], [q.y, q.y1, q.cy], q);\n }\n break;\n default:\n throw new Error('unknown command type: ' + cmd.type);\n }\n x0 = x1;\n y0 = y1;\n }\n\n // allocate space for the strokes\n var strokeCount = strokes.length;\n var strokeImageInfo = this.strokeImageInfos.findImage(strokeCount);\n var strokeOffset = strokeImageInfo.index;\n\n // fill the stroke image\n for (var il = 0; il < strokeCount; ++il) {\n var s = strokes[il];\n setPixel(strokeImageInfo, byte(s.x), byte(s.y), byte(s.cx), byte(s.cy));\n }\n\n /**\n * @function layout\n * @param {Number[][]} dim\n * @param {ImageInfo[]} dimImageInfos\n * @param {ImageInfo[]} cellImageInfos\n * @return {Object}\n *\n * lays out the curves in a dimension (row or col) into two\n * images, one for the indices of the curves themselves, and\n * one containing the offset and length of those index spans.\n */\n function layout(dim, dimImageInfos, cellImageInfos) {\n var dimLength = dim.length; // the number of slices in this dimension\n var dimImageInfo = dimImageInfos.findImage(dimLength);\n var dimOffset = dimImageInfo.index;\n // calculate the total number of stroke indices in this dimension\n var totalStrokes = 0;\n for (var id = 0; id < dimLength; ++id) {\n totalStrokes += dim[id].length;\n }\n\n // allocate space for the stroke indices\n var cellImageInfo = cellImageInfos.findImage(totalStrokes);\n\n // for each slice in the glyph\n for (var i = 0; i < dimLength; ++i) {\n var strokeIndices = dim[i];\n var strokeCount = strokeIndices.length;\n var cellLineIndex = cellImageInfo.index;\n\n // write the offset and count into the glyph slice image\n setPixel(\n dimImageInfo,\n cellLineIndex >> 7,\n cellLineIndex & 0x7f,\n strokeCount >> 7,\n strokeCount & 0x7f\n );\n\n // for each stroke index in that slice\n for (var iil = 0; iil < strokeCount; ++iil) {\n // write the stroke index into the slice's image\n var strokeIndex = strokeIndices[iil] + strokeOffset;\n setPixel(cellImageInfo, strokeIndex >> 7, strokeIndex & 0x7f, 0, 0);\n }\n }\n\n return {\n cellImageInfo: cellImageInfo,\n dimOffset: dimOffset,\n dimImageInfo: dimImageInfo\n };\n }\n\n // initialize the info for this glyph\n gi = this.glyphInfos[glyph.index] = {\n glyph: glyph,\n uGlyphRect: [bb.x1, -bb.y1, bb.x2, -bb.y2],\n strokeImageInfo: strokeImageInfo,\n strokes: strokes,\n colInfo: layout(cols, this.colDimImageInfos, this.colCellImageInfos),\n rowInfo: layout(rows, this.rowDimImageInfos, this.rowCellImageInfos)\n };\n gi.uGridOffset = [gi.colInfo.dimOffset, gi.rowInfo.dimOffset];\n return gi;\n };\n};\n\np5.RendererGL.prototype._renderText = function(p, line, x, y, maxY) {\n if (y >= maxY || !this._doFill) {\n return; // don't render lines beyond our maxY position\n }\n\n if (!this._isOpenType()) {\n console.log('WEBGL: only opentype fonts are supported');\n return p;\n }\n\n p.push(); // fix to #803\n\n // remember this state, so it can be restored later\n var doStroke = this._doStroke;\n var drawMode = this.drawMode;\n\n this._doStroke = false;\n this.drawMode = constants.TEXTURE;\n\n // get the cached FontInfo object\n var font = this._textFont.font;\n var fontInfo = this._textFont._fontInfo;\n if (!fontInfo) {\n fontInfo = this._textFont._fontInfo = new FontInfo(font);\n }\n\n // calculate the alignment and move/scale the view accordingly\n var pos = this._textFont._handleAlignment(this, line, x, y);\n var fontSize = this._textSize;\n var scale = fontSize / font.unitsPerEm;\n this.translate(pos.x, pos.y, 0);\n this.scale(scale, scale, 1);\n\n // initialize the font shader\n var gl = this.GL;\n var initializeShader = !this._defaultFontShader;\n var sh = this._getFontShader();\n sh.init();\n\n if (initializeShader) {\n // these are constants, really. just initialize them one-time.\n sh.setUniform('uGridImageSize', [gridImageWidth, gridImageHeight]);\n sh.setUniform('uCellsImageSize', [cellImageWidth, cellImageHeight]);\n sh.setUniform('uStrokeImageSize', [strokeImageWidth, strokeImageHeight]);\n sh.setUniform('uGridSize', [charGridWidth, charGridHeight]);\n }\n this._applyColorBlend(this.curFillColor);\n\n var g = this.gHash['glyph'];\n if (!g) {\n // create the geometry for rendering a quad\n var geom = (this._textGeom = new p5.Geometry(1, 1, function() {\n for (var i = 0; i <= 1; i++) {\n for (var j = 0; j <= 1; j++) {\n this.vertices.push(new p5.Vector(j, i, 0));\n this.uvs.push(j, i);\n }\n }\n }));\n geom.computeFaces().computeNormals();\n g = this.createBuffers('glyph', geom);\n }\n\n // bind the shader buffers\n this._bindBuffer(g.vertexBuffer, gl.ARRAY_BUFFER);\n sh.enableAttrib(sh.attributes.aPosition.location, 3, gl.FLOAT, false, 0, 0);\n this._bindBuffer(g.indexBuffer, gl.ELEMENT_ARRAY_BUFFER);\n this._bindBuffer(g.uvBuffer, gl.ARRAY_BUFFER);\n sh.enableAttrib(sh.attributes.aTexCoord.location, 2, gl.FLOAT, false, 0, 0);\n\n // this will have to do for now...\n sh.setUniform('uMaterialColor', this.curFillColor);\n\n try {\n var dx = 0; // the x position in the line\n var glyphPrev = null; // the previous glyph, used for kerning\n var shaderBound = false;\n // fetch the glyphs in the line of text\n var glyphs = font.stringToGlyphs(line);\n for (var ig = 0; ig < glyphs.length; ++ig) {\n var glyph = glyphs[ig];\n // kern\n if (glyphPrev) dx += font.getKerningValue(glyphPrev, glyph);\n\n var gi = fontInfo.getGlyphInfo(glyph);\n if (gi.uGlyphRect) {\n var rowInfo = gi.rowInfo;\n var colInfo = gi.colInfo;\n sh.setUniform('uSamplerStrokes', gi.strokeImageInfo.imageData);\n sh.setUniform('uSamplerRowStrokes', rowInfo.cellImageInfo.imageData);\n sh.setUniform('uSamplerRows', rowInfo.dimImageInfo.imageData);\n sh.setUniform('uSamplerColStrokes', colInfo.cellImageInfo.imageData);\n sh.setUniform('uSamplerCols', colInfo.dimImageInfo.imageData);\n sh.setUniform('uGridOffset', gi.uGridOffset);\n sh.setUniform('uGlyphRect', gi.uGlyphRect);\n sh.setUniform('uGlyphOffset', dx);\n\n if (!shaderBound) {\n shaderBound = true;\n sh.bindShader(); // first time around, bind the shader fully\n } else {\n sh.bindTextures(); // afterwards, only textures need updating\n }\n\n // draw it\n gl.drawElements(gl.TRIANGLES, 6, this.GL.UNSIGNED_SHORT, 0);\n }\n dx += glyph.advanceWidth;\n glyphPrev = glyph;\n }\n } finally {\n // clean up\n sh.unbindShader();\n\n this._doStroke = doStroke;\n this.drawMode = drawMode;\n\n p.pop();\n }\n\n this._pixelsState._pixelsDirty = true;\n return p;\n};\n\n},{\"../core/constants\":18,\"../core/main\":24,\"./p5.RendererGL\":74,\"./p5.Shader\":75}]},{},[13])(13)\n});\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/p5/lib/p5.js?"); /***/ }), /***/ "./node_modules/popper.js/dist/esm/popper.js": /*!***************************************************!*\ !*** ./node_modules/popper.js/dist/esm/popper.js ***! \***************************************************/ /*! exports provided: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; eval("__webpack_require__.r(__webpack_exports__);\n/* WEBPACK VAR INJECTION */(function(global) {/**!\n * @fileOverview Kickass library to create and place poppers near their reference elements.\n * @version 1.16.1-lts\n * @license\n * Copyright (c) 2016 Federico Zivolo and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';\n\nvar timeoutDuration = function () {\n var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox'];\n for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) {\n if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) {\n return 1;\n }\n }\n return 0;\n}();\n\nfunction microtaskDebounce(fn) {\n var called = false;\n return function () {\n if (called) {\n return;\n }\n called = true;\n window.Promise.resolve().then(function () {\n called = false;\n fn();\n });\n };\n}\n\nfunction taskDebounce(fn) {\n var scheduled = false;\n return function () {\n if (!scheduled) {\n scheduled = true;\n setTimeout(function () {\n scheduled = false;\n fn();\n }, timeoutDuration);\n }\n };\n}\n\nvar supportsMicroTasks = isBrowser && window.Promise;\n\n/**\n* Create a debounced version of a method, that's asynchronously deferred\n* but called in the minimum time possible.\n*\n* @method\n* @memberof Popper.Utils\n* @argument {Function} fn\n* @returns {Function}\n*/\nvar debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce;\n\n/**\n * Check if the given variable is a function\n * @method\n * @memberof Popper.Utils\n * @argument {Any} functionToCheck - variable to check\n * @returns {Boolean} answer to: is a function?\n */\nfunction isFunction(functionToCheck) {\n var getType = {};\n return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';\n}\n\n/**\n * Get CSS computed property of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Eement} element\n * @argument {String} property\n */\nfunction getStyleComputedProperty(element, property) {\n if (element.nodeType !== 1) {\n return [];\n }\n // NOTE: 1 DOM access here\n var window = element.ownerDocument.defaultView;\n var css = window.getComputedStyle(element, null);\n return property ? css[property] : css;\n}\n\n/**\n * Returns the parentNode or the host of the element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} parent\n */\nfunction getParentNode(element) {\n if (element.nodeName === 'HTML') {\n return element;\n }\n return element.parentNode || element.host;\n}\n\n/**\n * Returns the scrolling parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} scroll parent\n */\nfunction getScrollParent(element) {\n // Return body, `getScroll` will take care to get the correct `scrollTop` from it\n if (!element) {\n return document.body;\n }\n\n switch (element.nodeName) {\n case 'HTML':\n case 'BODY':\n return element.ownerDocument.body;\n case '#document':\n return element.body;\n }\n\n // Firefox want us to check `-x` and `-y` variations as well\n\n var _getStyleComputedProp = getStyleComputedProperty(element),\n overflow = _getStyleComputedProp.overflow,\n overflowX = _getStyleComputedProp.overflowX,\n overflowY = _getStyleComputedProp.overflowY;\n\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n return element;\n }\n\n return getScrollParent(getParentNode(element));\n}\n\n/**\n * Returns the reference node of the reference object, or the reference object itself.\n * @method\n * @memberof Popper.Utils\n * @param {Element|Object} reference - the reference element (the popper will be relative to this)\n * @returns {Element} parent\n */\nfunction getReferenceNode(reference) {\n return reference && reference.referenceNode ? reference.referenceNode : reference;\n}\n\nvar isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode);\nvar isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent);\n\n/**\n * Determines if the browser is Internet Explorer\n * @method\n * @memberof Popper.Utils\n * @param {Number} version to check\n * @returns {Boolean} isIE\n */\nfunction isIE(version) {\n if (version === 11) {\n return isIE11;\n }\n if (version === 10) {\n return isIE10;\n }\n return isIE11 || isIE10;\n}\n\n/**\n * Returns the offset parent of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} offset parent\n */\nfunction getOffsetParent(element) {\n if (!element) {\n return document.documentElement;\n }\n\n var noOffsetParent = isIE(10) ? document.body : null;\n\n // NOTE: 1 DOM access here\n var offsetParent = element.offsetParent || null;\n // Skip hidden elements which don't have an offsetParent\n while (offsetParent === noOffsetParent && element.nextElementSibling) {\n offsetParent = (element = element.nextElementSibling).offsetParent;\n }\n\n var nodeName = offsetParent && offsetParent.nodeName;\n\n if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') {\n return element ? element.ownerDocument.documentElement : document.documentElement;\n }\n\n // .offsetParent will return the closest TH, TD or TABLE in case\n // no offsetParent is present, I hate this job...\n if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') {\n return getOffsetParent(offsetParent);\n }\n\n return offsetParent;\n}\n\nfunction isOffsetContainer(element) {\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY') {\n return false;\n }\n return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element;\n}\n\n/**\n * Finds the root node (document, shadowDOM root) of the given element\n * @method\n * @memberof Popper.Utils\n * @argument {Element} node\n * @returns {Element} root node\n */\nfunction getRoot(node) {\n if (node.parentNode !== null) {\n return getRoot(node.parentNode);\n }\n\n return node;\n}\n\n/**\n * Finds the offset parent common to the two provided nodes\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element1\n * @argument {Element} element2\n * @returns {Element} common offset parent\n */\nfunction findCommonOffsetParent(element1, element2) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) {\n return document.documentElement;\n }\n\n // Here we make sure to give as \"start\" the element that comes first in the DOM\n var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING;\n var start = order ? element1 : element2;\n var end = order ? element2 : element1;\n\n // Get common ancestor container\n var range = document.createRange();\n range.setStart(start, 0);\n range.setEnd(end, 0);\n var commonAncestorContainer = range.commonAncestorContainer;\n\n // Both nodes are inside #document\n\n if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) {\n if (isOffsetContainer(commonAncestorContainer)) {\n return commonAncestorContainer;\n }\n\n return getOffsetParent(commonAncestorContainer);\n }\n\n // one of the nodes is inside shadowDOM, find which one\n var element1root = getRoot(element1);\n if (element1root.host) {\n return findCommonOffsetParent(element1root.host, element2);\n } else {\n return findCommonOffsetParent(element1, getRoot(element2).host);\n }\n}\n\n/**\n * Gets the scroll value of the given element in the given side (top and left)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {String} side `top` or `left`\n * @returns {number} amount of scrolled pixels\n */\nfunction getScroll(element) {\n var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top';\n\n var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft';\n var nodeName = element.nodeName;\n\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n var html = element.ownerDocument.documentElement;\n var scrollingElement = element.ownerDocument.scrollingElement || html;\n return scrollingElement[upperSide];\n }\n\n return element[upperSide];\n}\n\n/*\n * Sum or subtract the element scroll values (left and top) from a given rect object\n * @method\n * @memberof Popper.Utils\n * @param {Object} rect - Rect object you want to change\n * @param {HTMLElement} element - The element from the function reads the scroll values\n * @param {Boolean} subtract - set to true if you want to subtract the scroll values\n * @return {Object} rect - The modifier rect object\n */\nfunction includeScroll(rect, element) {\n var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n var modifier = subtract ? -1 : 1;\n rect.top += scrollTop * modifier;\n rect.bottom += scrollTop * modifier;\n rect.left += scrollLeft * modifier;\n rect.right += scrollLeft * modifier;\n return rect;\n}\n\n/*\n * Helper to detect borders of a given element\n * @method\n * @memberof Popper.Utils\n * @param {CSSStyleDeclaration} styles\n * Result of `getStyleComputedProperty` on the given element\n * @param {String} axis - `x` or `y`\n * @return {number} borders - The borders size of the given axis\n */\n\nfunction getBordersSize(styles, axis) {\n var sideA = axis === 'x' ? 'Left' : 'Top';\n var sideB = sideA === 'Left' ? 'Right' : 'Bottom';\n\n return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);\n}\n\nfunction getSize(axis, body, html, computedStyle) {\n return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);\n}\n\nfunction getWindowSizes(document) {\n var body = document.body;\n var html = document.documentElement;\n var computedStyle = isIE(10) && getComputedStyle(html);\n\n return {\n height: getSize('Height', body, html, computedStyle),\n width: getSize('Width', body, html, computedStyle)\n };\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\nvar defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\n/**\n * Given element offsets, generate an output similar to getBoundingClientRect\n * @method\n * @memberof Popper.Utils\n * @argument {Object} offsets\n * @returns {Object} ClientRect like output\n */\nfunction getClientRect(offsets) {\n return _extends({}, offsets, {\n right: offsets.left + offsets.width,\n bottom: offsets.top + offsets.height\n });\n}\n\n/**\n * Get bounding client rect of given element\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} element\n * @return {Object} client rect\n */\nfunction getBoundingClientRect(element) {\n var rect = {};\n\n // IE10 10 FIX: Please, don't ask, the element isn't\n // considered in DOM in some circumstances...\n // This isn't reproducible in IE10 compatibility mode of IE11\n try {\n if (isIE(10)) {\n rect = element.getBoundingClientRect();\n var scrollTop = getScroll(element, 'top');\n var scrollLeft = getScroll(element, 'left');\n rect.top += scrollTop;\n rect.left += scrollLeft;\n rect.bottom += scrollTop;\n rect.right += scrollLeft;\n } else {\n rect = element.getBoundingClientRect();\n }\n } catch (e) {}\n\n var result = {\n left: rect.left,\n top: rect.top,\n width: rect.right - rect.left,\n height: rect.bottom - rect.top\n };\n\n // subtract scrollbar size from sizes\n var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {};\n var width = sizes.width || element.clientWidth || result.width;\n var height = sizes.height || element.clientHeight || result.height;\n\n var horizScrollbar = element.offsetWidth - width;\n var vertScrollbar = element.offsetHeight - height;\n\n // if an hypothetical scrollbar is detected, we must be sure it's not a `border`\n // we make this check conditional for performance reasons\n if (horizScrollbar || vertScrollbar) {\n var styles = getStyleComputedProperty(element);\n horizScrollbar -= getBordersSize(styles, 'x');\n vertScrollbar -= getBordersSize(styles, 'y');\n\n result.width -= horizScrollbar;\n result.height -= vertScrollbar;\n }\n\n return getClientRect(result);\n}\n\nfunction getOffsetRectRelativeToArbitraryNode(children, parent) {\n var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var isIE10 = isIE(10);\n var isHTML = parent.nodeName === 'HTML';\n var childrenRect = getBoundingClientRect(children);\n var parentRect = getBoundingClientRect(parent);\n var scrollParent = getScrollParent(children);\n\n var styles = getStyleComputedProperty(parent);\n var borderTopWidth = parseFloat(styles.borderTopWidth);\n var borderLeftWidth = parseFloat(styles.borderLeftWidth);\n\n // In cases where the parent is fixed, we must ignore negative scroll in offset calc\n if (fixedPosition && isHTML) {\n parentRect.top = Math.max(parentRect.top, 0);\n parentRect.left = Math.max(parentRect.left, 0);\n }\n var offsets = getClientRect({\n top: childrenRect.top - parentRect.top - borderTopWidth,\n left: childrenRect.left - parentRect.left - borderLeftWidth,\n width: childrenRect.width,\n height: childrenRect.height\n });\n offsets.marginTop = 0;\n offsets.marginLeft = 0;\n\n // Subtract margins of documentElement in case it's being used as parent\n // we do this only on HTML because it's the only element that behaves\n // differently when margins are applied to it. The margins are included in\n // the box of the documentElement, in the other cases not.\n if (!isIE10 && isHTML) {\n var marginTop = parseFloat(styles.marginTop);\n var marginLeft = parseFloat(styles.marginLeft);\n\n offsets.top -= borderTopWidth - marginTop;\n offsets.bottom -= borderTopWidth - marginTop;\n offsets.left -= borderLeftWidth - marginLeft;\n offsets.right -= borderLeftWidth - marginLeft;\n\n // Attach marginTop and marginLeft because in some circumstances we may need them\n offsets.marginTop = marginTop;\n offsets.marginLeft = marginLeft;\n }\n\n if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') {\n offsets = includeScroll(offsets, parent);\n }\n\n return offsets;\n}\n\nfunction getViewportOffsetRectRelativeToArtbitraryNode(element) {\n var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var html = element.ownerDocument.documentElement;\n var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html);\n var width = Math.max(html.clientWidth, window.innerWidth || 0);\n var height = Math.max(html.clientHeight, window.innerHeight || 0);\n\n var scrollTop = !excludeScroll ? getScroll(html) : 0;\n var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0;\n\n var offset = {\n top: scrollTop - relativeOffset.top + relativeOffset.marginTop,\n left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft,\n width: width,\n height: height\n };\n\n return getClientRect(offset);\n}\n\n/**\n * Check if the given element is fixed or is inside a fixed parent\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @argument {Element} customContainer\n * @returns {Boolean} answer to \"isFixed?\"\n */\nfunction isFixed(element) {\n var nodeName = element.nodeName;\n if (nodeName === 'BODY' || nodeName === 'HTML') {\n return false;\n }\n if (getStyleComputedProperty(element, 'position') === 'fixed') {\n return true;\n }\n var parentNode = getParentNode(element);\n if (!parentNode) {\n return false;\n }\n return isFixed(parentNode);\n}\n\n/**\n * Finds the first parent of an element that has a transformed property defined\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Element} first transformed parent or documentElement\n */\n\nfunction getFixedPositionOffsetParent(element) {\n // This check is needed to avoid errors in case one of the elements isn't defined for any reason\n if (!element || !element.parentElement || isIE()) {\n return document.documentElement;\n }\n var el = element.parentElement;\n while (el && getStyleComputedProperty(el, 'transform') === 'none') {\n el = el.parentElement;\n }\n return el || document.documentElement;\n}\n\n/**\n * Computed the boundaries limits and return them\n * @method\n * @memberof Popper.Utils\n * @param {HTMLElement} popper\n * @param {HTMLElement} reference\n * @param {number} padding\n * @param {HTMLElement} boundariesElement - Element used to define the boundaries\n * @param {Boolean} fixedPosition - Is in fixed position mode\n * @returns {Object} Coordinates of the boundaries\n */\nfunction getBoundaries(popper, reference, padding, boundariesElement) {\n var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n // NOTE: 1 DOM access here\n\n var boundaries = { top: 0, left: 0 };\n var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n\n // Handle viewport case\n if (boundariesElement === 'viewport') {\n boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition);\n } else {\n // Handle other cases based on DOM element used as boundaries\n var boundariesNode = void 0;\n if (boundariesElement === 'scrollParent') {\n boundariesNode = getScrollParent(getParentNode(reference));\n if (boundariesNode.nodeName === 'BODY') {\n boundariesNode = popper.ownerDocument.documentElement;\n }\n } else if (boundariesElement === 'window') {\n boundariesNode = popper.ownerDocument.documentElement;\n } else {\n boundariesNode = boundariesElement;\n }\n\n var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition);\n\n // In case of HTML, we need a different computation\n if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) {\n var _getWindowSizes = getWindowSizes(popper.ownerDocument),\n height = _getWindowSizes.height,\n width = _getWindowSizes.width;\n\n boundaries.top += offsets.top - offsets.marginTop;\n boundaries.bottom = height + offsets.top;\n boundaries.left += offsets.left - offsets.marginLeft;\n boundaries.right = width + offsets.left;\n } else {\n // for all the other DOM elements, this one is good\n boundaries = offsets;\n }\n }\n\n // Add paddings\n padding = padding || 0;\n var isPaddingNumber = typeof padding === 'number';\n boundaries.left += isPaddingNumber ? padding : padding.left || 0;\n boundaries.top += isPaddingNumber ? padding : padding.top || 0;\n boundaries.right -= isPaddingNumber ? padding : padding.right || 0;\n boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0;\n\n return boundaries;\n}\n\nfunction getArea(_ref) {\n var width = _ref.width,\n height = _ref.height;\n\n return width * height;\n}\n\n/**\n * Utility used to transform the `auto` placement to the placement with more\n * available space.\n * @method\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) {\n var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n\n if (placement.indexOf('auto') === -1) {\n return placement;\n }\n\n var boundaries = getBoundaries(popper, reference, padding, boundariesElement);\n\n var rects = {\n top: {\n width: boundaries.width,\n height: refRect.top - boundaries.top\n },\n right: {\n width: boundaries.right - refRect.right,\n height: boundaries.height\n },\n bottom: {\n width: boundaries.width,\n height: boundaries.bottom - refRect.bottom\n },\n left: {\n width: refRect.left - boundaries.left,\n height: boundaries.height\n }\n };\n\n var sortedAreas = Object.keys(rects).map(function (key) {\n return _extends({\n key: key\n }, rects[key], {\n area: getArea(rects[key])\n });\n }).sort(function (a, b) {\n return b.area - a.area;\n });\n\n var filteredAreas = sortedAreas.filter(function (_ref2) {\n var width = _ref2.width,\n height = _ref2.height;\n return width >= popper.clientWidth && height >= popper.clientHeight;\n });\n\n var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key;\n\n var variation = placement.split('-')[1];\n\n return computedPlacement + (variation ? '-' + variation : '');\n}\n\n/**\n * Get offsets to the reference element\n * @method\n * @memberof Popper.Utils\n * @param {Object} state\n * @param {Element} popper - the popper element\n * @param {Element} reference - the reference element (the popper will be relative to this)\n * @param {Element} fixedPosition - is in fixed position mode\n * @returns {Object} An object containing the offsets which will be applied to the popper\n */\nfunction getReferenceOffsets(state, popper, reference) {\n var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n\n var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference));\n return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition);\n}\n\n/**\n * Get the outer sizes of the given element (offset size + margins)\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element\n * @returns {Object} object containing width and height properties\n */\nfunction getOuterSizes(element) {\n var window = element.ownerDocument.defaultView;\n var styles = window.getComputedStyle(element);\n var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0);\n var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0);\n var result = {\n width: element.offsetWidth + y,\n height: element.offsetHeight + x\n };\n return result;\n}\n\n/**\n * Get the opposite placement of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement\n * @returns {String} flipped placement\n */\nfunction getOppositePlacement(placement) {\n var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}\n\n/**\n * Get offsets to the popper\n * @method\n * @memberof Popper.Utils\n * @param {Object} position - CSS position the Popper will get applied\n * @param {HTMLElement} popper - the popper element\n * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this)\n * @param {String} placement - one of the valid placement options\n * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper\n */\nfunction getPopperOffsets(popper, referenceOffsets, placement) {\n placement = placement.split('-')[0];\n\n // Get popper node sizes\n var popperRect = getOuterSizes(popper);\n\n // Add position, width and height to our offsets object\n var popperOffsets = {\n width: popperRect.width,\n height: popperRect.height\n };\n\n // depending by the popper placement we have to compute its offsets slightly differently\n var isHoriz = ['right', 'left'].indexOf(placement) !== -1;\n var mainSide = isHoriz ? 'top' : 'left';\n var secondarySide = isHoriz ? 'left' : 'top';\n var measurement = isHoriz ? 'height' : 'width';\n var secondaryMeasurement = !isHoriz ? 'height' : 'width';\n\n popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2;\n if (placement === secondarySide) {\n popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement];\n } else {\n popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)];\n }\n\n return popperOffsets;\n}\n\n/**\n * Mimics the `find` method of Array\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction find(arr, check) {\n // use native find if supported\n if (Array.prototype.find) {\n return arr.find(check);\n }\n\n // use `filter` to obtain the same behavior of `find`\n return arr.filter(check)[0];\n}\n\n/**\n * Return the index of the matching object\n * @method\n * @memberof Popper.Utils\n * @argument {Array} arr\n * @argument prop\n * @argument value\n * @returns index or -1\n */\nfunction findIndex(arr, prop, value) {\n // use native findIndex if supported\n if (Array.prototype.findIndex) {\n return arr.findIndex(function (cur) {\n return cur[prop] === value;\n });\n }\n\n // use `find` + `indexOf` if `findIndex` isn't supported\n var match = find(arr, function (obj) {\n return obj[prop] === value;\n });\n return arr.indexOf(match);\n}\n\n/**\n * Loop trough the list of modifiers and run them in order,\n * each of them will then edit the data object.\n * @method\n * @memberof Popper.Utils\n * @param {dataObject} data\n * @param {Array} modifiers\n * @param {String} ends - Optional modifier name used as stopper\n * @returns {dataObject}\n */\nfunction runModifiers(modifiers, data, ends) {\n var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends));\n\n modifiersToRun.forEach(function (modifier) {\n if (modifier['function']) {\n // eslint-disable-line dot-notation\n console.warn('`modifier.function` is deprecated, use `modifier.fn`!');\n }\n var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation\n if (modifier.enabled && isFunction(fn)) {\n // Add properties to offsets to make them a complete clientRect object\n // we do this before each modifier to make sure the previous one doesn't\n // mess with these values\n data.offsets.popper = getClientRect(data.offsets.popper);\n data.offsets.reference = getClientRect(data.offsets.reference);\n\n data = fn(data, modifier);\n }\n });\n\n return data;\n}\n\n/**\n * Updates the position of the popper, computing the new offsets and applying\n * the new style.\n * Prefer `scheduleUpdate` over `update` because of performance reasons.\n * @method\n * @memberof Popper\n */\nfunction update() {\n // if popper is destroyed, don't perform any further update\n if (this.state.isDestroyed) {\n return;\n }\n\n var data = {\n instance: this,\n styles: {},\n arrowStyles: {},\n attributes: {},\n flipped: false,\n offsets: {}\n };\n\n // compute reference element offsets\n data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding);\n\n // store the computed placement inside `originalPlacement`\n data.originalPlacement = data.placement;\n\n data.positionFixed = this.options.positionFixed;\n\n // compute the popper offsets\n data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement);\n\n data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute';\n\n // run the modifiers\n data = runModifiers(this.modifiers, data);\n\n // the first `update` will call `onCreate` callback\n // the other ones will call `onUpdate` callback\n if (!this.state.isCreated) {\n this.state.isCreated = true;\n this.options.onCreate(data);\n } else {\n this.options.onUpdate(data);\n }\n}\n\n/**\n * Helper used to know if the given modifier is enabled.\n * @method\n * @memberof Popper.Utils\n * @returns {Boolean}\n */\nfunction isModifierEnabled(modifiers, modifierName) {\n return modifiers.some(function (_ref) {\n var name = _ref.name,\n enabled = _ref.enabled;\n return enabled && name === modifierName;\n });\n}\n\n/**\n * Get the prefixed supported property name\n * @method\n * @memberof Popper.Utils\n * @argument {String} property (camelCase)\n * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix)\n */\nfunction getSupportedPropertyName(property) {\n var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O'];\n var upperProp = property.charAt(0).toUpperCase() + property.slice(1);\n\n for (var i = 0; i < prefixes.length; i++) {\n var prefix = prefixes[i];\n var toCheck = prefix ? '' + prefix + upperProp : property;\n if (typeof document.body.style[toCheck] !== 'undefined') {\n return toCheck;\n }\n }\n return null;\n}\n\n/**\n * Destroys the popper.\n * @method\n * @memberof Popper\n */\nfunction destroy() {\n this.state.isDestroyed = true;\n\n // touch DOM only if `applyStyle` modifier is enabled\n if (isModifierEnabled(this.modifiers, 'applyStyle')) {\n this.popper.removeAttribute('x-placement');\n this.popper.style.position = '';\n this.popper.style.top = '';\n this.popper.style.left = '';\n this.popper.style.right = '';\n this.popper.style.bottom = '';\n this.popper.style.willChange = '';\n this.popper.style[getSupportedPropertyName('transform')] = '';\n }\n\n this.disableEventListeners();\n\n // remove the popper if user explicitly asked for the deletion on destroy\n // do not use `remove` because IE11 doesn't support it\n if (this.options.removeOnDestroy) {\n this.popper.parentNode.removeChild(this.popper);\n }\n return this;\n}\n\n/**\n * Get the window associated with the element\n * @argument {Element} element\n * @returns {Window}\n */\nfunction getWindow(element) {\n var ownerDocument = element.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView : window;\n}\n\nfunction attachToScrollParents(scrollParent, event, callback, scrollParents) {\n var isBody = scrollParent.nodeName === 'BODY';\n var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent;\n target.addEventListener(event, callback, { passive: true });\n\n if (!isBody) {\n attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents);\n }\n scrollParents.push(target);\n}\n\n/**\n * Setup needed event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction setupEventListeners(reference, options, state, updateBound) {\n // Resize event listener on window\n state.updateBound = updateBound;\n getWindow(reference).addEventListener('resize', state.updateBound, { passive: true });\n\n // Scroll event listener on scroll parents\n var scrollElement = getScrollParent(reference);\n attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents);\n state.scrollElement = scrollElement;\n state.eventsEnabled = true;\n\n return state;\n}\n\n/**\n * It will add resize/scroll events and start recalculating\n * position of the popper element when they are triggered.\n * @method\n * @memberof Popper\n */\nfunction enableEventListeners() {\n if (!this.state.eventsEnabled) {\n this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate);\n }\n}\n\n/**\n * Remove event listeners used to update the popper position\n * @method\n * @memberof Popper.Utils\n * @private\n */\nfunction removeEventListeners(reference, state) {\n // Remove resize event listener on window\n getWindow(reference).removeEventListener('resize', state.updateBound);\n\n // Remove scroll event listener on scroll parents\n state.scrollParents.forEach(function (target) {\n target.removeEventListener('scroll', state.updateBound);\n });\n\n // Reset state\n state.updateBound = null;\n state.scrollParents = [];\n state.scrollElement = null;\n state.eventsEnabled = false;\n return state;\n}\n\n/**\n * It will remove resize/scroll events and won't recalculate popper position\n * when they are triggered. It also won't trigger `onUpdate` callback anymore,\n * unless you call `update` method manually.\n * @method\n * @memberof Popper\n */\nfunction disableEventListeners() {\n if (this.state.eventsEnabled) {\n cancelAnimationFrame(this.scheduleUpdate);\n this.state = removeEventListeners(this.reference, this.state);\n }\n}\n\n/**\n * Tells if a given input is a number\n * @method\n * @memberof Popper.Utils\n * @param {*} input to check\n * @return {Boolean}\n */\nfunction isNumeric(n) {\n return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);\n}\n\n/**\n * Set the style to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the style to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setStyles(element, styles) {\n Object.keys(styles).forEach(function (prop) {\n var unit = '';\n // add unit if the value is numeric and is one of the following\n if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) {\n unit = 'px';\n }\n element.style[prop] = styles[prop] + unit;\n });\n}\n\n/**\n * Set the attributes to the given popper\n * @method\n * @memberof Popper.Utils\n * @argument {Element} element - Element to apply the attributes to\n * @argument {Object} styles\n * Object with a list of properties and values which will be applied to the element\n */\nfunction setAttributes(element, attributes) {\n Object.keys(attributes).forEach(function (prop) {\n var value = attributes[prop];\n if (value !== false) {\n element.setAttribute(prop, attributes[prop]);\n } else {\n element.removeAttribute(prop);\n }\n });\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} data.styles - List of style properties - values to apply to popper element\n * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The same data object\n */\nfunction applyStyle(data) {\n // any property present in `data.styles` will be applied to the popper,\n // in this way we can make the 3rd party modifiers add custom styles to it\n // Be aware, modifiers could override the properties defined in the previous\n // lines of this modifier!\n setStyles(data.instance.popper, data.styles);\n\n // any property present in `data.attributes` will be applied to the popper,\n // they will be set as HTML attributes of the element\n setAttributes(data.instance.popper, data.attributes);\n\n // if arrowElement is defined and arrowStyles has some properties\n if (data.arrowElement && Object.keys(data.arrowStyles).length) {\n setStyles(data.arrowElement, data.arrowStyles);\n }\n\n return data;\n}\n\n/**\n * Set the x-placement attribute before everything else because it could be used\n * to add margins to the popper margins needs to be calculated to get the\n * correct popper offsets.\n * @method\n * @memberof Popper.modifiers\n * @param {HTMLElement} reference - The reference element used to position the popper\n * @param {HTMLElement} popper - The HTML element used as popper\n * @param {Object} options - Popper.js options\n */\nfunction applyStyleOnLoad(reference, popper, options, modifierOptions, state) {\n // compute reference element offsets\n var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed);\n\n // compute auto placement, store placement inside the data object,\n // modifiers will be able to edit `placement` if needed\n // and refer to originalPlacement to know the original value\n var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding);\n\n popper.setAttribute('x-placement', placement);\n\n // Apply `position` to popper before anything else because\n // without the position applied we can't guarantee correct computations\n setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' });\n\n return options;\n}\n\n/**\n * @function\n * @memberof Popper.Utils\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Boolean} shouldRound - If the offsets should be rounded at all\n * @returns {Object} The popper's position offsets rounded\n *\n * The tale of pixel-perfect positioning. It's still not 100% perfect, but as\n * good as it can be within reason.\n * Discussion here: https://github.com/FezVrasta/popper.js/pull/715\n *\n * Low DPI screens cause a popper to be blurry if not using full pixels (Safari\n * as well on High DPI screens).\n *\n * Firefox prefers no rounding for positioning and does not have blurriness on\n * high DPI screens.\n *\n * Only horizontal placement and left/right values need to be considered.\n */\nfunction getRoundedOffsets(data, shouldRound) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n var round = Math.round,\n floor = Math.floor;\n\n var noRound = function noRound(v) {\n return v;\n };\n\n var referenceWidth = round(reference.width);\n var popperWidth = round(popper.width);\n\n var isVertical = ['left', 'right'].indexOf(data.placement) !== -1;\n var isVariation = data.placement.indexOf('-') !== -1;\n var sameWidthParity = referenceWidth % 2 === popperWidth % 2;\n var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1;\n\n var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor;\n var verticalToInteger = !shouldRound ? noRound : round;\n\n return {\n left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left),\n top: verticalToInteger(popper.top),\n bottom: verticalToInteger(popper.bottom),\n right: horizontalToInteger(popper.right)\n };\n}\n\nvar isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent);\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction computeStyle(data, options) {\n var x = options.x,\n y = options.y;\n var popper = data.offsets.popper;\n\n // Remove this legacy support in Popper.js v2\n\n var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'applyStyle';\n }).gpuAcceleration;\n if (legacyGpuAccelerationOption !== undefined) {\n console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');\n }\n var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration;\n\n var offsetParent = getOffsetParent(data.instance.popper);\n var offsetParentRect = getBoundingClientRect(offsetParent);\n\n // Styles\n var styles = {\n position: popper.position\n };\n\n var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox);\n\n var sideA = x === 'bottom' ? 'top' : 'bottom';\n var sideB = y === 'right' ? 'left' : 'right';\n\n // if gpuAcceleration is set to `true` and transform is supported,\n // we use `translate3d` to apply the position to the popper we\n // automatically use the supported prefixed version if needed\n var prefixedProperty = getSupportedPropertyName('transform');\n\n // now, let's make a step back and look at this code closely (wtf?)\n // If the content of the popper grows once it's been positioned, it\n // may happen that the popper gets misplaced because of the new content\n // overflowing its reference element\n // To avoid this problem, we provide two options (x and y), which allow\n // the consumer to define the offset origin.\n // If we position a popper on top of a reference element, we can set\n // `x` to `top` to make the popper grow towards its top instead of\n // its bottom.\n var left = void 0,\n top = void 0;\n if (sideA === 'bottom') {\n // when offsetParent is the positioning is relative to the bottom of the screen (excluding the scrollbar)\n // and not the bottom of the html element\n if (offsetParent.nodeName === 'HTML') {\n top = -offsetParent.clientHeight + offsets.bottom;\n } else {\n top = -offsetParentRect.height + offsets.bottom;\n }\n } else {\n top = offsets.top;\n }\n if (sideB === 'right') {\n if (offsetParent.nodeName === 'HTML') {\n left = -offsetParent.clientWidth + offsets.right;\n } else {\n left = -offsetParentRect.width + offsets.right;\n }\n } else {\n left = offsets.left;\n }\n if (gpuAcceleration && prefixedProperty) {\n styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';\n styles[sideA] = 0;\n styles[sideB] = 0;\n styles.willChange = 'transform';\n } else {\n // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties\n var invertTop = sideA === 'bottom' ? -1 : 1;\n var invertLeft = sideB === 'right' ? -1 : 1;\n styles[sideA] = top * invertTop;\n styles[sideB] = left * invertLeft;\n styles.willChange = sideA + ', ' + sideB;\n }\n\n // Attributes\n var attributes = {\n 'x-placement': data.placement\n };\n\n // Update `data` attributes, styles and arrowStyles\n data.attributes = _extends({}, attributes, data.attributes);\n data.styles = _extends({}, styles, data.styles);\n data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles);\n\n return data;\n}\n\n/**\n * Helper used to know if the given modifier depends from another one.\n * It checks if the needed modifier is listed and enabled.\n * @method\n * @memberof Popper.Utils\n * @param {Array} modifiers - list of modifiers\n * @param {String} requestingName - name of requesting modifier\n * @param {String} requestedName - name of requested modifier\n * @returns {Boolean}\n */\nfunction isModifierRequired(modifiers, requestingName, requestedName) {\n var requesting = find(modifiers, function (_ref) {\n var name = _ref.name;\n return name === requestingName;\n });\n\n var isRequired = !!requesting && modifiers.some(function (modifier) {\n return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order;\n });\n\n if (!isRequired) {\n var _requesting = '`' + requestingName + '`';\n var requested = '`' + requestedName + '`';\n console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!');\n }\n return isRequired;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction arrow(data, options) {\n var _data$offsets$arrow;\n\n // arrow depends on keepTogether in order to work\n if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) {\n return data;\n }\n\n var arrowElement = options.element;\n\n // if arrowElement is a string, suppose it's a CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = data.instance.popper.querySelector(arrowElement);\n\n // if arrowElement is not found, don't run the modifier\n if (!arrowElement) {\n return data;\n }\n } else {\n // if the arrowElement isn't a query selector we must check that the\n // provided DOM node is child of its popper node\n if (!data.instance.popper.contains(arrowElement)) {\n console.warn('WARNING: `arrow.element` must be child of its popper element!');\n return data;\n }\n }\n\n var placement = data.placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isVertical = ['left', 'right'].indexOf(placement) !== -1;\n\n var len = isVertical ? 'height' : 'width';\n var sideCapitalized = isVertical ? 'Top' : 'Left';\n var side = sideCapitalized.toLowerCase();\n var altSide = isVertical ? 'left' : 'top';\n var opSide = isVertical ? 'bottom' : 'right';\n var arrowElementSize = getOuterSizes(arrowElement)[len];\n\n //\n // extends keepTogether behavior making sure the popper and its\n // reference have enough pixels in conjunction\n //\n\n // top/left side\n if (reference[opSide] - arrowElementSize < popper[side]) {\n data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize);\n }\n // bottom/right side\n if (reference[side] + arrowElementSize > popper[opSide]) {\n data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide];\n }\n data.offsets.popper = getClientRect(data.offsets.popper);\n\n // compute center of the popper\n var center = reference[side] + reference[len] / 2 - arrowElementSize / 2;\n\n // Compute the sideValue using the updated popper offsets\n // take popper margin in account because we don't have this info available\n var css = getStyleComputedProperty(data.instance.popper);\n var popperMarginSide = parseFloat(css['margin' + sideCapitalized]);\n var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']);\n var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;\n\n // prevent arrowElement from being placed not contiguously to its popper\n sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0);\n\n data.arrowElement = arrowElement;\n data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow);\n\n return data;\n}\n\n/**\n * Get the opposite placement variation of the given one\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement variation\n * @returns {String} flipped placement variation\n */\nfunction getOppositeVariation(variation) {\n if (variation === 'end') {\n return 'start';\n } else if (variation === 'start') {\n return 'end';\n }\n return variation;\n}\n\n/**\n * List of accepted placements to use as values of the `placement` option.\n * Valid placements are:\n * - `auto`\n * - `top`\n * - `right`\n * - `bottom`\n * - `left`\n *\n * Each placement can have a variation from this list:\n * - `-start`\n * - `-end`\n *\n * Variations are interpreted easily if you think of them as the left to right\n * written languages. Horizontally (`top` and `bottom`), `start` is left and `end`\n * is right.\n * Vertically (`left` and `right`), `start` is top and `end` is bottom.\n *\n * Some valid examples are:\n * - `top-end` (on top of reference, right aligned)\n * - `right-start` (on right of reference, top aligned)\n * - `bottom` (on bottom, centered)\n * - `auto-end` (on the side with more space available, alignment depends by placement)\n *\n * @static\n * @type {Array}\n * @enum {String}\n * @readonly\n * @method placements\n * @memberof Popper\n */\nvar placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start'];\n\n// Get rid of `auto` `auto-start` and `auto-end`\nvar validPlacements = placements.slice(3);\n\n/**\n * Given an initial placement, returns all the subsequent placements\n * clockwise (or counter-clockwise).\n *\n * @method\n * @memberof Popper.Utils\n * @argument {String} placement - A valid placement (it accepts variations)\n * @argument {Boolean} counter - Set to true to walk the placements counterclockwise\n * @returns {Array} placements including their variations\n */\nfunction clockwise(placement) {\n var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var index = validPlacements.indexOf(placement);\n var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index));\n return counter ? arr.reverse() : arr;\n}\n\nvar BEHAVIORS = {\n FLIP: 'flip',\n CLOCKWISE: 'clockwise',\n COUNTERCLOCKWISE: 'counterclockwise'\n};\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction flip(data, options) {\n // if `inner` modifier is enabled, we can't use the `flip` modifier\n if (isModifierEnabled(data.instance.modifiers, 'inner')) {\n return data;\n }\n\n if (data.flipped && data.placement === data.originalPlacement) {\n // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides\n return data;\n }\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed);\n\n var placement = data.placement.split('-')[0];\n var placementOpposite = getOppositePlacement(placement);\n var variation = data.placement.split('-')[1] || '';\n\n var flipOrder = [];\n\n switch (options.behavior) {\n case BEHAVIORS.FLIP:\n flipOrder = [placement, placementOpposite];\n break;\n case BEHAVIORS.CLOCKWISE:\n flipOrder = clockwise(placement);\n break;\n case BEHAVIORS.COUNTERCLOCKWISE:\n flipOrder = clockwise(placement, true);\n break;\n default:\n flipOrder = options.behavior;\n }\n\n flipOrder.forEach(function (step, index) {\n if (placement !== step || flipOrder.length === index + 1) {\n return data;\n }\n\n placement = data.placement.split('-')[0];\n placementOpposite = getOppositePlacement(placement);\n\n var popperOffsets = data.offsets.popper;\n var refOffsets = data.offsets.reference;\n\n // using floor because the reference offsets may contain decimals we are not going to consider here\n var floor = Math.floor;\n var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom);\n\n var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left);\n var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right);\n var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top);\n var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom);\n\n var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom;\n\n // flip the variation if required\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n\n // flips variation if reference element overflows boundaries\n var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom);\n\n // flips variation if popper content overflows boundaries\n var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop);\n\n var flippedVariation = flippedVariationByRef || flippedVariationByContent;\n\n if (overlapsRef || overflowsBoundaries || flippedVariation) {\n // this boolean to detect any flip loop\n data.flipped = true;\n\n if (overlapsRef || overflowsBoundaries) {\n placement = flipOrder[index + 1];\n }\n\n if (flippedVariation) {\n variation = getOppositeVariation(variation);\n }\n\n data.placement = placement + (variation ? '-' + variation : '');\n\n // this object contains `position`, we want to preserve it along with\n // any additional property we may add in the future\n data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement));\n\n data = runModifiers(data.instance.modifiers, data, 'flip');\n }\n });\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction keepTogether(data) {\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var placement = data.placement.split('-')[0];\n var floor = Math.floor;\n var isVertical = ['top', 'bottom'].indexOf(placement) !== -1;\n var side = isVertical ? 'right' : 'bottom';\n var opSide = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n if (popper[side] < floor(reference[opSide])) {\n data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement];\n }\n if (popper[opSide] > floor(reference[side])) {\n data.offsets.popper[opSide] = floor(reference[side]);\n }\n\n return data;\n}\n\n/**\n * Converts a string containing value + unit into a px value number\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} str - Value + unit string\n * @argument {String} measurement - `height` or `width`\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @returns {Number|String}\n * Value in pixels, or original string if no values were extracted\n */\nfunction toValue(str, measurement, popperOffsets, referenceOffsets) {\n // separate value from unit\n var split = str.match(/((?:\\-|\\+)?\\d*\\.?\\d*)(.*)/);\n var value = +split[1];\n var unit = split[2];\n\n // If it's not a number it's an operator, I guess\n if (!value) {\n return str;\n }\n\n if (unit.indexOf('%') === 0) {\n var element = void 0;\n switch (unit) {\n case '%p':\n element = popperOffsets;\n break;\n case '%':\n case '%r':\n default:\n element = referenceOffsets;\n }\n\n var rect = getClientRect(element);\n return rect[measurement] / 100 * value;\n } else if (unit === 'vh' || unit === 'vw') {\n // if is a vh or vw, we calculate the size based on the viewport\n var size = void 0;\n if (unit === 'vh') {\n size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);\n } else {\n size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);\n }\n return size / 100 * value;\n } else {\n // if is an explicit pixel unit, we get rid of the unit and keep the value\n // if is an implicit unit, it's px, and we return just the value\n return value;\n }\n}\n\n/**\n * Parse an `offset` string to extrapolate `x` and `y` numeric offsets.\n * @function\n * @memberof {modifiers~offset}\n * @private\n * @argument {String} offset\n * @argument {Object} popperOffsets\n * @argument {Object} referenceOffsets\n * @argument {String} basePlacement\n * @returns {Array} a two cells array with x and y offsets in numbers\n */\nfunction parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) {\n var offsets = [0, 0];\n\n // Use height if placement is left or right and index is 0 otherwise use width\n // in this way the first offset will use an axis and the second one\n // will use the other one\n var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1;\n\n // Split the offset string to obtain a list of values and operands\n // The regex addresses values with the plus or minus sign in front (+10, -20, etc)\n var fragments = offset.split(/(\\+|\\-)/).map(function (frag) {\n return frag.trim();\n });\n\n // Detect if the offset string contains a pair of values or a single one\n // they could be separated by comma or space\n var divider = fragments.indexOf(find(fragments, function (frag) {\n return frag.search(/,|\\s/) !== -1;\n }));\n\n if (fragments[divider] && fragments[divider].indexOf(',') === -1) {\n console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');\n }\n\n // If divider is found, we divide the list of values and operands to divide\n // them by ofset X and Y.\n var splitRegex = /\\s*,\\s*|\\s+/;\n var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments];\n\n // Convert the values with units to absolute pixels to allow our computations\n ops = ops.map(function (op, index) {\n // Most of the units rely on the orientation of the popper\n var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width';\n var mergeWithPrevious = false;\n return op\n // This aggregates any `+` or `-` sign that aren't considered operators\n // e.g.: 10 + +5 => [10, +, +5]\n .reduce(function (a, b) {\n if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) {\n a[a.length - 1] = b;\n mergeWithPrevious = true;\n return a;\n } else if (mergeWithPrevious) {\n a[a.length - 1] += b;\n mergeWithPrevious = false;\n return a;\n } else {\n return a.concat(b);\n }\n }, [])\n // Here we convert the string values into number values (in px)\n .map(function (str) {\n return toValue(str, measurement, popperOffsets, referenceOffsets);\n });\n });\n\n // Loop trough the offsets arrays and execute the operations\n ops.forEach(function (op, index) {\n op.forEach(function (frag, index2) {\n if (isNumeric(frag)) {\n offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1);\n }\n });\n });\n return offsets;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @argument {Number|String} options.offset=0\n * The offset value as described in the modifier description\n * @returns {Object} The data object, properly modified\n */\nfunction offset(data, _ref) {\n var offset = _ref.offset;\n var placement = data.placement,\n _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var basePlacement = placement.split('-')[0];\n\n var offsets = void 0;\n if (isNumeric(+offset)) {\n offsets = [+offset, 0];\n } else {\n offsets = parseOffset(offset, popper, reference, basePlacement);\n }\n\n if (basePlacement === 'left') {\n popper.top += offsets[0];\n popper.left -= offsets[1];\n } else if (basePlacement === 'right') {\n popper.top += offsets[0];\n popper.left += offsets[1];\n } else if (basePlacement === 'top') {\n popper.left += offsets[0];\n popper.top -= offsets[1];\n } else if (basePlacement === 'bottom') {\n popper.left += offsets[0];\n popper.top += offsets[1];\n }\n\n data.popper = popper;\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction preventOverflow(data, options) {\n var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper);\n\n // If offsetParent is the reference element, we really want to\n // go one step up and use the next offsetParent as reference to\n // avoid to make this modifier completely useless and look like broken\n if (data.instance.reference === boundariesElement) {\n boundariesElement = getOffsetParent(boundariesElement);\n }\n\n // NOTE: DOM access here\n // resets the popper's position so that the document size can be calculated excluding\n // the size of the popper element itself\n var transformProp = getSupportedPropertyName('transform');\n var popperStyles = data.instance.popper.style; // assignment to help minification\n var top = popperStyles.top,\n left = popperStyles.left,\n transform = popperStyles[transformProp];\n\n popperStyles.top = '';\n popperStyles.left = '';\n popperStyles[transformProp] = '';\n\n var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed);\n\n // NOTE: DOM access here\n // restores the original style properties after the offsets have been computed\n popperStyles.top = top;\n popperStyles.left = left;\n popperStyles[transformProp] = transform;\n\n options.boundaries = boundaries;\n\n var order = options.priority;\n var popper = data.offsets.popper;\n\n var check = {\n primary: function primary(placement) {\n var value = popper[placement];\n if (popper[placement] < boundaries[placement] && !options.escapeWithReference) {\n value = Math.max(popper[placement], boundaries[placement]);\n }\n return defineProperty({}, placement, value);\n },\n secondary: function secondary(placement) {\n var mainSide = placement === 'right' ? 'left' : 'top';\n var value = popper[mainSide];\n if (popper[placement] > boundaries[placement] && !options.escapeWithReference) {\n value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height));\n }\n return defineProperty({}, mainSide, value);\n }\n };\n\n order.forEach(function (placement) {\n var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary';\n popper = _extends({}, popper, check[side](placement));\n });\n\n data.offsets.popper = popper;\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction shift(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var shiftvariation = placement.split('-')[1];\n\n // if shift shiftvariation is specified, run the modifier\n if (shiftvariation) {\n var _data$offsets = data.offsets,\n reference = _data$offsets.reference,\n popper = _data$offsets.popper;\n\n var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1;\n var side = isVertical ? 'left' : 'top';\n var measurement = isVertical ? 'width' : 'height';\n\n var shiftOffsets = {\n start: defineProperty({}, side, reference[side]),\n end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement])\n };\n\n data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]);\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by update method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction hide(data) {\n if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) {\n return data;\n }\n\n var refRect = data.offsets.reference;\n var bound = find(data.instance.modifiers, function (modifier) {\n return modifier.name === 'preventOverflow';\n }).boundaries;\n\n if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === true) {\n return data;\n }\n\n data.hide = true;\n data.attributes['x-out-of-boundaries'] = '';\n } else {\n // Avoid unnecessary DOM access if visibility hasn't changed\n if (data.hide === false) {\n return data;\n }\n\n data.hide = false;\n data.attributes['x-out-of-boundaries'] = false;\n }\n\n return data;\n}\n\n/**\n * @function\n * @memberof Modifiers\n * @argument {Object} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {Object} The data object, properly modified\n */\nfunction inner(data) {\n var placement = data.placement;\n var basePlacement = placement.split('-')[0];\n var _data$offsets = data.offsets,\n popper = _data$offsets.popper,\n reference = _data$offsets.reference;\n\n var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1;\n\n var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1;\n\n popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0);\n\n data.placement = getOppositePlacement(placement);\n data.offsets.popper = getClientRect(popper);\n\n return data;\n}\n\n/**\n * Modifier function, each modifier can have a function of this type assigned\n * to its `fn` property.\n * These functions will be called on each update, this means that you must\n * make sure they are performant enough to avoid performance bottlenecks.\n *\n * @function ModifierFn\n * @argument {dataObject} data - The data object generated by `update` method\n * @argument {Object} options - Modifiers configuration and options\n * @returns {dataObject} The data object, properly modified\n */\n\n/**\n * Modifiers are plugins used to alter the behavior of your poppers.\n * Popper.js uses a set of 9 modifiers to provide all the basic functionalities\n * needed by the library.\n *\n * Usually you don't want to override the `order`, `fn` and `onLoad` props.\n * All the other properties are configurations that could be tweaked.\n * @namespace modifiers\n */\nvar modifiers = {\n /**\n * Modifier used to shift the popper on the start or end of its reference\n * element.\n * It will read the variation of the `placement` property.\n * It can be one either `-end` or `-start`.\n * @memberof modifiers\n * @inner\n */\n shift: {\n /** @prop {number} order=100 - Index used to define the order of execution */\n order: 100,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: shift\n },\n\n /**\n * The `offset` modifier can shift your popper on both its axis.\n *\n * It accepts the following units:\n * - `px` or unit-less, interpreted as pixels\n * - `%` or `%r`, percentage relative to the length of the reference element\n * - `%p`, percentage relative to the length of the popper element\n * - `vw`, CSS viewport width unit\n * - `vh`, CSS viewport height unit\n *\n * For length is intended the main axis relative to the placement of the popper.\n * This means that if the placement is `top` or `bottom`, the length will be the\n * `width`. In case of `left` or `right`, it will be the `height`.\n *\n * You can provide a single value (as `Number` or `String`), or a pair of values\n * as `String` divided by a comma or one (or more) white spaces.\n * The latter is a deprecated method because it leads to confusion and will be\n * removed in v2.\n * Additionally, it accepts additions and subtractions between different units.\n * Note that multiplications and divisions aren't supported.\n *\n * Valid examples are:\n * ```\n * 10\n * '10%'\n * '10, 10'\n * '10%, 10'\n * '10 + 10%'\n * '10 - 5vh + 3%'\n * '-10px + 5vh, 5px - 6%'\n * ```\n * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap\n * > with their reference element, unfortunately, you will have to disable the `flip` modifier.\n * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373).\n *\n * @memberof modifiers\n * @inner\n */\n offset: {\n /** @prop {number} order=200 - Index used to define the order of execution */\n order: 200,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: offset,\n /** @prop {Number|String} offset=0\n * The offset value as described in the modifier description\n */\n offset: 0\n },\n\n /**\n * Modifier used to prevent the popper from being positioned outside the boundary.\n *\n * A scenario exists where the reference itself is not within the boundaries.\n * We can say it has \"escaped the boundaries\" — or just \"escaped\".\n * In this case we need to decide whether the popper should either:\n *\n * - detach from the reference and remain \"trapped\" in the boundaries, or\n * - if it should ignore the boundary and \"escape with its reference\"\n *\n * When `escapeWithReference` is set to`true` and reference is completely\n * outside its boundaries, the popper will overflow (or completely leave)\n * the boundaries in order to remain attached to the edge of the reference.\n *\n * @memberof modifiers\n * @inner\n */\n preventOverflow: {\n /** @prop {number} order=300 - Index used to define the order of execution */\n order: 300,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: preventOverflow,\n /**\n * @prop {Array} [priority=['left','right','top','bottom']]\n * Popper will try to prevent overflow following these priorities by default,\n * then, it could overflow on the left and on top of the `boundariesElement`\n */\n priority: ['left', 'right', 'top', 'bottom'],\n /**\n * @prop {number} padding=5\n * Amount of pixel used to define a minimum distance between the boundaries\n * and the popper. This makes sure the popper always has a little padding\n * between the edges of its container\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='scrollParent'\n * Boundaries used by the modifier. Can be `scrollParent`, `window`,\n * `viewport` or any DOM element.\n */\n boundariesElement: 'scrollParent'\n },\n\n /**\n * Modifier used to make sure the reference and its popper stay near each other\n * without leaving any gap between the two. Especially useful when the arrow is\n * enabled and you want to ensure that it points to its reference element.\n * It cares only about the first axis. You can still have poppers with margin\n * between the popper and its reference element.\n * @memberof modifiers\n * @inner\n */\n keepTogether: {\n /** @prop {number} order=400 - Index used to define the order of execution */\n order: 400,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: keepTogether\n },\n\n /**\n * This modifier is used to move the `arrowElement` of the popper to make\n * sure it is positioned between the reference element and its popper element.\n * It will read the outer size of the `arrowElement` node to detect how many\n * pixels of conjunction are needed.\n *\n * It has no effect if no `arrowElement` is provided.\n * @memberof modifiers\n * @inner\n */\n arrow: {\n /** @prop {number} order=500 - Index used to define the order of execution */\n order: 500,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: arrow,\n /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */\n element: '[x-arrow]'\n },\n\n /**\n * Modifier used to flip the popper's placement when it starts to overlap its\n * reference element.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n *\n * **NOTE:** this modifier will interrupt the current update cycle and will\n * restart it if it detects the need to flip the placement.\n * @memberof modifiers\n * @inner\n */\n flip: {\n /** @prop {number} order=600 - Index used to define the order of execution */\n order: 600,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: flip,\n /**\n * @prop {String|Array} behavior='flip'\n * The behavior used to change the popper's placement. It can be one of\n * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid\n * placements (with optional variations)\n */\n behavior: 'flip',\n /**\n * @prop {number} padding=5\n * The popper will flip if it hits the edges of the `boundariesElement`\n */\n padding: 5,\n /**\n * @prop {String|HTMLElement} boundariesElement='viewport'\n * The element which will define the boundaries of the popper position.\n * The popper will never be placed outside of the defined boundaries\n * (except if `keepTogether` is enabled)\n */\n boundariesElement: 'viewport',\n /**\n * @prop {Boolean} flipVariations=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the reference element overlaps its boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariations: false,\n /**\n * @prop {Boolean} flipVariationsByContent=false\n * The popper will switch placement variation between `-start` and `-end` when\n * the popper element overlaps its reference boundaries.\n *\n * The original placement should have a set variation.\n */\n flipVariationsByContent: false\n },\n\n /**\n * Modifier used to make the popper flow toward the inner of the reference element.\n * By default, when this modifier is disabled, the popper will be placed outside\n * the reference element.\n * @memberof modifiers\n * @inner\n */\n inner: {\n /** @prop {number} order=700 - Index used to define the order of execution */\n order: 700,\n /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */\n enabled: false,\n /** @prop {ModifierFn} */\n fn: inner\n },\n\n /**\n * Modifier used to hide the popper when its reference element is outside of the\n * popper boundaries. It will set a `x-out-of-boundaries` attribute which can\n * be used to hide with a CSS selector the popper when its reference is\n * out of boundaries.\n *\n * Requires the `preventOverflow` modifier before it in order to work.\n * @memberof modifiers\n * @inner\n */\n hide: {\n /** @prop {number} order=800 - Index used to define the order of execution */\n order: 800,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: hide\n },\n\n /**\n * Computes the style that will be applied to the popper element to gets\n * properly positioned.\n *\n * Note that this modifier will not touch the DOM, it just prepares the styles\n * so that `applyStyle` modifier can apply it. This separation is useful\n * in case you need to replace `applyStyle` with a custom implementation.\n *\n * This modifier has `850` as `order` value to maintain backward compatibility\n * with previous versions of Popper.js. Expect the modifiers ordering method\n * to change in future major versions of the library.\n *\n * @memberof modifiers\n * @inner\n */\n computeStyle: {\n /** @prop {number} order=850 - Index used to define the order of execution */\n order: 850,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: computeStyle,\n /**\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: true,\n /**\n * @prop {string} [x='bottom']\n * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin.\n * Change this if your popper should grow in a direction different from `bottom`\n */\n x: 'bottom',\n /**\n * @prop {string} [x='left']\n * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin.\n * Change this if your popper should grow in a direction different from `right`\n */\n y: 'right'\n },\n\n /**\n * Applies the computed styles to the popper element.\n *\n * All the DOM manipulations are limited to this modifier. This is useful in case\n * you want to integrate Popper.js inside a framework or view library and you\n * want to delegate all the DOM manipulations to it.\n *\n * Note that if you disable this modifier, you must make sure the popper element\n * has its position set to `absolute` before Popper.js can do its work!\n *\n * Just disable this modifier and define your own to achieve the desired effect.\n *\n * @memberof modifiers\n * @inner\n */\n applyStyle: {\n /** @prop {number} order=900 - Index used to define the order of execution */\n order: 900,\n /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */\n enabled: true,\n /** @prop {ModifierFn} */\n fn: applyStyle,\n /** @prop {Function} */\n onLoad: applyStyleOnLoad,\n /**\n * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier\n * @prop {Boolean} gpuAcceleration=true\n * If true, it uses the CSS 3D transformation to position the popper.\n * Otherwise, it will use the `top` and `left` properties\n */\n gpuAcceleration: undefined\n }\n};\n\n/**\n * The `dataObject` is an object containing all the information used by Popper.js.\n * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks.\n * @name dataObject\n * @property {Object} data.instance The Popper.js instance\n * @property {String} data.placement Placement applied to popper\n * @property {String} data.originalPlacement Placement originally defined on init\n * @property {Boolean} data.flipped True if popper has been flipped by flip modifier\n * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper\n * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier\n * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`)\n * @property {Object} data.boundaries Offsets of the popper boundaries\n * @property {Object} data.offsets The measurements of popper, reference and arrow elements\n * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values\n * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0\n */\n\n/**\n * Default options provided to Popper.js constructor.\n * These can be overridden using the `options` argument of Popper.js.\n * To override an option, simply pass an object with the same\n * structure of the `options` object, as the 3rd argument. For example:\n * ```\n * new Popper(ref, pop, {\n * modifiers: {\n * preventOverflow: { enabled: false }\n * }\n * })\n * ```\n * @type {Object}\n * @static\n * @memberof Popper\n */\nvar Defaults = {\n /**\n * Popper's placement.\n * @prop {Popper.placements} placement='bottom'\n */\n placement: 'bottom',\n\n /**\n * Set this to true if you want popper to position it self in 'fixed' mode\n * @prop {Boolean} positionFixed=false\n */\n positionFixed: false,\n\n /**\n * Whether events (resize, scroll) are initially enabled.\n * @prop {Boolean} eventsEnabled=true\n */\n eventsEnabled: true,\n\n /**\n * Set to true if you want to automatically remove the popper when\n * you call the `destroy` method.\n * @prop {Boolean} removeOnDestroy=false\n */\n removeOnDestroy: false,\n\n /**\n * Callback called when the popper is created.\n * By default, it is set to no-op.\n * Access Popper.js instance with `data.instance`.\n * @prop {onCreate}\n */\n onCreate: function onCreate() {},\n\n /**\n * Callback called when the popper is updated. This callback is not called\n * on the initialization/creation of the popper, but only on subsequent\n * updates.\n * By default, it is set to no-op.\n * Access Popper.js instance with `data.instance`.\n * @prop {onUpdate}\n */\n onUpdate: function onUpdate() {},\n\n /**\n * List of modifiers used to modify the offsets before they are applied to the popper.\n * They provide most of the functionalities of Popper.js.\n * @prop {modifiers}\n */\n modifiers: modifiers\n};\n\n/**\n * @callback onCreate\n * @param {dataObject} data\n */\n\n/**\n * @callback onUpdate\n * @param {dataObject} data\n */\n\n// Utils\n// Methods\nvar Popper = function () {\n /**\n * Creates a new Popper.js instance.\n * @class Popper\n * @param {Element|referenceObject} reference - The reference element used to position the popper\n * @param {Element} popper - The HTML / XML element used as the popper\n * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults)\n * @return {Object} instance - The generated Popper.js instance\n */\n function Popper(reference, popper) {\n var _this = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, Popper);\n\n this.scheduleUpdate = function () {\n return requestAnimationFrame(_this.update);\n };\n\n // make update() debounced, so that it only runs at most once-per-tick\n this.update = debounce(this.update.bind(this));\n\n // with {} we create a new object with the options inside it\n this.options = _extends({}, Popper.Defaults, options);\n\n // init state\n this.state = {\n isDestroyed: false,\n isCreated: false,\n scrollParents: []\n };\n\n // get reference and popper elements (allow jQuery wrappers)\n this.reference = reference && reference.jquery ? reference[0] : reference;\n this.popper = popper && popper.jquery ? popper[0] : popper;\n\n // Deep merge modifiers options\n this.options.modifiers = {};\n Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) {\n _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {});\n });\n\n // Refactoring modifiers' list (Object => Array)\n this.modifiers = Object.keys(this.options.modifiers).map(function (name) {\n return _extends({\n name: name\n }, _this.options.modifiers[name]);\n })\n // sort the modifiers by order\n .sort(function (a, b) {\n return a.order - b.order;\n });\n\n // modifiers have the ability to execute arbitrary code when Popper.js get inited\n // such code is executed in the same order of its modifier\n // they could add new properties to their options configuration\n // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`!\n this.modifiers.forEach(function (modifierOptions) {\n if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) {\n modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state);\n }\n });\n\n // fire the first update to position the popper in the right place\n this.update();\n\n var eventsEnabled = this.options.eventsEnabled;\n if (eventsEnabled) {\n // setup event listeners, they will take care of update the position in specific situations\n this.enableEventListeners();\n }\n\n this.state.eventsEnabled = eventsEnabled;\n }\n\n // We can't use class properties because they don't get listed in the\n // class prototype and break stuff like Sinon stubs\n\n\n createClass(Popper, [{\n key: 'update',\n value: function update$$1() {\n return update.call(this);\n }\n }, {\n key: 'destroy',\n value: function destroy$$1() {\n return destroy.call(this);\n }\n }, {\n key: 'enableEventListeners',\n value: function enableEventListeners$$1() {\n return enableEventListeners.call(this);\n }\n }, {\n key: 'disableEventListeners',\n value: function disableEventListeners$$1() {\n return disableEventListeners.call(this);\n }\n\n /**\n * Schedules an update. It will run on the next UI update available.\n * @method scheduleUpdate\n * @memberof Popper\n */\n\n\n /**\n * Collection of utilities useful when writing custom modifiers.\n * Starting from version 1.7, this method is available only if you\n * include `popper-utils.js` before `popper.js`.\n *\n * **DEPRECATION**: This way to access PopperUtils is deprecated\n * and will be removed in v2! Use the PopperUtils module directly instead.\n * Due to the high instability of the methods contained in Utils, we can't\n * guarantee them to follow semver. Use them at your own risk!\n * @static\n * @private\n * @type {Object}\n * @deprecated since version 1.8\n * @member Utils\n * @memberof Popper\n */\n\n }]);\n return Popper;\n}();\n\n/**\n * The `referenceObject` is an object that provides an interface compatible with Popper.js\n * and lets you use it as replacement of a real DOM node.\n * You can use this method to position a popper relatively to a set of coordinates\n * in case you don't have a DOM node to use as reference.\n *\n * ```\n * new Popper(referenceObject, popperNode);\n * ```\n *\n * NB: This feature isn't supported in Internet Explorer 10.\n * @name referenceObject\n * @property {Function} data.getBoundingClientRect\n * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method.\n * @property {number} data.clientWidth\n * An ES6 getter that will return the width of the virtual reference element.\n * @property {number} data.clientHeight\n * An ES6 getter that will return the height of the virtual reference element.\n */\n\n\nPopper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils;\nPopper.placements = placements;\nPopper.Defaults = Defaults;\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (Popper);\n//# sourceMappingURL=popper.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/popper.js/dist/esm/popper.js?"); /***/ }), /***/ "./node_modules/prop-types/checkPropTypes.js": /*!***************************************************!*\ !*** ./node_modules/prop-types/checkPropTypes.js ***! \***************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = Function.call.bind(Object.prototype.hasOwnProperty);\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/checkPropTypes.js?"); /***/ }), /***/ "./node_modules/prop-types/factoryWithTypeCheckers.js": /*!************************************************************!*\ !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/factoryWithTypeCheckers.js?"); /***/ }), /***/ "./node_modules/prop-types/index.js": /*!******************************************!*\ !*** ./node_modules/prop-types/index.js ***! \******************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); /***/ }), /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": /*!*************************************************************!*\ !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/lib/ReactPropTypesSecret.js?"); /***/ }), /***/ "./node_modules/react-dom/cjs/react-dom.development.js": /*!*************************************************************!*\ !*** ./node_modules/react-dom/cjs/react-dom.development.js ***! \*************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; eval("/** @license React v16.13.1\n * react-dom.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\nvar React = __webpack_require__(/*! react */ \"./node_modules/react/index.js\");\nvar _assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\nvar Scheduler = __webpack_require__(/*! scheduler */ \"./node_modules/scheduler/index.js\");\nvar checkPropTypes = __webpack_require__(/*! prop-types/checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\nvar tracing = __webpack_require__(/*! scheduler/tracing */ \"./node_modules/scheduler/tracing.js\");\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; // Prevent newer renderers from RTE when used with older react package versions.\n// Current owner and dispatcher used to share the same ref,\n// but PR #14548 split them out to better support the react-debug-tools package.\n\nif (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {\n ReactSharedInternals.ReactCurrentDispatcher = {\n current: null\n };\n}\n\nif (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {\n ReactSharedInternals.ReactCurrentBatchConfig = {\n suspense: null\n };\n}\n\n// by calls to these methods by a Babel plugin.\n//\n// In PROD (or in packages without access to React internals),\n// they are left as they are instead.\n\nfunction warn(format) {\n {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n printWarning('warn', format, args);\n }\n}\nfunction error(format) {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var hasExistingStack = args.length > 0 && typeof args[args.length - 1] === 'string' && args[args.length - 1].indexOf('\\n in') === 0;\n\n if (!hasExistingStack) {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n }\n }\n\n var argsWithFormat = args.map(function (item) {\n return '' + item;\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n throw new Error(message);\n } catch (x) {}\n }\n}\n\nif (!React) {\n {\n throw Error( \"ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.\" );\n }\n}\n\nvar invokeGuardedCallbackImpl = function (name, func, context, a, b, c, d, e, f) {\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n try {\n func.apply(context, funcArgs);\n } catch (error) {\n this.onError(error);\n }\n};\n\n{\n // In DEV mode, we swap out invokeGuardedCallback for a special version\n // that plays more nicely with the browser's DevTools. The idea is to preserve\n // \"Pause on exceptions\" behavior. Because React wraps all user-provided\n // functions in invokeGuardedCallback, and the production version of\n // invokeGuardedCallback uses a try-catch, all user exceptions are treated\n // like caught exceptions, and the DevTools won't pause unless the developer\n // takes the extra step of enabling pause on caught exceptions. This is\n // unintuitive, though, because even though React has caught the error, from\n // the developer's perspective, the error is uncaught.\n //\n // To preserve the expected \"Pause on exceptions\" behavior, we don't use a\n // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake\n // DOM node, and call the user-provided callback from inside an event handler\n // for that fake event. If the callback throws, the error is \"captured\" using\n // a global event handler. But because the error happens in a different\n // event loop context, it does not interrupt the normal program flow.\n // Effectively, this gives us try-catch behavior without actually using\n // try-catch. Neat!\n // Check that the browser supports the APIs we need to implement our special\n // DEV version of invokeGuardedCallback\n if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {\n var fakeNode = document.createElement('react');\n\n var invokeGuardedCallbackDev = function (name, func, context, a, b, c, d, e, f) {\n // If document doesn't exist we know for sure we will crash in this method\n // when we call document.createEvent(). However this can cause confusing\n // errors: https://github.com/facebookincubator/create-react-app/issues/3482\n // So we preemptively throw with a better message instead.\n if (!(typeof document !== 'undefined')) {\n {\n throw Error( \"The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.\" );\n }\n }\n\n var evt = document.createEvent('Event'); // Keeps track of whether the user-provided callback threw an error. We\n // set this to true at the beginning, then set it to false right after\n // calling the function. If the function errors, `didError` will never be\n // set to false. This strategy works even if the browser is flaky and\n // fails to call our global error handler, because it doesn't rely on\n // the error event at all.\n\n var didError = true; // Keeps track of the value of window.event so that we can reset it\n // during the callback to let user code access window.event in the\n // browsers that support it.\n\n var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event\n // dispatching: https://github.com/facebook/react/issues/13688\n\n var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event'); // Create an event handler for our fake event. We will synchronously\n // dispatch our fake event using `dispatchEvent`. Inside the handler, we\n // call the user-provided callback.\n\n var funcArgs = Array.prototype.slice.call(arguments, 3);\n\n function callCallback() {\n // We immediately remove the callback from event listeners so that\n // nested `invokeGuardedCallback` calls do not clash. Otherwise, a\n // nested call would trigger the fake event handlers of any call higher\n // in the stack.\n fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the\n // window.event assignment in both IE <= 10 as they throw an error\n // \"Member not found\" in strict mode, and in Firefox which does not\n // support window.event.\n\n if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {\n window.event = windowEvent;\n }\n\n func.apply(context, funcArgs);\n didError = false;\n } // Create a global error event handler. We use this to capture the value\n // that was thrown. It's possible that this error handler will fire more\n // than once; for example, if non-React code also calls `dispatchEvent`\n // and a handler for that event throws. We should be resilient to most of\n // those cases. Even if our error event handler fires more than once, the\n // last error event is always used. If the callback actually does error,\n // we know that the last error event is the correct one, because it's not\n // possible for anything else to have happened in between our callback\n // erroring and the code that follows the `dispatchEvent` call below. If\n // the callback doesn't error, but the error event was fired, we know to\n // ignore it because `didError` will be false, as described above.\n\n\n var error; // Use this to track whether the error event is ever called.\n\n var didSetError = false;\n var isCrossOriginError = false;\n\n function handleWindowError(event) {\n error = event.error;\n didSetError = true;\n\n if (error === null && event.colno === 0 && event.lineno === 0) {\n isCrossOriginError = true;\n }\n\n if (event.defaultPrevented) {\n // Some other error handler has prevented default.\n // Browsers silence the error report if this happens.\n // We'll remember this to later decide whether to log it or not.\n if (error != null && typeof error === 'object') {\n try {\n error._suppressLogging = true;\n } catch (inner) {// Ignore.\n }\n }\n }\n } // Create a fake event type.\n\n\n var evtType = \"react-\" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers\n\n window.addEventListener('error', handleWindowError);\n fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function\n // errors, it will trigger our global error handler.\n\n evt.initEvent(evtType, false, false);\n fakeNode.dispatchEvent(evt);\n\n if (windowEventDescriptor) {\n Object.defineProperty(window, 'event', windowEventDescriptor);\n }\n\n if (didError) {\n if (!didSetError) {\n // The callback errored, but the error event never fired.\n error = new Error('An error was thrown inside one of your components, but React ' + \"doesn't know what it was. This is likely due to browser \" + 'flakiness. React does its best to preserve the \"Pause on ' + 'exceptions\" behavior of the DevTools, which requires some ' + \"DEV-mode only tricks. It's possible that these don't work in \" + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');\n } else if (isCrossOriginError) {\n error = new Error(\"A cross-origin error was thrown. React doesn't have access to \" + 'the actual error object in development. ' + 'See https://fb.me/react-crossorigin-error for more information.');\n }\n\n this.onError(error);\n } // Remove our event listeners\n\n\n window.removeEventListener('error', handleWindowError);\n };\n\n invokeGuardedCallbackImpl = invokeGuardedCallbackDev;\n }\n}\n\nvar invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;\n\nvar hasError = false;\nvar caughtError = null; // Used by event system to capture/rethrow the first error.\n\nvar hasRethrowError = false;\nvar rethrowError = null;\nvar reporter = {\n onError: function (error) {\n hasError = true;\n caughtError = error;\n }\n};\n/**\n * Call a function while guarding against errors that happens within it.\n * Returns an error if it throws, otherwise null.\n *\n * In production, this is implemented using a try-catch. The reason we don't\n * use a try-catch directly is so that we can swap out a different\n * implementation in DEV mode.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {\n hasError = false;\n caughtError = null;\n invokeGuardedCallbackImpl$1.apply(reporter, arguments);\n}\n/**\n * Same as invokeGuardedCallback, but instead of returning an error, it stores\n * it in a global so it can be rethrown by `rethrowCaughtError` later.\n * TODO: See if caughtError and rethrowError can be unified.\n *\n * @param {String} name of the guard to use for logging or debugging\n * @param {Function} func The function to invoke\n * @param {*} context The context to use when calling the function\n * @param {...*} args Arguments for function\n */\n\nfunction invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {\n invokeGuardedCallback.apply(this, arguments);\n\n if (hasError) {\n var error = clearCaughtError();\n\n if (!hasRethrowError) {\n hasRethrowError = true;\n rethrowError = error;\n }\n }\n}\n/**\n * During execution of guarded functions we will capture the first error which\n * we will rethrow to be handled by the top level error handler.\n */\n\nfunction rethrowCaughtError() {\n if (hasRethrowError) {\n var error = rethrowError;\n hasRethrowError = false;\n rethrowError = null;\n throw error;\n }\n}\nfunction hasCaughtError() {\n return hasError;\n}\nfunction clearCaughtError() {\n if (hasError) {\n var error = caughtError;\n hasError = false;\n caughtError = null;\n return error;\n } else {\n {\n {\n throw Error( \"clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n }\n}\n\nvar getFiberCurrentPropsFromNode = null;\nvar getInstanceFromNode = null;\nvar getNodeFromInstance = null;\nfunction setComponentTree(getFiberCurrentPropsFromNodeImpl, getInstanceFromNodeImpl, getNodeFromInstanceImpl) {\n getFiberCurrentPropsFromNode = getFiberCurrentPropsFromNodeImpl;\n getInstanceFromNode = getInstanceFromNodeImpl;\n getNodeFromInstance = getNodeFromInstanceImpl;\n\n {\n if (!getNodeFromInstance || !getInstanceFromNode) {\n error('EventPluginUtils.setComponentTree(...): Injected ' + 'module is missing getNodeFromInstance or getInstanceFromNode.');\n }\n }\n}\nvar validateEventDispatches;\n\n{\n validateEventDispatches = function (event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n var listenersIsArr = Array.isArray(dispatchListeners);\n var listenersLen = listenersIsArr ? dispatchListeners.length : dispatchListeners ? 1 : 0;\n var instancesIsArr = Array.isArray(dispatchInstances);\n var instancesLen = instancesIsArr ? dispatchInstances.length : dispatchInstances ? 1 : 0;\n\n if (instancesIsArr !== listenersIsArr || instancesLen !== listenersLen) {\n error('EventPluginUtils: Invalid `event`.');\n }\n };\n}\n/**\n * Dispatch the event to the listener.\n * @param {SyntheticEvent} event SyntheticEvent to handle\n * @param {function} listener Application-level callback\n * @param {*} inst Internal component instance\n */\n\n\nfunction executeDispatch(event, listener, inst) {\n var type = event.type || 'unknown-event';\n event.currentTarget = getNodeFromInstance(inst);\n invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);\n event.currentTarget = null;\n}\n/**\n * Standard/simple iteration through an event's collected dispatches.\n */\n\nfunction executeDispatchesInOrder(event) {\n var dispatchListeners = event._dispatchListeners;\n var dispatchInstances = event._dispatchInstances;\n\n {\n validateEventDispatches(event);\n }\n\n if (Array.isArray(dispatchListeners)) {\n for (var i = 0; i < dispatchListeners.length; i++) {\n if (event.isPropagationStopped()) {\n break;\n } // Listeners and Instances are two parallel arrays that are always in sync.\n\n\n executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);\n }\n } else if (dispatchListeners) {\n executeDispatch(event, dispatchListeners, dispatchInstances);\n }\n\n event._dispatchListeners = null;\n event._dispatchInstances = null;\n}\n\nvar FunctionComponent = 0;\nvar ClassComponent = 1;\nvar IndeterminateComponent = 2; // Before we know whether it is function or class\n\nvar HostRoot = 3; // Root of a host tree. Could be nested inside another node.\n\nvar HostPortal = 4; // A subtree. Could be an entry point to a different renderer.\n\nvar HostComponent = 5;\nvar HostText = 6;\nvar Fragment = 7;\nvar Mode = 8;\nvar ContextConsumer = 9;\nvar ContextProvider = 10;\nvar ForwardRef = 11;\nvar Profiler = 12;\nvar SuspenseComponent = 13;\nvar MemoComponent = 14;\nvar SimpleMemoComponent = 15;\nvar LazyComponent = 16;\nvar IncompleteClassComponent = 17;\nvar DehydratedFragment = 18;\nvar SuspenseListComponent = 19;\nvar FundamentalComponent = 20;\nvar ScopeComponent = 21;\nvar Block = 22;\n\n/**\n * Injectable ordering of event plugins.\n */\nvar eventPluginOrder = null;\n/**\n * Injectable mapping from names to event plugin modules.\n */\n\nvar namesToPlugins = {};\n/**\n * Recomputes the plugin list using the injected plugins and plugin ordering.\n *\n * @private\n */\n\nfunction recomputePluginOrdering() {\n if (!eventPluginOrder) {\n // Wait until an `eventPluginOrder` is injected.\n return;\n }\n\n for (var pluginName in namesToPlugins) {\n var pluginModule = namesToPlugins[pluginName];\n var pluginIndex = eventPluginOrder.indexOf(pluginName);\n\n if (!(pluginIndex > -1)) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `\" + pluginName + \"`.\" );\n }\n }\n\n if (plugins[pluginIndex]) {\n continue;\n }\n\n if (!pluginModule.extractEvents) {\n {\n throw Error( \"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `\" + pluginName + \"` does not.\" );\n }\n }\n\n plugins[pluginIndex] = pluginModule;\n var publishedEvents = pluginModule.eventTypes;\n\n for (var eventName in publishedEvents) {\n if (!publishEventForPlugin(publishedEvents[eventName], pluginModule, eventName)) {\n {\n throw Error( \"EventPluginRegistry: Failed to publish event `\" + eventName + \"` for plugin `\" + pluginName + \"`.\" );\n }\n }\n }\n }\n}\n/**\n * Publishes an event so that it can be dispatched by the supplied plugin.\n *\n * @param {object} dispatchConfig Dispatch configuration for the event.\n * @param {object} PluginModule Plugin publishing the event.\n * @return {boolean} True if the event was successfully published.\n * @private\n */\n\n\nfunction publishEventForPlugin(dispatchConfig, pluginModule, eventName) {\n if (!!eventNameDispatchConfigs.hasOwnProperty(eventName)) {\n {\n throw Error( \"EventPluginRegistry: More than one plugin attempted to publish the same event name, `\" + eventName + \"`.\" );\n }\n }\n\n eventNameDispatchConfigs[eventName] = dispatchConfig;\n var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;\n\n if (phasedRegistrationNames) {\n for (var phaseName in phasedRegistrationNames) {\n if (phasedRegistrationNames.hasOwnProperty(phaseName)) {\n var phasedRegistrationName = phasedRegistrationNames[phaseName];\n publishRegistrationName(phasedRegistrationName, pluginModule, eventName);\n }\n }\n\n return true;\n } else if (dispatchConfig.registrationName) {\n publishRegistrationName(dispatchConfig.registrationName, pluginModule, eventName);\n return true;\n }\n\n return false;\n}\n/**\n * Publishes a registration name that is used to identify dispatched events.\n *\n * @param {string} registrationName Registration name to add.\n * @param {object} PluginModule Plugin publishing the event.\n * @private\n */\n\n\nfunction publishRegistrationName(registrationName, pluginModule, eventName) {\n if (!!registrationNameModules[registrationName]) {\n {\n throw Error( \"EventPluginRegistry: More than one plugin attempted to publish the same registration name, `\" + registrationName + \"`.\" );\n }\n }\n\n registrationNameModules[registrationName] = pluginModule;\n registrationNameDependencies[registrationName] = pluginModule.eventTypes[eventName].dependencies;\n\n {\n var lowerCasedName = registrationName.toLowerCase();\n possibleRegistrationNames[lowerCasedName] = registrationName;\n\n if (registrationName === 'onDoubleClick') {\n possibleRegistrationNames.ondblclick = registrationName;\n }\n }\n}\n/**\n * Registers plugins so that they can extract and dispatch events.\n */\n\n/**\n * Ordered list of injected plugins.\n */\n\n\nvar plugins = [];\n/**\n * Mapping from event name to dispatch config\n */\n\nvar eventNameDispatchConfigs = {};\n/**\n * Mapping from registration name to plugin module\n */\n\nvar registrationNameModules = {};\n/**\n * Mapping from registration name to event name\n */\n\nvar registrationNameDependencies = {};\n/**\n * Mapping from lowercase registration names to the properly cased version,\n * used to warn in the case of missing event handlers. Available\n * only in true.\n * @type {Object}\n */\n\nvar possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true\n\n/**\n * Injects an ordering of plugins (by plugin name). This allows the ordering\n * to be decoupled from injection of the actual plugins so that ordering is\n * always deterministic regardless of packaging, on-the-fly injection, etc.\n *\n * @param {array} InjectedEventPluginOrder\n * @internal\n */\n\nfunction injectEventPluginOrder(injectedEventPluginOrder) {\n if (!!eventPluginOrder) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.\" );\n }\n } // Clone the ordering so it cannot be dynamically mutated.\n\n\n eventPluginOrder = Array.prototype.slice.call(injectedEventPluginOrder);\n recomputePluginOrdering();\n}\n/**\n * Injects plugins to be used by plugin event system. The plugin names must be\n * in the ordering injected by `injectEventPluginOrder`.\n *\n * Plugins can be injected as part of page initialization or on-the-fly.\n *\n * @param {object} injectedNamesToPlugins Map from names to plugin modules.\n * @internal\n */\n\nfunction injectEventPluginsByName(injectedNamesToPlugins) {\n var isOrderingDirty = false;\n\n for (var pluginName in injectedNamesToPlugins) {\n if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {\n continue;\n }\n\n var pluginModule = injectedNamesToPlugins[pluginName];\n\n if (!namesToPlugins.hasOwnProperty(pluginName) || namesToPlugins[pluginName] !== pluginModule) {\n if (!!namesToPlugins[pluginName]) {\n {\n throw Error( \"EventPluginRegistry: Cannot inject two different event plugins using the same name, `\" + pluginName + \"`.\" );\n }\n }\n\n namesToPlugins[pluginName] = pluginModule;\n isOrderingDirty = true;\n }\n }\n\n if (isOrderingDirty) {\n recomputePluginOrdering();\n }\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar PLUGIN_EVENT_SYSTEM = 1;\nvar IS_REPLAYED = 1 << 5;\nvar IS_FIRST_ANCESTOR = 1 << 6;\n\nvar restoreImpl = null;\nvar restoreTarget = null;\nvar restoreQueue = null;\n\nfunction restoreStateOfTarget(target) {\n // We perform this translation at the end of the event loop so that we\n // always receive the correct fiber here\n var internalInstance = getInstanceFromNode(target);\n\n if (!internalInstance) {\n // Unmounted\n return;\n }\n\n if (!(typeof restoreImpl === 'function')) {\n {\n throw Error( \"setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n\n var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.\n\n if (stateNode) {\n var _props = getFiberCurrentPropsFromNode(stateNode);\n\n restoreImpl(internalInstance.stateNode, internalInstance.type, _props);\n }\n}\n\nfunction setRestoreImplementation(impl) {\n restoreImpl = impl;\n}\nfunction enqueueStateRestore(target) {\n if (restoreTarget) {\n if (restoreQueue) {\n restoreQueue.push(target);\n } else {\n restoreQueue = [target];\n }\n } else {\n restoreTarget = target;\n }\n}\nfunction needsStateRestore() {\n return restoreTarget !== null || restoreQueue !== null;\n}\nfunction restoreStateIfNeeded() {\n if (!restoreTarget) {\n return;\n }\n\n var target = restoreTarget;\n var queuedTargets = restoreQueue;\n restoreTarget = null;\n restoreQueue = null;\n restoreStateOfTarget(target);\n\n if (queuedTargets) {\n for (var i = 0; i < queuedTargets.length; i++) {\n restoreStateOfTarget(queuedTargets[i]);\n }\n }\n}\n\nvar enableProfilerTimer = true; // Trace which interactions trigger each commit.\n\nvar enableDeprecatedFlareAPI = false; // Experimental Host Component support.\n\nvar enableFundamentalAPI = false; // Experimental Scope support.\nvar warnAboutStringRefs = false;\n\n// the renderer. Such as when we're dispatching events or if third party\n// libraries need to call batchedUpdates. Eventually, this API will go away when\n// everything is batched by default. We'll then have a similar API to opt-out of\n// scheduled work and instead do synchronous work.\n// Defaults\n\nvar batchedUpdatesImpl = function (fn, bookkeeping) {\n return fn(bookkeeping);\n};\n\nvar discreteUpdatesImpl = function (fn, a, b, c, d) {\n return fn(a, b, c, d);\n};\n\nvar flushDiscreteUpdatesImpl = function () {};\n\nvar batchedEventUpdatesImpl = batchedUpdatesImpl;\nvar isInsideEventHandler = false;\nvar isBatchingEventUpdates = false;\n\nfunction finishEventHandler() {\n // Here we wait until all updates have propagated, which is important\n // when using controlled components within layers:\n // https://github.com/facebook/react/issues/1698\n // Then we restore state of any controlled component.\n var controlledComponentsHavePendingUpdates = needsStateRestore();\n\n if (controlledComponentsHavePendingUpdates) {\n // If a controlled event was fired, we may need to restore the state of\n // the DOM node back to the controlled value. This is necessary when React\n // bails out of the update without touching the DOM.\n flushDiscreteUpdatesImpl();\n restoreStateIfNeeded();\n }\n}\n\nfunction batchedUpdates(fn, bookkeeping) {\n if (isInsideEventHandler) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(bookkeeping);\n }\n\n isInsideEventHandler = true;\n\n try {\n return batchedUpdatesImpl(fn, bookkeeping);\n } finally {\n isInsideEventHandler = false;\n finishEventHandler();\n }\n}\nfunction batchedEventUpdates(fn, a, b) {\n if (isBatchingEventUpdates) {\n // If we are currently inside another batch, we need to wait until it\n // fully completes before restoring state.\n return fn(a, b);\n }\n\n isBatchingEventUpdates = true;\n\n try {\n return batchedEventUpdatesImpl(fn, a, b);\n } finally {\n isBatchingEventUpdates = false;\n finishEventHandler();\n }\n} // This is for the React Flare event system\nfunction discreteUpdates(fn, a, b, c, d) {\n var prevIsInsideEventHandler = isInsideEventHandler;\n isInsideEventHandler = true;\n\n try {\n return discreteUpdatesImpl(fn, a, b, c, d);\n } finally {\n isInsideEventHandler = prevIsInsideEventHandler;\n\n if (!isInsideEventHandler) {\n finishEventHandler();\n }\n }\n}\nfunction flushDiscreteUpdatesIfNeeded(timeStamp) {\n // event.timeStamp isn't overly reliable due to inconsistencies in\n // how different browsers have historically provided the time stamp.\n // Some browsers provide high-resolution time stamps for all events,\n // some provide low-resolution time stamps for all events. FF < 52\n // even mixes both time stamps together. Some browsers even report\n // negative time stamps or time stamps that are 0 (iOS9) in some cases.\n // Given we are only comparing two time stamps with equality (!==),\n // we are safe from the resolution differences. If the time stamp is 0\n // we bail-out of preventing the flush, which can affect semantics,\n // such as if an earlier flush removes or adds event listeners that\n // are fired in the subsequent flush. However, this is the same\n // behaviour as we had before this change, so the risks are low.\n if (!isInsideEventHandler && (!enableDeprecatedFlareAPI )) {\n flushDiscreteUpdatesImpl();\n }\n}\nfunction setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {\n batchedUpdatesImpl = _batchedUpdatesImpl;\n discreteUpdatesImpl = _discreteUpdatesImpl;\n flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;\n batchedEventUpdatesImpl = _batchedEventUpdatesImpl;\n}\n\nvar DiscreteEvent = 0;\nvar UserBlockingEvent = 1;\nvar ContinuousEvent = 2;\n\n// A reserved attribute.\n// It is handled by React separately and shouldn't be written to the DOM.\nvar RESERVED = 0; // A simple string attribute.\n// Attributes that aren't in the whitelist are presumed to have this type.\n\nvar STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called\n// \"enumerated\" attributes with \"true\" and \"false\" as possible values.\n// When true, it should be set to a \"true\" string.\n// When false, it should be set to a \"false\" string.\n\nvar BOOLEANISH_STRING = 2; // A real boolean attribute.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n\nvar BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.\n// When true, it should be present (set either to an empty string or its name).\n// When false, it should be omitted.\n// For any other value, should be present with that value.\n\nvar OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.\n// When falsy, it should be removed.\n\nvar NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.\n// When falsy, it should be removed.\n\nvar POSITIVE_NUMERIC = 6;\n\n/* eslint-disable max-len */\nvar ATTRIBUTE_NAME_START_CHAR = \":A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\";\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + \"\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040\";\nvar ROOT_ATTRIBUTE_NAME = 'data-reactroot';\nvar VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar illegalAttributeNameCache = {};\nvar validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {\n return true;\n }\n\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {\n return false;\n }\n\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {\n validatedAttributeNameCache[attributeName] = true;\n return true;\n }\n\n illegalAttributeNameCache[attributeName] = true;\n\n {\n error('Invalid attribute name: `%s`', attributeName);\n }\n\n return false;\n}\nfunction shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null) {\n return propertyInfo.type === RESERVED;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {\n return true;\n }\n\n return false;\n}\nfunction shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {\n if (propertyInfo !== null && propertyInfo.type === RESERVED) {\n return false;\n }\n\n switch (typeof value) {\n case 'function': // $FlowIssue symbol is perfectly valid here\n\n case 'symbol':\n // eslint-disable-line\n return true;\n\n case 'boolean':\n {\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n return !propertyInfo.acceptsBooleans;\n } else {\n var prefix = name.toLowerCase().slice(0, 5);\n return prefix !== 'data-' && prefix !== 'aria-';\n }\n }\n\n default:\n return false;\n }\n}\nfunction shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {\n if (value === null || typeof value === 'undefined') {\n return true;\n }\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {\n return true;\n }\n\n if (isCustomComponentTag) {\n return false;\n }\n\n if (propertyInfo !== null) {\n switch (propertyInfo.type) {\n case BOOLEAN:\n return !value;\n\n case OVERLOADED_BOOLEAN:\n return value === false;\n\n case NUMERIC:\n return isNaN(value);\n\n case POSITIVE_NUMERIC:\n return isNaN(value) || value < 1;\n }\n }\n\n return false;\n}\nfunction getPropertyInfo(name) {\n return properties.hasOwnProperty(name) ? properties[name] : null;\n}\n\nfunction PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {\n this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;\n this.attributeName = attributeName;\n this.attributeNamespace = attributeNamespace;\n this.mustUseProperty = mustUseProperty;\n this.propertyName = name;\n this.type = type;\n this.sanitizeURL = sanitizeURL;\n} // When adding attributes to this list, be sure to also add them to\n// the `possibleStandardNames` module to ensure casing and incorrect\n// name warnings.\n\n\nvar properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.\n\nvar reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular\n// elements (not just inputs). Now that ReactDOMInput assigns to the\n// defaultValue property -- do we need this?\n'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];\n\nreservedProps.forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // A few React string attributes have a different name.\n// This is a mapping from React prop names to the attribute names.\n\n[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {\n var name = _ref[0],\n attributeName = _ref[1];\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, // attributeName\n null, // attributeNamespace\n false);\n}); // These are \"enumerated\" HTML attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n\n['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These are \"enumerated\" SVG attributes that accept \"true\" and \"false\".\n// In React, we let users pass `true` and `false` even though technically\n// these aren't boolean attributes (they are coerced to strings).\n// Since these are SVG attributes, their attribute names are case-sensitive.\n\n['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML boolean attributes.\n\n['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM\n// on the client side because the browsers are inconsistent. Instead we call focus().\n'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata\n'itemScope'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These are the few React props that we set as DOM properties\n// rather than attributes. These are all booleans.\n\n['checked', // Note: `option.selected` is not updated if `select.multiple` is\n// disabled with `removeAttribute`. We have special logic for handling this.\n'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that are \"overloaded booleans\": they behave like\n// booleans, but can also accept a string value.\n\n['capture', 'download' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that must be positive numbers.\n\n['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty\n name, // attributeName\n null, // attributeNamespace\n false);\n}); // These are HTML attributes that must be numbers.\n\n['rowSpan', 'start'].forEach(function (name) {\n properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty\n name.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n});\nvar CAMELIZE = /[\\-\\:]([a-z])/g;\n\nvar capitalize = function (token) {\n return token[1].toUpperCase();\n}; // This is a list of all SVG attributes that need special casing, namespacing,\n// or boolean value assignment. Regular attributes that just accept strings\n// and have the same names are omitted, just like in the HTML whitelist.\n// Some of these attributes can be hard to find. This list was created by\n// scraping the MDN documentation.\n\n\n['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, null, // attributeNamespace\n false);\n}); // String SVG attributes with the xlink namespace.\n\n['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/1999/xlink', false);\n}); // String SVG attributes with the xml namespace.\n\n['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,\n// you'll need to set attributeName to name.toLowerCase()\n// instead in the assignment below.\n].forEach(function (attributeName) {\n var name = attributeName.replace(CAMELIZE, capitalize);\n properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty\n attributeName, 'http://www.w3.org/XML/1998/namespace', false);\n}); // These attribute exists both in HTML and SVG.\n// The attribute name is case-sensitive in SVG so we can't just use\n// the React name like we do for attributes that exist only in HTML.\n\n['tabIndex', 'crossOrigin'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n false);\n}); // These attributes accept URLs. These must not allow javascript: URLS.\n// These will also need to accept Trusted Types object in the future.\n\nvar xlinkHref = 'xlinkHref';\nproperties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty\n'xlink:href', 'http://www.w3.org/1999/xlink', true);\n['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {\n properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty\n attributeName.toLowerCase(), // attributeName\n null, // attributeNamespace\n true);\n});\n\nvar ReactDebugCurrentFrame = null;\n\n{\n ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n} // A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\n/* eslint-disable max-len */\n\n\nvar isJavaScriptProtocol = /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*\\:/i;\nvar didWarn = false;\n\nfunction sanitizeURL(url) {\n {\n if (!didWarn && isJavaScriptProtocol.test(url)) {\n didWarn = true;\n\n error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));\n }\n }\n}\n\n/**\n * Get the value for a property on a node. Only used in DEV for SSR validation.\n * The \"expected\" argument is used as a hint of what the expected value is.\n * Some properties have multiple equivalent values.\n */\nfunction getValueForProperty(node, name, expected, propertyInfo) {\n {\n if (propertyInfo.mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n return node[propertyName];\n } else {\n if ( propertyInfo.sanitizeURL) {\n // If we haven't fully disabled javascript: URLs, and if\n // the hydration is successful of a javascript: URL, we\n // still want to warn on the client.\n sanitizeURL('' + expected);\n }\n\n var attributeName = propertyInfo.attributeName;\n var stringValue = null;\n\n if (propertyInfo.type === OVERLOADED_BOOLEAN) {\n if (node.hasAttribute(attributeName)) {\n var value = node.getAttribute(attributeName);\n\n if (value === '') {\n return true;\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return value;\n }\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n } else if (node.hasAttribute(attributeName)) {\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n // We had an attribute but shouldn't have had one, so read it\n // for the error message.\n return node.getAttribute(attributeName);\n }\n\n if (propertyInfo.type === BOOLEAN) {\n // If this was a boolean, it doesn't matter what the value is\n // the fact that we have it is the same as the expected.\n return expected;\n } // Even if this property uses a namespace we use getAttribute\n // because we assume its namespaced name is the same as our config.\n // To use getAttributeNS we need the local name which we don't have\n // in our config atm.\n\n\n stringValue = node.getAttribute(attributeName);\n }\n\n if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {\n return stringValue === null ? expected : stringValue;\n } else if (stringValue === '' + expected) {\n return expected;\n } else {\n return stringValue;\n }\n }\n }\n}\n/**\n * Get the value for a attribute on a node. Only used in DEV for SSR validation.\n * The third argument is used as a hint of what the expected value is. Some\n * attributes have multiple equivalent values.\n */\n\nfunction getValueForAttribute(node, name, expected) {\n {\n if (!isAttributeNameSafe(name)) {\n return;\n }\n\n if (!node.hasAttribute(name)) {\n return expected === undefined ? undefined : null;\n }\n\n var value = node.getAttribute(name);\n\n if (value === '' + expected) {\n return expected;\n }\n\n return value;\n }\n}\n/**\n * Sets the value for a property on a node.\n *\n * @param {DOMElement} node\n * @param {string} name\n * @param {*} value\n */\n\nfunction setValueForProperty(node, name, value, isCustomComponentTag) {\n var propertyInfo = getPropertyInfo(name);\n\n if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {\n return;\n }\n\n if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {\n value = null;\n } // If the prop isn't in the special list, treat it as a simple attribute.\n\n\n if (isCustomComponentTag || propertyInfo === null) {\n if (isAttributeNameSafe(name)) {\n var _attributeName = name;\n\n if (value === null) {\n node.removeAttribute(_attributeName);\n } else {\n node.setAttribute(_attributeName, '' + value);\n }\n }\n\n return;\n }\n\n var mustUseProperty = propertyInfo.mustUseProperty;\n\n if (mustUseProperty) {\n var propertyName = propertyInfo.propertyName;\n\n if (value === null) {\n var type = propertyInfo.type;\n node[propertyName] = type === BOOLEAN ? false : '';\n } else {\n // Contrary to `setAttribute`, object properties are properly\n // `toString`ed by IE8/9.\n node[propertyName] = value;\n }\n\n return;\n } // The rest are treated as attributes with special cases.\n\n\n var attributeName = propertyInfo.attributeName,\n attributeNamespace = propertyInfo.attributeNamespace;\n\n if (value === null) {\n node.removeAttribute(attributeName);\n } else {\n var _type = propertyInfo.type;\n var attributeValue;\n\n if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {\n // If attribute type is boolean, we know for sure it won't be an execution sink\n // and we won't require Trusted Type here.\n attributeValue = '';\n } else {\n // `setAttribute` with objects becomes only `[object]` in IE8/9,\n // ('' + value) makes it output the correct toString()-value.\n {\n attributeValue = '' + value;\n }\n\n if (propertyInfo.sanitizeURL) {\n sanitizeURL(attributeValue.toString());\n }\n }\n\n if (attributeNamespace) {\n node.setAttributeNS(attributeNamespace, attributeName, attributeValue);\n } else {\n node.setAttribute(attributeName, attributeValue);\n }\n }\n}\n\nvar BEFORE_SLASH_RE = /^(.*)[\\\\\\/]/;\nfunction describeComponentFrame (name, source, ownerName) {\n var sourceInfo = '';\n\n if (source) {\n var path = source.fileName;\n var fileName = path.replace(BEFORE_SLASH_RE, '');\n\n {\n // In DEV, include code for a common special case:\n // prefer \"folder/index.js\" instead of just \"index.js\".\n if (/^index\\./.test(fileName)) {\n var match = path.match(BEFORE_SLASH_RE);\n\n if (match) {\n var pathBeforeSlash = match[1];\n\n if (pathBeforeSlash) {\n var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');\n fileName = folderName + '/' + fileName;\n }\n }\n }\n }\n\n sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';\n } else if (ownerName) {\n sourceInfo = ' (created by ' + ownerName + ')';\n }\n\n return '\\n in ' + (name || 'Unknown') + sourceInfo;\n}\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar Uninitialized = -1;\nvar Pending = 0;\nvar Resolved = 1;\nvar Rejected = 2;\nfunction refineResolvedLazyComponent(lazyComponent) {\n return lazyComponent._status === Resolved ? lazyComponent._result : null;\n}\nfunction initializeLazyComponentType(lazyComponent) {\n if (lazyComponent._status === Uninitialized) {\n lazyComponent._status = Pending;\n var ctor = lazyComponent._ctor;\n var thenable = ctor();\n lazyComponent._result = thenable;\n thenable.then(function (moduleObject) {\n if (lazyComponent._status === Pending) {\n var defaultExport = moduleObject.default;\n\n {\n if (defaultExport === undefined) {\n error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\\n\\nYour code should look like: \\n ' + \"const MyComponent = lazy(() => import('./MyComponent'))\", moduleObject);\n }\n }\n\n lazyComponent._status = Resolved;\n lazyComponent._result = defaultExport;\n }\n }, function (error) {\n if (lazyComponent._status === Pending) {\n lazyComponent._status = Rejected;\n lazyComponent._result = error;\n }\n });\n }\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var functionName = innerType.displayName || innerType.name || '';\n return outerType.displayName || (functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName);\n}\n\nfunction getComponentName(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n return 'Context.Consumer';\n\n case REACT_PROVIDER_TYPE:\n return 'Context.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n return getComponentName(type.type);\n\n case REACT_BLOCK_TYPE:\n return getComponentName(type.render);\n\n case REACT_LAZY_TYPE:\n {\n var thenable = type;\n var resolvedThenable = refineResolvedLazyComponent(thenable);\n\n if (resolvedThenable) {\n return getComponentName(resolvedThenable);\n }\n\n break;\n }\n }\n }\n\n return null;\n}\n\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction describeFiber(fiber) {\n switch (fiber.tag) {\n case HostRoot:\n case HostPortal:\n case HostText:\n case Fragment:\n case ContextProvider:\n case ContextConsumer:\n return '';\n\n default:\n var owner = fiber._debugOwner;\n var source = fiber._debugSource;\n var name = getComponentName(fiber.type);\n var ownerName = null;\n\n if (owner) {\n ownerName = getComponentName(owner.type);\n }\n\n return describeComponentFrame(name, source, ownerName);\n }\n}\n\nfunction getStackByFiberInDevAndProd(workInProgress) {\n var info = '';\n var node = workInProgress;\n\n do {\n info += describeFiber(node);\n node = node.return;\n } while (node);\n\n return info;\n}\nvar current = null;\nvar isRendering = false;\nfunction getCurrentFiberOwnerNameInDevOrNull() {\n {\n if (current === null) {\n return null;\n }\n\n var owner = current._debugOwner;\n\n if (owner !== null && typeof owner !== 'undefined') {\n return getComponentName(owner.type);\n }\n }\n\n return null;\n}\nfunction getCurrentFiberStackInDev() {\n {\n if (current === null) {\n return '';\n } // Safe because if current fiber exists, we are reconciling,\n // and it is guaranteed to be the work-in-progress version.\n\n\n return getStackByFiberInDevAndProd(current);\n }\n}\nfunction resetCurrentFiber() {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = null;\n current = null;\n isRendering = false;\n }\n}\nfunction setCurrentFiber(fiber) {\n {\n ReactDebugCurrentFrame$1.getCurrentStack = getCurrentFiberStackInDev;\n current = fiber;\n isRendering = false;\n }\n}\nfunction setIsRendering(rendering) {\n {\n isRendering = rendering;\n }\n}\n\n// Flow does not allow string concatenation of most non-string types. To work\n// around this limitation, we use an opaque type that can only be obtained by\n// passing the value through getToStringValue first.\nfunction toString(value) {\n return '' + value;\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n case 'object':\n case 'string':\n case 'undefined':\n return value;\n\n default:\n // function, symbol are assigned as empty strings\n return '';\n }\n}\n\nvar ReactDebugCurrentFrame$2 = null;\nvar ReactControlledValuePropTypes = {\n checkPropTypes: null\n};\n\n{\n ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;\n var hasReadOnlyValue = {\n button: true,\n checkbox: true,\n image: true,\n hidden: true,\n radio: true,\n reset: true,\n submit: true\n };\n var propTypes = {\n value: function (props, propName, componentName) {\n if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {\n return null;\n }\n\n return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n },\n checked: function (props, propName, componentName) {\n if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableDeprecatedFlareAPI ) {\n return null;\n }\n\n return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');\n }\n };\n /**\n * Provide a linked `value` attribute for controlled forms. You should not use\n * this outside of the ReactDOM controlled form components.\n */\n\n ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {\n checkPropTypes(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);\n };\n}\n\nfunction isCheckable(elem) {\n var type = elem.type;\n var nodeName = elem.nodeName;\n return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');\n}\n\nfunction getTracker(node) {\n return node._valueTracker;\n}\n\nfunction detachTracker(node) {\n node._valueTracker = null;\n}\n\nfunction getValueFromNode(node) {\n var value = '';\n\n if (!node) {\n return value;\n }\n\n if (isCheckable(node)) {\n value = node.checked ? 'true' : 'false';\n } else {\n value = node.value;\n }\n\n return value;\n}\n\nfunction trackValueOnNode(node) {\n var valueField = isCheckable(node) ? 'checked' : 'value';\n var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);\n var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail\n // and don't track value will cause over reporting of changes,\n // but it's better then a hard failure\n // (needed for certain tests that spyOn input values and Safari)\n\n if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {\n return;\n }\n\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: true,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = '' + value;\n set.call(this, value);\n }\n }); // We could've passed this the first time\n // but it triggers a bug in IE11 and Edge 14/15.\n // Calling defineProperty() again should be equivalent.\n // https://github.com/facebook/react/issues/11768\n\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n var tracker = {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = '' + value;\n },\n stopTracking: function () {\n detachTracker(node);\n delete node[valueField];\n }\n };\n return tracker;\n}\n\nfunction track(node) {\n if (getTracker(node)) {\n return;\n } // TODO: Once it's just Fiber we can move this to node._wrapperState\n\n\n node._valueTracker = trackValueOnNode(node);\n}\nfunction updateValueIfChanged(node) {\n if (!node) {\n return false;\n }\n\n var tracker = getTracker(node); // if there is no tracker at this point it's unlikely\n // that trying again will succeed\n\n if (!tracker) {\n return true;\n }\n\n var lastValue = tracker.getValue();\n var nextValue = getValueFromNode(node);\n\n if (nextValue !== lastValue) {\n tracker.setValue(nextValue);\n return true;\n }\n\n return false;\n}\n\nvar didWarnValueDefaultValue = false;\nvar didWarnCheckedDefaultChecked = false;\nvar didWarnControlledToUncontrolled = false;\nvar didWarnUncontrolledToControlled = false;\n\nfunction isControlled(props) {\n var usesChecked = props.type === 'checkbox' || props.type === 'radio';\n return usesChecked ? props.checked != null : props.value != null;\n}\n/**\n * Implements an host component that allows setting these optional\n * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.\n *\n * If `checked` or `value` are not supplied (or null/undefined), user actions\n * that affect the checked state or value will trigger updates to the element.\n *\n * If they are supplied (and not null/undefined), the rendered element will not\n * trigger updates to the element. Instead, the props must change in order for\n * the rendered element to be updated.\n *\n * The rendered element will be initialized as unchecked (or `defaultChecked`)\n * with an empty value (or `defaultValue`).\n *\n * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html\n */\n\n\nfunction getHostProps(element, props) {\n var node = element;\n var checked = props.checked;\n\n var hostProps = _assign({}, props, {\n defaultChecked: undefined,\n defaultValue: undefined,\n value: undefined,\n checked: checked != null ? checked : node._wrapperState.initialChecked\n });\n\n return hostProps;\n}\nfunction initWrapperState(element, props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('input', props);\n\n if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {\n error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnCheckedDefaultChecked = true;\n }\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {\n error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);\n\n didWarnValueDefaultValue = true;\n }\n }\n\n var node = element;\n var defaultValue = props.defaultValue == null ? '' : props.defaultValue;\n node._wrapperState = {\n initialChecked: props.checked != null ? props.checked : props.defaultChecked,\n initialValue: getToStringValue(props.value != null ? props.value : defaultValue),\n controlled: isControlled(props)\n };\n}\nfunction updateChecked(element, props) {\n var node = element;\n var checked = props.checked;\n\n if (checked != null) {\n setValueForProperty(node, 'checked', checked, false);\n }\n}\nfunction updateWrapper(element, props) {\n var node = element;\n\n {\n var controlled = isControlled(props);\n\n if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {\n error('A component is changing an uncontrolled input of type %s to be controlled. ' + 'Input elements should not switch from uncontrolled to controlled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n\n didWarnUncontrolledToControlled = true;\n }\n\n if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {\n error('A component is changing a controlled input of type %s to be uncontrolled. ' + 'Input elements should not switch from controlled to uncontrolled (or vice versa). ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://fb.me/react-controlled-components', props.type);\n\n didWarnControlledToUncontrolled = true;\n }\n }\n\n updateChecked(element, props);\n var value = getToStringValue(props.value);\n var type = props.type;\n\n if (value != null) {\n if (type === 'number') {\n if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.\n // eslint-disable-next-line\n node.value != value) {\n node.value = toString(value);\n }\n } else if (node.value !== toString(value)) {\n node.value = toString(value);\n }\n } else if (type === 'submit' || type === 'reset') {\n // Submit/reset inputs need the attribute removed completely to avoid\n // blank-text buttons.\n node.removeAttribute('value');\n return;\n }\n\n {\n // When syncing the value attribute, the value comes from a cascade of\n // properties:\n // 1. The value React property\n // 2. The defaultValue React property\n // 3. Otherwise there should be no change\n if (props.hasOwnProperty('value')) {\n setDefaultValue(node, props.type, value);\n } else if (props.hasOwnProperty('defaultValue')) {\n setDefaultValue(node, props.type, getToStringValue(props.defaultValue));\n }\n }\n\n {\n // When syncing the checked attribute, it only changes when it needs\n // to be removed, such as transitioning from a checkbox into a text input\n if (props.checked == null && props.defaultChecked != null) {\n node.defaultChecked = !!props.defaultChecked;\n }\n }\n}\nfunction postMountWrapper(element, props, isHydrating) {\n var node = element; // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {\n var type = props.type;\n var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the\n // default value provided by the browser. See: #12872\n\n if (isButton && (props.value === undefined || props.value === null)) {\n return;\n }\n\n var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input\n // from being lost during SSR hydration.\n\n if (!isHydrating) {\n {\n // When syncing the value attribute, the value property should use\n // the wrapperState._initialValue property. This uses:\n //\n // 1. The value React property when present\n // 2. The defaultValue React property when present\n // 3. An empty string\n if (initialValue !== node.value) {\n node.value = initialValue;\n }\n }\n }\n\n {\n // Otherwise, the value attribute is synchronized to the property,\n // so we assign defaultValue to the same thing as the value property\n // assignment step above.\n node.defaultValue = initialValue;\n }\n } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug\n // this is needed to work around a chrome bug where setting defaultChecked\n // will sometimes influence the value of checked (even after detachment).\n // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416\n // We need to temporarily unset name to avoid disrupting radio button groups.\n\n\n var name = node.name;\n\n if (name !== '') {\n node.name = '';\n }\n\n {\n // When syncing the checked attribute, both the checked property and\n // attribute are assigned at the same time using defaultChecked. This uses:\n //\n // 1. The checked React property when present\n // 2. The defaultChecked React property when present\n // 3. Otherwise, false\n node.defaultChecked = !node.defaultChecked;\n node.defaultChecked = !!node._wrapperState.initialChecked;\n }\n\n if (name !== '') {\n node.name = name;\n }\n}\nfunction restoreControlledState(element, props) {\n var node = element;\n updateWrapper(node, props);\n updateNamedCousins(node, props);\n}\n\nfunction updateNamedCousins(rootNode, props) {\n var name = props.name;\n\n if (props.type === 'radio' && name != null) {\n var queryRoot = rootNode;\n\n while (queryRoot.parentNode) {\n queryRoot = queryRoot.parentNode;\n } // If `rootNode.form` was non-null, then we could try `form.elements`,\n // but that sometimes behaves strangely in IE8. We could also try using\n // `form.getElementsByName`, but that will only return direct children\n // and won't include inputs that use the HTML5 `form=` attribute. Since\n // the input might not even be in a form. It might not even be in the\n // document. Let's just use the local `querySelectorAll` to ensure we don't\n // miss anything.\n\n\n var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type=\"radio\"]');\n\n for (var i = 0; i < group.length; i++) {\n var otherNode = group[i];\n\n if (otherNode === rootNode || otherNode.form !== rootNode.form) {\n continue;\n } // This will throw if radio buttons rendered by different copies of React\n // and the same name are rendered into the same form (same as #1939).\n // That's probably okay; we don't support it just as we don't support\n // mixing React radio buttons with non-React ones.\n\n\n var otherProps = getFiberCurrentPropsFromNode$1(otherNode);\n\n if (!otherProps) {\n {\n throw Error( \"ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.\" );\n }\n } // We need update the tracked value on the named cousin since the value\n // was changed but the input saw no event or value set\n\n\n updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that\n // was previously checked to update will cause it to be come re-checked\n // as appropriate.\n\n updateWrapper(otherNode, otherProps);\n }\n }\n} // In Chrome, assigning defaultValue to certain input types triggers input validation.\n// For number inputs, the display value loses trailing decimal points. For email inputs,\n// Chrome raises \"The specified value is not a valid email address\".\n//\n// Here we check to see if the defaultValue has actually changed, avoiding these problems\n// when the user is inputting text\n//\n// https://github.com/facebook/react/issues/7253\n\n\nfunction setDefaultValue(node, type, value) {\n if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js\n type !== 'number' || node.ownerDocument.activeElement !== node) {\n if (value == null) {\n node.defaultValue = toString(node._wrapperState.initialValue);\n } else if (node.defaultValue !== toString(value)) {\n node.defaultValue = toString(value);\n }\n }\n}\n\nvar didWarnSelectedSetOnOption = false;\nvar didWarnInvalidChild = false;\n\nfunction flattenChildren(children) {\n var content = ''; // Flatten children. We'll warn if they are invalid\n // during validateProps() which runs for hydration too.\n // Note that this would throw on non-element objects.\n // Elements are stringified (which is normally irrelevant\n // but matters for ).\n\n React.Children.forEach(children, function (child) {\n if (child == null) {\n return;\n }\n\n content += child; // Note: we don't warn about invalid children here.\n // Instead, this is done separately below so that\n // it happens during the hydration codepath too.\n });\n return content;\n}\n/**\n * Implements an host component that warns when `selected` is set.\n */\n\n\nfunction validateProps(element, props) {\n {\n // This mirrors the codepath above, but runs for hydration too.\n // Warn about invalid children here so that client and hydration are consistent.\n // TODO: this seems like it could cause a DEV-only throw for hydration\n // if children contains a non-element object. We should try to avoid that.\n if (typeof props.children === 'object' && props.children !== null) {\n React.Children.forEach(props.children, function (child) {\n if (child == null) {\n return;\n }\n\n if (typeof child === 'string' || typeof child === 'number') {\n return;\n }\n\n if (typeof child.type !== 'string') {\n return;\n }\n\n if (!didWarnInvalidChild) {\n didWarnInvalidChild = true;\n\n error('Only strings and numbers are supported as children.');\n }\n });\n } // TODO: Remove support for `selected` in .\n\n\n if (props.selected != null && !didWarnSelectedSetOnOption) {\n error('Use the `defaultValue` or `value` props on instead of ' + 'setting `selected` on .');\n\n didWarnSelectedSetOnOption = true;\n }\n }\n}\nfunction postMountWrapper$1(element, props) {\n // value=\"\" should make a value attribute (#6219)\n if (props.value != null) {\n element.setAttribute('value', toString(getToStringValue(props.value)));\n }\n}\nfunction getHostProps$1(element, props) {\n var hostProps = _assign({\n children: undefined\n }, props);\n\n var content = flattenChildren(props.children);\n\n if (content) {\n hostProps.children = content;\n }\n\n return hostProps;\n}\n\nvar didWarnValueDefaultValue$1;\n\n{\n didWarnValueDefaultValue$1 = false;\n}\n\nfunction getDeclarationErrorAddendum() {\n var ownerName = getCurrentFiberOwnerNameInDevOrNull();\n\n if (ownerName) {\n return '\\n\\nCheck the render method of `' + ownerName + '`.';\n }\n\n return '';\n}\n\nvar valuePropNames = ['value', 'defaultValue'];\n/**\n * Validation function for `value` and `defaultValue`.\n */\n\nfunction checkSelectPropTypes(props) {\n {\n ReactControlledValuePropTypes.checkPropTypes('select', props);\n\n for (var i = 0; i < valuePropNames.length; i++) {\n var propName = valuePropNames[i];\n\n if (props[propName] == null) {\n continue;\n }\n\n var isArray = Array.isArray(props[propName]);\n\n if (props.multiple && !isArray) {\n error('The `%s` prop supplied to must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());\n } else if (!props.multiple && isArray) {\n error('The `%s` prop supplied to must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());\n }\n }\n }\n}\n\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n var options = node.options;\n\n if (multiple) {\n var selectedValues = propValue;\n var selectedValue = {};\n\n for (var i = 0; i < selectedValues.length; i++) {\n // Prefix to avoid chaos with special keys.\n selectedValue['$' + selectedValues[i]] = true;\n }\n\n for (var _i = 0; _i < options.length; _i++) {\n var selected = selectedValue.hasOwnProperty('$' + options[_i].value);\n\n if (options[_i].selected !== selected) {\n options[_i].selected = selected;\n }\n\n if (selected && setDefaultSelected) {\n options[_i].defaultSelected = true;\n }\n }\n } else {\n // Do not set `select.value` as exact behavior isn't consistent across all\n // browsers for all cases.\n var _selectedValue = toString(getToStringValue(propValue));\n\n var defaultSelected = null;\n\n for (var _i2 = 0; _i2 < options.length; _i2++) {\n if (options[_i2].value === _selectedValue) {\n options[_i2].selected = true;\n\n if (setDefaultSelected) {\n options[_i2].defaultSelected = true;\n }\n\n return;\n }\n\n if (defaultSelected === null && !options[_i2].disabled) {\n defaultSelected = options[_i2];\n }\n }\n\n if (defaultSelected !== null) {\n defaultSelected.selected = true;\n }\n }\n}\n/**\n * Implements a host component that allows optionally setting the\n * props `value` and `defaultValue`. If `multiple` is false, the prop must be a\n * stringable. If `multiple` is true, the prop must be an array of stringables.\n *\n * If `value` is not supplied (or null/undefined), user actions that change the\n * selected option will trigger updates to the rendered options.\n *\n * If it is supplied (and not null/undefined), the rendered options will not\n * update in response to user actions. Instead, the `value` prop must change in\n * order for the rendered options to update.\n *\n * If `defaultValue` is provided, any options with the supplied values will be\n * selected.\n */\n\n\nfunction getHostProps$2(element, props) {\n return _assign({}, props, {\n value: undefined\n });\n}\nfunction initWrapperState$1(element, props) {\n var node = element;\n\n {\n checkSelectPropTypes(props);\n }\n\n node._wrapperState = {\n wasMultiple: !!props.multiple\n };\n\n {\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {\n error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components');\n\n didWarnValueDefaultValue$1 = true;\n }\n }\n}\nfunction postMountWrapper$2(element, props) {\n var node = element;\n node.multiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n }\n}\nfunction postUpdateWrapper(element, props) {\n var node = element;\n var wasMultiple = node._wrapperState.wasMultiple;\n node._wrapperState.wasMultiple = !!props.multiple;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n } else if (wasMultiple !== !!props.multiple) {\n // For simplicity, reapply `defaultValue` if `multiple` is toggled.\n if (props.defaultValue != null) {\n updateOptions(node, !!props.multiple, props.defaultValue, true);\n } else {\n // Revert the select back to its default unselected state.\n updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);\n }\n }\n}\nfunction restoreControlledState$1(element, props) {\n var node = element;\n var value = props.value;\n\n if (value != null) {\n updateOptions(node, !!props.multiple, value, false);\n }\n}\n\nvar didWarnValDefaultVal = false;\n\n/**\n * Implements a host component that allows setting `value`, and\n * `defaultValue`. This differs from the traditional DOM API because value is\n * usually set as PCDATA children.\n *\n * If `value` is not supplied (or null/undefined), user actions that affect the\n * value will trigger updates to the element.\n *\n * If `value` is supplied (and not null/undefined), the rendered element will\n * not trigger updates to the element. Instead, the `value` prop must change in\n * order for the rendered element to be updated.\n *\n * The rendered element will be initialized with an empty value, the prop\n * `defaultValue` if specified, or the children content (deprecated).\n */\nfunction getHostProps$3(element, props) {\n var node = element;\n\n if (!(props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( \"`dangerouslySetInnerHTML` does not make sense on .\" );\n }\n } // Always set children to the same thing. In IE9, the selection range will\n // get reset if `textContent` is mutated. We could add a check in setTextContent\n // to only set the value if/when the value differs from the node value (which would\n // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this\n // solution. The value can be a boolean or object so that's why it's forced\n // to be a string.\n\n\n var hostProps = _assign({}, props, {\n value: undefined,\n defaultValue: undefined,\n children: toString(node._wrapperState.initialValue)\n });\n\n return hostProps;\n}\nfunction initWrapperState$2(element, props) {\n var node = element;\n\n {\n ReactControlledValuePropTypes.checkPropTypes('textarea', props);\n\n if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {\n error('%s contains a textarea with both value and defaultValue props. ' + 'Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://fb.me/react-controlled-components', getCurrentFiberOwnerNameInDevOrNull() || 'A component');\n\n didWarnValDefaultVal = true;\n }\n }\n\n var initialValue = props.value; // Only bother fetching default value if we're going to use it\n\n if (initialValue == null) {\n var children = props.children,\n defaultValue = props.defaultValue;\n\n if (children != null) {\n {\n error('Use the `defaultValue` or `value` props instead of setting ' + 'children on .');\n }\n\n {\n if (!(defaultValue == null)) {\n {\n throw Error( \"If you supply `defaultValue` on a , do not pass children.\" );\n }\n }\n\n if (Array.isArray(children)) {\n if (!(children.length <= 1)) {\n {\n throw Error( \" can only have at most one child.\" );\n }\n }\n\n children = children[0];\n }\n\n defaultValue = children;\n }\n }\n\n if (defaultValue == null) {\n defaultValue = '';\n }\n\n initialValue = defaultValue;\n }\n\n node._wrapperState = {\n initialValue: getToStringValue(initialValue)\n };\n}\nfunction updateWrapper$1(element, props) {\n var node = element;\n var value = getToStringValue(props.value);\n var defaultValue = getToStringValue(props.defaultValue);\n\n if (value != null) {\n // Cast `value` to a string to ensure the value is set correctly. While\n // browsers typically do this as necessary, jsdom doesn't.\n var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed\n\n if (newValue !== node.value) {\n node.value = newValue;\n }\n\n if (props.defaultValue == null && node.defaultValue !== newValue) {\n node.defaultValue = newValue;\n }\n }\n\n if (defaultValue != null) {\n node.defaultValue = toString(defaultValue);\n }\n}\nfunction postMountWrapper$3(element, props) {\n var node = element; // This is in postMount because we need access to the DOM node, which is not\n // available until after the component has mounted.\n\n var textContent = node.textContent; // Only set node.value if textContent is equal to the expected\n // initial value. In IE10/IE11 there is a bug where the placeholder attribute\n // will populate textContent as well.\n // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/\n\n if (textContent === node._wrapperState.initialValue) {\n if (textContent !== '' && textContent !== null) {\n node.value = textContent;\n }\n }\n}\nfunction restoreControlledState$2(element, props) {\n // DOM component is still mounted; update\n updateWrapper$1(element, props);\n}\n\nvar HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\nvar MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\nvar SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\nvar Namespaces = {\n html: HTML_NAMESPACE,\n mathml: MATH_NAMESPACE,\n svg: SVG_NAMESPACE\n}; // Assumes there is no parent namespace.\n\nfunction getIntrinsicNamespace(type) {\n switch (type) {\n case 'svg':\n return SVG_NAMESPACE;\n\n case 'math':\n return MATH_NAMESPACE;\n\n default:\n return HTML_NAMESPACE;\n }\n}\nfunction getChildNamespace(parentNamespace, type) {\n if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {\n // No (or default) parent namespace: potential entry point.\n return getIntrinsicNamespace(type);\n }\n\n if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {\n // We're leaving SVG.\n return HTML_NAMESPACE;\n } // By default, pass namespace below.\n\n\n return parentNamespace;\n}\n\n/* globals MSApp */\n\n/**\n * Create a function which has 'unsafe' privileges (required by windows8 apps)\n */\nvar createMicrosoftUnsafeLocalFunction = function (func) {\n if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {\n return function (arg0, arg1, arg2, arg3) {\n MSApp.execUnsafeLocalFunction(function () {\n return func(arg0, arg1, arg2, arg3);\n });\n };\n } else {\n return func;\n }\n};\n\nvar reusableSVGContainer;\n/**\n * Set the innerHTML property of a node\n *\n * @param {DOMElement} node\n * @param {string} html\n * @internal\n */\n\nvar setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {\n if (node.namespaceURI === Namespaces.svg) {\n\n if (!('innerHTML' in node)) {\n // IE does not have innerHTML for SVG nodes, so instead we inject the\n // new markup in a temp node and then move the child nodes across into\n // the target node\n reusableSVGContainer = reusableSVGContainer || document.createElement('div');\n reusableSVGContainer.innerHTML = '' + html.valueOf().toString() + '';\n var svgNode = reusableSVGContainer.firstChild;\n\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n\n while (svgNode.firstChild) {\n node.appendChild(svgNode.firstChild);\n }\n\n return;\n }\n }\n\n node.innerHTML = html;\n});\n\n/**\n * HTML nodeType values that represent the type of the node\n */\nvar ELEMENT_NODE = 1;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\nvar DOCUMENT_NODE = 9;\nvar DOCUMENT_FRAGMENT_NODE = 11;\n\n/**\n * Set the textContent property of a node. For text updates, it's faster\n * to set the `nodeValue` of the Text node directly instead of using\n * `.textContent` which will remove the existing node and create a new one.\n *\n * @param {DOMElement} node\n * @param {string} text\n * @internal\n */\n\nvar setTextContent = function (node, text) {\n if (text) {\n var firstChild = node.firstChild;\n\n if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {\n firstChild.nodeValue = text;\n return;\n }\n }\n\n node.textContent = text;\n};\n\n// Do not use the below two methods directly!\n// Instead use constants exported from DOMTopLevelEventTypes in ReactDOM.\n// (It is the only module that is allowed to access these methods.)\nfunction unsafeCastStringToDOMTopLevelType(topLevelType) {\n return topLevelType;\n}\nfunction unsafeCastDOMTopLevelTypeToString(topLevelType) {\n return topLevelType;\n}\n\n/**\n * Generate a mapping of standard vendor prefixes using the defined style property and event name.\n *\n * @param {string} styleProp\n * @param {string} eventName\n * @returns {object}\n */\n\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes['Webkit' + styleProp] = 'webkit' + eventName;\n prefixes['Moz' + styleProp] = 'moz' + eventName;\n return prefixes;\n}\n/**\n * A list of event names to a configurable list of vendor prefixes.\n */\n\n\nvar vendorPrefixes = {\n animationend: makePrefixMap('Animation', 'AnimationEnd'),\n animationiteration: makePrefixMap('Animation', 'AnimationIteration'),\n animationstart: makePrefixMap('Animation', 'AnimationStart'),\n transitionend: makePrefixMap('Transition', 'TransitionEnd')\n};\n/**\n * Event names that have already been detected and prefixed (if applicable).\n */\n\nvar prefixedEventNames = {};\n/**\n * Element to check for prefixes on.\n */\n\nvar style = {};\n/**\n * Bootstrap if a DOM exists.\n */\n\nif (canUseDOM) {\n style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,\n // the un-prefixed \"animation\" and \"transition\" properties are defined on the\n // style object but the events that fire will still be prefixed, so we need\n // to check if the un-prefixed events are usable, and if not remove them from the map.\n\n if (!('AnimationEvent' in window)) {\n delete vendorPrefixes.animationend.animation;\n delete vendorPrefixes.animationiteration.animation;\n delete vendorPrefixes.animationstart.animation;\n } // Same as above\n\n\n if (!('TransitionEvent' in window)) {\n delete vendorPrefixes.transitionend.transition;\n }\n}\n/**\n * Attempts to determine the correct vendor prefixed event name.\n *\n * @param {string} eventName\n * @returns {string}\n */\n\n\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) {\n return prefixedEventNames[eventName];\n } else if (!vendorPrefixes[eventName]) {\n return eventName;\n }\n\n var prefixMap = vendorPrefixes[eventName];\n\n for (var styleProp in prefixMap) {\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {\n return prefixedEventNames[eventName] = prefixMap[styleProp];\n }\n }\n\n return eventName;\n}\n\n/**\n * To identify top level events in ReactDOM, we use constants defined by this\n * module. This is the only module that uses the unsafe* methods to express\n * that the constants actually correspond to the browser event names. This lets\n * us save some bundle size by avoiding a top level type -> event name map.\n * The rest of ReactDOM code should import top level types from this file.\n */\n\nvar TOP_ABORT = unsafeCastStringToDOMTopLevelType('abort');\nvar TOP_ANIMATION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationend'));\nvar TOP_ANIMATION_ITERATION = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationiteration'));\nvar TOP_ANIMATION_START = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('animationstart'));\nvar TOP_BLUR = unsafeCastStringToDOMTopLevelType('blur');\nvar TOP_CAN_PLAY = unsafeCastStringToDOMTopLevelType('canplay');\nvar TOP_CAN_PLAY_THROUGH = unsafeCastStringToDOMTopLevelType('canplaythrough');\nvar TOP_CANCEL = unsafeCastStringToDOMTopLevelType('cancel');\nvar TOP_CHANGE = unsafeCastStringToDOMTopLevelType('change');\nvar TOP_CLICK = unsafeCastStringToDOMTopLevelType('click');\nvar TOP_CLOSE = unsafeCastStringToDOMTopLevelType('close');\nvar TOP_COMPOSITION_END = unsafeCastStringToDOMTopLevelType('compositionend');\nvar TOP_COMPOSITION_START = unsafeCastStringToDOMTopLevelType('compositionstart');\nvar TOP_COMPOSITION_UPDATE = unsafeCastStringToDOMTopLevelType('compositionupdate');\nvar TOP_CONTEXT_MENU = unsafeCastStringToDOMTopLevelType('contextmenu');\nvar TOP_COPY = unsafeCastStringToDOMTopLevelType('copy');\nvar TOP_CUT = unsafeCastStringToDOMTopLevelType('cut');\nvar TOP_DOUBLE_CLICK = unsafeCastStringToDOMTopLevelType('dblclick');\nvar TOP_AUX_CLICK = unsafeCastStringToDOMTopLevelType('auxclick');\nvar TOP_DRAG = unsafeCastStringToDOMTopLevelType('drag');\nvar TOP_DRAG_END = unsafeCastStringToDOMTopLevelType('dragend');\nvar TOP_DRAG_ENTER = unsafeCastStringToDOMTopLevelType('dragenter');\nvar TOP_DRAG_EXIT = unsafeCastStringToDOMTopLevelType('dragexit');\nvar TOP_DRAG_LEAVE = unsafeCastStringToDOMTopLevelType('dragleave');\nvar TOP_DRAG_OVER = unsafeCastStringToDOMTopLevelType('dragover');\nvar TOP_DRAG_START = unsafeCastStringToDOMTopLevelType('dragstart');\nvar TOP_DROP = unsafeCastStringToDOMTopLevelType('drop');\nvar TOP_DURATION_CHANGE = unsafeCastStringToDOMTopLevelType('durationchange');\nvar TOP_EMPTIED = unsafeCastStringToDOMTopLevelType('emptied');\nvar TOP_ENCRYPTED = unsafeCastStringToDOMTopLevelType('encrypted');\nvar TOP_ENDED = unsafeCastStringToDOMTopLevelType('ended');\nvar TOP_ERROR = unsafeCastStringToDOMTopLevelType('error');\nvar TOP_FOCUS = unsafeCastStringToDOMTopLevelType('focus');\nvar TOP_GOT_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('gotpointercapture');\nvar TOP_INPUT = unsafeCastStringToDOMTopLevelType('input');\nvar TOP_INVALID = unsafeCastStringToDOMTopLevelType('invalid');\nvar TOP_KEY_DOWN = unsafeCastStringToDOMTopLevelType('keydown');\nvar TOP_KEY_PRESS = unsafeCastStringToDOMTopLevelType('keypress');\nvar TOP_KEY_UP = unsafeCastStringToDOMTopLevelType('keyup');\nvar TOP_LOAD = unsafeCastStringToDOMTopLevelType('load');\nvar TOP_LOAD_START = unsafeCastStringToDOMTopLevelType('loadstart');\nvar TOP_LOADED_DATA = unsafeCastStringToDOMTopLevelType('loadeddata');\nvar TOP_LOADED_METADATA = unsafeCastStringToDOMTopLevelType('loadedmetadata');\nvar TOP_LOST_POINTER_CAPTURE = unsafeCastStringToDOMTopLevelType('lostpointercapture');\nvar TOP_MOUSE_DOWN = unsafeCastStringToDOMTopLevelType('mousedown');\nvar TOP_MOUSE_MOVE = unsafeCastStringToDOMTopLevelType('mousemove');\nvar TOP_MOUSE_OUT = unsafeCastStringToDOMTopLevelType('mouseout');\nvar TOP_MOUSE_OVER = unsafeCastStringToDOMTopLevelType('mouseover');\nvar TOP_MOUSE_UP = unsafeCastStringToDOMTopLevelType('mouseup');\nvar TOP_PASTE = unsafeCastStringToDOMTopLevelType('paste');\nvar TOP_PAUSE = unsafeCastStringToDOMTopLevelType('pause');\nvar TOP_PLAY = unsafeCastStringToDOMTopLevelType('play');\nvar TOP_PLAYING = unsafeCastStringToDOMTopLevelType('playing');\nvar TOP_POINTER_CANCEL = unsafeCastStringToDOMTopLevelType('pointercancel');\nvar TOP_POINTER_DOWN = unsafeCastStringToDOMTopLevelType('pointerdown');\nvar TOP_POINTER_MOVE = unsafeCastStringToDOMTopLevelType('pointermove');\nvar TOP_POINTER_OUT = unsafeCastStringToDOMTopLevelType('pointerout');\nvar TOP_POINTER_OVER = unsafeCastStringToDOMTopLevelType('pointerover');\nvar TOP_POINTER_UP = unsafeCastStringToDOMTopLevelType('pointerup');\nvar TOP_PROGRESS = unsafeCastStringToDOMTopLevelType('progress');\nvar TOP_RATE_CHANGE = unsafeCastStringToDOMTopLevelType('ratechange');\nvar TOP_RESET = unsafeCastStringToDOMTopLevelType('reset');\nvar TOP_SCROLL = unsafeCastStringToDOMTopLevelType('scroll');\nvar TOP_SEEKED = unsafeCastStringToDOMTopLevelType('seeked');\nvar TOP_SEEKING = unsafeCastStringToDOMTopLevelType('seeking');\nvar TOP_SELECTION_CHANGE = unsafeCastStringToDOMTopLevelType('selectionchange');\nvar TOP_STALLED = unsafeCastStringToDOMTopLevelType('stalled');\nvar TOP_SUBMIT = unsafeCastStringToDOMTopLevelType('submit');\nvar TOP_SUSPEND = unsafeCastStringToDOMTopLevelType('suspend');\nvar TOP_TEXT_INPUT = unsafeCastStringToDOMTopLevelType('textInput');\nvar TOP_TIME_UPDATE = unsafeCastStringToDOMTopLevelType('timeupdate');\nvar TOP_TOGGLE = unsafeCastStringToDOMTopLevelType('toggle');\nvar TOP_TOUCH_CANCEL = unsafeCastStringToDOMTopLevelType('touchcancel');\nvar TOP_TOUCH_END = unsafeCastStringToDOMTopLevelType('touchend');\nvar TOP_TOUCH_MOVE = unsafeCastStringToDOMTopLevelType('touchmove');\nvar TOP_TOUCH_START = unsafeCastStringToDOMTopLevelType('touchstart');\nvar TOP_TRANSITION_END = unsafeCastStringToDOMTopLevelType(getVendorPrefixedEventName('transitionend'));\nvar TOP_VOLUME_CHANGE = unsafeCastStringToDOMTopLevelType('volumechange');\nvar TOP_WAITING = unsafeCastStringToDOMTopLevelType('waiting');\nvar TOP_WHEEL = unsafeCastStringToDOMTopLevelType('wheel'); // List of events that need to be individually attached to media elements.\n// Note that events in this list will *not* be listened to at the top level\n// unless they're explicitly whitelisted in `ReactBrowserEventEmitter.listenTo`.\n\nvar mediaEventTypes = [TOP_ABORT, TOP_CAN_PLAY, TOP_CAN_PLAY_THROUGH, TOP_DURATION_CHANGE, TOP_EMPTIED, TOP_ENCRYPTED, TOP_ENDED, TOP_ERROR, TOP_LOADED_DATA, TOP_LOADED_METADATA, TOP_LOAD_START, TOP_PAUSE, TOP_PLAY, TOP_PLAYING, TOP_PROGRESS, TOP_RATE_CHANGE, TOP_SEEKED, TOP_SEEKING, TOP_STALLED, TOP_SUSPEND, TOP_TIME_UPDATE, TOP_VOLUME_CHANGE, TOP_WAITING];\nfunction getRawEventName(topLevelType) {\n return unsafeCastDOMTopLevelTypeToString(topLevelType);\n}\n\nvar PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; // prettier-ignore\n\nvar elementListenerMap = new PossiblyWeakMap();\nfunction getListenerMapForElement(element) {\n var listenerMap = elementListenerMap.get(element);\n\n if (listenerMap === undefined) {\n listenerMap = new Map();\n elementListenerMap.set(element, listenerMap);\n }\n\n return listenerMap;\n}\n\n/**\n * `ReactInstanceMap` maintains a mapping from a public facing stateful\n * instance (key) and the internal representation (value). This allows public\n * methods to accept the user facing instance as an argument and map them back\n * to internal methods.\n *\n * Note that this module is currently shared and assumed to be stateless.\n * If this becomes an actual Map, that will break.\n */\nfunction get(key) {\n return key._reactInternalFiber;\n}\nfunction has(key) {\n return key._reactInternalFiber !== undefined;\n}\nfunction set(key, value) {\n key._reactInternalFiber = value;\n}\n\n// Don't change these two values. They're used by React Dev Tools.\nvar NoEffect =\n/* */\n0;\nvar PerformedWork =\n/* */\n1; // You can change the rest (and add more).\n\nvar Placement =\n/* */\n2;\nvar Update =\n/* */\n4;\nvar PlacementAndUpdate =\n/* */\n6;\nvar Deletion =\n/* */\n8;\nvar ContentReset =\n/* */\n16;\nvar Callback =\n/* */\n32;\nvar DidCapture =\n/* */\n64;\nvar Ref =\n/* */\n128;\nvar Snapshot =\n/* */\n256;\nvar Passive =\n/* */\n512;\nvar Hydrating =\n/* */\n1024;\nvar HydratingAndUpdate =\n/* */\n1028; // Passive & Update & Callback & Ref & Snapshot\n\nvar LifecycleEffectMask =\n/* */\n932; // Union of all host effects\n\nvar HostEffectMask =\n/* */\n2047;\nvar Incomplete =\n/* */\n2048;\nvar ShouldCapture =\n/* */\n4096;\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nfunction getNearestMountedFiber(fiber) {\n var node = fiber;\n var nearestMounted = fiber;\n\n if (!fiber.alternate) {\n // If there is no alternate, this might be a new tree that isn't inserted\n // yet. If it is, then it will have a pending insertion effect on it.\n var nextNode = node;\n\n do {\n node = nextNode;\n\n if ((node.effectTag & (Placement | Hydrating)) !== NoEffect) {\n // This is an insertion or in-progress hydration. The nearest possible\n // mounted fiber is the parent but we need to continue to figure out\n // if that one is still mounted.\n nearestMounted = node.return;\n }\n\n nextNode = node.return;\n } while (nextNode);\n } else {\n while (node.return) {\n node = node.return;\n }\n }\n\n if (node.tag === HostRoot) {\n // TODO: Check if this was a nested HostRoot when used with\n // renderContainerIntoSubtree.\n return nearestMounted;\n } // If we didn't hit the root, that means that we're in an disconnected tree\n // that has been unmounted.\n\n\n return null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (fiber.tag === SuspenseComponent) {\n var suspenseState = fiber.memoizedState;\n\n if (suspenseState === null) {\n var current = fiber.alternate;\n\n if (current !== null) {\n suspenseState = current.memoizedState;\n }\n }\n\n if (suspenseState !== null) {\n return suspenseState.dehydrated;\n }\n }\n\n return null;\n}\nfunction getContainerFromFiber(fiber) {\n return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;\n}\nfunction isFiberMounted(fiber) {\n return getNearestMountedFiber(fiber) === fiber;\n}\nfunction isMounted(component) {\n {\n var owner = ReactCurrentOwner.current;\n\n if (owner !== null && owner.tag === ClassComponent) {\n var ownerFiber = owner;\n var instance = ownerFiber.stateNode;\n\n if (!instance._warnedAboutRefsInRender) {\n error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');\n }\n\n instance._warnedAboutRefsInRender = true;\n }\n }\n\n var fiber = get(component);\n\n if (!fiber) {\n return false;\n }\n\n return getNearestMountedFiber(fiber) === fiber;\n}\n\nfunction assertIsMounted(fiber) {\n if (!(getNearestMountedFiber(fiber) === fiber)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n}\n\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n\n if (!alternate) {\n // If there is no alternate, then we only need to check if it is mounted.\n var nearestMounted = getNearestMountedFiber(fiber);\n\n if (!(nearestMounted !== null)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (nearestMounted !== fiber) {\n return null;\n }\n\n return fiber;\n } // If we have two possible branches, we'll walk backwards up to the root\n // to see what path the root points to. On the way we may hit one of the\n // special cases and we'll deal with them.\n\n\n var a = fiber;\n var b = alternate;\n\n while (true) {\n var parentA = a.return;\n\n if (parentA === null) {\n // We're at the root.\n break;\n }\n\n var parentB = parentA.alternate;\n\n if (parentB === null) {\n // There is no alternate. This is an unusual case. Currently, it only\n // happens when a Suspense component is hidden. An extra fragment fiber\n // is inserted in between the Suspense fiber and its children. Skip\n // over this extra fragment fiber and proceed to the next parent.\n var nextParent = parentA.return;\n\n if (nextParent !== null) {\n a = b = nextParent;\n continue;\n } // If there's no parent, we're at the root.\n\n\n break;\n } // If both copies of the parent fiber point to the same child, we can\n // assume that the child is current. This happens when we bailout on low\n // priority: the bailed out fiber's child reuses the current child.\n\n\n if (parentA.child === parentB.child) {\n var child = parentA.child;\n\n while (child) {\n if (child === a) {\n // We've determined that A is the current branch.\n assertIsMounted(parentA);\n return fiber;\n }\n\n if (child === b) {\n // We've determined that B is the current branch.\n assertIsMounted(parentA);\n return alternate;\n }\n\n child = child.sibling;\n } // We should never have an alternate for any mounting node. So the only\n // way this could possibly happen is if this was unmounted, if at all.\n\n\n {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n }\n\n if (a.return !== b.return) {\n // The return pointer of A and the return pointer of B point to different\n // fibers. We assume that return pointers never criss-cross, so A must\n // belong to the child set of A.return, and B must belong to the child\n // set of B.return.\n a = parentA;\n b = parentB;\n } else {\n // The return pointers point to the same fiber. We'll have to use the\n // default, slow path: scan the child sets of each parent alternate to see\n // which child belongs to which set.\n //\n // Search parent A's child set\n var didFindChild = false;\n var _child = parentA.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentA;\n b = parentB;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentA;\n a = parentB;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n // Search parent B's child set\n _child = parentB.child;\n\n while (_child) {\n if (_child === a) {\n didFindChild = true;\n a = parentB;\n b = parentA;\n break;\n }\n\n if (_child === b) {\n didFindChild = true;\n b = parentB;\n a = parentA;\n break;\n }\n\n _child = _child.sibling;\n }\n\n if (!didFindChild) {\n {\n throw Error( \"Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.\" );\n }\n }\n }\n }\n\n if (!(a.alternate === b)) {\n {\n throw Error( \"Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.\" );\n }\n }\n } // If the root is not a host container, we're in a disconnected tree. I.e.\n // unmounted.\n\n\n if (!(a.tag === HostRoot)) {\n {\n throw Error( \"Unable to find node on an unmounted component.\" );\n }\n }\n\n if (a.stateNode.current === a) {\n // We've determined that A is the current branch.\n return fiber;\n } // Otherwise B has to be current branch.\n\n\n return alternate;\n}\nfunction findCurrentHostFiber(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText) {\n return node;\n } else if (node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\nfunction findCurrentHostFiberWithNoPortals(parent) {\n var currentParent = findCurrentFiberUsingSlowPath(parent);\n\n if (!currentParent) {\n return null;\n } // Next we'll drill down this component to find the first HostComponent/Text.\n\n\n var node = currentParent;\n\n while (true) {\n if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {\n return node;\n } else if (node.child && node.tag !== HostPortal) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n\n if (node === currentParent) {\n return null;\n }\n\n while (!node.sibling) {\n if (!node.return || node.return === currentParent) {\n return null;\n }\n\n node = node.return;\n }\n\n node.sibling.return = node.return;\n node = node.sibling;\n } // Flow needs the return null here, but ESLint complains about it.\n // eslint-disable-next-line no-unreachable\n\n\n return null;\n}\n\n/**\n * Accumulates items that must not be null or undefined into the first one. This\n * is used to conserve memory by avoiding array allocations, and thus sacrifices\n * API cleanness. Since `current` can be null before being passed in and not\n * null after this function, make sure to assign it back to `current`:\n *\n * `a = accumulateInto(a, b);`\n *\n * This API should be sparingly used. Try `accumulate` for something cleaner.\n *\n * @return {*|array<*>} An accumulation of items.\n */\n\nfunction accumulateInto(current, next) {\n if (!(next != null)) {\n {\n throw Error( \"accumulateInto(...): Accumulated items must not be null or undefined.\" );\n }\n }\n\n if (current == null) {\n return next;\n } // Both are not empty. Warning: Never call x.concat(y) when you are not\n // certain that x is an Array (x could be a string with concat method).\n\n\n if (Array.isArray(current)) {\n if (Array.isArray(next)) {\n current.push.apply(current, next);\n return current;\n }\n\n current.push(next);\n return current;\n }\n\n if (Array.isArray(next)) {\n // A bit too dangerous to mutate `next`.\n return [current].concat(next);\n }\n\n return [current, next];\n}\n\n/**\n * @param {array} arr an \"accumulation\" of items which is either an Array or\n * a single item. Useful when paired with the `accumulate` module. This is a\n * simple utility that allows us to reason about a collection of items, but\n * handling the case when there is exactly one item (and we do not need to\n * allocate an array).\n * @param {function} cb Callback invoked with each element or a collection.\n * @param {?} [scope] Scope used as `this` in a callback.\n */\nfunction forEachAccumulated(arr, cb, scope) {\n if (Array.isArray(arr)) {\n arr.forEach(cb, scope);\n } else if (arr) {\n cb.call(scope, arr);\n }\n}\n\n/**\n * Internal queue of events that have accumulated their dispatches and are\n * waiting to have their dispatches executed.\n */\n\nvar eventQueue = null;\n/**\n * Dispatches an event and releases it back into the pool, unless persistent.\n *\n * @param {?object} event Synthetic event to be dispatched.\n * @private\n */\n\nvar executeDispatchesAndRelease = function (event) {\n if (event) {\n executeDispatchesInOrder(event);\n\n if (!event.isPersistent()) {\n event.constructor.release(event);\n }\n }\n};\n\nvar executeDispatchesAndReleaseTopLevel = function (e) {\n return executeDispatchesAndRelease(e);\n};\n\nfunction runEventsInBatch(events) {\n if (events !== null) {\n eventQueue = accumulateInto(eventQueue, events);\n } // Set `eventQueue` to null before processing it so that we can tell if more\n // events get enqueued while processing.\n\n\n var processingEventQueue = eventQueue;\n eventQueue = null;\n\n if (!processingEventQueue) {\n return;\n }\n\n forEachAccumulated(processingEventQueue, executeDispatchesAndReleaseTopLevel);\n\n if (!!eventQueue) {\n {\n throw Error( \"processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented.\" );\n }\n } // This would be a good time to rethrow if any of the event handlers threw.\n\n\n rethrowCaughtError();\n}\n\n/**\n * Gets the target node from a native browser event by accounting for\n * inconsistencies in browser DOM APIs.\n *\n * @param {object} nativeEvent Native browser event.\n * @return {DOMEventTarget} Target node.\n */\n\nfunction getEventTarget(nativeEvent) {\n // Fallback to nativeEvent.srcElement for IE9\n // https://github.com/facebook/react/issues/12506\n var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG element events #4963\n\n if (target.correspondingUseElement) {\n target = target.correspondingUseElement;\n } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).\n // @see http://www.quirksmode.org/js/events_properties.html\n\n\n return target.nodeType === TEXT_NODE ? target.parentNode : target;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\n\nfunction isEventSupported(eventNameSuffix) {\n if (!canUseDOM) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n return isSupported;\n}\n\n/**\n * Summary of `DOMEventPluginSystem` event handling:\n *\n * - Top-level delegation is used to trap most native browser events. This\n * may only occur in the main thread and is the responsibility of\n * ReactDOMEventListener, which is injected and can therefore support\n * pluggable event sources. This is the only work that occurs in the main\n * thread.\n *\n * - We normalize and de-duplicate events to account for browser quirks. This\n * may be done in the worker thread.\n *\n * - Forward these native events (with the associated top-level type used to\n * trap it) to `EventPluginRegistry`, which in turn will ask plugins if they want\n * to extract any synthetic events.\n *\n * - The `EventPluginRegistry` will then process each event by annotating them with\n * \"dispatches\", a sequence of listeners and IDs that care about that event.\n *\n * - The `EventPluginRegistry` then dispatches the events.\n *\n * Overview of React and the event system:\n *\n * +------------+ .\n * | DOM | .\n * +------------+ .\n * | .\n * v .\n * +------------+ .\n * | ReactEvent | .\n * | Listener | .\n * +------------+ . +-----------+\n * | . +--------+|SimpleEvent|\n * | . | |Plugin |\n * +-----|------+ . v +-----------+\n * | | | . +--------------+ +------------+\n * | +-----------.--->|PluginRegistry| | Event |\n * | | . | | +-----------+ | Propagators|\n * | ReactEvent | . | | |TapEvent | |------------|\n * | Emitter | . | |<---+|Plugin | |other plugin|\n * | | . | | +-----------+ | utilities |\n * | +-----------.--->| | +------------+\n * | | | . +--------------+\n * +-----|------+ . ^ +-----------+\n * | . | |Enter/Leave|\n * + . +-------+|Plugin |\n * +-------------+ . +-----------+\n * | application | .\n * |-------------| .\n * | | .\n * | | .\n * +-------------+ .\n * .\n * React Core . General Purpose Event Plugin System\n */\n\nvar CALLBACK_BOOKKEEPING_POOL_SIZE = 10;\nvar callbackBookkeepingPool = [];\n\nfunction releaseTopLevelCallbackBookKeeping(instance) {\n instance.topLevelType = null;\n instance.nativeEvent = null;\n instance.targetInst = null;\n instance.ancestors.length = 0;\n\n if (callbackBookkeepingPool.length < CALLBACK_BOOKKEEPING_POOL_SIZE) {\n callbackBookkeepingPool.push(instance);\n }\n} // Used to store ancestor hierarchy in top level callback\n\n\nfunction getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags) {\n if (callbackBookkeepingPool.length) {\n var instance = callbackBookkeepingPool.pop();\n instance.topLevelType = topLevelType;\n instance.eventSystemFlags = eventSystemFlags;\n instance.nativeEvent = nativeEvent;\n instance.targetInst = targetInst;\n return instance;\n }\n\n return {\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetInst: targetInst,\n ancestors: []\n };\n}\n/**\n * Find the deepest React component completely containing the root of the\n * passed-in instance (for use when entire React trees are nested within each\n * other). If React trees are not nested, returns null.\n */\n\n\nfunction findRootContainerNode(inst) {\n if (inst.tag === HostRoot) {\n return inst.stateNode.containerInfo;\n } // TODO: It may be a good idea to cache this to prevent unnecessary DOM\n // traversal, but caching is difficult to do correctly without using a\n // mutation observer to listen for all DOM changes.\n\n\n while (inst.return) {\n inst = inst.return;\n }\n\n if (inst.tag !== HostRoot) {\n // This can happen if we're in a detached tree.\n return null;\n }\n\n return inst.stateNode.containerInfo;\n}\n/**\n * Allows registered plugins an opportunity to extract events from top-level\n * native browser events.\n *\n * @return {*} An accumulation of synthetic events.\n * @internal\n */\n\n\nfunction extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = null;\n\n for (var i = 0; i < plugins.length; i++) {\n // Not every plugin in the ordering may be loaded at runtime.\n var possiblePlugin = plugins[i];\n\n if (possiblePlugin) {\n var extractedEvents = possiblePlugin.extractEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n\n if (extractedEvents) {\n events = accumulateInto(events, extractedEvents);\n }\n }\n }\n\n return events;\n}\n\nfunction runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags) {\n var events = extractPluginEvents(topLevelType, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);\n runEventsInBatch(events);\n}\n\nfunction handleTopLevel(bookKeeping) {\n var targetInst = bookKeeping.targetInst; // Loop through the hierarchy, in case there's any nested components.\n // It's important that we build the array of ancestors before calling any\n // event handlers, because event handlers can modify the DOM, leading to\n // inconsistencies with ReactMount's node cache. See #1105.\n\n var ancestor = targetInst;\n\n do {\n if (!ancestor) {\n var ancestors = bookKeeping.ancestors;\n ancestors.push(ancestor);\n break;\n }\n\n var root = findRootContainerNode(ancestor);\n\n if (!root) {\n break;\n }\n\n var tag = ancestor.tag;\n\n if (tag === HostComponent || tag === HostText) {\n bookKeeping.ancestors.push(ancestor);\n }\n\n ancestor = getClosestInstanceFromNode(root);\n } while (ancestor);\n\n for (var i = 0; i < bookKeeping.ancestors.length; i++) {\n targetInst = bookKeeping.ancestors[i];\n var eventTarget = getEventTarget(bookKeeping.nativeEvent);\n var topLevelType = bookKeeping.topLevelType;\n var nativeEvent = bookKeeping.nativeEvent;\n var eventSystemFlags = bookKeeping.eventSystemFlags; // If this is the first ancestor, we mark it on the system flags\n\n if (i === 0) {\n eventSystemFlags |= IS_FIRST_ANCESTOR;\n }\n\n runExtractedPluginEventsInBatch(topLevelType, targetInst, nativeEvent, eventTarget, eventSystemFlags);\n }\n}\n\nfunction dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst) {\n var bookKeeping = getTopLevelCallbackBookKeeping(topLevelType, nativeEvent, targetInst, eventSystemFlags);\n\n try {\n // Event queue being processed in the same cycle allows\n // `preventDefault`.\n batchedEventUpdates(handleTopLevel, bookKeeping);\n } finally {\n releaseTopLevelCallbackBookKeeping(bookKeeping);\n }\n}\n/**\n * We listen for bubbled touch events on the document object.\n *\n * Firefox v8.01 (and possibly others) exhibited strange behavior when\n * mounting `onmousemove` events at some node that was not the document\n * element. The symptoms were that if your mouse is not moving over something\n * contained within that mount point (for example on the background) the\n * top-level listeners for `onmousemove` won't be called. However, if you\n * register the `mousemove` on the document object, then it will of course\n * catch all `mousemove`s. This along with iOS quirks, justifies restricting\n * top-level listeners to the document object only, at least for these\n * movement types of events and possibly all events.\n *\n * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n *\n * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but\n * they bubble to document.\n *\n * @param {string} registrationName Name of listener (e.g. `onClick`).\n * @param {object} mountAt Container where to mount the listener\n */\n\nfunction legacyListenToEvent(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n legacyListenToTopLevelEvent(dependency, mountAt, listenerMap);\n }\n}\nfunction legacyListenToTopLevelEvent(topLevelType, mountAt, listenerMap) {\n if (!listenerMap.has(topLevelType)) {\n switch (topLevelType) {\n case TOP_SCROLL:\n trapCapturedEvent(TOP_SCROLL, mountAt);\n break;\n\n case TOP_FOCUS:\n case TOP_BLUR:\n trapCapturedEvent(TOP_FOCUS, mountAt);\n trapCapturedEvent(TOP_BLUR, mountAt); // We set the flag for a single dependency later in this function,\n // but this ensures we mark both as attached rather than just one.\n\n listenerMap.set(TOP_BLUR, null);\n listenerMap.set(TOP_FOCUS, null);\n break;\n\n case TOP_CANCEL:\n case TOP_CLOSE:\n if (isEventSupported(getRawEventName(topLevelType))) {\n trapCapturedEvent(topLevelType, mountAt);\n }\n\n break;\n\n case TOP_INVALID:\n case TOP_SUBMIT:\n case TOP_RESET:\n // We listen to them on the target DOM elements.\n // Some of them bubble so we don't want them to fire twice.\n break;\n\n default:\n // By default, listen on the top level to all non-media events.\n // Media events don't bubble so adding the listener wouldn't do anything.\n var isMediaEvent = mediaEventTypes.indexOf(topLevelType) !== -1;\n\n if (!isMediaEvent) {\n trapBubbledEvent(topLevelType, mountAt);\n }\n\n break;\n }\n\n listenerMap.set(topLevelType, null);\n }\n}\nfunction isListeningToAllDependencies(registrationName, mountAt) {\n var listenerMap = getListenerMapForElement(mountAt);\n var dependencies = registrationNameDependencies[registrationName];\n\n for (var i = 0; i < dependencies.length; i++) {\n var dependency = dependencies[i];\n\n if (!listenerMap.has(dependency)) {\n return false;\n }\n }\n\n return true;\n}\n\nvar attemptUserBlockingHydration;\nfunction setAttemptUserBlockingHydration(fn) {\n attemptUserBlockingHydration = fn;\n}\nvar attemptContinuousHydration;\nfunction setAttemptContinuousHydration(fn) {\n attemptContinuousHydration = fn;\n}\nvar attemptHydrationAtCurrentPriority;\nfunction setAttemptHydrationAtCurrentPriority(fn) {\n attemptHydrationAtCurrentPriority = fn;\n} // TODO: Upgrade this definition once we're on a newer version of Flow that\nvar hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.\n\nvar queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.\n// if the last target was dehydrated.\n\nvar queuedFocus = null;\nvar queuedDrag = null;\nvar queuedMouse = null; // For pointer events there can be one latest event per pointerId.\n\nvar queuedPointers = new Map();\nvar queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.\n\nvar queuedExplicitHydrationTargets = [];\nfunction hasQueuedDiscreteEvents() {\n return queuedDiscreteEvents.length > 0;\n}\nvar discreteReplayableEvents = [TOP_MOUSE_DOWN, TOP_MOUSE_UP, TOP_TOUCH_CANCEL, TOP_TOUCH_END, TOP_TOUCH_START, TOP_AUX_CLICK, TOP_DOUBLE_CLICK, TOP_POINTER_CANCEL, TOP_POINTER_DOWN, TOP_POINTER_UP, TOP_DRAG_END, TOP_DRAG_START, TOP_DROP, TOP_COMPOSITION_END, TOP_COMPOSITION_START, TOP_KEY_DOWN, TOP_KEY_PRESS, TOP_KEY_UP, TOP_INPUT, TOP_TEXT_INPUT, TOP_CLOSE, TOP_CANCEL, TOP_COPY, TOP_CUT, TOP_PASTE, TOP_CLICK, TOP_CHANGE, TOP_CONTEXT_MENU, TOP_RESET, TOP_SUBMIT];\nvar continuousReplayableEvents = [TOP_FOCUS, TOP_BLUR, TOP_DRAG_ENTER, TOP_DRAG_LEAVE, TOP_MOUSE_OVER, TOP_MOUSE_OUT, TOP_POINTER_OVER, TOP_POINTER_OUT, TOP_GOT_POINTER_CAPTURE, TOP_LOST_POINTER_CAPTURE];\nfunction isReplayableDiscreteEvent(eventType) {\n return discreteReplayableEvents.indexOf(eventType) > -1;\n}\n\nfunction trapReplayableEventForDocument(topLevelType, document, listenerMap) {\n legacyListenToTopLevelEvent(topLevelType, document, listenerMap);\n}\n\nfunction eagerlyTrapReplayableEvents(container, document) {\n var listenerMapForDoc = getListenerMapForElement(document); // Discrete\n\n discreteReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n }); // Continuous\n\n continuousReplayableEvents.forEach(function (topLevelType) {\n trapReplayableEventForDocument(topLevelType, document, listenerMapForDoc);\n });\n}\n\nfunction createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n return {\n blockedOn: blockedOn,\n topLevelType: topLevelType,\n eventSystemFlags: eventSystemFlags | IS_REPLAYED,\n nativeEvent: nativeEvent,\n container: container\n };\n}\n\nfunction queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n queuedDiscreteEvents.push(queuedEvent);\n} // Resets the replaying for this type of continuous event to no event.\n\nfunction clearIfContinuousEvent(topLevelType, nativeEvent) {\n switch (topLevelType) {\n case TOP_FOCUS:\n case TOP_BLUR:\n queuedFocus = null;\n break;\n\n case TOP_DRAG_ENTER:\n case TOP_DRAG_LEAVE:\n queuedDrag = null;\n break;\n\n case TOP_MOUSE_OVER:\n case TOP_MOUSE_OUT:\n queuedMouse = null;\n break;\n\n case TOP_POINTER_OVER:\n case TOP_POINTER_OUT:\n {\n var pointerId = nativeEvent.pointerId;\n queuedPointers.delete(pointerId);\n break;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n case TOP_LOST_POINTER_CAPTURE:\n {\n var _pointerId = nativeEvent.pointerId;\n queuedPointerCaptures.delete(_pointerId);\n break;\n }\n }\n}\n\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {\n var queuedEvent = createQueuedReplayableEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn !== null) {\n var _fiber2 = getInstanceFromNode$1(blockedOn);\n\n if (_fiber2 !== null) {\n // Attempt to increase the priority of this target.\n attemptContinuousHydration(_fiber2);\n }\n }\n\n return queuedEvent;\n } // If we have already queued this exact event, then it's because\n // the different event systems have different DOM event listeners.\n // We can accumulate the flags and store a single event to be\n // replayed.\n\n\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n return existingQueuedEvent;\n}\n\nfunction queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent) {\n // These set relatedTarget to null because the replayed event will be treated as if we\n // moved from outside the window (no target) onto the target once it hydrates.\n // Instead of mutating we could clone the event.\n switch (topLevelType) {\n case TOP_FOCUS:\n {\n var focusEvent = nativeEvent;\n queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, topLevelType, eventSystemFlags, container, focusEvent);\n return true;\n }\n\n case TOP_DRAG_ENTER:\n {\n var dragEvent = nativeEvent;\n queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, topLevelType, eventSystemFlags, container, dragEvent);\n return true;\n }\n\n case TOP_MOUSE_OVER:\n {\n var mouseEvent = nativeEvent;\n queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, topLevelType, eventSystemFlags, container, mouseEvent);\n return true;\n }\n\n case TOP_POINTER_OVER:\n {\n var pointerEvent = nativeEvent;\n var pointerId = pointerEvent.pointerId;\n queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, topLevelType, eventSystemFlags, container, pointerEvent));\n return true;\n }\n\n case TOP_GOT_POINTER_CAPTURE:\n {\n var _pointerEvent = nativeEvent;\n var _pointerId2 = _pointerEvent.pointerId;\n queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, topLevelType, eventSystemFlags, container, _pointerEvent));\n return true;\n }\n }\n\n return false;\n} // Check if this target is unblocked. Returns true if it's unblocked.\n\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n // TODO: This function shares a lot of logic with attemptToDispatchEvent.\n // Try to unify them. It's a bit tricky since it would require two return\n // values.\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted !== null) {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // We're blocked on hydrating this boundary.\n // Increase its priority.\n queuedTarget.blockedOn = instance;\n Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of\n // a root other than sync.\n\n return;\n }\n }\n }\n }\n\n queuedTarget.blockedOn = null;\n}\n\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (queuedEvent.blockedOn !== null) {\n return false;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(queuedEvent.topLevelType, queuedEvent.eventSystemFlags, queuedEvent.container, queuedEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n var _fiber3 = getInstanceFromNode$1(nextBlockedOn);\n\n if (_fiber3 !== null) {\n attemptContinuousHydration(_fiber3);\n }\n\n queuedEvent.blockedOn = nextBlockedOn;\n return false;\n }\n\n return true;\n}\n\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n if (attemptReplayContinuousQueuedEvent(queuedEvent)) {\n map.delete(key);\n }\n}\n\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = false; // First replay discrete events.\n\n while (queuedDiscreteEvents.length > 0) {\n var nextDiscreteEvent = queuedDiscreteEvents[0];\n\n if (nextDiscreteEvent.blockedOn !== null) {\n // We're still blocked.\n // Increase the priority of this boundary to unblock\n // the next discrete event.\n var _fiber4 = getInstanceFromNode$1(nextDiscreteEvent.blockedOn);\n\n if (_fiber4 !== null) {\n attemptUserBlockingHydration(_fiber4);\n }\n\n break;\n }\n\n var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.topLevelType, nextDiscreteEvent.eventSystemFlags, nextDiscreteEvent.container, nextDiscreteEvent.nativeEvent);\n\n if (nextBlockedOn !== null) {\n // We're still blocked. Try again later.\n nextDiscreteEvent.blockedOn = nextBlockedOn;\n } else {\n // We've successfully replayed the first event. Let's try the next one.\n queuedDiscreteEvents.shift();\n }\n } // Next replay any continuous events.\n\n\n if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {\n queuedFocus = null;\n }\n\n if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {\n queuedDrag = null;\n }\n\n if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {\n queuedMouse = null;\n }\n\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\n\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n\n if (!hasScheduledReplayAttempt) {\n hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are\n // now unblocked. This first might not actually be unblocked yet.\n // We could check it early to avoid scheduling an unnecessary callback.\n\n Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);\n }\n }\n}\n\nfunction retryIfBlockedOn(unblocked) {\n // Mark anything that was blocked on this as no longer blocked\n // and eligible for a replay.\n if (queuedDiscreteEvents.length > 0) {\n scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's\n // worth it because we expect very few discrete events to queue up and once\n // we are actually fully unblocked it will be fast to replay them.\n\n for (var i = 1; i < queuedDiscreteEvents.length; i++) {\n var queuedEvent = queuedDiscreteEvents[i];\n\n if (queuedEvent.blockedOn === unblocked) {\n queuedEvent.blockedOn = null;\n }\n }\n }\n\n if (queuedFocus !== null) {\n scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n }\n\n if (queuedDrag !== null) {\n scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n }\n\n if (queuedMouse !== null) {\n scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n }\n\n var unblock = function (queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n };\n\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n\n for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {\n var queuedTarget = queuedExplicitHydrationTargets[_i];\n\n if (queuedTarget.blockedOn === unblocked) {\n queuedTarget.blockedOn = null;\n }\n }\n\n while (queuedExplicitHydrationTargets.length > 0) {\n var nextExplicitTarget = queuedExplicitHydrationTargets[0];\n\n if (nextExplicitTarget.blockedOn !== null) {\n // We're still blocked.\n break;\n } else {\n attemptExplicitHydrationTarget(nextExplicitTarget);\n\n if (nextExplicitTarget.blockedOn === null) {\n // We're unblocked.\n queuedExplicitHydrationTargets.shift();\n }\n }\n }\n}\n\nfunction addEventBubbleListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, false);\n}\nfunction addEventCaptureListener(element, eventType, listener) {\n element.addEventListener(eventType, listener, true);\n}\n\n// do it in two places, which duplicates logic\n// and increases the bundle size, we do it all\n// here once. If we remove or refactor the\n// SimpleEventPlugin, we should also remove or\n// update the below line.\n\nvar simpleEventPluginEventTypes = {};\nvar topLevelEventsToDispatchConfig = new Map();\nvar eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use\n// the code required to apply the same logic for event prioritization and that of the\n// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code\n// duplication (for which there would be quite a bit). For the events that are not needed\n// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an\n// array of top level events.\n// Lastly, we ignore prettier so we can keep the formatting sane.\n// prettier-ignore\n\nvar discreteEventPairsForSimpleEventPlugin = [TOP_BLUR, 'blur', TOP_CANCEL, 'cancel', TOP_CLICK, 'click', TOP_CLOSE, 'close', TOP_CONTEXT_MENU, 'contextMenu', TOP_COPY, 'copy', TOP_CUT, 'cut', TOP_AUX_CLICK, 'auxClick', TOP_DOUBLE_CLICK, 'doubleClick', TOP_DRAG_END, 'dragEnd', TOP_DRAG_START, 'dragStart', TOP_DROP, 'drop', TOP_FOCUS, 'focus', TOP_INPUT, 'input', TOP_INVALID, 'invalid', TOP_KEY_DOWN, 'keyDown', TOP_KEY_PRESS, 'keyPress', TOP_KEY_UP, 'keyUp', TOP_MOUSE_DOWN, 'mouseDown', TOP_MOUSE_UP, 'mouseUp', TOP_PASTE, 'paste', TOP_PAUSE, 'pause', TOP_PLAY, 'play', TOP_POINTER_CANCEL, 'pointerCancel', TOP_POINTER_DOWN, 'pointerDown', TOP_POINTER_UP, 'pointerUp', TOP_RATE_CHANGE, 'rateChange', TOP_RESET, 'reset', TOP_SEEKED, 'seeked', TOP_SUBMIT, 'submit', TOP_TOUCH_CANCEL, 'touchCancel', TOP_TOUCH_END, 'touchEnd', TOP_TOUCH_START, 'touchStart', TOP_VOLUME_CHANGE, 'volumeChange'];\nvar otherDiscreteEvents = [TOP_CHANGE, TOP_SELECTION_CHANGE, TOP_TEXT_INPUT, TOP_COMPOSITION_START, TOP_COMPOSITION_END, TOP_COMPOSITION_UPDATE]; // prettier-ignore\n\nvar userBlockingPairsForSimpleEventPlugin = [TOP_DRAG, 'drag', TOP_DRAG_ENTER, 'dragEnter', TOP_DRAG_EXIT, 'dragExit', TOP_DRAG_LEAVE, 'dragLeave', TOP_DRAG_OVER, 'dragOver', TOP_MOUSE_MOVE, 'mouseMove', TOP_MOUSE_OUT, 'mouseOut', TOP_MOUSE_OVER, 'mouseOver', TOP_POINTER_MOVE, 'pointerMove', TOP_POINTER_OUT, 'pointerOut', TOP_POINTER_OVER, 'pointerOver', TOP_SCROLL, 'scroll', TOP_TOGGLE, 'toggle', TOP_TOUCH_MOVE, 'touchMove', TOP_WHEEL, 'wheel']; // prettier-ignore\n\nvar continuousPairsForSimpleEventPlugin = [TOP_ABORT, 'abort', TOP_ANIMATION_END, 'animationEnd', TOP_ANIMATION_ITERATION, 'animationIteration', TOP_ANIMATION_START, 'animationStart', TOP_CAN_PLAY, 'canPlay', TOP_CAN_PLAY_THROUGH, 'canPlayThrough', TOP_DURATION_CHANGE, 'durationChange', TOP_EMPTIED, 'emptied', TOP_ENCRYPTED, 'encrypted', TOP_ENDED, 'ended', TOP_ERROR, 'error', TOP_GOT_POINTER_CAPTURE, 'gotPointerCapture', TOP_LOAD, 'load', TOP_LOADED_DATA, 'loadedData', TOP_LOADED_METADATA, 'loadedMetadata', TOP_LOAD_START, 'loadStart', TOP_LOST_POINTER_CAPTURE, 'lostPointerCapture', TOP_PLAYING, 'playing', TOP_PROGRESS, 'progress', TOP_SEEKING, 'seeking', TOP_STALLED, 'stalled', TOP_SUSPEND, 'suspend', TOP_TIME_UPDATE, 'timeUpdate', TOP_TRANSITION_END, 'transitionEnd', TOP_WAITING, 'waiting'];\n/**\n * Turns\n * ['abort', ...]\n * into\n * eventTypes = {\n * 'abort': {\n * phasedRegistrationNames: {\n * bubbled: 'onAbort',\n * captured: 'onAbortCapture',\n * },\n * dependencies: [TOP_ABORT],\n * },\n * ...\n * };\n * topLevelEventsToDispatchConfig = new Map([\n * [TOP_ABORT, { sameConfig }],\n * ]);\n */\n\nfunction processSimpleEventPluginPairsByPriority(eventTypes, priority) {\n // As the event types are in pairs of two, we need to iterate\n // through in twos. The events are in pairs of two to save code\n // and improve init perf of processing this array, as it will\n // result in far fewer object allocations and property accesses\n // if we only use three arrays to process all the categories of\n // instead of tuples.\n for (var i = 0; i < eventTypes.length; i += 2) {\n var topEvent = eventTypes[i];\n var event = eventTypes[i + 1];\n var capitalizedEvent = event[0].toUpperCase() + event.slice(1);\n var onEvent = 'on' + capitalizedEvent;\n var config = {\n phasedRegistrationNames: {\n bubbled: onEvent,\n captured: onEvent + 'Capture'\n },\n dependencies: [topEvent],\n eventPriority: priority\n };\n eventPriorities.set(topEvent, priority);\n topLevelEventsToDispatchConfig.set(topEvent, config);\n simpleEventPluginEventTypes[event] = config;\n }\n}\n\nfunction processTopEventPairsByPriority(eventTypes, priority) {\n for (var i = 0; i < eventTypes.length; i++) {\n eventPriorities.set(eventTypes[i], priority);\n }\n} // SimpleEventPlugin\n\n\nprocessSimpleEventPluginPairsByPriority(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);\nprocessSimpleEventPluginPairsByPriority(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);\nprocessSimpleEventPluginPairsByPriority(continuousPairsForSimpleEventPlugin, ContinuousEvent); // Not used by SimpleEventPlugin\n\nprocessTopEventPairsByPriority(otherDiscreteEvents, DiscreteEvent);\nfunction getEventPriorityForPluginSystem(topLevelType) {\n var priority = eventPriorities.get(topLevelType); // Default to a ContinuousEvent. Note: we might\n // want to warn if we can't detect the priority\n // for the event.\n\n return priority === undefined ? ContinuousEvent : priority;\n}\n\n// Intentionally not named imports because Rollup would use dynamic dispatch for\nvar UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?\n\nvar _enabled = true;\nfunction setEnabled(enabled) {\n _enabled = !!enabled;\n}\nfunction isEnabled() {\n return _enabled;\n}\nfunction trapBubbledEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, false);\n}\nfunction trapCapturedEvent(topLevelType, element) {\n trapEventForPluginEventSystem(element, topLevelType, true);\n}\n\nfunction trapEventForPluginEventSystem(container, topLevelType, capture) {\n var listener;\n\n switch (getEventPriorityForPluginSystem(topLevelType)) {\n case DiscreteEvent:\n listener = dispatchDiscreteEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case UserBlockingEvent:\n listener = dispatchUserBlockingUpdate.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n\n case ContinuousEvent:\n default:\n listener = dispatchEvent.bind(null, topLevelType, PLUGIN_EVENT_SYSTEM, container);\n break;\n }\n\n var rawEventName = getRawEventName(topLevelType);\n\n if (capture) {\n addEventCaptureListener(container, rawEventName, listener);\n } else {\n addEventBubbleListener(container, rawEventName, listener);\n }\n}\n\nfunction dispatchDiscreteEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);\n discreteUpdates(dispatchEvent, topLevelType, eventSystemFlags, container, nativeEvent);\n}\n\nfunction dispatchUserBlockingUpdate(topLevelType, eventSystemFlags, container, nativeEvent) {\n runWithPriority(UserBlockingPriority, dispatchEvent.bind(null, topLevelType, eventSystemFlags, container, nativeEvent));\n}\n\nfunction dispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n if (!_enabled) {\n return;\n }\n\n if (hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(topLevelType)) {\n // If we already have a queue of discrete events, and this is another discrete\n // event, then we can't dispatch it regardless of its target, since they\n // need to dispatch in order.\n queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.\n topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n var blockedOn = attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent);\n\n if (blockedOn === null) {\n // We successfully dispatched this event.\n clearIfContinuousEvent(topLevelType, nativeEvent);\n return;\n }\n\n if (isReplayableDiscreteEvent(topLevelType)) {\n // This this to be replayed later once the target is available.\n queueDiscreteEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent);\n return;\n }\n\n if (queueIfContinuousEvent(blockedOn, topLevelType, eventSystemFlags, container, nativeEvent)) {\n return;\n } // We need to clear only if we didn't queue because\n // queueing is accummulative.\n\n\n clearIfContinuousEvent(topLevelType, nativeEvent); // This is not replayable so we'll invoke it but without a target,\n // in case the event system needs to trace it.\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, null);\n }\n} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.\n\nfunction attemptToDispatchEvent(topLevelType, eventSystemFlags, container, nativeEvent) {\n // TODO: Warn if _enabled is false.\n var nativeEventTarget = getEventTarget(nativeEvent);\n var targetInst = getClosestInstanceFromNode(nativeEventTarget);\n\n if (targetInst !== null) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n\n if (nearestMounted === null) {\n // This tree has been unmounted already. Dispatch without a target.\n targetInst = null;\n } else {\n var tag = nearestMounted.tag;\n\n if (tag === SuspenseComponent) {\n var instance = getSuspenseInstanceFromFiber(nearestMounted);\n\n if (instance !== null) {\n // Queue the event to be replayed later. Abort dispatching since we\n // don't want this event dispatched twice through the event system.\n // TODO: If this is the first discrete event in the queue. Schedule an increased\n // priority for this boundary.\n return instance;\n } // This shouldn't happen, something went wrong but to avoid blocking\n // the whole system, dispatch the event without a target.\n // TODO: Warn.\n\n\n targetInst = null;\n } else if (tag === HostRoot) {\n var root = nearestMounted.stateNode;\n\n if (root.hydrate) {\n // If this happens during a replay something went wrong and it might block\n // the whole system.\n return getContainerFromFiber(nearestMounted);\n }\n\n targetInst = null;\n } else if (nearestMounted !== targetInst) {\n // If we get an event (ex: img onload) before committing that\n // component's mount, ignore it for now (that is, treat it as if it was an\n // event on a non-React tree). We might also consider queueing events and\n // dispatching them after the mount.\n targetInst = null;\n }\n }\n }\n\n {\n dispatchEventForLegacyPluginEventSystem(topLevelType, eventSystemFlags, nativeEvent, targetInst);\n } // We're not blocked on anything.\n\n\n return null;\n}\n\n// List derived from Gecko source code:\n// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js\nvar shorthandToLonghand = {\n animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],\n background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],\n borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],\n borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],\n borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],\n borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],\n borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],\n borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],\n borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],\n borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],\n borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],\n borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],\n borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],\n borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],\n columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],\n columns: ['columnCount', 'columnWidth'],\n flex: ['flexBasis', 'flexGrow', 'flexShrink'],\n flexFlow: ['flexDirection', 'flexWrap'],\n font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],\n fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],\n gap: ['columnGap', 'rowGap'],\n grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],\n gridColumn: ['gridColumnEnd', 'gridColumnStart'],\n gridColumnGap: ['columnGap'],\n gridGap: ['columnGap', 'rowGap'],\n gridRow: ['gridRowEnd', 'gridRowStart'],\n gridRowGap: ['rowGap'],\n gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],\n listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],\n margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],\n marker: ['markerEnd', 'markerMid', 'markerStart'],\n mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],\n maskPosition: ['maskPositionX', 'maskPositionY'],\n outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],\n overflow: ['overflowX', 'overflowY'],\n padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],\n placeContent: ['alignContent', 'justifyContent'],\n placeItems: ['alignItems', 'justifyItems'],\n placeSelf: ['alignSelf', 'justifySelf'],\n textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],\n textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],\n transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],\n wordWrap: ['overflowWrap']\n};\n\n/**\n * CSS properties which accept numbers but are not in units of \"px\".\n */\nvar isUnitlessNumber = {\n animationIterationCount: true,\n borderImageOutset: true,\n borderImageSlice: true,\n borderImageWidth: true,\n boxFlex: true,\n boxFlexGroup: true,\n boxOrdinalGroup: true,\n columnCount: true,\n columns: true,\n flex: true,\n flexGrow: true,\n flexPositive: true,\n flexShrink: true,\n flexNegative: true,\n flexOrder: true,\n gridArea: true,\n gridRow: true,\n gridRowEnd: true,\n gridRowSpan: true,\n gridRowStart: true,\n gridColumn: true,\n gridColumnEnd: true,\n gridColumnSpan: true,\n gridColumnStart: true,\n fontWeight: true,\n lineClamp: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n tabSize: true,\n widows: true,\n zIndex: true,\n zoom: true,\n // SVG-related properties\n fillOpacity: true,\n floodOpacity: true,\n stopOpacity: true,\n strokeDasharray: true,\n strokeDashoffset: true,\n strokeMiterlimit: true,\n strokeOpacity: true,\n strokeWidth: true\n};\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\n\nfunction prefixKey(prefix, key) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\n\n\nvar prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an\n// infinite loop, because it iterates over the newly added props too.\n\nObject.keys(isUnitlessNumber).forEach(function (prop) {\n prefixes.forEach(function (prefix) {\n isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];\n });\n});\n\n/**\n * Convert a value into the proper css writable value. The style name `name`\n * should be logical (no hyphens), as specified\n * in `CSSProperty.isUnitlessNumber`.\n *\n * @param {string} name CSS property name such as `topMargin`.\n * @param {*} value CSS property value such as `10px`.\n * @return {string} Normalized style value with dimensions applied.\n */\n\nfunction dangerousStyleValue(name, value, isCustomProperty) {\n // Note that we've removed escapeTextForBrowser() calls here since the\n // whole string will be escaped when the attribute is injected into\n // the markup. If you provide unsafe user data here they can inject\n // arbitrary CSS which may be problematic (I couldn't repro this):\n // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet\n // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/\n // This is not an XSS hole but instead a potential CSS injection issue\n // which has lead to a greater discussion about how we're going to\n // trust URLs moving forward. See #2115901\n var isEmpty = value == null || typeof value === 'boolean' || value === '';\n\n if (isEmpty) {\n return '';\n }\n\n if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {\n return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers\n }\n\n return ('' + value).trim();\n}\n\nvar uppercasePattern = /([A-Z])/g;\nvar msPattern = /^ms-/;\n/**\n * Hyphenates a camelcased CSS property name, for example:\n *\n * > hyphenateStyleName('backgroundColor')\n * < \"background-color\"\n * > hyphenateStyleName('MozTransition')\n * < \"-moz-transition\"\n * > hyphenateStyleName('msTransition')\n * < \"-ms-transition\"\n *\n * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix\n * is converted to `-ms-`.\n */\n\nfunction hyphenateStyleName(name) {\n return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');\n}\n\nvar warnValidStyle = function () {};\n\n{\n // 'msTransform' is correct, but the other prefixes should be capitalized\n var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;\n var msPattern$1 = /^-ms-/;\n var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon\n\n var badStyleValueWithSemicolonPattern = /;\\s*$/;\n var warnedStyleNames = {};\n var warnedStyleValues = {};\n var warnedForNaNValue = false;\n var warnedForInfinityValue = false;\n\n var camelize = function (string) {\n return string.replace(hyphenPattern, function (_, character) {\n return character.toUpperCase();\n });\n };\n\n var warnHyphenatedStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests\n // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix\n // is converted to lowercase `ms`.\n camelize(name.replace(msPattern$1, 'ms-')));\n };\n\n var warnBadVendoredStyleName = function (name) {\n if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {\n return;\n }\n\n warnedStyleNames[name] = true;\n\n error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));\n };\n\n var warnStyleValueWithSemicolon = function (name, value) {\n if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {\n return;\n }\n\n warnedStyleValues[value] = true;\n\n error(\"Style property values shouldn't contain a semicolon. \" + 'Try \"%s: %s\" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));\n };\n\n var warnStyleValueIsNaN = function (name, value) {\n if (warnedForNaNValue) {\n return;\n }\n\n warnedForNaNValue = true;\n\n error('`NaN` is an invalid value for the `%s` css style property.', name);\n };\n\n var warnStyleValueIsInfinity = function (name, value) {\n if (warnedForInfinityValue) {\n return;\n }\n\n warnedForInfinityValue = true;\n\n error('`Infinity` is an invalid value for the `%s` css style property.', name);\n };\n\n warnValidStyle = function (name, value) {\n if (name.indexOf('-') > -1) {\n warnHyphenatedStyleName(name);\n } else if (badVendoredStyleNamePattern.test(name)) {\n warnBadVendoredStyleName(name);\n } else if (badStyleValueWithSemicolonPattern.test(value)) {\n warnStyleValueWithSemicolon(name, value);\n }\n\n if (typeof value === 'number') {\n if (isNaN(value)) {\n warnStyleValueIsNaN(name, value);\n } else if (!isFinite(value)) {\n warnStyleValueIsInfinity(name, value);\n }\n }\n };\n}\n\nvar warnValidStyle$1 = warnValidStyle;\n\n/**\n * Operations for dealing with CSS properties.\n */\n\n/**\n * This creates a string that is expected to be equivalent to the style\n * attribute generated by server-side rendering. It by-passes warnings and\n * security checks so it's not safe to use this value for anything other than\n * comparison. It is only used in DEV for SSR validation.\n */\n\nfunction createDangerousStringForStyles(styles) {\n {\n var serialized = '';\n var delimiter = '';\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var styleValue = styles[styleName];\n\n if (styleValue != null) {\n var isCustomProperty = styleName.indexOf('--') === 0;\n serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';\n serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);\n delimiter = ';';\n }\n }\n\n return serialized || null;\n }\n}\n/**\n * Sets the value for multiple styles on a node. If a value is specified as\n * '' (empty string), the corresponding style property will be unset.\n *\n * @param {DOMElement} node\n * @param {object} styles\n */\n\nfunction setValueForStyles(node, styles) {\n var style = node.style;\n\n for (var styleName in styles) {\n if (!styles.hasOwnProperty(styleName)) {\n continue;\n }\n\n var isCustomProperty = styleName.indexOf('--') === 0;\n\n {\n if (!isCustomProperty) {\n warnValidStyle$1(styleName, styles[styleName]);\n }\n }\n\n var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);\n\n if (styleName === 'float') {\n styleName = 'cssFloat';\n }\n\n if (isCustomProperty) {\n style.setProperty(styleName, styleValue);\n } else {\n style[styleName] = styleValue;\n }\n }\n}\n\nfunction isValueEmpty(value) {\n return value == null || typeof value === 'boolean' || value === '';\n}\n/**\n * Given {color: 'red', overflow: 'hidden'} returns {\n * color: 'color',\n * overflowX: 'overflow',\n * overflowY: 'overflow',\n * }. This can be read as \"the overflowY property was set by the overflow\n * shorthand\". That is, the values are the property that each was derived from.\n */\n\n\nfunction expandShorthandMap(styles) {\n var expanded = {};\n\n for (var key in styles) {\n var longhands = shorthandToLonghand[key] || [key];\n\n for (var i = 0; i < longhands.length; i++) {\n expanded[longhands[i]] = key;\n }\n }\n\n return expanded;\n}\n/**\n * When mixing shorthand and longhand property names, we warn during updates if\n * we expect an incorrect result to occur. In particular, we warn for:\n *\n * Updating a shorthand property (longhand gets overwritten):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}\n * becomes .style.font = 'baz'\n * Removing a shorthand property (longhand gets lost too):\n * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}\n * becomes .style.font = ''\n * Removing a longhand property (should revert to shorthand; doesn't):\n * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}\n * becomes .style.fontVariant = ''\n */\n\n\nfunction validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {\n {\n\n if (!nextStyles) {\n return;\n }\n\n var expandedUpdates = expandShorthandMap(styleUpdates);\n var expandedStyles = expandShorthandMap(nextStyles);\n var warnedAbout = {};\n\n for (var key in expandedUpdates) {\n var originalKey = expandedUpdates[key];\n var correctOriginalKey = expandedStyles[key];\n\n if (correctOriginalKey && originalKey !== correctOriginalKey) {\n var warningKey = originalKey + ',' + correctOriginalKey;\n\n if (warnedAbout[warningKey]) {\n continue;\n }\n\n warnedAbout[warningKey] = true;\n\n error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + \"avoid this, don't mix shorthand and non-shorthand properties \" + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);\n }\n }\n }\n}\n\n// For HTML, certain tags should omit their close tag. We keep a whitelist for\n// those special-case tags.\nvar omittedCloseTags = {\n area: true,\n base: true,\n br: true,\n col: true,\n embed: true,\n hr: true,\n img: true,\n input: true,\n keygen: true,\n link: true,\n meta: true,\n param: true,\n source: true,\n track: true,\n wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.\n\n};\n\n// `omittedCloseTags` except that `menuitem` should still have its closing tag.\n\nvar voidElementTags = _assign({\n menuitem: true\n}, omittedCloseTags);\n\nvar HTML = '__html';\nvar ReactDebugCurrentFrame$3 = null;\n\n{\n ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;\n}\n\nfunction assertValidProps(tag, props) {\n if (!props) {\n return;\n } // Note the use of `==` which checks for null or undefined.\n\n\n if (voidElementTags[tag]) {\n if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {\n {\n throw Error( tag + \" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.\" + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );\n }\n }\n }\n\n if (props.dangerouslySetInnerHTML != null) {\n if (!(props.children == null)) {\n {\n throw Error( \"Can only set one of `children` or `props.dangerouslySetInnerHTML`.\" );\n }\n }\n\n if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {\n {\n throw Error( \"`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.\" );\n }\n }\n }\n\n {\n if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {\n error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');\n }\n }\n\n if (!(props.style == null || typeof props.style === 'object')) {\n {\n throw Error( \"The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.\" + ( ReactDebugCurrentFrame$3.getStackAddendum() ) );\n }\n }\n}\n\nfunction isCustomComponent(tagName, props) {\n if (tagName.indexOf('-') === -1) {\n return typeof props.is === 'string';\n }\n\n switch (tagName) {\n // These are reserved SVG and MathML elements.\n // We don't mind this whitelist too much because we expect it to never grow.\n // The alternative is to track the namespace in a few places which is convoluted.\n // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts\n case 'annotation-xml':\n case 'color-profile':\n case 'font-face':\n case 'font-face-src':\n case 'font-face-uri':\n case 'font-face-format':\n case 'font-face-name':\n case 'missing-glyph':\n return false;\n\n default:\n return true;\n }\n}\n\n// When adding attributes to the HTML or SVG whitelist, be sure to\n// also add them to this module to ensure casing and incorrect name\n// warnings.\nvar possibleStandardNames = {\n // HTML\n accept: 'accept',\n acceptcharset: 'acceptCharset',\n 'accept-charset': 'acceptCharset',\n accesskey: 'accessKey',\n action: 'action',\n allowfullscreen: 'allowFullScreen',\n alt: 'alt',\n as: 'as',\n async: 'async',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n capture: 'capture',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n challenge: 'challenge',\n charset: 'charSet',\n checked: 'checked',\n children: 'children',\n cite: 'cite',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n cols: 'cols',\n colspan: 'colSpan',\n content: 'content',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controls: 'controls',\n controlslist: 'controlsList',\n coords: 'coords',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n data: 'data',\n datetime: 'dateTime',\n default: 'default',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n defer: 'defer',\n dir: 'dir',\n disabled: 'disabled',\n disablepictureinpicture: 'disablePictureInPicture',\n download: 'download',\n draggable: 'draggable',\n enctype: 'encType',\n for: 'htmlFor',\n form: 'form',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n headers: 'headers',\n height: 'height',\n hidden: 'hidden',\n high: 'high',\n href: 'href',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n id: 'id',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n integrity: 'integrity',\n is: 'is',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n kind: 'kind',\n label: 'label',\n lang: 'lang',\n list: 'list',\n loop: 'loop',\n low: 'low',\n manifest: 'manifest',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n max: 'max',\n maxlength: 'maxLength',\n media: 'media',\n mediagroup: 'mediaGroup',\n method: 'method',\n min: 'min',\n minlength: 'minLength',\n multiple: 'multiple',\n muted: 'muted',\n name: 'name',\n nomodule: 'noModule',\n nonce: 'nonce',\n novalidate: 'noValidate',\n open: 'open',\n optimum: 'optimum',\n pattern: 'pattern',\n placeholder: 'placeholder',\n playsinline: 'playsInline',\n poster: 'poster',\n preload: 'preload',\n profile: 'profile',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rel: 'rel',\n required: 'required',\n reversed: 'reversed',\n role: 'role',\n rows: 'rows',\n rowspan: 'rowSpan',\n sandbox: 'sandbox',\n scope: 'scope',\n scoped: 'scoped',\n scrolling: 'scrolling',\n seamless: 'seamless',\n selected: 'selected',\n shape: 'shape',\n size: 'size',\n sizes: 'sizes',\n span: 'span',\n spellcheck: 'spellCheck',\n src: 'src',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n start: 'start',\n step: 'step',\n style: 'style',\n summary: 'summary',\n tabindex: 'tabIndex',\n target: 'target',\n title: 'title',\n type: 'type',\n usemap: 'useMap',\n value: 'value',\n width: 'width',\n wmode: 'wmode',\n wrap: 'wrap',\n // SVG\n about: 'about',\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n accumulate: 'accumulate',\n additive: 'additive',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n alphabetic: 'alphabetic',\n amplitude: 'amplitude',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n ascent: 'ascent',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n azimuth: 'azimuth',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n bbox: 'bbox',\n begin: 'begin',\n bias: 'bias',\n by: 'by',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clip: 'clip',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n color: 'color',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n cursor: 'cursor',\n cx: 'cx',\n cy: 'cy',\n d: 'd',\n datatype: 'datatype',\n decelerate: 'decelerate',\n descent: 'descent',\n diffuseconstant: 'diffuseConstant',\n direction: 'direction',\n display: 'display',\n divisor: 'divisor',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n dur: 'dur',\n dx: 'dx',\n dy: 'dy',\n edgemode: 'edgeMode',\n elevation: 'elevation',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n end: 'end',\n exponent: 'exponent',\n externalresourcesrequired: 'externalResourcesRequired',\n fill: 'fill',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filter: 'filter',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n focusable: 'focusable',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n format: 'format',\n from: 'from',\n fx: 'fx',\n fy: 'fy',\n g1: 'g1',\n g2: 'g2',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n hanging: 'hanging',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n ideographic: 'ideographic',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n in2: 'in2',\n in: 'in',\n inlist: 'inlist',\n intercept: 'intercept',\n k1: 'k1',\n k2: 'k2',\n k3: 'k3',\n k4: 'k4',\n k: 'k',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n kerning: 'kerning',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n local: 'local',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n mask: 'mask',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n mathematical: 'mathematical',\n mode: 'mode',\n numoctaves: 'numOctaves',\n offset: 'offset',\n opacity: 'opacity',\n operator: 'operator',\n order: 'order',\n orient: 'orient',\n orientation: 'orientation',\n origin: 'origin',\n overflow: 'overflow',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n panose1: 'panose1',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n points: 'points',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n prefix: 'prefix',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n property: 'property',\n r: 'r',\n radius: 'radius',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n resource: 'resource',\n restart: 'restart',\n result: 'result',\n results: 'results',\n rotate: 'rotate',\n rx: 'rx',\n ry: 'ry',\n scale: 'scale',\n security: 'security',\n seed: 'seed',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n slope: 'slope',\n spacing: 'spacing',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n speed: 'speed',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stemh: 'stemh',\n stemv: 'stemv',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n string: 'string',\n stroke: 'stroke',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n to: 'to',\n transform: 'transform',\n typeof: 'typeof',\n u1: 'u1',\n u2: 'u2',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicode: 'unicode',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n values: 'values',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n version: 'version',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n visibility: 'visibility',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n vocab: 'vocab',\n widths: 'widths',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n x1: 'x1',\n x2: 'x2',\n x: 'x',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n xmlns: 'xmlns',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n y1: 'y1',\n y2: 'y2',\n y: 'y',\n ychannelselector: 'yChannelSelector',\n z: 'z',\n zoomandpan: 'zoomAndPan'\n};\n\nvar ariaProperties = {\n 'aria-current': 0,\n // state\n 'aria-details': 0,\n 'aria-disabled': 0,\n // state\n 'aria-hidden': 0,\n // state\n 'aria-invalid': 0,\n // state\n 'aria-keyshortcuts': 0,\n 'aria-label': 0,\n 'aria-roledescription': 0,\n // Widget Attributes\n 'aria-autocomplete': 0,\n 'aria-checked': 0,\n 'aria-expanded': 0,\n 'aria-haspopup': 0,\n 'aria-level': 0,\n 'aria-modal': 0,\n 'aria-multiline': 0,\n 'aria-multiselectable': 0,\n 'aria-orientation': 0,\n 'aria-placeholder': 0,\n 'aria-pressed': 0,\n 'aria-readonly': 0,\n 'aria-required': 0,\n 'aria-selected': 0,\n 'aria-sort': 0,\n 'aria-valuemax': 0,\n 'aria-valuemin': 0,\n 'aria-valuenow': 0,\n 'aria-valuetext': 0,\n // Live Region Attributes\n 'aria-atomic': 0,\n 'aria-busy': 0,\n 'aria-live': 0,\n 'aria-relevant': 0,\n // Drag-and-Drop Attributes\n 'aria-dropeffect': 0,\n 'aria-grabbed': 0,\n // Relationship Attributes\n 'aria-activedescendant': 0,\n 'aria-colcount': 0,\n 'aria-colindex': 0,\n 'aria-colspan': 0,\n 'aria-controls': 0,\n 'aria-describedby': 0,\n 'aria-errormessage': 0,\n 'aria-flowto': 0,\n 'aria-labelledby': 0,\n 'aria-owns': 0,\n 'aria-posinset': 0,\n 'aria-rowcount': 0,\n 'aria-rowindex': 0,\n 'aria-rowspan': 0,\n 'aria-setsize': 0\n};\n\nvar warnedProperties = {};\nvar rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\nvar hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\nfunction validateProperty(tagName, name) {\n {\n if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {\n return true;\n }\n\n if (rARIACamel.test(name)) {\n var ariaName = 'aria-' + name.slice(4).toLowerCase();\n var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (correctName == null) {\n error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);\n\n warnedProperties[name] = true;\n return true;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== correctName) {\n error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n\n if (rARIA.test(name)) {\n var lowerCasedName = name.toLowerCase();\n var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM\n // DOM properties, then it is an invalid aria-* attribute.\n\n if (standardName == null) {\n warnedProperties[name] = true;\n return false;\n } // aria-* attributes should be lowercase; suggest the lowercase version.\n\n\n if (name !== standardName) {\n error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties[name] = true;\n return true;\n }\n }\n }\n\n return true;\n}\n\nfunction warnInvalidARIAProps(type, props) {\n {\n var invalidProps = [];\n\n for (var key in props) {\n var isValid = validateProperty(type, key);\n\n if (!isValid) {\n invalidProps.push(key);\n }\n }\n\n var unknownPropString = invalidProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (invalidProps.length === 1) {\n error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n } else if (invalidProps.length > 1) {\n error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://fb.me/invalid-aria-prop', unknownPropString, type);\n }\n }\n}\n\nfunction validateProperties(type, props) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnInvalidARIAProps(type, props);\n}\n\nvar didWarnValueNull = false;\nfunction validateProperties$1(type, props) {\n {\n if (type !== 'input' && type !== 'textarea' && type !== 'select') {\n return;\n }\n\n if (props != null && props.value === null && !didWarnValueNull) {\n didWarnValueNull = true;\n\n if (type === 'select' && props.multiple) {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);\n } else {\n error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);\n }\n }\n }\n}\n\nvar validateProperty$1 = function () {};\n\n{\n var warnedProperties$1 = {};\n var _hasOwnProperty = Object.prototype.hasOwnProperty;\n var EVENT_NAME_REGEX = /^on./;\n var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;\n var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');\n var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');\n\n validateProperty$1 = function (tagName, name, value, canUseEventSystem) {\n if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {\n return true;\n }\n\n var lowerCasedName = name.toLowerCase();\n\n if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {\n error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');\n\n warnedProperties$1[name] = true;\n return true;\n } // We can't rely on the event system being injected on the server.\n\n\n if (canUseEventSystem) {\n if (registrationNameModules.hasOwnProperty(name)) {\n return true;\n }\n\n var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;\n\n if (registrationName != null) {\n error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (EVENT_NAME_REGEX.test(name)) {\n error('Unknown event handler property `%s`. It will be ignored.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (EVENT_NAME_REGEX.test(name)) {\n // If no event plugins have been injected, we are in a server environment.\n // So we can't tell if the event name is correct for sure, but we can filter\n // out known bad ones like `onclick`. We can't suggest a specific replacement though.\n if (INVALID_EVENT_NAME_REGEX.test(name)) {\n error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Let the ARIA attribute hook validate ARIA attributes\n\n\n if (rARIA$1.test(name) || rARIACamel$1.test(name)) {\n return true;\n }\n\n if (lowerCasedName === 'innerhtml') {\n error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'aria') {\n error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {\n error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'number' && isNaN(value)) {\n error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n var propertyInfo = getPropertyInfo(name);\n var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.\n\n if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {\n var standardName = possibleStandardNames[lowerCasedName];\n\n if (standardName !== name) {\n error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n } else if (!isReserved && name !== lowerCasedName) {\n // Unknown attributes should have lowercase casing since that's how they\n // will be cased anyway with server rendering.\n error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n if (value) {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.', value, name, name, value, name);\n } else {\n error('Received `%s` for a non-boolean attribute `%s`.\\n\\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s=\"%s\" or %s={value.toString()}.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);\n }\n\n warnedProperties$1[name] = true;\n return true;\n } // Now that we've validated casing, do not validate\n // data types for reserved props\n\n\n if (isReserved) {\n return true;\n } // Warn when a known attribute is a bad type\n\n\n if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {\n warnedProperties$1[name] = true;\n return false;\n } // Warn when passing the strings 'false' or 'true' into a boolean prop\n\n\n if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {\n error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string \"false\".', name, value);\n\n warnedProperties$1[name] = true;\n return true;\n }\n\n return true;\n };\n}\n\nvar warnUnknownProperties = function (type, props, canUseEventSystem) {\n {\n var unknownProps = [];\n\n for (var key in props) {\n var isValid = validateProperty$1(type, key, props[key], canUseEventSystem);\n\n if (!isValid) {\n unknownProps.push(key);\n }\n }\n\n var unknownPropString = unknownProps.map(function (prop) {\n return '`' + prop + '`';\n }).join(', ');\n\n if (unknownProps.length === 1) {\n error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n } else if (unknownProps.length > 1) {\n error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://fb.me/react-attribute-behavior', unknownPropString, type);\n }\n }\n};\n\nfunction validateProperties$2(type, props, canUseEventSystem) {\n if (isCustomComponent(type, props)) {\n return;\n }\n\n warnUnknownProperties(type, props, canUseEventSystem);\n}\n\nvar didWarnInvalidHydration = false;\nvar DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';\nvar SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';\nvar SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';\nvar AUTOFOCUS = 'autoFocus';\nvar CHILDREN = 'children';\nvar STYLE = 'style';\nvar HTML$1 = '__html';\nvar HTML_NAMESPACE$1 = Namespaces.html;\nvar warnedUnknownTags;\nvar suppressHydrationWarning;\nvar validatePropertiesInDevelopment;\nvar warnForTextDifference;\nvar warnForPropDifference;\nvar warnForExtraAttributes;\nvar warnForInvalidEventListener;\nvar canDiffStyleForHydrationWarning;\nvar normalizeMarkupForTextOrAttribute;\nvar normalizeHTML;\n\n{\n warnedUnknownTags = {\n // Chrome is the only major browser not shipping . But as of July\n // 2017 it intends to ship it due to widespread usage. We intentionally\n // *don't* warn for even if it's unrecognized by Chrome because\n // it soon will be, and many apps have been using it anyway.\n time: true,\n // There are working polyfills for . Let people use it.\n dialog: true,\n // Electron ships a custom tag to display external web content in\n // an isolated frame and process.\n // This tag is not present in non Electron environments such as JSDom which\n // is often used for testing purposes.\n // @see https://electronjs.org/docs/api/webview-tag\n webview: true\n };\n\n validatePropertiesInDevelopment = function (type, props) {\n validateProperties(type, props);\n validateProperties$1(type, props);\n validateProperties$2(type, props,\n /* canUseEventSystem */\n true);\n }; // IE 11 parses & normalizes the style attribute as opposed to other\n // browsers. It adds spaces and sorts the properties in some\n // non-alphabetical order. Handling that would require sorting CSS\n // properties in the client & server versions or applying\n // `expectedStyle` to a temporary DOM node to read its `style` attribute\n // normalized. Since it only affects IE, we're skipping style warnings\n // in that browser completely in favor of doing all that work.\n // See https://github.com/facebook/react/issues/11807\n\n\n canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.\n // It also can turn \\u0000 into \\uFFFD inside attributes.\n // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream\n // If we have a mismatch, it might be caused by that.\n // We will still patch up in this case but not fire the warning.\n\n var NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g;\n var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\n\n normalizeMarkupForTextOrAttribute = function (markup) {\n var markupString = typeof markup === 'string' ? markup : '' + markup;\n return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');\n };\n\n warnForTextDifference = function (serverText, clientText) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);\n var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);\n\n if (normalizedServerText === normalizedClientText) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Text content did not match. Server: \"%s\" Client: \"%s\"', normalizedServerText, normalizedClientText);\n };\n\n warnForPropDifference = function (propName, serverValue, clientValue) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);\n var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);\n\n if (normalizedServerValue === normalizedClientValue) {\n return;\n }\n\n didWarnInvalidHydration = true;\n\n error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));\n };\n\n warnForExtraAttributes = function (attributeNames) {\n if (didWarnInvalidHydration) {\n return;\n }\n\n didWarnInvalidHydration = true;\n var names = [];\n attributeNames.forEach(function (name) {\n names.push(name);\n });\n\n error('Extra attributes from the server: %s', names);\n };\n\n warnForInvalidEventListener = function (registrationName, listener) {\n if (listener === false) {\n error('Expected `%s` listener to be a function, instead got `false`.\\n\\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);\n } else {\n error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);\n }\n }; // Parse the HTML and read it back to normalize the HTML string so that it\n // can be used for comparison.\n\n\n normalizeHTML = function (parent, html) {\n // We could have created a separate document here to avoid\n // re-initializing custom elements if they exist. But this breaks\n // how is being handled. So we use the same document.\n // See the discussion in https://github.com/facebook/react/pull/11157.\n var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);\n testElement.innerHTML = html;\n return testElement.innerHTML;\n };\n}\n\nfunction ensureListeningTo(rootContainerElement, registrationName) {\n var isDocumentOrFragment = rootContainerElement.nodeType === DOCUMENT_NODE || rootContainerElement.nodeType === DOCUMENT_FRAGMENT_NODE;\n var doc = isDocumentOrFragment ? rootContainerElement : rootContainerElement.ownerDocument;\n legacyListenToEvent(registrationName, doc);\n}\n\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;\n}\n\nfunction noop() {}\n\nfunction trapClickOnNonInteractiveElement(node) {\n // Mobile Safari does not fire properly bubble click events on\n // non-interactive elements, which means delegated click listeners do not\n // fire. The workaround for this bug involves attaching an empty click\n // listener on the target node.\n // http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html\n // Just set it using the onclick property so that we don't have to manage any\n // bookkeeping for it. Not sure if we need to clear it when the listener is\n // removed.\n // TODO: Only do this for the relevant Safaris maybe?\n node.onclick = noop;\n}\n\nfunction setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {\n for (var propKey in nextProps) {\n if (!nextProps.hasOwnProperty(propKey)) {\n continue;\n }\n\n var nextProp = nextProps[propKey];\n\n if (propKey === STYLE) {\n {\n if (nextProp) {\n // Freeze the next style object so that we can assume it won't be\n // mutated. We have already warned for this in the past.\n Object.freeze(nextProp);\n }\n } // Relies on `updateStylesByID` not mutating `styleUpdates`.\n\n\n setValueForStyles(domElement, nextProp);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n var nextHtml = nextProp ? nextProp[HTML$1] : undefined;\n\n if (nextHtml != null) {\n setInnerHTML(domElement, nextHtml);\n }\n } else if (propKey === CHILDREN) {\n if (typeof nextProp === 'string') {\n // Avoid setting initial textContent when the text is empty. In IE11 setting\n // textContent on a will cause the placeholder to not\n // show within the until it has been focused and blurred again.\n // https://github.com/facebook/react/issues/6731#issuecomment-254874553\n var canSetTextContent = tag !== 'textarea' || nextProp !== '';\n\n if (canSetTextContent) {\n setTextContent(domElement, nextProp);\n }\n } else if (typeof nextProp === 'number') {\n setTextContent(domElement, '' + nextProp);\n }\n } else if ( propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameModules.hasOwnProperty(propKey)) {\n if (nextProp != null) {\n if ( typeof nextProp !== 'function') {\n warnForInvalidEventListener(propKey, nextProp);\n }\n\n ensureListeningTo(rootContainerElement, propKey);\n }\n } else if (nextProp != null) {\n setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);\n }\n }\n}\n\nfunction updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {\n // TODO: Handle wasCustomComponentTag\n for (var i = 0; i < updatePayload.length; i += 2) {\n var propKey = updatePayload[i];\n var propValue = updatePayload[i + 1];\n\n if (propKey === STYLE) {\n setValueForStyles(domElement, propValue);\n } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {\n setInnerHTML(domElement, propValue);\n } else if (propKey === CHILDREN) {\n setTextContent(domElement, propValue);\n } else {\n setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);\n }\n }\n}\n\nfunction createElement(type, props, rootContainerElement, parentNamespace) {\n var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML\n // tags get no namespace.\n\n var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);\n var domElement;\n var namespaceURI = parentNamespace;\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n namespaceURI = getIntrinsicNamespace(type);\n }\n\n if (namespaceURI === HTML_NAMESPACE$1) {\n {\n isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to\n // allow or .\n\n if (!isCustomComponentTag && type !== type.toLowerCase()) {\n error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);\n }\n }\n\n if (type === 'script') {\n // Create the script via .innerHTML so its \"parser-inserted\" flag is\n // set to true and it does not execute\n var div = ownerDocument.createElement('div');\n\n div.innerHTML = '
Internally we store an array representing the ideal RGBA values in floating\\npoint form, normalized from 0 to 1. From this we calculate the closest\\nscreen color (RGBA levels from 0 to 255) and expose this to the renderer.
We also cache normalized, floating point components of the color in various\\nrepresentations as they are calculated. This is done to prevent repeating a\\nconversion that has already been performed.
Base class for all elements added to a sketch, including canvas,\\ngraphics buffers, and other HTML elements. Methods in blue are\\nincluded in the core functionality, methods in brown are added\\nwith the p5.dom\\nlibrary.\\nIt is not called directly, but p5.Element\\nobjects are created by calling createCanvas, createGraphics,\\nor in the p5.dom library, createDiv, createImg, createInput, etc.
Thin wrapper around a renderer, to be used for creating a\\ngraphics buffer object. Use this class if you need\\nto draw into an off-screen graphics buffer. The two parameters define the\\nwidth and height in pixels. The fields and methods for this class are\\nextensive, but mirror the normal drawing API for p5.
Base class for all p5.Dictionary types. Specifically\\n typed Dictionary classes inherit from this class.
Creates a new p5.Image. A p5.Image is a canvas backed representation of an\\nimage.\\n\\np5 can display .gif, .jpg and .png images. Images may be displayed\\nin 2D and 3D space. Before an image is used, it must be loaded with the\\nloadImage() function. The p5.Image class contains fields for the width and\\nheight of the image, as well as an array called pixels[] that contains the\\nvalues for every pixel in the image.\\n\\nThe methods described below allow easy access to the image's pixels and\\nalpha channel and simplify the process of compositing.\\n\\nBefore using the pixels[] array, be sure to use the loadPixels() method on\\nthe image to make sure that the pixel data is properly loaded.
This is the p5 instance constructor.
A p5 instance holds all the properties and methods related to\\na p5 sketch. It expects an incoming sketch closure and it can also\\ntake an optional node parameter for attaching the generated p5 canvas\\nto a node. The sketch closure takes the newly created p5 instance as\\nits sole argument and may optionally set preload(), setup(), and/or\\ndraw() properties on it for running a sketch.
A p5 sketch can run in "global" or "instance" mode:\\n"global" - all properties and methods are attached to the window\\n"instance" - all properties and methods are bound to this p5 object
Table objects store data with multiple rows and columns, much\\nlike in a traditional spreadsheet. Tables can be generated from\\nscratch, dynamically, or using data from an existing file.
XML is a representation of an XML object, able to parse XML code. Use\\nloadXML() to load external XML files and create XML objects.
A class to describe a two or three dimensional vector, specifically\\na Euclidean (also known as geometric) vector. A vector is an entity\\nthat has both magnitude and direction. The datatype, however, stores\\nthe components of the vector (x, y for 2D, and x, y, z for 3D). The magnitude\\nand direction can be accessed via the methods mag() and heading().\\n\\nIn many of the p5.js examples, you will see p5.Vector used to describe a\\nposition, velocity, or acceleration. For example, if you consider a rectangle\\nmoving across the screen, at any given instant it has a position (a vector\\nthat points from the origin to its location), a velocity (the rate at which\\nthe object's position changes per time unit, expressed as a vector), and\\nacceleration (the rate at which the object's velocity changes per time\\nunit, expressed as a vector).\\n\\nSince vectors represent groupings of values, we cannot simply use\\ntraditional addition/multiplication/etc. Instead, we'll need to do some\\n"vector" math, which is made easy by the methods inside the p5.Vector class.
This module defines the p5.Font class and functions for\\ndrawing text to the display canvas.
This module defines the p5.Texture class
This class describes a camera for use in p5's\\n\\nWebGL mode. It contains camera position, orientation, and projection\\ninformation necessary for rendering a 3D scene.
New p5.Camera objects can be made through the\\ncreateCamera() function and controlled through\\nthe methods described below. A camera created in this way will use a default\\nposition in the scene and a default perspective projection until these\\nproperties are changed through the various methods available. It is possible\\nto create multiple cameras, in which case the current camera\\ncan be set through the setCamera() method.
Note:\\nThe methods below operate in two coordinate systems: the 'world' coordinate\\nsystem describe positions in terms of their relationship to the origin along\\nthe X, Y and Z axes whereas the camera's 'local' coordinate system\\ndescribes positions from the camera's point of view: left-right, up-down,\\nand forward-backward. The move() method,\\nfor instance, moves the camera along its own axes, whereas the\\nsetPosition()\\nmethod sets the camera's position in world-space.
This module defines the p5.Shader class
The web is much more than just canvas and p5.dom makes it easy to interact\\nwith other HTML5 objects, including text, hyperlink, image, input, video,\\naudio, and webcam.
There is a set of creation methods, DOM manipulation methods, and\\nan extended p5.Element that supports a range of HTML elements. See the\\n\\nbeyond the canvas tutorial for a full overview of how this addon works.
Methods and properties shown in black are part of the p5.js core, items in\\nblue are part of the p5.dom library. You will need to include an extra file\\nin order to access the blue functions. See the\\nusing a library\\nsection for information on how to include this library. p5.dom comes with\\np5 complete or you can download the single file\\n\\nhere.
See tutorial: beyond the canvas\\nfor more info on how to use this library.
p5.sound extends p5 with Web Audio functionality including audio input,\\nplayback, analysis and synthesis.\\n\\np5.SoundFile: Load and play sound files.\\np5.Amplitude: Get the current volume of a sound.\\np5.AudioIn: Get sound from an input source, typically\\n a computer microphone.\\np5.FFT: Analyze the frequency of sound. Returns\\n results from the frequency spectrum or time domain (waveform).\\np5.Oscillator: Generate Sine,\\n Triangle, Square and Sawtooth waveforms. Base class of\\n p5.Noise and p5.Pulse.\\n \\np5.Envelope: An Envelope is a series\\n of fades over time. Often used to control an object's\\n output gain level as an "ADSR Envelope" (Attack, Decay,\\n Sustain, Release). Can also modulate other parameters.\\np5.Delay: A delay effect with\\n parameters for feedback, delayTime, and lowpass filter.\\np5.Filter: Filter the frequency range of a\\n sound.\\n\\np5.Reverb: Add reverb to a sound by specifying\\n duration and decay. \\np5.Convolver: Extends\\np5.Reverb to simulate the sound of real\\n physical spaces through convolution.\\np5.SoundRecorder: Record sound for playback\\n / save the .wav file.\\np5.Phrase, p5.Part and\\np5.Score: Compose musical sequences.\\n\\np5.sound is on GitHub.\\nDownload the latest version\\nhere.
a closure that can set optional preload(),\\n setup(), and/or draw() properties on the\\n given p5 instance
element to attach canvas to, if a\\n boolean is passed in use it as sync
start synchronously (optional)
Each color stores the color mode and level maxes that applied at the\\ntime of its construction. These are used to interpret the input arguments\\n(at construction and later for that instance of color) and to format the\\noutput e.g. when saturation() is requested.
DOM node that is wrapped
pointer to p5 instance
width
height
the renderer to use, either P2D or WEBGL
Main graphics and rendering context, as well as the base API\\nimplementation for p5.js "core". To be used as the superclass for\\nRenderer2D and Renderer3D classes, respecitvely.
whether we're using it as main canvas
A simple Dictionary class for Strings.
A simple Dictionary class for Numbers.
\\nfunction setup() {\\n let img = createImage(100, 100); // same as new p5.Image(100, 100);\\n img.loadPixels();\\n createCanvas(100, 100);\\n background(0);\\n\\n // helper for writing color to array\\n function writeColor(image, x, y, red, green, blue, alpha) {\\n let index = (x + y * width) * 4;\\n image.pixels[index] = red;\\n image.pixels[index + 1] = green;\\n image.pixels[index + 2] = blue;\\n image.pixels[index + 3] = alpha;\\n }\\n\\n let x, y;\\n // fill with random colors\\n for (y = 0; y < img.height; y++) {\\n for (x = 0; x < img.width; x++) {\\n let red = random(255);\\n let green = random(255);\\n let blue = random(255);\\n let alpha = 255;\\n writeColor(img, x, y, red, green, blue, alpha);\\n }\\n }\\n\\n // draw a red line\\n y = 0;\\n for (x = 0; x < img.width; x++) {\\n writeColor(img, x, y, 255, 0, 0, 255);\\n }\\n\\n // draw a green line\\n y = img.height - 1;\\n for (x = 0; x < img.width; x++) {\\n writeColor(img, x, y, 0, 255, 0, 255);\\n }\\n\\n img.updatePixels();\\n image(img, 0, 0);\\n}\\n
An array of p5.TableRow objects
A TableRow object represents a single row of data values,\\nstored in columns, from a table.
A Table Row contains both an ordered array, and an unordered\\nJSON object.
optional: populate the row with a\\n string of values, separated by the\\n separator
comma separated values (csv) by default
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let children = xml.getChildren('animal');\\n\\n for (let i = 0; i < children.length; i++) {\\n let id = children[i].getNum('id');\\n let coloring = children[i].getString('species');\\n let name = children[i].getContent();\\n print(id + ', ' + coloring + ', ' + name);\\n }\\n}\\n\\n// Sketch prints:\\n// 0, Capra hircus, Goat\\n// 1, Panthera pardus, Leopard\\n// 2, Equus zebra, Zebra\\n
x component of the vector
y component of the vector
z component of the vector
\\nlet v1 = createVector(40, 50);\\nlet v2 = createVector(40, 50);\\n\\nellipse(v1.x, v1.y, 50, 50);\\nellipse(v2.x, v2.y, 50, 50);\\nv1.add(v2);\\nellipse(v1.x, v1.y, 50, 50);\\n
Base class for font handling
instance of WebGL renderer
\\nlet cam;\\nlet delta = 0.01;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n // set initial pan angle\\n cam.pan(-0.8);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // pan camera according to angle 'delta'\\n cam.pan(delta);\\n\\n // every 160 frames, switch direction\\n if (frameCount % 160 === 0) {\\n delta *= -1;\\n }\\n\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n
p5 Geometry class
number of vertices on horizontal surface
function to call upon object instantiation.
Shader class for WEBGL Mode
an instance of p5.RendererGL that\\nwill provide the GL context for this new p5.Shader
source code for the vertex shader (as a string)
source code for the fragment shader (as a string)
Extends p5.Element to handle audio and video. In addition to the methods\\nof p5.Element, it also contains methods for controlling media. It is not\\ncalled directly, but p5.MediaElements are created by calling createVideo,\\ncreateAudio, and createCapture.
Base class for a file.\\nUsed for Element.drop and createFileInput.
File that is wrapped
SoundFile object with a path to a file.
The p5.SoundFile may not be available immediately because\\nit loads the file information asynchronously.
To do something with the sound as soon as it loads\\npass the name of a function as the second parameter.
Only one file path is required. However, audio file formats\\n(i.e. mp3, ogg, wav and m4a/aac) are not supported by all\\nweb browsers. If you want to ensure compatability, instead of a single\\nfile path, you may include an Array of filepaths, and the browser will\\nchoose a format that works.
path to a sound file (String). Optionally,\\n you may include multiple file formats in\\n an array. Alternately, accepts an object\\n from the HTML5 File API, or a p5.File.
Name of a function to call once file loads
Name of a function to call if file fails to\\n load. This function will receive an error or\\n XMLHttpRequest object with information\\n about what went wrong.
Name of a function to call while file\\n is loading. That function will\\n receive progress of the request to\\n load the sound file\\n (between 0 and 1) as its first\\n parameter. This progress\\n does not account for the additional\\n time needed to decode the audio data.
\\n\\nfunction preload() {\\n soundFormats('mp3', 'ogg');\\n mySound = loadSound('assets/doorbell.mp3');\\n}\\n\\nfunction setup() {\\n mySound.setVolume(0.1);\\n mySound.play();\\n}\\n\\n
Amplitude measures volume between 0.0 and 1.0.\\nListens to all p5sound by default, or use setInput()\\nto listen to a specific sound source. Accepts an optional\\nsmoothing value, which defaults to 0.
between 0.0 and .999 to smooth\\n amplitude readings (defaults to 0)
\\nvar sound, amplitude, cnv;\\n\\nfunction preload(){\\n sound = loadSound('assets/beat.mp3');\\n}\\nfunction setup() {\\n cnv = createCanvas(100,100);\\n amplitude = new p5.Amplitude();\\n\\n // start / stop the sound when canvas is clicked\\n cnv.mouseClicked(function() {\\n if (sound.isPlaying() ){\\n sound.stop();\\n } else {\\n sound.play();\\n }\\n });\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\n\\n
FFT (Fast Fourier Transform) is an analysis algorithm that\\nisolates individual\\n\\naudio frequencies within a waveform.
Once instantiated, a p5.FFT object can return an array based on\\ntwo types of analyses: • FFT.waveform() computes\\namplitude values along the time domain. The array indices correspond\\nto samples across a brief moment in time. Each value represents\\namplitude of the waveform at that sample of time.\\n• FFT.analyze() computes amplitude values along the\\nfrequency domain. The array indices correspond to frequencies (i.e.\\npitches), from the lowest to the highest that humans can hear. Each\\nvalue represents amplitude at that slice of the frequency spectrum.\\nUse with getEnergy() to measure amplitude at specific\\nfrequencies, or within a range of frequencies.
FFT.waveform()
FFT.analyze()
getEnergy()
FFT analyzes a very short snapshot of sound called a sample\\nbuffer. It returns an array of amplitude measurements, referred\\nto as bins. The array is 1024 bins long by default.\\nYou can change the bin array length, but it must be a power of 2\\nbetween 16 and 1024 in order for the FFT algorithm to function\\ncorrectly. The actual size of the FFT buffer is twice the\\nnumber of bins, so given a standard sample rate, the buffer is\\n2048/44100 seconds long.
bins
Smooth results of Freq Spectrum.\\n 0.0 < smoothing < 1.0.\\n Defaults to 0.8.
Length of resulting array.\\n Must be a power of two between\\n 16 and 1024. Defaults to 1024.
\\nfunction preload(){\\n sound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup(){\\n var cnv = createCanvas(100,100);\\n cnv.mouseClicked(togglePlay);\\n fft = new p5.FFT();\\n sound.amp(0.2);\\n}\\n\\nfunction draw(){\\n background(0);\\n\\n var spectrum = fft.analyze();\\n noStroke();\\n fill(0,255,0); // spectrum is green\\n for (var i = 0; i< spectrum.length; i++){\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width / spectrum.length, h )\\n }\\n\\n var waveform = fft.waveform();\\n noFill();\\n beginShape();\\n stroke(255,0,0); // waveform is red\\n strokeWeight(1);\\n for (var i = 0; i< waveform.length; i++){\\n var x = map(i, 0, waveform.length, 0, width);\\n var y = map( waveform[i], -1, 1, 0, height);\\n vertex(x,y);\\n }\\n endShape();\\n\\n text('click to play/pause', 4, 10);\\n}\\n\\n// fade sound if mouse is over canvas\\nfunction togglePlay() {\\n if (sound.isPlaying()) {\\n sound.pause();\\n } else {\\n sound.loop();\\n }\\n}\\n
p5.Signal is a constant audio-rate signal used by p5.Oscillator\\nand p5.Envelope for modulation math.
This is necessary because Web Audio is processed on a seprate clock.\\nFor example, the p5 draw loop runs about 60 times per second. But\\nthe audio clock must process samples 44100 times per second. If we\\nwant to add a value to each of those samples, we can't do it in the\\ndraw loop, but we can do it by adding a constant-rate audio signal.</p.\\n\\n
This class mostly functions behind the scenes in p5.sound, and returns\\na Tone.Signal from the Tone.js library by Yotam Mann.\\nIf you want to work directly with audio signals for modular\\nsynthesis, check out\\ntone.js.
\\nfunction setup() {\\n carrier = new p5.Oscillator('sine');\\n carrier.amp(1); // set amplitude\\n carrier.freq(220); // set frequency\\n carrier.start(); // start oscillating\\n\\n modulator = new p5.Oscillator('sawtooth');\\n modulator.disconnect();\\n modulator.amp(1);\\n modulator.freq(4);\\n modulator.start();\\n\\n // Modulator's default amplitude range is -1 to 1.\\n // Multiply it by -200, so the range is -200 to 200\\n // then add 220 so the range is 20 to 420\\n carrier.freq( modulator.mult(-200).add(220) );\\n}\\n
Creates a signal that oscillates between -1.0 and 1.0.\\nBy default, the oscillation takes the form of a sinusoidal\\nshape ('sine'). Additional types include 'triangle',\\n'sawtooth' and 'square'. The frequency defaults to\\n440 oscillations per second (440Hz, equal to the pitch of an\\n'A' note).
Set the type of oscillation with setType(), or by instantiating a\\nspecific oscillator: p5.SinOsc, p5.TriOsc, p5.SqrOsc, or p5.SawOsc.\\n
frequency defaults to 440Hz
type of oscillator. Options:\\n 'sine' (default), 'triangle',\\n 'sawtooth', 'square'
\\nvar osc;\\nvar playing = false;\\n\\nfunction setup() {\\n backgroundColor = color(255,0,255);\\n textAlign(CENTER);\\n\\n osc = new p5.Oscillator();\\n osc.setType('sine');\\n osc.freq(240);\\n osc.amp(0);\\n osc.start();\\n}\\n\\nfunction draw() {\\n background(backgroundColor)\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY < height && mouseY > 0) {\\n if (!playing) {\\n // ramp amplitude to 0.5 over 0.05 seconds\\n osc.amp(0.5, 0.05);\\n playing = true;\\n backgroundColor = color(0,255,255);\\n } else {\\n // ramp amplitude to 0 over 0.5 seconds\\n osc.amp(0, 0.5);\\n playing = false;\\n backgroundColor = color(255,0,255);\\n }\\n }\\n}\\n
Constructor: new p5.SinOsc().\\nThis creates a Sine Wave Oscillator and is\\nequivalent to new p5.Oscillator('sine')\\n or creating a p5.Oscillator and then calling\\nits method setType('sine').\\nSee p5.Oscillator for methods.
new p5.SinOsc()
new p5.Oscillator('sine')\\n
setType('sine')
Set the frequency
Constructor: new p5.TriOsc().\\nThis creates a Triangle Wave Oscillator and is\\nequivalent to new p5.Oscillator('triangle')\\n or creating a p5.Oscillator and then calling\\nits method setType('triangle').\\nSee p5.Oscillator for methods.
new p5.TriOsc()
new p5.Oscillator('triangle')\\n
setType('triangle')
Constructor: new p5.SawOsc().\\nThis creates a SawTooth Wave Oscillator and is\\nequivalent to new p5.Oscillator('sawtooth')\\n or creating a p5.Oscillator and then calling\\nits method setType('sawtooth').\\nSee p5.Oscillator for methods.
new p5.SawOsc()
new p5.Oscillator('sawtooth')\\n
setType('sawtooth')
Constructor: new p5.SqrOsc().\\nThis creates a Square Wave Oscillator and is\\nequivalent to new p5.Oscillator('square')\\n or creating a p5.Oscillator and then calling\\nits method setType('square').\\nSee p5.Oscillator for methods.
new p5.SqrOsc()
new p5.Oscillator('square')\\n
setType('square')
Envelopes are pre-defined amplitude distribution over time.\\nTypically, envelopes are used to control the output volume\\nof an object, a series of fades referred to as Attack, Decay,\\nSustain and Release (\\nADSR\\n). Envelopes can also control other Web Audio Parameters—for example, a p5.Envelope can\\ncontrol an Oscillator's frequency like this: osc.freq(env).
osc.freq(env)
Use setRange to change the attack/release level.\\nUse setADSR to change attackTime, decayTime, sustainPercent and releaseTime.
setRange
setADSR
Use the play method to play the entire envelope,\\nthe ramp method for a pingable trigger,\\nor triggerAttack/\\ntriggerRelease to trigger noteOn/noteOff.
play
ramp
triggerAttack
triggerRelease
\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n env.play();\\n}\\n
Creates a Pulse object, an oscillator that implements\\nPulse Width Modulation.\\nThe pulse is created with two oscillators.\\nAccepts a parameter for frequency, and to set the\\nwidth between the pulses. See \\np5.Oscillator for a full list of methods.
p5.Oscillator
Frequency in oscillations per second (Hz)
Width between the pulses (0 to 1.0,\\n defaults to 0)
\\nvar pulse;\\nfunction setup() {\\n background(0);\\n\\n // Create and start the pulse wave oscillator\\n pulse = new p5.Pulse();\\n pulse.amp(0.5);\\n pulse.freq(220);\\n pulse.start();\\n}\\n\\nfunction draw() {\\n var w = map(mouseX, 0, width, 0, 1);\\n w = constrain(w, 0, 1);\\n pulse.width(w)\\n}\\n
Noise is a type of oscillator that generates a buffer with random values.
Type of noise can be 'white' (default),\\n 'brown' or 'pink'.
Get audio from an input, i.e. your computer's microphone.
Turn the mic on/off with the start() and stop() methods. When the mic\\nis on, its volume can be measured with getLevel or by connecting an\\nFFT object.
If you want to hear the AudioIn, use the .connect() method.\\nAudioIn does not connect to p5.sound output by default to prevent\\nfeedback.
Note: This uses the getUserMedia/\\nStream API, which is not supported by certain browsers. Access in Chrome browser\\nis limited to localhost and https, but access over http may be limited.
A function to call if there is an error\\n accessing the AudioIn. For example,\\n Safari and iOS devices do not\\n currently allow microphone access.
\\nvar mic;\\nfunction setup(){\\n mic = new p5.AudioIn()\\n mic.start();\\n}\\nfunction draw(){\\n background(0);\\n micLevel = mic.getLevel();\\n ellipse(width/2, constrain(height-micLevel*height*5, 0, height), 10, 10);\\n}\\n
Effect is a base class for audio effects in p5. \\nThis module handles the nodes and methods that are \\ncommon and useful for current and future effects.
This class is extended by p5.Distortion, \\np5.Compressor,\\np5.Delay, \\np5.Filter, \\np5.Reverb.
Reference to the audio context of the p5 object
Gain Node effect wrapper
Tone.JS CrossFade node (defaults to value: 1)
Effects that extend this class should connect\\n to the wet signal to this gain node, so that dry and wet \\n signals are mixed properly.
A p5.Filter uses a Web Audio Biquad Filter to filter\\nthe frequency response of an input source. Subclasses\\ninclude:
p5.LowPass
p5.HighPass
p5.BandPass
The .res() method controls either width of the\\nbandpass, or resonance of the low/highpass cutoff frequency.
.res()
This class extends p5.Effect.Methods amp(), chain(), \\ndrywet(), connect(), and \\ndisconnect() are available.
'lowpass' (default), 'highpass', 'bandpass'
\\nvar fft, noise, filter;\\n\\nfunction setup() {\\n fill(255, 40, 255);\\n\\n filter = new p5.BandPass();\\n\\n noise = new p5.Noise();\\n // disconnect unfiltered noise,\\n // and connect to filter\\n noise.disconnect();\\n noise.connect(filter);\\n noise.start();\\n\\n fft = new p5.FFT();\\n}\\n\\nfunction draw() {\\n background(30);\\n\\n // set the BandPass frequency based on mouseX\\n var freq = map(mouseX, 0, width, 20, 10000);\\n filter.freq(freq);\\n // give the filter a narrow band (lower res = wider bandpass)\\n filter.res(50);\\n\\n // draw filtered spectrum\\n var spectrum = fft.analyze();\\n noStroke();\\n for (var i = 0; i < spectrum.length; i++) {\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width/spectrum.length, h);\\n }\\n\\n isMouseOverCanvas();\\n}\\n\\nfunction isMouseOverCanvas() {\\n var mX = mouseX, mY = mouseY;\\n if (mX > 0 && mX < width && mY < height && mY > 0) {\\n noise.amp(0.5, 0.2);\\n } else {\\n noise.amp(0, 0.2);\\n }\\n}\\n
Constructor: new p5.LowPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('lowpass').\\nSee p5.Filter for methods.
new p5.LowPass()
setType('lowpass')
Constructor: new p5.HighPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('highpass').\\nSee p5.Filter for methods.
new p5.HighPass()
setType('highpass')
Constructor: new p5.BandPass() Filter.\\nThis is the same as creating a p5.Filter and then calling\\nits method setType('bandpass').\\nSee p5.Filter for methods.
new p5.BandPass()
setType('bandpass')
p5.EQ is an audio effect that performs the function of a multiband\\naudio equalizer. Equalization is used to adjust the balance of\\nfrequency compoenents of an audio signal. This process is commonly used\\nin sound production and recording to change the waveform before it reaches\\na sound output device. EQ can also be used as an audio effect to create\\ninteresting distortions by filtering out parts of the spectrum. p5.EQ is\\nbuilt using a chain of Web Audio Biquad Filter Nodes and can be\\ninstantiated with 3 or 8 bands. Bands can be added or removed from\\nthe EQ by directly modifying p5.EQ.bands (the array that stores filters).
This class extends p5.Effect.\\nMethods amp(), chain(),\\ndrywet(), connect(), and\\ndisconnect() are available.
Constructor will accept 3 or 8, defaults to 3
\\nvar eq;\\nvar band_names;\\nvar band_index;\\n\\nvar soundFile, play;\\n\\nfunction preload() {\\n soundFormats('mp3', 'ogg');\\n soundFile = loadSound('assets/beat');\\n}\\n\\nfunction setup() {\\n eq = new p5.EQ(3);\\n soundFile.disconnect();\\n eq.process(soundFile);\\n\\n band_names = ['lows','mids','highs'];\\n band_index = 0;\\n play = false;\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(30);\\n noStroke();\\n fill(255);\\n text('click to kill',50,25);\\n\\n fill(255, 40, 255);\\n textSize(26);\\n text(band_names[band_index],50,55);\\n\\n fill(255);\\n textSize(9);\\n text('space = play/pause',50,80);\\n}\\n\\n//If mouse is over canvas, cycle to the next band and kill the frequency\\nfunction mouseClicked() {\\n for (var i = 0; i < eq.bands.length; i++) {\\n eq.bands[i].gain(0);\\n }\\n eq.bands[band_index].gain(-40);\\n if (mouseX > 0 && mouseX < width && mouseY < height && mouseY > 0) {\\n band_index === 2 ? band_index = 0 : band_index++;\\n }\\n}\\n\\n//use space bar to trigger play / pause\\nfunction keyPressed() {\\n if (key===' ') {\\n play = !play\\n play ? soundFile.loop() : soundFile.pause();\\n }\\n}\\n
Panner3D is based on the \\nWeb Audio Spatial Panner Node.\\nThis panner is a spatial processing node that allows audio to be positioned\\nand oriented in 3D space.
The position is relative to an \\nAudio Context Listener, which can be accessed\\nby p5.soundOut.audiocontext.listener
p5.soundOut.audiocontext.listener
Delay is an echo effect. It processes an existing sound source,\\nand outputs a delayed version of that sound. The p5.Delay can\\nproduce different effects depending on the delayTime, feedback,\\nfilter, and type. In the example below, a feedback of 0.5 (the\\ndefaul value) will produce a looping delay that decreases in\\nvolume by 50% each repeat. A filter will cut out the high\\nfrequencies so that the delay does not sound as piercing as the\\noriginal source.
\\nvar noise, env, delay;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n noise = new p5.Noise('brown');\\n noise.amp(0);\\n noise.start();\\n\\n delay = new p5.Delay();\\n\\n // delay.process() accepts 4 parameters:\\n // source, delayTime, feedback, filter frequency\\n // play with these numbers!!\\n delay.process(noise, .12, .7, 2300);\\n\\n // play the noise with an envelope,\\n // a series of fades ( time / value pairs )\\n env = new p5.Envelope(.01, 0.2, .2, .1);\\n}\\n\\n// mouseClick triggers envelope\\nfunction mouseClicked() {\\n // is mouse over canvas?\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n env.play(noise);\\n }\\n}\\n
Reverb adds depth to a sound through a large number of decaying\\nechoes. It creates the perception that sound is occurring in a\\nphysical space. The p5.Reverb has paramters for Time (how long does the\\nreverb last) and decayRate (how much the sound decays with each echo)\\nthat can be set with the .set() or .process() methods. The p5.Convolver\\nextends p5.Reverb allowing you to recreate the sound of actual physical\\nspaces through convolution.
\\nvar soundFile, reverb;\\nfunction preload() {\\n soundFile = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n reverb = new p5.Reverb();\\n soundFile.disconnect(); // so we'll only hear reverb...\\n\\n // connect soundFile to reverb, process w/\\n // 3 second reverbTime, decayRate of 2%\\n reverb.process(soundFile, 3, 2);\\n soundFile.play();\\n}\\n
p5.Convolver extends p5.Reverb. It can emulate the sound of real\\nphysical spaces through a process called \\nconvolution.
Convolution multiplies any audio input by an "impulse response"\\nto simulate the dispersion of sound over time. The impulse response is\\ngenerated from an audio file that you provide. One way to\\ngenerate an impulse response is to pop a balloon in a reverberant space\\nand record the echo. Convolution can also be used to experiment with\\nsound.
Use the method createConvolution(path) to instantiate a\\np5.Convolver with a path to your impulse response audio file.
createConvolution(path)
path to a sound file
function to call when loading succeeds
function to call if loading fails.\\n This function will receive an error or\\n XMLHttpRequest object with information\\n about what went wrong.
\\nvar cVerb, sound;\\nfunction preload() {\\n // We have both MP3 and OGG versions of all sound assets\\n soundFormats('ogg', 'mp3');\\n\\n // Try replacing 'bx-spring' with other soundfiles like\\n // 'concrete-tunnel' 'small-plate' 'drum' 'beatbox'\\n cVerb = createConvolver('assets/bx-spring.mp3');\\n\\n // Try replacing 'Damscray_DancingTiger' with\\n // 'beat', 'doorbell', lucky_dragons_-_power_melody'\\n sound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n // disconnect from master output...\\n sound.disconnect();\\n\\n // ...and process with cVerb\\n // so that we only hear the convolution\\n cVerb.process(sound);\\n\\n sound.play();\\n}\\n
A phrase is a pattern of musical events over time, i.e.\\na series of notes and rests.
Phrases must be added to a p5.Part for playback, and\\neach part can play multiple phrases at the same time.\\nFor example, one Phrase might be a kick drum, another\\ncould be a snare, and another could be the bassline.
The first parameter is a name so that the phrase can be\\nmodified or deleted later. The callback is a a function that\\nthis phrase will call at every step—for example it might be\\ncalled playNote(value){}. The array determines\\nwhich value is passed into the callback at each step of the\\nphrase. It can be numbers, an object with multiple numbers,\\nor a zero (0) indicates a rest so the callback won't be called).
playNote(value){}
Name so that you can access the Phrase.
The name of a function that this phrase\\n will call. Typically it will play a sound,\\n and accept two parameters: a time at which\\n to play the sound (in seconds from now),\\n and a value from the sequence array. The\\n time should be passed into the play() or\\n start() method to ensure precision.
Array of values to pass into the callback\\n at each step of the phrase.
\\nvar mySound, myPhrase, myPart;\\nvar pattern = [1,0,0,2,0,2,0,0];\\nvar msg = 'click to play';\\n\\nfunction preload() {\\n mySound = loadSound('assets/beatbox.mp3');\\n}\\n\\nfunction setup() {\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n masterVolume(0.1);\\n\\n myPhrase = new p5.Phrase('bbox', makeSound, pattern);\\n myPart = new p5.Part();\\n myPart.addPhrase(myPhrase);\\n myPart.setBPM(60);\\n}\\n\\nfunction draw() {\\n background(0);\\n text(msg, width/2, height/2);\\n}\\n\\nfunction makeSound(time, playbackRate) {\\n mySound.rate(playbackRate);\\n mySound.play(time);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n myPart.start();\\n msg = 'playing pattern';\\n }\\n}\\n\\n
A p5.Part plays back one or more p5.Phrases. Instantiate a part\\nwith steps and tatums. By default, each step represents a 1/16th note.
See p5.Phrase for more about musical timing.
Steps in the part
Divisions of a beat, e.g. use 1/4, or 0.25 for a quater note (default is 1/16, a sixteenth note)
\\nvar box, drum, myPart;\\nvar boxPat = [1,0,0,2,0,2,0,0];\\nvar drumPat = [0,1,1,0,2,0,1,0];\\nvar msg = 'click to play';\\n\\nfunction preload() {\\n box = loadSound('assets/beatbox.mp3');\\n drum = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n masterVolume(0.1);\\n\\n var boxPhrase = new p5.Phrase('box', playBox, boxPat);\\n var drumPhrase = new p5.Phrase('drum', playDrum, drumPat);\\n myPart = new p5.Part();\\n myPart.addPhrase(boxPhrase);\\n myPart.addPhrase(drumPhrase);\\n myPart.setBPM(60);\\n masterVolume(0.1);\\n}\\n\\nfunction draw() {\\n background(0);\\n text(msg, width/2, height/2);\\n}\\n\\nfunction playBox(time, playbackRate) {\\n box.rate(playbackRate);\\n box.play(time);\\n}\\n\\nfunction playDrum(time, playbackRate) {\\n drum.rate(playbackRate);\\n drum.play(time);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n myPart.start();\\n msg = 'playing part';\\n }\\n}\\n
A Score consists of a series of Parts. The parts will\\nbe played back in order. For example, you could have an\\nA part, a B part, and a C part, and play them back in this order\\nnew p5.Score(a, a, b, a, c)
new p5.Score(a, a, b, a, c)
One or multiple parts, to be played in sequence.
SoundLoop
this function will be called on each iteration of theloop
amount of time or beats for each iteration of the loop\\n defaults to 1
\\nvar click;\\nvar looper1;\\n\\nfunction preload() {\\n click = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n //the looper's callback is passed the timeFromNow\\n //this value should be used as a reference point from \\n //which to schedule sounds \\n looper1 = new p5.SoundLoop(function(timeFromNow){\\n click.play(timeFromNow);\\n background(255 * (looper1.iterations % 2));\\n }, 2);\\n\\n //stop after 10 iteratios;\\n looper1.maxIterations = 10;\\n //start the loop\\n looper1.start();\\n}\\n
Compressor is an audio effect class that performs dynamics compression\\non an audio input source. This is a very commonly used technique in music\\nand sound production. Compression creates an overall louder, richer, \\nand fuller sound by lowering the volume of louds and raising that of softs.\\nCompression can be used to avoid clipping (sound distortion due to \\npeaks in volume) and is especially useful when many sounds are played \\nat once. Compression can be used on indivudal sound sources in addition\\nto the master output.
Record sounds for playback and/or to save as a .wav file.\\nThe p5.SoundRecorder records all sound output from your sketch,\\nor can be assigned a specific source with setInput().
The record() method accepts a p5.SoundFile as a parameter.\\nWhen playback is stopped (either after the given amount of time,\\nor with the stop() method), the p5.SoundRecorder will send its\\nrecording to that p5.SoundFile for playback.
\\nvar mic, recorder, soundFile;\\nvar state = 0;\\n\\nfunction setup() {\\n background(200);\\n // create an audio in\\n mic = new p5.AudioIn();\\n\\n // prompts user to enable their browser mic\\n mic.start();\\n\\n // create a sound recorder\\n recorder = new p5.SoundRecorder();\\n\\n // connect the mic to the recorder\\n recorder.setInput(mic);\\n\\n // this sound file will be used to\\n // playback & save the recording\\n soundFile = new p5.SoundFile();\\n\\n text('keyPress to record', 20, 20);\\n}\\n\\nfunction keyPressed() {\\n // make sure user enabled the mic\\n if (state === 0 && mic.enabled) {\\n\\n // record to our p5.SoundFile\\n recorder.record(soundFile);\\n\\n background(255,0,0);\\n text('Recording!', 20, 20);\\n state++;\\n }\\n else if (state === 1) {\\n background(0,255,0);\\n\\n // stop recorder and\\n // send result to soundFile\\n recorder.stop();\\n\\n text('Stopped', 20, 20);\\n state++;\\n }\\n\\n else if (state === 2) {\\n soundFile.play(); // play the result!\\n save(soundFile, 'mySound.wav');\\n state++;\\n }\\n}\\n
PeakDetect works in conjunction with p5.FFT to\\nlook for onsets in some or all of the frequency spectrum.\\n
\\nTo use p5.PeakDetect, call update in the draw loop\\nand pass in a p5.FFT object.\\n
update
\\nYou can listen for a specific part of the frequency spectrum by\\nsetting the range between freq1 and freq2.\\n
freq1
freq2
threshold is the threshold for detecting a peak,\\nscaled between 0 and 1. It is logarithmic, so 0.1 is half as loud\\nas 1.0.
threshold
\\nThe update method is meant to be run in the draw loop, and\\nframes determines how many loops must pass before\\nanother peak can be detected.\\nFor example, if the frameRate() = 60, you could detect the beat of a\\n120 beat-per-minute song with this equation:\\n framesPerPeak = 60 / (estimatedBPM / 60 );\\n
framesPerPeak = 60 / (estimatedBPM / 60 );
\\nBased on example contribtued by @b2renger, and a simple beat detection\\nexplanation by Felix Turner.\\n
lowFrequency - defaults to 20Hz
highFrequency - defaults to 20000 Hz
Threshold for detecting a beat between 0 and 1\\n scaled logarithmically where 0.1 is 1/2 the loudness\\n of 1.0. Defaults to 0.35.
Defaults to 20.
\\n\\nvar cnv, soundFile, fft, peakDetect;\\nvar ellipseWidth = 10;\\n\\nfunction preload() {\\n soundFile = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n\\n // p5.PeakDetect requires a p5.FFT\\n fft = new p5.FFT();\\n peakDetect = new p5.PeakDetect();\\n}\\n\\nfunction draw() {\\n background(0);\\n text('click to play/pause', width/2, height/2);\\n\\n // peakDetect accepts an fft post-analysis\\n fft.analyze();\\n peakDetect.update(fft);\\n\\n if ( peakDetect.isDetected ) {\\n ellipseWidth = 50;\\n } else {\\n ellipseWidth *= 0.95;\\n }\\n\\n ellipse(width/2, height/2, ellipseWidth, ellipseWidth);\\n}\\n\\n// toggle play/stop when canvas is clicked\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n if (soundFile.isPlaying() ) {\\n soundFile.stop();\\n } else {\\n soundFile.play();\\n }\\n }\\n}\\n
A gain node is usefull to set the relative volume of sound.\\nIt's typically used to build mixers.
\\n\\n // load two soundfile and crossfade beetween them\\n var sound1,sound2;\\n var gain1, gain2, gain3;\\n\\n function preload(){\\n soundFormats('ogg', 'mp3');\\n sound1 = loadSound('assets/Damscray_-_Dancing_Tiger_01');\\n sound2 = loadSound('assets/beat.mp3');\\n }\\n\\n function setup() {\\n createCanvas(400,200);\\n\\n // create a 'master' gain to which we will connect both soundfiles\\n gain3 = new p5.Gain();\\n gain3.connect();\\n\\n // setup first sound for playing\\n sound1.rate(1);\\n sound1.loop();\\n sound1.disconnect(); // diconnect from p5 output\\n\\n gain1 = new p5.Gain(); // setup a gain node\\n gain1.setInput(sound1); // connect the first sound to its input\\n gain1.connect(gain3); // connect its output to the 'master'\\n\\n sound2.rate(1);\\n sound2.disconnect();\\n sound2.loop();\\n\\n gain2 = new p5.Gain();\\n gain2.setInput(sound2);\\n gain2.connect(gain3);\\n\\n }\\n\\n function draw(){\\n background(180);\\n\\n // calculate the horizontal distance beetween the mouse and the right of the screen\\n var d = dist(mouseX,0,width,0);\\n\\n // map the horizontal position of the mouse to values useable for volume control of sound1\\n var vol1 = map(mouseX,0,width,0,1);\\n var vol2 = 1-vol1; // when sound1 is loud, sound2 is quiet and vice versa\\n\\n gain1.amp(vol1,0.5,0);\\n gain2.amp(vol2,0.5,0);\\n\\n // map the vertical position of the mouse to values useable for 'master volume control'\\n var vol3 = map(mouseY,0,height,0,1);\\n gain3.amp(vol3,0.5,0);\\n }\\n
Base class for monophonic synthesizers. Any extensions of this class\\nshould follow the API and implement the methods below in order to \\nremain compatible with p5.PolySynth();
A MonoSynth is used as a single voice for sound synthesis.\\nThis is a class to be used in conjunction with the PolySynth\\nclass. Custom synthetisers should be built inheriting from\\nthis class.
\\nvar monoSynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n monoSynth = new p5.MonoSynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // time from now (in seconds)\\n var time = 0;\\n // note duration (in seconds)\\n var dur = 0.25;\\n // velocity (volume, from 0 to 1)\\n var v = 0.2;\\n\\n monoSynth.play(\\\"G3\\\", v, time, dur);\\n monoSynth.play(\\\"C4\\\", v, time += dur, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n
An AudioVoice is used as a single voice for sound synthesis.\\nThe PolySynth class holds an array of AudioVoice, and deals\\nwith voices allocations, with setting notes to be played, and\\nparameters to be set.
A monophonic synth voice inheriting\\n the AudioVoice class. Defaults to p5.MonoSynth
Number of voices, defaults to 8;
\\nvar polySynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n polySynth = new p5.PolySynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // note duration (in seconds)\\n var dur = 1.5;\\n\\n // time from now (in seconds)\\n var time = 0;\\n\\n // velocity (volume, from 0 to 1)\\n var vel = 0.1;\\n\\n // notes can overlap with each other\\n polySynth.play(\\\"G2\\\", vel, 0, dur);\\n polySynth.play(\\\"C3\\\", vel, time += 1/3, dur);\\n polySynth.play(\\\"G3\\\", vel, time += 1/3, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n
A Distortion effect created with a Waveshaper Node,\\nwith an approach adapted from\\nKevin Ennis
Unbounded distortion amount.\\n Normal values range from 0-1.
'none', '2x', or '4x'.
Conversions adapted from http://www.easyrgb.com/en/math.php.
In these functions, hue is always in the range [0, 1], just like all other\\ncomponents are in the range [0, 1]. 'Brightness' and 'value' are used\\ninterchangeably.
Convert an HSBA array to HSLA.
Convert an HSBA array to RGBA.
Convert an HSLA array to HSBA.
Convert an HSLA array to RGBA.
We need to change basis from HSLA to something that can be more easily be\\nprojected onto RGBA. We will choose hue and brightness as our first two\\ncomponents, and pick a convenient third one ('zest') so that we don't need\\nto calculate formal HSBA saturation.
Convert an RGBA array to HSBA.
Convert an RGBA array to HSLA.
Extracts the alpha value from a color or pixel array.
p5.Color object, color components,\\n or CSS color
\\nnoStroke();\\nlet c = color(0, 126, 255, 102);\\nfill(c);\\nrect(15, 15, 35, 70);\\nlet value = alpha(c); // Sets 'value' to 102\\nfill(value);\\nrect(50, 15, 35, 70);\\n
Extracts the blue value from a color or pixel array.
\\nlet c = color(175, 100, 220); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet blueValue = blue(c); // Get blue in 'c'\\nprint(blueValue); // Prints \\\"220.0\\\"\\nfill(0, 0, blueValue); // Use 'blueValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n
Extracts the HSB brightness value from a color or pixel array.
\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = brightness(c); // Sets 'value' to 255\\nfill(value);\\nrect(50, 20, 35, 60);\\n
\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color('hsb(60, 100%, 50%)');\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = brightness(c); // A 'value' of 50% is 127.5\\nfill(value);\\nrect(50, 20, 35, 60);\\n
Creates colors for storing in variables of the color datatype. The\\nparameters are interpreted as RGB or HSB values depending on the\\ncurrent colorMode(). The default mode is RGB values from 0 to 255\\nand, therefore, the function call color(255, 204, 0) will return a\\nbright yellow color.\\n\\nNote that if only one value is provided to color(), it will be interpreted\\nas a grayscale value. Add a second value, and it will be used for alpha\\ntransparency. When three values are specified, they are interpreted as\\neither RGB or HSB values. Adding a fourth value applies alpha\\ntransparency.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color\\nstrings and all named color strings are supported. In this case, an alpha\\nnumber value as a second argument is not supported, the RGBA form should be\\nused.
\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nrect(30, 20, 55, 55); // Draw rectangle\\n
\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nellipse(25, 25, 80, 80); // Draw left circle\\n\\n// Using only one value with color()\\n// generates a grayscale value.\\nc = color(65); // Update 'c' with grayscale value\\nfill(c); // Use updated 'c' as fill color\\nellipse(75, 75, 80, 80); // Draw right circle\\n
\\n// Named SVG & CSS colors may be used,\\nlet c = color('magenta');\\nfill(c); // Use 'c' as fill color\\nnoStroke(); // Don't draw a stroke around shapes\\nrect(20, 20, 60, 60); // Draw rectangle\\n
\\n// as can hex color codes:\\nnoStroke(); // Don't draw a stroke around shapes\\nlet c = color('#0f0');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('#00ff00');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n
\\n// RGB and RGBA color strings are also supported:\\n// these all set to the same color (solid blue)\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('rgb(0,0,255)');\\nfill(c); // Use 'c' as fill color\\nrect(10, 10, 35, 35); // Draw rectangle\\n\\nc = color('rgb(0%, 0%, 100%)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 35, 35); // Draw rectangle\\n\\nc = color('rgba(0, 0, 255, 1)');\\nfill(c); // Use updated 'c' as fill color\\nrect(10, 55, 35, 35); // Draw rectangle\\n\\nc = color('rgba(0%, 0%, 100%, 1)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 55, 35, 35); // Draw rectangle\\n
\\n// HSL color is also supported and can be specified\\n// by value\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('hsl(160, 100%, 50%)');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('hsla(160, 100%, 50%, 0.5)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n
\\n// HSB color is also supported and can be specified\\n// by value\\nlet c;\\nnoStroke(); // Don't draw a stroke around shapes\\nc = color('hsb(160, 100%, 50%)');\\nfill(c); // Use 'c' as fill color\\nrect(0, 10, 45, 80); // Draw rectangle\\n\\nc = color('hsba(160, 100%, 50%, 0.5)');\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw rectangle\\n
\\nlet c; // Declare color 'c'\\nnoStroke(); // Don't draw a stroke around shapes\\n\\n// If no colorMode is specified, then the\\n// default of RGB with scale of 0-255 is used.\\nc = color(50, 55, 100); // Create a color for 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(0, 10, 45, 80); // Draw left rect\\n\\ncolorMode(HSB, 100); // Use HSB with scale of 0-100\\nc = color(50, 55, 100); // Update 'c' with new color\\nfill(c); // Use updated 'c' as fill color\\nrect(55, 10, 45, 80); // Draw right rect\\n
number specifying value between white\\n and black.
alpha value relative to current color range\\n (default is 0-255)
red or hue value relative to\\n the current color range
green or saturation value\\n relative to the current color range
blue or brightness value\\n relative to the current color range
a color string
an array containing the red,green,blue &\\n and alpha components of the color
Extracts the green value from a color or pixel array.
\\nlet c = color(20, 75, 200); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet greenValue = green(c); // Get green in 'c'\\nprint(greenValue); // Print \\\"75.0\\\"\\nfill(0, greenValue, 0); // Use 'greenValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n
Extracts the hue value from a color or pixel array.
Hue exists in both HSB and HSL. This function will return the\\nHSB-normalized hue when supplied with an HSB color object (or when supplied\\nwith a pixel array while the color mode is HSB), but will default to the\\nHSL-normalized hue otherwise. (The values will only be different if the\\nmaximum hue setting for each system is different.)
\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = hue(c); // Sets 'value' to \\\"0\\\"\\nfill(value);\\nrect(50, 20, 35, 60);\\n
Blends two colors to find a third color somewhere between them. The amt\\nparameter is the amount to interpolate between the two values where 0.0\\nequal to the first color, 0.1 is very near the first color, 0.5 is halfway\\nin between, etc. An amount below 0 will be treated as 0. Likewise, amounts\\nabove 1 will be capped at 1. This is different from the behavior of lerp(),\\nbut necessary because otherwise numbers outside the range will produce\\nstrange and unexpected colors.\\n\\nThe way that colours are interpolated depends on the current color mode.
interpolate from this color
interpolate to this color
number between 0 and 1
\\ncolorMode(RGB);\\nstroke(255);\\nbackground(51);\\nlet from = color(218, 165, 32);\\nlet to = color(72, 61, 139);\\ncolorMode(RGB); // Try changing to HSB.\\nlet interA = lerpColor(from, to, 0.33);\\nlet interB = lerpColor(from, to, 0.66);\\nfill(from);\\nrect(10, 20, 20, 60);\\nfill(interA);\\nrect(30, 20, 20, 60);\\nfill(interB);\\nrect(50, 20, 20, 60);\\nfill(to);\\nrect(70, 20, 20, 60);\\n
Extracts the HSL lightness value from a color or pixel array.
\\nnoStroke();\\ncolorMode(HSL);\\nlet c = color(156, 100, 50, 1);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = lightness(c); // Sets 'value' to 50\\nfill(value);\\nrect(50, 20, 35, 60);\\n
Extracts the red value from a color or pixel array.
\\nlet c = color(255, 204, 0); // Define color 'c'\\nfill(c); // Use color variable 'c' as fill color\\nrect(15, 20, 35, 60); // Draw left rectangle\\n\\nlet redValue = red(c); // Get red in 'c'\\nprint(redValue); // Print \\\"255.0\\\"\\nfill(redValue, 0, 0); // Use 'redValue' in new fill\\nrect(50, 20, 35, 60); // Draw right rectangle\\n
\\ncolorMode(RGB, 255); // Sets the range for red, green, and blue to 255\\nlet c = color(127, 255, 0);\\ncolorMode(RGB, 1); // Sets the range for red, green, and blue to 1\\nlet myColor = red(c);\\nprint(myColor); // 0.4980392156862745\\n
Extracts the saturation value from a color or pixel array.
Saturation is scaled differently in HSB and HSL. This function will return\\nthe HSB saturation when supplied with an HSB color object (or when supplied\\nwith a pixel array while the color mode is HSB), but will default to the\\nHSL saturation otherwise.
\\nnoStroke();\\ncolorMode(HSB, 255);\\nlet c = color(0, 126, 255);\\nfill(c);\\nrect(15, 20, 35, 60);\\nlet value = saturation(c); // Sets 'value' to 126\\nfill(value);\\nrect(50, 20, 35, 60);\\n
This function returns the color formatted as a string. This can be useful\\nfor debugging, or for using p5.js with other libraries.
How the color string will be formatted.\\nLeaving this empty formats the string as rgba(r, g, b, a).\\n'#rgb' '#rgba' '#rrggbb' and '#rrggbbaa' format as hexadecimal color codes.\\n'rgb' 'hsb' and 'hsl' return the color formatted in the specified color mode.\\n'rgba' 'hsba' and 'hsla' are the same as above but with alpha channels.\\n'rgb%' 'hsb%' 'hsl%' 'rgba%' 'hsba%' and 'hsla%' format as percentages.
\\nlet myColor;\\nfunction setup() {\\n createCanvas(200, 200);\\n stroke(255);\\n myColor = color(100, 100, 250);\\n fill(myColor);\\n}\\n\\nfunction draw() {\\n rotate(HALF_PI);\\n text(myColor.toString(), 0, -5);\\n text(myColor.toString('#rrggbb'), 0, -30);\\n text(myColor.toString('rgba%'), 0, -55);\\n}\\n
the new red value
\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setRed(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n
the new green value
\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n
the new blue value
\\nlet backgroundColor;\\n\\nfunction setup() {\\n backgroundColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));\\n background(backgroundColor);\\n}\\n
the new alpha value
\\nlet squareColor;\\n\\nfunction setup() {\\n ellipseMode(CORNERS);\\n strokeWeight(4);\\n squareColor = color(100, 50, 150);\\n}\\n\\nfunction draw() {\\n background(255);\\n\\n noFill();\\n stroke(0);\\n ellipse(10, 10, width - 10, height - 10);\\n\\n squareColor.setAlpha(128 + 128 * sin(millis() / 1000));\\n fill(squareColor);\\n noStroke();\\n rect(13, 13, width - 26, height - 26);\\n}\\n
Hue is the same in HSB and HSL, but the maximum value may be different.\\nThis function will return the HSB-normalized saturation when supplied with\\nan HSB color object, but will default to the HSL-normalized saturation\\notherwise.
Saturation is scaled differently in HSB and HSL. This function will return\\nthe HSB saturation when supplied with an HSB color object, but will default\\nto the HSL saturation otherwise.
CSS named colors.
These regular expressions are used to build up the patterns for matching\\nviable CSS color strings: fragmenting the regexes in this way increases the\\nlegibility and comprehensibility of the code.
Note that RGB values of .9 are not parsed by IE, but are supported here for\\ncolor string consistency.
Full color string patterns. The capture groups are necessary.
For HSB and HSL, interpret the gray level as a brightness/lightness\\nvalue (they are equivalent when chroma is zero). For RGB, normalize the\\ngray level according to the blue maximum.
The background() function sets the color used for the background of the\\np5.js canvas. The default background is transparent. This function is\\ntypically used within draw() to clear the display window at the beginning\\nof each frame, but it can be used inside setup() to set the background on\\nthe first frame of animation or if the background need only be set once.\\n\\nThe color is either specified in terms of the RGB, HSB, or HSL color\\ndepending on the current colorMode. (The default color space is RGB, with\\neach value in the range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color strings\\nand all named color strings are supported. In this case, an alpha number\\nvalue as a second argument is not supported, the RGBA form should be used.\\n\\nA p5.Color object can also be provided to set the background color.\\n\\nA p5.Image can also be provided to set the background image.
\\n// Grayscale integer value\\nbackground(51);\\n
\\n// R, G & B integer values\\nbackground(255, 204, 0);\\n
\\n// H, S & B integer values\\ncolorMode(HSB);\\nbackground(255, 204, 100);\\n
\\n// Named SVG/CSS color string\\nbackground('red');\\n
\\n// three-digit hexadecimal RGB notation\\nbackground('#fae');\\n
\\n// six-digit hexadecimal RGB notation\\nbackground('#222222');\\n
\\n// integer RGB notation\\nbackground('rgb(0,255,0)');\\n
\\n// integer RGBA notation\\nbackground('rgba(0,255,0, 0.25)');\\n
\\n// percentage RGB notation\\nbackground('rgb(100%,0%,10%)');\\n
\\n// percentage RGBA notation\\nbackground('rgba(100%,0%,100%,0.5)');\\n
\\n// p5 Color object\\nbackground(color(0, 0, 255));\\n
any value created by the color() function
color string, possible formats include: integer\\n rgb() or rgba(), percentage rgb() or rgba(),\\n 3-digit hex, 6-digit hex
opacity of the background relative to current\\n color range (default is 0-255)
specifies a value between white and black
red or hue value (depending on the current color\\n mode)
green or saturation value (depending on the current\\n color mode)
blue or brightness value (depending on the current\\n color mode)
an array containing the red, green, blue\\n and alpha components of the color
image created with loadImage() or createImage(),\\n to set as background\\n (must be same size as the sketch window)
Clears the pixels within a buffer. This function only clears the canvas.\\nIt will not clear objects created by createX() methods such as\\ncreateVideo() or createDiv().\\nUnlike the main graphics context, pixels in additional graphics areas created\\nwith createGraphics() can be entirely\\nor partially transparent. This function clears everything to make all of\\nthe pixels 100% transparent.
\\n// Clear the screen on mouse press.\\nfunction setup() {\\n createCanvas(100, 100);\\n}\\n\\nfunction draw() {\\n ellipse(mouseX, mouseY, 20, 20);\\n}\\n\\nfunction mousePressed() {\\n clear();\\n}\\n
colorMode() changes the way p5.js interprets color data. By default, the\\nparameters for fill(), stroke(), background(), and color() are defined by\\nvalues between 0 and 255 using the RGB color model. This is equivalent to\\nsetting colorMode(RGB, 255). Setting colorMode(HSB) lets you use the HSB\\nsystem instead. By default, this is colorMode(HSB, 360, 100, 100, 1). You\\ncan also use HSL.\\n\\nNote: existing color objects remember the mode that they were created in,\\nso you can change modes as you like without affecting their appearance.
\\nnoStroke();\\ncolorMode(RGB, 100);\\nfor (let i = 0; i < 100; i++) {\\n for (let j = 0; j < 100; j++) {\\n stroke(i, j, 0);\\n point(i, j);\\n }\\n}\\n
\\nnoStroke();\\ncolorMode(HSB, 100);\\nfor (let i = 0; i < 100; i++) {\\n for (let j = 0; j < 100; j++) {\\n stroke(i, j, 100);\\n point(i, j);\\n }\\n}\\n
\\ncolorMode(RGB, 255);\\nlet c = color(127, 255, 0);\\n\\ncolorMode(RGB, 1);\\nlet myColor = c._getRed();\\ntext(myColor, 10, 10, 80, 80);\\n
\\nnoFill();\\ncolorMode(RGB, 255, 255, 255, 1);\\nbackground(255);\\n\\nstrokeWeight(4);\\nstroke(255, 0, 10, 0.3);\\nellipse(40, 40, 50, 50);\\nellipse(50, 50, 40, 40);\\n
either RGB, HSB or HSL, corresponding to\\n Red/Green/Blue and Hue/Saturation/Brightness\\n (or Lightness)
range for all values
range for the red or hue depending on the\\n current color mode
range for the green or saturation depending\\n on the current color mode
range for the blue or brightness/lightness\\n depending on the current color mode
range for the alpha
Sets the color used to fill shapes. For example, if you run\\nfill(204, 102, 0), all subsequent shapes will be filled with orange. This\\ncolor is either specified in terms of the RGB or HSB color depending on\\nthe current colorMode(). (The default color space is RGB, with each value\\nin the range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color strings\\nand all named color strings are supported. In this case, an alpha number\\nvalue as a second argument is not supported, the RGBA form should be used.\\n\\nA p5 Color object can also be provided to set the fill color.
\\n// Grayscale integer value\\nfill(51);\\nrect(20, 20, 60, 60);\\n
\\n// R, G & B integer values\\nfill(255, 204, 0);\\nrect(20, 20, 60, 60);\\n
\\n// H, S & B integer values\\ncolorMode(HSB);\\nfill(255, 204, 100);\\nrect(20, 20, 60, 60);\\n
\\n// Named SVG/CSS color string\\nfill('red');\\nrect(20, 20, 60, 60);\\n
\\n// three-digit hexadecimal RGB notation\\nfill('#fae');\\nrect(20, 20, 60, 60);\\n
\\n// six-digit hexadecimal RGB notation\\nfill('#222222');\\nrect(20, 20, 60, 60);\\n
\\n// integer RGB notation\\nfill('rgb(0,255,0)');\\nrect(20, 20, 60, 60);\\n
\\n// integer RGBA notation\\nfill('rgba(0,255,0, 0.25)');\\nrect(20, 20, 60, 60);\\n
\\n// percentage RGB notation\\nfill('rgb(100%,0%,10%)');\\nrect(20, 20, 60, 60);\\n
\\n// percentage RGBA notation\\nfill('rgba(100%,0%,100%,0.5)');\\nrect(20, 20, 60, 60);\\n
\\n// p5 Color object\\nfill(color(0, 0, 255));\\nrect(20, 20, 60, 60);\\n
a gray value
the fill color
Disables filling geometry. If both noStroke() and noFill() are called,\\nnothing will be drawn to the screen.
\\nrect(15, 10, 55, 55);\\nnoFill();\\nrect(20, 20, 60, 60);\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n noFill();\\n stroke(100, 100, 240);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(45, 45, 45);\\n}\\n
Disables drawing the stroke (outline). If both noStroke() and noFill()\\nare called, nothing will be drawn to the screen.
\\nnoStroke();\\nrect(20, 20, 60, 60);\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n noStroke();\\n fill(240, 150, 150);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(45, 45, 45);\\n}\\n
Sets the color used to draw lines and borders around shapes. This color\\nis either specified in terms of the RGB or HSB color depending on the\\ncurrent colorMode() (the default color space is RGB, with each value in\\nthe range from 0 to 255). The alpha range by default is also 0 to 255.\\n\\nIf a single string argument is provided, RGB, RGBA and Hex CSS color\\nstrings and all named color strings are supported. In this case, an alpha\\nnumber value as a second argument is not supported, the RGBA form should be\\nused.\\n\\nA p5 Color object can also be provided to set the stroke color.
\\n// Grayscale integer value\\nstrokeWeight(4);\\nstroke(51);\\nrect(20, 20, 60, 60);\\n
\\n// R, G & B integer values\\nstroke(255, 204, 0);\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// H, S & B integer values\\ncolorMode(HSB);\\nstrokeWeight(4);\\nstroke(255, 204, 100);\\nrect(20, 20, 60, 60);\\n
\\n// Named SVG/CSS color string\\nstroke('red');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// three-digit hexadecimal RGB notation\\nstroke('#fae');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// six-digit hexadecimal RGB notation\\nstroke('#222222');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// integer RGB notation\\nstroke('rgb(0,255,0)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// integer RGBA notation\\nstroke('rgba(0,255,0,0.25)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// percentage RGB notation\\nstroke('rgb(100%,0%,10%)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// percentage RGBA notation\\nstroke('rgba(100%,0%,100%,0.5)');\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
\\n// p5 Color object\\nstroke(color(0, 0, 255));\\nstrokeWeight(4);\\nrect(20, 20, 60, 60);\\n
the stroke color
This function does 3 things:
Bounds the desired start/stop angles for an arc (in radians) so that:
0 <= start < TWO_PI ; start <= stop < start + TWO_PI\\n
This means that the arc rendering functions don't have to be concerned\\nwith what happens if stop is smaller than start, or if the arc 'goes\\nround more than once', etc.: they can just start at start and increase\\nuntil stop and the correct arc will be drawn.
Optionally adjusts the angles within each quadrant to counter the naive\\nscaling of the underlying ellipse up from the unit circle. Without\\nthis, the angles become arbitrary when width != height: 45 degrees\\nmight be drawn at 5 degrees on a 'wide' ellipse, or at 85 degrees on\\na 'tall' ellipse.
Flags up when start and stop correspond to the same place on the\\nunderlying ellipse. This is useful if you want to do something special\\nthere (like rendering a whole ellipse instead).
Draw an arc to the screen. If called with only x, y, w, h, start, and\\nstop, the arc will be drawn and filled as an open pie segment. If a mode parameter is provided, the arc\\nwill be filled like an open semi-circle (OPEN) , a closed semi-circle (CHORD), or as a closed pie segment (PIE). The\\norigin may be changed with the ellipseMode() function.\\nThe arc is always drawn clockwise from wherever start falls to wherever stop falls on the ellipse.\\nAdding or subtracting TWO_PI to either angle does not change where they fall.\\nIf both start and stop fall at the same place, a full ellipse will be drawn.
x-coordinate of the arc's ellipse
y-coordinate of the arc's ellipse
width of the arc's ellipse by default
height of the arc's ellipse by default
angle to start the arc, specified in radians
angle to stop the arc, specified in radians
optional parameter to determine the way of drawing\\n the arc. either CHORD, PIE or OPEN
optional parameter for WebGL mode only. This is to\\n specify the number of vertices that makes up the\\n perimeter of the arc. Default value is 25.
\\narc(50, 55, 50, 50, 0, HALF_PI);\\nnoFill();\\narc(50, 55, 60, 60, HALF_PI, PI);\\narc(50, 55, 70, 70, PI, PI + QUARTER_PI);\\narc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\\n
\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI);\\n
\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\\n
\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\\n
\\narc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\\n
Draws an ellipse (oval) to the screen. An ellipse with equal width and\\nheight is a circle. By default, the first two parameters set the location,\\nand the third and fourth parameters set the shape's width and height. If\\nno height is specified, the value of width is used for both the width and\\nheight. If a negative height or width is specified, the absolute value is taken.\\nThe origin may be changed with the ellipseMode() function.
\\nellipse(56, 46, 55, 55);\\n
x-coordinate of the ellipse.
y-coordinate of the ellipse.
width of the ellipse.
height of the ellipse.
number of radial sectors to draw (for WebGL mode)
Draws a circle to the screen. A circle is a simple closed shape.\\nIt is the set of all points in a plane that are at a given distance from a given point, the centre.\\nThis function is a special case of the ellipse() function, where the width and height of the ellipse are the same.\\nHeight and width of the ellipse correspond to the diameter of the circle.\\nBy default, the first two parameters set the location of the centre of the circle, the third sets the diameter of the circle.
x-coordinate of the centre of the circle.
y-coordinate of the centre of the circle.
diameter of the circle.
\\n// Draw a circle at location (30, 30) with a diameter of 20.\\ncircle(30, 30, 20);\\n
Draws a line (a direct path between two points) to the screen. The version\\nof line() with four parameters draws the line in 2D. To color a line, use\\nthe stroke() function. A line cannot be filled, therefore the fill()\\nfunction will not affect the color of a line. 2D lines are drawn with a\\nwidth of one pixel by default, but this can be changed with the\\nstrokeWeight() function.
\\nline(30, 20, 85, 75);\\n
\\nline(30, 20, 85, 20);\\nstroke(126);\\nline(85, 20, 85, 75);\\nstroke(255);\\nline(85, 75, 30, 75);\\n
the x-coordinate of the first point
the y-coordinate of the first point
the x-coordinate of the second point
the y-coordinate of the second point
the z-coordinate of the first point
the z-coordinate of the second point
Draws a point, a coordinate in space at the dimension of one pixel.\\nThe first parameter is the horizontal value for the point, the second\\nvalue is the vertical value for the point. The color of the point is\\ndetermined by the current stroke.
the x-coordinate
the y-coordinate
the z-coordinate (for WebGL mode)
\\npoint(30, 20);\\npoint(85, 20);\\npoint(85, 75);\\npoint(30, 75);\\n
Draw a quad. A quad is a quadrilateral, a four sided polygon. It is\\nsimilar to a rectangle, but the angles between its edges are not\\nconstrained to ninety degrees. The first pair of parameters (x1,y1)\\nsets the first vertex and the subsequent pairs should proceed\\nclockwise or counter-clockwise around the defined shape.\\nz-arguments only work when quad() is used in WEBGL mode.
\\nquad(38, 31, 86, 20, 69, 63, 30, 76);\\n
the x-coordinate of the third point
the y-coordinate of the third point
the x-coordinate of the fourth point
the y-coordinate of the fourth point
the z-coordinate of the third point
the z-coordinate of the fourth point
Draws a rectangle to the screen. A rectangle is a four-sided shape with\\nevery angle at ninety degrees. By default, the first two parameters set\\nthe location of the upper-left corner, the third sets the width, and the\\nfourth sets the height. The way these parameters are interpreted, however,\\nmay be changed with the rectMode() function.\\n\\nThe fifth, sixth, seventh and eighth parameters, if specified,\\ndetermine corner radius for the top-left, top-right, lower-right and\\nlower-left corners, respectively. An omitted corner radius parameter is set\\nto the value of the previously specified radius value in the parameter list.
\\n// Draw a rectangle at location (30, 20) with a width and height of 55.\\nrect(30, 20, 55, 55);\\n
\\n// Draw a rectangle with rounded corners, each having a radius of 20.\\nrect(30, 20, 55, 55, 20);\\n
\\n// Draw a rectangle with rounded corners having the following radii:\\n// top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\\nrect(30, 20, 55, 55, 20, 15, 10, 5);\\n
x-coordinate of the rectangle.
y-coordinate of the rectangle.
width of the rectangle.
height of the rectangle.
optional radius of top-left corner.
optional radius of top-right corner.
optional radius of bottom-right corner.
optional radius of bottom-left corner.
number of segments in the x-direction (for WebGL mode)
number of segments in the y-direction (for WebGL mode)
Draws a square to the screen. A square is a four-sided shape with\\nevery angle at ninety degrees, and equal side size.\\nThis function is a special case of the rect() function, where the width and height are the same, and the parameter is called "s" for side size.\\nBy default, the first two parameters set the location of the upper-left corner, the third sets the side size of the square.\\nThe way these parameters are interpreted, however,\\nmay be changed with the rectMode() function.\\n\\nThe fourth, fifth, sixth and seventh parameters, if specified,\\ndetermine corner radius for the top-left, top-right, lower-right and\\nlower-left corners, respectively. An omitted corner radius parameter is set\\nto the value of the previously specified radius value in the parameter list.
x-coordinate of the square.
y-coordinate of the square.
side size of the square.
\\n// Draw a square at location (30, 20) with a side size of 55.\\nsquare(30, 20, 55);\\n
\\n// Draw a square with rounded corners, each having a radius of 20.\\nsquare(30, 20, 55, 20);\\n
\\n// Draw a square with rounded corners having the following radii:\\n// top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\\nsquare(30, 20, 55, 20, 15, 10, 5);\\n
A triangle is a plane created by connecting three points. The first two\\narguments specify the first point, the middle two arguments specify the\\nsecond point, and the last two arguments specify the third point.
x-coordinate of the first point
y-coordinate of the first point
x-coordinate of the second point
y-coordinate of the second point
x-coordinate of the third point
y-coordinate of the third point
\\ntriangle(30, 75, 58, 20, 86, 75);\\n
Modifies the location from which ellipses are drawn by changing the way\\nin which parameters given to ellipse() are interpreted.\\n\\nThe default mode is ellipseMode(CENTER), which interprets the first two\\nparameters of ellipse() as the shape's center point, while the third and\\nfourth parameters are its width and height.\\n\\nellipseMode(RADIUS) also uses the first two parameters of ellipse() as\\nthe shape's center point, but uses the third and fourth parameters to\\nspecify half of the shapes's width and height.\\n\\nellipseMode(CORNER) interprets the first two parameters of ellipse() as\\nthe upper-left corner of the shape, while the third and fourth parameters\\nare its width and height.\\n\\nellipseMode(CORNERS) interprets the first two parameters of ellipse() as\\nthe location of one corner of the ellipse's bounding box, and the third\\nand fourth parameters as the location of the opposite corner.\\n\\nThe parameter must be written in ALL CAPS because Javascript is a\\ncase-sensitive language.
either CENTER, RADIUS, CORNER, or CORNERS
\\nellipseMode(RADIUS); // Set ellipseMode to RADIUS\\nfill(255); // Set fill to white\\nellipse(50, 50, 30, 30); // Draw white ellipse using RADIUS mode\\n\\nellipseMode(CENTER); // Set ellipseMode to CENTER\\nfill(100); // Set fill to gray\\nellipse(50, 50, 30, 30); // Draw gray ellipse using CENTER mode\\n
\\nellipseMode(CORNER); // Set ellipseMode is CORNER\\nfill(255); // Set fill to white\\nellipse(25, 25, 50, 50); // Draw white ellipse using CORNER mode\\n\\nellipseMode(CORNERS); // Set ellipseMode to CORNERS\\nfill(100); // Set fill to gray\\nellipse(25, 25, 50, 50); // Draw gray ellipse using CORNERS mode\\n
Draws all geometry with jagged (aliased) edges. Note that smooth() is\\nactive by default in 2D mode, so it is necessary to call noSmooth() to disable\\nsmoothing of geometry, images, and fonts. In 3D mode, noSmooth() is enabled\\nby default, so it is necessary to call smooth() if you would like\\nsmooth (antialiased) edges on your geometry.
\\nbackground(0);\\nnoStroke();\\nsmooth();\\nellipse(30, 48, 36, 36);\\nnoSmooth();\\nellipse(70, 48, 36, 36);\\n
Modifies the location from which rectangles are drawn by changing the way\\nin which parameters given to rect() are interpreted.\\n\\nThe default mode is rectMode(CORNER), which interprets the first two\\nparameters of rect() as the upper-left corner of the shape, while the\\nthird and fourth parameters are its width and height.\\n\\nrectMode(CORNERS) interprets the first two parameters of rect() as the\\nlocation of one corner, and the third and fourth parameters as the\\nlocation of the opposite corner.\\n\\nrectMode(CENTER) interprets the first two parameters of rect() as the\\nshape's center point, while the third and fourth parameters are its\\nwidth and height.\\n\\nrectMode(RADIUS) also uses the first two parameters of rect() as the\\nshape's center point, but uses the third and fourth parameters to specify\\nhalf of the shapes's width and height.\\n\\nThe parameter must be written in ALL CAPS because Javascript is a\\ncase-sensitive language.
either CORNER, CORNERS, CENTER, or RADIUS
\\nrectMode(CORNER); // Default rectMode is CORNER\\nfill(255); // Set fill to white\\nrect(25, 25, 50, 50); // Draw white rect using CORNER mode\\n\\nrectMode(CORNERS); // Set rectMode to CORNERS\\nfill(100); // Set fill to gray\\nrect(25, 25, 50, 50); // Draw gray rect using CORNERS mode\\n
\\nrectMode(RADIUS); // Set rectMode to RADIUS\\nfill(255); // Set fill to white\\nrect(50, 50, 30, 30); // Draw white rect using RADIUS mode\\n\\nrectMode(CENTER); // Set rectMode to CENTER\\nfill(100); // Set fill to gray\\nrect(50, 50, 30, 30); // Draw gray rect using CENTER mode\\n
Draws all geometry with smooth (anti-aliased) edges. smooth() will also\\nimprove image quality of resized images. Note that smooth() is active by\\ndefault in 2D mode; noSmooth() can be used to disable smoothing of geometry,\\nimages, and fonts. In 3D mode, noSmooth() is enabled\\nby default, so it is necessary to call smooth() if you would like\\nsmooth (antialiased) edges on your geometry.
Sets the style for rendering line endings. These ends are either squared,\\nextended, or rounded, each of which specified with the corresponding\\nparameters: SQUARE, PROJECT, and ROUND. The default cap is ROUND.
either SQUARE, PROJECT, or ROUND
\\nstrokeWeight(12.0);\\nstrokeCap(ROUND);\\nline(20, 30, 80, 30);\\nstrokeCap(SQUARE);\\nline(20, 50, 80, 50);\\nstrokeCap(PROJECT);\\nline(20, 70, 80, 70);\\n
Sets the style of the joints which connect line segments. These joints\\nare either mitered, beveled, or rounded and specified with the\\ncorresponding parameters MITER, BEVEL, and ROUND. The default joint is\\nMITER.
either MITER, BEVEL, ROUND
\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(MITER);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n
\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(BEVEL);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n
\\nnoFill();\\nstrokeWeight(10.0);\\nstrokeJoin(ROUND);\\nbeginShape();\\nvertex(35, 20);\\nvertex(65, 50);\\nvertex(35, 80);\\nendShape();\\n
Sets the width of the stroke used for lines, points, and the border\\naround shapes. All widths are set in units of pixels.
the weight (in pixels) of the stroke
\\nstrokeWeight(1); // Default\\nline(20, 20, 80, 20);\\nstrokeWeight(4); // Thicker\\nline(20, 40, 80, 40);\\nstrokeWeight(10); // Beastly\\nline(20, 70, 80, 70);\\n
Draws a cubic Bezier curve on the screen. These curves are defined by a\\nseries of anchor and control points. The first two parameters specify\\nthe first anchor point and the last two parameters specify the other\\nanchor point, which become the first and last points on the curve. The\\nmiddle parameters specify the two control points which define the shape\\nof the curve. Approximately speaking, control points "pull" the curve\\ntowards them.Bezier curves were developed by French\\nautomotive engineer Pierre Bezier, and are commonly used in computer\\ngraphics to define gently sloping curves. See also curve().
\\nnoFill();\\nstroke(255, 102, 0);\\nline(85, 20, 10, 10);\\nline(90, 90, 15, 80);\\nstroke(0, 0, 0);\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\n
\\nbackground(0, 0, 0);\\nnoFill();\\nstroke(255);\\nbezier(250, 250, 0, 100, 100, 0, 100, 0, 0, 0, 100, 0);\\n
x-coordinate for the first anchor point
y-coordinate for the first anchor point
x-coordinate for the first control point
y-coordinate for the first control point
x-coordinate for the second control point
y-coordinate for the second control point
x-coordinate for the second anchor point
y-coordinate for the second anchor point
z-coordinate for the first anchor point
z-coordinate for the first control point
z-coordinate for the second control point
z-coordinate for the second anchor point
Sets the resolution at which Beziers display.
The default value is 20.
This function is only useful when using the WEBGL renderer\\nas the default canvas renderer does not use this information.
resolution of the curves
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noFill();\\n\\n bezierDetail(5);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n bezier(-40, -40, 0,\\n 90, -40, 0,\\n -90, 40, 0,\\n 40, 40, 0);\\n}\\n
Evaluates the Bezier at position t for points a, b, c, d.\\nThe parameters a and d are the first and last points\\non the curve, and b and c are the control points.\\nThe final parameter t varies between 0 and 1.\\nThis can be done once with the x coordinates and a second time\\nwith the y coordinates to get the location of a bezier curve at t.
coordinate of first point on the curve
coordinate of first control point
coordinate of second control point
coordinate of second point on the curve
value between 0 and 1
\\nnoFill();\\nlet x1 = 85,\\n x2 = 10,\\n x3 = 90,\\n x4 = 15;\\nlet y1 = 20,\\n y2 = 10,\\n y3 = 90,\\n y4 = 80;\\nbezier(x1, y1, x2, y2, x3, y3, x4, y4);\\nfill(255);\\nlet steps = 10;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = bezierPoint(x1, x2, x3, x4, t);\\n let y = bezierPoint(y1, y2, y3, y4, t);\\n ellipse(x, y, 5, 5);\\n}\\n
Evaluates the tangent to the Bezier at position t for points a, b, c, d.\\nThe parameters a and d are the first and last points\\non the curve, and b and c are the control points.\\nThe final parameter t varies between 0 and 1.
\\nnoFill();\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\nlet steps = 6;\\nfill(255);\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n // Get the location of the point\\n let x = bezierPoint(85, 10, 90, 15, t);\\n let y = bezierPoint(20, 10, 90, 80, t);\\n // Get the tangent points\\n let tx = bezierTangent(85, 10, 90, 15, t);\\n let ty = bezierTangent(20, 10, 90, 80, t);\\n // Calculate an angle from the tangent points\\n let a = atan2(ty, tx);\\n a += PI;\\n stroke(255, 102, 0);\\n line(x, y, cos(a) * 30 + x, sin(a) * 30 + y);\\n // The following line of code makes a line\\n // inverse of the above line\\n //line(x, y, cos(a)*-30 + x, sin(a)*-30 + y);\\n stroke(0);\\n ellipse(x, y, 5, 5);\\n}\\n
\\nnoFill();\\nbezier(85, 20, 10, 10, 90, 90, 15, 80);\\nstroke(255, 102, 0);\\nlet steps = 16;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = bezierPoint(85, 10, 90, 15, t);\\n let y = bezierPoint(20, 10, 90, 80, t);\\n let tx = bezierTangent(85, 10, 90, 15, t);\\n let ty = bezierTangent(20, 10, 90, 80, t);\\n let a = atan2(ty, tx);\\n a -= HALF_PI;\\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\\n}\\n
Draws a curved line on the screen between two points, given as the\\nmiddle four parameters. The first two parameters are a control point, as\\nif the curve came from this point even though it's not drawn. The last\\ntwo parameters similarly describe the other control point. \\nLonger curves can be created by putting a series of curve() functions\\ntogether or using curveVertex(). An additional function called\\ncurveTightness() provides control for the visual quality of the curve.\\nThe curve() function is an implementation of Catmull-Rom splines.
\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\\nstroke(0);\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nstroke(255, 102, 0);\\ncurve(73, 24, 73, 61, 15, 65, 15, 65);\\n
\\n// Define the curve points as JavaScript objects\\nlet p1 = { x: 5, y: 26 },\\n p2 = { x: 73, y: 24 };\\nlet p3 = { x: 73, y: 61 },\\n p4 = { x: 15, y: 65 };\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\\nstroke(0);\\ncurve(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);\\nstroke(255, 102, 0);\\ncurve(p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, p4.x, p4.y);\\n
\\nnoFill();\\nstroke(255, 102, 0);\\ncurve(5, 26, 0, 5, 26, 0, 73, 24, 0, 73, 61, 0);\\nstroke(0);\\ncurve(5, 26, 0, 73, 24, 0, 73, 61, 0, 15, 65, 0);\\nstroke(255, 102, 0);\\ncurve(73, 24, 0, 73, 61, 0, 15, 65, 0, 15, 65, 0);\\n
x-coordinate for the beginning control point
y-coordinate for the beginning control point
x-coordinate for the first point
y-coordinate for the first point
x-coordinate for the second point
y-coordinate for the second point
x-coordinate for the ending control point
y-coordinate for the ending control point
z-coordinate for the beginning control point
z-coordinate for the first point
z-coordinate for the second point
z-coordinate for the ending control point
Sets the resolution at which curves display.
The default value is 20 while the minimum value is 3.
This function is only useful when using the WEBGL renderer\\nas the default canvas renderer does not use this\\ninformation.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n\\n curveDetail(5);\\n}\\nfunction draw() {\\n background(200);\\n\\n curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);\\n}\\n
Modifies the quality of forms created with curve() and curveVertex().\\nThe parameter tightness determines how the curve fits to the vertex\\npoints. The value 0.0 is the default value for tightness (this value\\ndefines the curves to be Catmull-Rom splines) and the value 1.0 connects\\nall the points with straight lines. Values within the range -5.0 and 5.0\\nwill deform the curves but will leave them recognizable and as values\\nincrease in magnitude, they will continue to deform.
amount of deformation from the original vertices
\\n// Move the mouse left and right to see the curve change\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(204);\\n let t = map(mouseX, 0, width, -5, 5);\\n curveTightness(t);\\n beginShape();\\n curveVertex(10, 26);\\n curveVertex(10, 26);\\n curveVertex(83, 24);\\n curveVertex(83, 61);\\n curveVertex(25, 65);\\n curveVertex(25, 65);\\n endShape();\\n}\\n
Evaluates the curve at position t for points a, b, c, d.\\nThe parameter t varies between 0 and 1, a and d are control points\\nof the curve, and b and c are the start and end points of the curve.\\nThis can be done once with the x coordinates and a second time\\nwith the y coordinates to get the location of a curve at t.
coordinate of first control point of the curve
coordinate of first point
coordinate of second point
\\nnoFill();\\ncurve(5, 26, 5, 26, 73, 24, 73, 61);\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nfill(255);\\nellipseMode(CENTER);\\nlet steps = 6;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = curvePoint(5, 5, 73, 73, t);\\n let y = curvePoint(26, 26, 24, 61, t);\\n ellipse(x, y, 5, 5);\\n x = curvePoint(5, 73, 73, 15, t);\\n y = curvePoint(26, 24, 61, 65, t);\\n ellipse(x, y, 5, 5);\\n}\\n
Evaluates the tangent to the curve at position t for points a, b, c, d.\\nThe parameter t varies between 0 and 1, a and d are points on the curve,\\nand b and c are the control points.
\\nnoFill();\\ncurve(5, 26, 73, 24, 73, 61, 15, 65);\\nlet steps = 6;\\nfor (let i = 0; i <= steps; i++) {\\n let t = i / steps;\\n let x = curvePoint(5, 73, 73, 15, t);\\n let y = curvePoint(26, 24, 61, 65, t);\\n //ellipse(x, y, 5, 5);\\n let tx = curveTangent(5, 73, 73, 15, t);\\n let ty = curveTangent(26, 24, 61, 65, t);\\n let a = atan2(ty, tx);\\n a -= PI / 2.0;\\n line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\\n}\\n
Use the beginContour() and endContour() functions to create negative\\nshapes within shapes such as the center of the letter 'O'. beginContour()\\nbegins recording vertices for the shape and endContour() stops recording.\\nThe vertices that define a negative shape must "wind" in the opposite\\ndirection from the exterior shape. First draw vertices for the exterior\\nclockwise order, then for internal shapes, draw vertices\\nshape in counter-clockwise.\\n\\nThese functions can only be used within a beginShape()/endShape() pair and\\ntransformations such as translate(), rotate(), and scale() do not work\\nwithin a beginContour()/endContour() pair. It is also not possible to use\\nother shapes, such as ellipse() or rect() within.
\\ntranslate(50, 50);\\nstroke(255, 0, 0);\\nbeginShape();\\n// Exterior part of shape, clockwise winding\\nvertex(-40, -40);\\nvertex(40, -40);\\nvertex(40, 40);\\nvertex(-40, 40);\\n// Interior part of shape, counter-clockwise winding\\nbeginContour();\\nvertex(-20, -20);\\nvertex(-20, 20);\\nvertex(20, 20);\\nvertex(20, -20);\\nendContour();\\nendShape(CLOSE);\\n
Using the beginShape() and endShape() functions allow creating more\\ncomplex forms. beginShape() begins recording vertices for a shape and\\nendShape() stops recording. The value of the kind parameter tells it which\\ntypes of shapes to create from the provided vertices. With no mode\\nspecified, the shape can be any irregular polygon.\\n\\nThe parameters available for beginShape() are POINTS, LINES, TRIANGLES,\\nTRIANGLE_FAN, TRIANGLE_STRIP, QUADS, and QUAD_STRIP. After calling the\\nbeginShape() function, a series of vertex() commands must follow. To stop\\ndrawing the shape, call endShape(). Each shape will be outlined with the\\ncurrent stroke color and filled with the fill color.\\n\\nTransformations such as translate(), rotate(), and scale() do not work\\nwithin beginShape(). It is also not possible to use other shapes, such as\\nellipse() or rect() within beginShape().
either POINTS, LINES, TRIANGLES, TRIANGLE_FAN\\n TRIANGLE_STRIP, QUADS, or QUAD_STRIP
\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape(CLOSE);\\n
\\nbeginShape(POINTS);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n
\\nbeginShape(LINES);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n
\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n
\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape(CLOSE);\\n
\\nbeginShape(TRIANGLES);\\nvertex(30, 75);\\nvertex(40, 20);\\nvertex(50, 75);\\nvertex(60, 20);\\nvertex(70, 75);\\nvertex(80, 20);\\nendShape();\\n
\\nbeginShape(TRIANGLE_STRIP);\\nvertex(30, 75);\\nvertex(40, 20);\\nvertex(50, 75);\\nvertex(60, 20);\\nvertex(70, 75);\\nvertex(80, 20);\\nvertex(90, 75);\\nendShape();\\n
\\nbeginShape(TRIANGLE_FAN);\\nvertex(57.5, 50);\\nvertex(57.5, 15);\\nvertex(92, 50);\\nvertex(57.5, 85);\\nvertex(22, 50);\\nvertex(57.5, 15);\\nendShape();\\n
\\nbeginShape(QUADS);\\nvertex(30, 20);\\nvertex(30, 75);\\nvertex(50, 75);\\nvertex(50, 20);\\nvertex(65, 20);\\nvertex(65, 75);\\nvertex(85, 75);\\nvertex(85, 20);\\nendShape();\\n
\\nbeginShape(QUAD_STRIP);\\nvertex(30, 20);\\nvertex(30, 75);\\nvertex(50, 20);\\nvertex(50, 75);\\nvertex(65, 20);\\nvertex(65, 75);\\nvertex(85, 20);\\nvertex(85, 75);\\nendShape();\\n
\\nbeginShape();\\nvertex(20, 20);\\nvertex(40, 20);\\nvertex(40, 40);\\nvertex(60, 40);\\nvertex(60, 60);\\nvertex(20, 60);\\nendShape(CLOSE);\\n
Specifies vertex coordinates for Bezier curves. Each call to\\nbezierVertex() defines the position of two control points and\\none anchor point of a Bezier curve, adding a new segment to a\\nline or shape. For WebGL mode bezierVertex() can be used in 2D\\nas well as 3D mode. 2D mode expects 6 parameters, while 3D mode\\nexpects 9 parameters (including z coordinates).\\n\\nThe first time bezierVertex() is used within a beginShape()\\ncall, it must be prefaced with a call to vertex() to set the first anchor\\npoint. This function must be used between beginShape() and endShape()\\nand only when there is no MODE or POINTS parameter specified to\\nbeginShape().
\\nnoFill();\\nbeginShape();\\nvertex(30, 20);\\nbezierVertex(80, 0, 80, 75, 30, 75);\\nendShape();\\n
\\nbeginShape();\\nvertex(30, 20);\\nbezierVertex(80, 0, 80, 75, 30, 75);\\nbezierVertex(50, 80, 60, 25, 30, 20);\\nendShape();\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n setAttributes('antialias', true);\\n}\\nfunction draw() {\\n orbitControl();\\n background(50);\\n strokeWeight(4);\\n stroke(255);\\n point(-25, 30);\\n point(25, 30);\\n point(25, -30);\\n point(-25, -30);\\n\\n strokeWeight(1);\\n noFill();\\n\\n beginShape();\\n vertex(-25, 30);\\n bezierVertex(25, 30, 25, -30, -25, -30);\\n endShape();\\n\\n beginShape();\\n vertex(-25, 30, 20);\\n bezierVertex(25, 30, 20, 25, -30, 20, -25, -30, 20);\\n endShape();\\n}\\n
x-coordinate for the anchor point
y-coordinate for the anchor point
z-coordinate for the first control point (for WebGL mode)
z-coordinate for the second control point (for WebGL mode)
z-coordinate for the anchor point (for WebGL mode)
Specifies vertex coordinates for curves. This function may only\\nbe used between beginShape() and endShape() and only when there\\nis no MODE parameter specified to beginShape().\\nFor WebGL mode curveVertex() can be used in 2D as well as 3D mode.\\n2D mode expects 2 parameters, while 3D mode expects 3 parameters.\\n\\nThe first and last points in a series of curveVertex() lines will be used to\\nguide the beginning and end of a the curve. A minimum of four\\npoints is required to draw a tiny curve between the second and\\nthird points. Adding a fifth point with curveVertex() will draw\\nthe curve between the second, third, and fourth points. The\\ncurveVertex() function is an implementation of Catmull-Rom\\nsplines.
\\nstrokeWeight(5);\\npoint(84, 91);\\npoint(68, 19);\\npoint(21, 17);\\npoint(32, 91);\\nstrokeWeight(1);\\n\\nnoFill();\\nbeginShape();\\ncurveVertex(84, 91);\\ncurveVertex(84, 91);\\ncurveVertex(68, 19);\\ncurveVertex(21, 17);\\ncurveVertex(32, 91);\\ncurveVertex(32, 91);\\nendShape();\\n
x-coordinate of the vertex
y-coordinate of the vertex
z-coordinate of the vertex (for WebGL mode)
The endShape() function is the companion to beginShape() and may only be\\ncalled after beginShape(). When endshape() is called, all of image data\\ndefined since the previous call to beginShape() is written into the image\\nbuffer. The constant CLOSE as the value for the MODE parameter to close\\nthe shape (to connect the beginning and the end).
use CLOSE to close the shape
\\nnoFill();\\n\\nbeginShape();\\nvertex(20, 20);\\nvertex(45, 20);\\nvertex(45, 80);\\nendShape(CLOSE);\\n\\nbeginShape();\\nvertex(50, 20);\\nvertex(75, 20);\\nvertex(75, 80);\\nendShape();\\n
Specifies vertex coordinates for quadratic Bezier curves. Each call to\\nquadraticVertex() defines the position of one control points and one\\nanchor point of a Bezier curve, adding a new segment to a line or shape.\\nThe first time quadraticVertex() is used within a beginShape() call, it\\nmust be prefaced with a call to vertex() to set the first anchor point.\\nFor WebGL mode quadraticVertex() can be used in 2D as well as 3D mode.\\n2D mode expects 4 parameters, while 3D mode expects 6 parameters\\n(including z coordinates).\\n\\nThis function must be used between beginShape() and endShape()\\nand only when there is no MODE or POINTS parameter specified to\\nbeginShape().
\\nstrokeWeight(5);\\npoint(20, 20);\\npoint(80, 20);\\npoint(50, 50);\\n\\nnoFill();\\nstrokeWeight(1);\\nbeginShape();\\nvertex(20, 20);\\nquadraticVertex(80, 20, 50, 50);\\nendShape();\\n
\\nstrokeWeight(5);\\npoint(20, 20);\\npoint(80, 20);\\npoint(50, 50);\\n\\npoint(20, 80);\\npoint(80, 80);\\npoint(80, 60);\\n\\nnoFill();\\nstrokeWeight(1);\\nbeginShape();\\nvertex(20, 20);\\nquadraticVertex(80, 20, 50, 50);\\nquadraticVertex(20, 80, 80, 80);\\nvertex(80, 60);\\nendShape();\\n
x-coordinate for the control point
y-coordinate for the control point
z-coordinate for the control point (for WebGL mode)
All shapes are constructed by connecting a series of vertices. vertex()\\nis used to specify the vertex coordinates for points, lines, triangles,\\nquads, and polygons. It is used exclusively within the beginShape() and\\nendShape() functions.
\\nstrokeWeight(3);\\nbeginShape(POINTS);\\nvertex(30, 20);\\nvertex(85, 20);\\nvertex(85, 75);\\nvertex(30, 75);\\nendShape();\\n
z-coordinate of the vertex
the vertex's texture u-coordinate
the vertex's texture v-coordinate
HALF_PI is a mathematical constant with the value\\n1.57079632679489661923. It is half the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().
\\narc(50, 50, 80, 80, 0, HALF_PI);\\n
PI is a mathematical constant with the value\\n3.14159265358979323846. It is the ratio of the circumference\\nof a circle to its diameter. It is useful in combination with\\nthe trigonometric functions sin() and cos().
\\narc(50, 50, 80, 80, 0, PI);\\n
QUARTER_PI is a mathematical constant with the value 0.7853982.\\nIt is one quarter the ratio of the circumference of a circle to\\nits diameter. It is useful in combination with the trigonometric\\nfunctions sin() and cos().
\\narc(50, 50, 80, 80, 0, QUARTER_PI);\\n
TAU is an alias for TWO_PI, a mathematical constant with the\\nvalue 6.28318530717958647693. It is twice the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().
\\narc(50, 50, 80, 80, 0, TAU);\\n
TWO_PI is a mathematical constant with the value\\n6.28318530717958647693. It is twice the ratio of the\\ncircumference of a circle to its diameter. It is useful in\\ncombination with the trigonometric functions sin() and cos().
\\narc(50, 50, 80, 80, 0, TWO_PI);\\n
Constant to be used with angleMode() function, to set the mode which\\np5.js interprates and calculates angles (either DEGREES or RADIANS).
\\nfunction setup() {\\n angleMode(DEGREES);\\n}\\n
Constant to be used with angleMode() function, to set the mode which\\np5.js interprates and calculates angles (either RADIANS or DEGREES).
\\nfunction setup() {\\n angleMode(RADIANS);\\n}\\n
AUTO allows us to automatically set the width or height of an element (but not both),\\nbased on the current height and width of the element. Only one parameter can\\nbe passed to the size function as AUTO, at a time.
The print() function writes to the console area of your browser.\\nThis function is often helpful for looking at the data a program is\\nproducing. This function creates a new line of text for each call to\\nthe function. Individual elements can be\\nseparated with quotes ("") and joined with the addition operator (+).
Note that calling print() without any arguments invokes the window.print()\\nfunction which opens the browser's print dialog. To print a blank line\\nto console you can write print('\\\\n').
any combination of Number, String, Object, Boolean,\\n Array to print
\\nlet x = 10;\\nprint('The value of x is ' + x);\\n// prints \\\"The value of x is 10\\\"\\n
The system variable frameCount contains the number of frames that have\\nbeen displayed since the program started. Inside setup() the value is 0,\\nafter the first iteration of draw it is 1, etc.
\\nfunction setup() {\\n frameRate(30);\\n textSize(30);\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(200);\\n text(frameCount, width / 2, height / 2);\\n}\\n
Confirms if the window a p5.js program is in is "focused," meaning that\\nthe sketch will accept mouse or keyboard input. This variable is\\n"true" if the window is focused and "false" if not.
\\n// To demonstrate, put two windows side by side.\\n// Click on the window that the p5 sketch isn't in!\\nfunction draw() {\\n background(200);\\n noStroke();\\n fill(0, 200, 0);\\n ellipse(25, 25, 50, 50);\\n\\n if (!focused) {\\n // or \\\"if (focused === false)\\\"\\n stroke(200, 0, 0);\\n line(0, 0, 100, 100);\\n line(100, 0, 0, 100);\\n }\\n}\\n
Sets the cursor to a predefined symbol or an image, or makes it visible\\nif already hidden. If you are trying to set an image as the cursor, the\\nrecommended size is 16x16 or 32x32 pixels. The values for parameters x and y\\nmust be less than the dimensions of the image.
Built-In: either ARROW, CROSS, HAND, MOVE, TEXT and WAIT\\n Native CSS properties: 'grab', 'progress', 'cell' etc.\\n External: path for cursor's images\\n (Allowed File extensions: .cur, .gif, .jpg, .jpeg, .png)\\n For more information on Native CSS cursors and url visit:\\n https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
the horizontal active spot of the cursor (must be less than 32)
the vertical active spot of the cursor (must be less than 32)
\\n// Move the mouse across the quadrants\\n// to see the cursor change\\nfunction draw() {\\n line(width / 2, 0, width / 2, height);\\n line(0, height / 2, width, height / 2);\\n if (mouseX < 50 && mouseY < 50) {\\n cursor(CROSS);\\n } else if (mouseX > 50 && mouseY < 50) {\\n cursor('progress');\\n } else if (mouseX > 50 && mouseY > 50) {\\n cursor('https://s3.amazonaws.com/mupublicdata/cursor.cur');\\n } else {\\n cursor('grab');\\n }\\n}\\n
Specifies the number of frames to be displayed every second. For example,\\nthe function call frameRate(30) will attempt to refresh 30 times a second.\\nIf the processor is not fast enough to maintain the specified rate, the\\nframe rate will not be achieved. Setting the frame rate within setup() is\\nrecommended. The default frame rate is based on the frame rate of the display\\n(here also called "refresh rate"), which is set to 60 frames per second on most\\ncomputers. A frame rate of 24 frames per second (usual for movies) or above\\nwill be enough for smooth animations\\nThis is the same as setFrameRate(val).\\n\\nCalling frameRate() with no arguments returns the current framerate. The\\ndraw function must run at least once before it will return a value. This\\nis the same as getFrameRate().\\n\\nCalling frameRate() with arguments that are not of the type numbers\\nor are non positive also returns current framerate.
\\nlet rectX = 0;\\nlet fr = 30; //starting FPS\\nlet clr;\\n\\nfunction setup() {\\n background(200);\\n frameRate(fr); // Attempt to refresh at starting FPS\\n clr = color(255, 0, 0);\\n}\\n\\nfunction draw() {\\n background(200);\\n rectX = rectX += 1; // Move Rectangle\\n\\n if (rectX >= width) {\\n // If you go off screen.\\n if (fr === 30) {\\n clr = color(0, 0, 255);\\n fr = 10;\\n frameRate(fr); // make frameRate 10 FPS\\n } else {\\n clr = color(255, 0, 0);\\n fr = 30;\\n frameRate(fr); // make frameRate 30 FPS\\n }\\n rectX = 0;\\n }\\n fill(clr);\\n rect(rectX, 40, 20, 20);\\n}\\n
number of frames to be displayed every second
Hides the cursor from view.
\\nfunction setup() {\\n noCursor();\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipse(mouseX, mouseY, 10, 10);\\n}\\n
System variable that stores the width of the screen display according to The\\ndefault pixelDensity. This is used to run a\\nfull-screen program on any display size. To return actual screen size,\\nmultiply this by pixelDensity.
\\ncreateCanvas(displayWidth, displayHeight);\\n
System variable that stores the height of the screen display according to The\\ndefault pixelDensity. This is used to run a\\nfull-screen program on any display size. To return actual screen size,\\nmultiply this by pixelDensity.
System variable that stores the width of the inner window, it maps to\\nwindow.innerWidth.
\\ncreateCanvas(windowWidth, windowHeight);\\n
System variable that stores the height of the inner window, it maps to\\nwindow.innerHeight.
The windowResized() function is called once every time the browser window\\nis resized. This is a good place to resize the canvas or do any other\\nadjustments to accommodate the new window size.
\\nfunction setup() {\\n createCanvas(windowWidth, windowHeight);\\n}\\n\\nfunction draw() {\\n background(0, 100, 200);\\n}\\n\\nfunction windowResized() {\\n resizeCanvas(windowWidth, windowHeight);\\n}\\n
System variable that stores the width of the drawing canvas. This value\\nis set by the first parameter of the createCanvas() function.\\nFor example, the function call createCanvas(320, 240) sets the width\\nvariable to the value 320. The value of width defaults to 100 if\\ncreateCanvas() is not used in a program.
System variable that stores the height of the drawing canvas. This value\\nis set by the second parameter of the createCanvas() function. For\\nexample, the function call createCanvas(320, 240) sets the height\\nvariable to the value 240. The value of height defaults to 100 if\\ncreateCanvas() is not used in a program.
If argument is given, sets the sketch to fullscreen or not based on the\\nvalue of the argument. If no argument is given, returns the current\\nfullscreen state. Note that due to browser restrictions this can only\\nbe called on user input, for example, on mouse press like the example\\nbelow.
whether the sketch should be in fullscreen mode\\nor not
\\n// Clicking in the box toggles fullscreen on and off.\\nfunction setup() {\\n background(200);\\n}\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\\n let fs = fullscreen();\\n fullscreen(!fs);\\n }\\n}\\n
Sets the pixel scaling for high pixel density displays. By default\\npixel density is set to match display density, call pixelDensity(1)\\nto turn this off. Calling pixelDensity() with no arguments returns\\nthe current pixel density of the sketch.
\\nfunction setup() {\\n pixelDensity(1);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n
\\nfunction setup() {\\n pixelDensity(3.0);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n
whether or how much the sketch should scale
Returns the pixel density of the current display the sketch is running on.
\\nfunction setup() {\\n let density = displayDensity();\\n pixelDensity(density);\\n createCanvas(100, 100);\\n background(200);\\n ellipse(width / 2, height / 2, 50, 50);\\n}\\n
Gets the current URL.
\\nlet url;\\nlet x = 100;\\n\\nfunction setup() {\\n fill(0);\\n noStroke();\\n url = getURL();\\n}\\n\\nfunction draw() {\\n background(200);\\n text(url, x, height / 2);\\n x--;\\n}\\n
Gets the current URL path as an array.
\\nfunction setup() {\\n let urlPath = getURLPath();\\n for (let i = 0; i < urlPath.length; i++) {\\n text(urlPath[i], 10, i * 20 + 20);\\n }\\n}\\n
Gets the current URL params as an Object.
\\n// Example: http://p5js.org?year=2014&month=May&day=15\\n\\nfunction setup() {\\n let params = getURLParams();\\n text(params.day, 10, 20);\\n text(params.month, 10, 40);\\n text(params.year, 10, 60);\\n}\\n
Validates parameters\\nparam {String} func the name of the function\\nparam {Array} args user input arguments
example:\\n var a;\\n ellipse(10,10,a,5);\\nconsole ouput:\\n "It looks like ellipse received an empty variable in spot #2."
example:\\n ellipse(10,"foo",5,5);\\nconsole output:\\n "ellipse was expecting a number for parameter #1,\\n received "foo" instead."
Prints out all the colors in the color pallete with white text.\\nFor color blindness testing.
Called directly before setup(), the preload() function is used to handle\\nasynchronous loading of external files in a blocking way. If a preload\\nfunction is defined, setup() will wait until any load calls within have\\nfinished. Nothing besides load calls (loadImage, loadJSON, loadFont,\\nloadStrings, etc.) should be inside the preload function. If asynchronous\\nloading is preferred, the load methods can instead be called in setup()\\nor anywhere else with the use of a callback parameter.\\n\\nBy default the text "loading..." will be displayed. To make your own\\nloading page, include an HTML element with id "p5_loading" in your\\npage. More information here.
\\nlet img;\\nlet c;\\nfunction preload() {\\n // preload() runs once\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n // setup() waits until preload() is done\\n img.loadPixels();\\n // get color of middle pixel\\n c = img.get(img.width / 2, img.height / 2);\\n}\\n\\nfunction draw() {\\n background(c);\\n image(img, 25, 25, 50, 50);\\n}\\n
The setup() function is called once when the program starts. It's used to\\ndefine initial environment properties such as screen size and background\\ncolor and to load media such as images and fonts as the program starts.\\nThere can only be one setup() function for each program and it shouldn't\\nbe called again after its initial execution.\\n\\nNote: Variables declared within setup() are not accessible within other\\nfunctions, including draw().
\\nlet a = 0;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(102);\\n}\\n\\nfunction draw() {\\n rect(a++ % width, 10, 2, 80);\\n}\\n
Called directly after setup(), the draw() function continuously executes\\nthe lines of code contained inside its block until the program is stopped\\nor noLoop() is called. Note if noLoop() is called in setup(), draw() will\\nstill be executed once before stopping. draw() is called automatically and\\nshould never be called explicitly.\\n\\nIt should always be controlled with noLoop(), redraw() and loop(). After\\nnoLoop() stops the code in draw() from executing, redraw() causes the\\ncode inside draw() to execute once, and loop() will cause the code\\ninside draw() to resume executing continuously.\\n\\nThe number of times draw() executes in each second may be controlled with\\nthe frameRate() function.\\n\\nThere can only be one draw() function for each sketch, and draw() must\\nexist if you want the code to run continuously, or to process events such\\nas mousePressed(). Sometimes, you might have an empty call to draw() in\\nyour program, as shown in the above example.\\n\\nIt is important to note that the drawing coordinate system will be reset\\nat the beginning of each draw() call. If any transformations are performed\\nwithin draw() (ex: scale, rotate, translate), their effects will be\\nundone at the beginning of draw(), so transformations will not accumulate\\nover time. On the other hand, styling applied (ex: fill, stroke, etc) will\\nremain in effect.
\\nlet yPos = 0;\\nfunction setup() {\\n // setup() runs once\\n frameRate(30);\\n}\\nfunction draw() {\\n // draw() loops forever, until stopped\\n background(204);\\n yPos = yPos - 1;\\n if (yPos < 0) {\\n yPos = height;\\n }\\n line(0, yPos, width, yPos);\\n}\\n
Removes the entire p5 sketch. This will remove the canvas and any\\nelements created by p5.js. It will also stop the draw loop and unbind\\nany properties or methods from the window global scope. It will\\nleave a variable p5 in case you wanted to create a new p5 sketch.\\nIf you like, you can set p5 = null to erase it. While all functions and\\nvariables and objects created by the p5 library will be removed, any\\nother global variables created by your code will remain.
\\nfunction draw() {\\n ellipse(50, 50, 10, 10);\\n}\\n\\nfunction mousePressed() {\\n remove(); // remove whole sketch on mouse press\\n}\\n
Allows for the friendly error system (FES) to be turned off when creating a sketch,\\nwhich can give a significant boost to performance when needed.\\nSee \\ndisabling the friendly error system.
\\np5.disableFriendlyErrors = true;\\n\\nfunction setup() {\\n createCanvas(100, 50);\\n}\\n
Underlying HTML element. All normal HTML methods can be called on this.
\\nfunction setup() {\\n let c = createCanvas(50, 50);\\n c.elt.style.border = '5px solid red';\\n}\\n\\nfunction draw() {\\n background(220);\\n}\\n
Attaches the element to the parent specified. A way of setting\\n the container for the element. Accepts either a string ID, DOM\\n node, or p5.Element. If no arguments given, parent node is returned.\\n For more ways to position the canvas, see the\\n \\n positioning the canvas wiki page.\\nAll above examples except for the first one require the inclusion of\\n the p5.dom library in your index.html. See the\\n using a library\\n section for information on how to include this library.
\\n // in the html file:\\n // <div id=\\\"myContainer\\\"></div>\\n// in the js file:\\n let cnv = createCanvas(100, 100);\\n cnv.parent('myContainer');\\n
\\n let div0 = createDiv('this is the parent');\\n let div1 = createDiv('this is the child');\\n div1.parent(div0); // use p5.Element\\n
\\n let div0 = createDiv('this is the parent');\\n div0.id('apples');\\n let div1 = createDiv('this is the child');\\n div1.parent('apples'); // use id\\n
\\n let elt = document.getElementById('myParentDiv');\\n let div1 = createDiv('this is the child');\\n div1.parent(elt); // use element from page\\n
the ID, DOM node, or p5.Element\\n of desired parent element
Sets the ID of the element. If no ID argument is passed in, it instead\\n returns the current ID of the element.\\n Note that only one element can have a particular id in a page.\\n The .class() function can be used\\n to identify multiple elements with the same class name.
\\n function setup() {\\n let cnv = createCanvas(100, 100);\\n // Assigns a CSS selector ID to\\n // the canvas element.\\n cnv.id('mycanvas');\\n }\\n
ID of the element
Adds given class to the element. If no class argument is passed in, it\\n instead returns a string containing the current class(es) of the element.
\\n function setup() {\\n let cnv = createCanvas(100, 100);\\n // Assigns a CSS selector class 'small'\\n // to the canvas element.\\n cnv.class('small');\\n }\\n
class to add
The .mousePressed() function is called once after every time a\\nmouse button is pressed over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.
function to be fired when mouse is\\n pressed over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
false
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mousePressed(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any click anywhere\\nfunction mousePressed() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .doubleClicked() function is called once after every time a\\nmouse button is pressed twice over the element. This can be used to\\nattach element and action specific event listeners.
function to be fired when mouse is\\n double clicked over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.doubleClicked(changeGray); // attach listener for\\n // canvas double click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any double click anywhere\\nfunction doubleClicked() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is double clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .mouseWheel() function is called once after every time a\\nmouse wheel is scrolled over the element. This can be used to\\nattach element specific event listeners.\\n\\nThe function accepts a callback function as argument which will be executed\\nwhen the wheel event is triggered on the element, the callback function is\\npassed one argument event. The event.deltaY property returns negative\\nvalues if the mouse wheel is rotated up or away from the user and positive\\nin the other direction. The event.deltaX does the same as event.deltaY\\nexcept it reads the horizontal wheel scroll of the mouse wheel.\\n\\nOn OS X with "natural" scrolling enabled, the event.deltaY values are\\nreversed.
wheel
event
event.deltaY
event.deltaX
function to be fired when mouse is\\n scrolled over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseWheel(changeSize); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with mousewheel movement\\n// anywhere on screen\\nfunction mouseWheel() {\\n g = g + 10;\\n}\\n\\n// this function fires with mousewheel movement\\n// over canvas only\\nfunction changeSize(event) {\\n if (event.deltaY > 0) {\\n d = d + 10;\\n } else {\\n d = d - 10;\\n }\\n}\\n
The .mouseReleased() function is called once after every time a\\nmouse button is released over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.
function to be fired when mouse is\\n released over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseReleased(changeGray); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires after the mouse has been\\n// released\\nfunction mouseReleased() {\\n d = d + 10;\\n}\\n\\n// this function fires after the mouse has been\\n// released while on canvas\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .mouseClicked() function is called once after a mouse button is\\npressed and released over the element.\\nSome mobile browsers may also trigger this event on a touch screen,\\nif the user performs a quick tap.\\nThis can be used to attach element specific event listeners.
function to be fired when mouse is\\n clicked over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\n\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseClicked(changeGray); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires after the mouse has been\\n// clicked anywhere\\nfunction mouseClicked() {\\n d = d + 10;\\n}\\n\\n// this function fires after the mouse has been\\n// clicked on canvas\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .mouseMoved() function is called once every time a\\nmouse moves over the element. This can be used to attach an\\nelement specific event listener.
function to be fired when a mouse moves\\n over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d = 30;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseMoved(changeSize); // attach listener for\\n // activity on canvas only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n fill(200);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires when mouse moves anywhere on\\n// page\\nfunction mouseMoved() {\\n g = g + 5;\\n if (g > 255) {\\n g = 0;\\n }\\n}\\n\\n// this function fires when mouse moves over canvas\\nfunction changeSize() {\\n d = d + 2;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n
The .mouseOver() function is called once after every time a\\nmouse moves onto the element. This can be used to attach an\\nelement specific event listener.
function to be fired when a mouse moves\\n onto the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseOver(changeGray);\\n d = 10;\\n}\\n\\nfunction draw() {\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\nfunction changeGray() {\\n d = d + 10;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n
The .mouseOut() function is called once after every time a\\nmouse moves off the element. This can be used to attach an\\nelement specific event listener.
function to be fired when a mouse\\n moves off of an element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.mouseOut(changeGray);\\n d = 10;\\n}\\n\\nfunction draw() {\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\nfunction changeGray() {\\n d = d + 10;\\n if (d > 100) {\\n d = 0;\\n }\\n}\\n
The .touchStarted() function is called once after every time a touch is\\nregistered. This can be used to attach element specific event listeners.
function to be fired when a touch\\n starts over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchStarted(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any touch anywhere\\nfunction touchStarted() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .touchMoved() function is called once after every time a touch move is\\nregistered. This can be used to attach element specific event listeners.
function to be fired when a touch moves over\\n the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchMoved(changeGray); // attach listener for\\n // canvas click only\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .touchEnded() function is called once after every time a touch is\\nregistered. This can be used to attach element specific event listeners.
function to be fired when a touch ends\\n over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nlet cnv;\\nlet d;\\nlet g;\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n cnv.touchEnded(changeGray); // attach listener for\\n // canvas click only\\n d = 10;\\n g = 100;\\n}\\n\\nfunction draw() {\\n background(g);\\n ellipse(width / 2, height / 2, d, d);\\n}\\n\\n// this function fires with any touch anywhere\\nfunction touchEnded() {\\n d = d + 10;\\n}\\n\\n// this function fires only when cnv is clicked\\nfunction changeGray() {\\n g = random(0, 255);\\n}\\n
The .dragOver() function is called once after every time a\\nfile is dragged over the element. This can be used to attach an\\nelement specific event listener.
function to be fired when a file is\\n dragged over the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\n// To test this sketch, simply drag a\\n// file over the canvas\\nfunction setup() {\\n let c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('Drag file', width / 2, height / 2);\\n c.dragOver(dragOverCallback);\\n}\\n\\n// This function will be called whenever\\n// a file is dragged over the canvas\\nfunction dragOverCallback() {\\n background(240);\\n text('Dragged over', width / 2, height / 2);\\n}\\n
The .dragLeave() function is called once after every time a\\ndragged file leaves the element area. This can be used to attach an\\nelement specific event listener.
function to be fired when a file is\\n dragged off the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\n// To test this sketch, simply drag a file\\n// over and then out of the canvas area\\nfunction setup() {\\n let c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('Drag file', width / 2, height / 2);\\n c.dragLeave(dragLeaveCallback);\\n}\\n\\n// This function will be called whenever\\n// a file is dragged out of the canvas\\nfunction dragLeaveCallback() {\\n background(240);\\n text('Dragged off', width / 2, height / 2);\\n}\\n
Helper fxn for sharing pixel methods
Resets certain values such as those modified by functions in the Transform category\\nand in the Lights category that are not automatically reset\\nwith graphics buffer objects. Calling this in draw() will copy the behavior\\nof the standard canvas.
\\nlet pg;\\nfunction setup() {\\n createCanvas(100, 100);\\n background(0);\\n pg = createGraphics(50, 100);\\n pg.fill(0);\\n frameRate(5);\\n}\\nfunction draw() {\\n image(pg, width / 2, 0);\\n pg.background(255);\\n // p5.Graphics object behave a bit differently in some cases\\n // The normal canvas on the left resets the translate\\n // with every loop through draw()\\n // the graphics object on the right doesn't automatically reset\\n // so translate() is additive and it moves down the screen\\n rect(0, 0, width / 2, 5);\\n pg.rect(0, 0, width / 2, 5);\\n translate(0, 5, 0);\\n pg.translate(0, 5, 0);\\n}\\nfunction mouseClicked() {\\n // if you click you will see that\\n // reset() resets the translate back to the initial state\\n // of the Graphics object\\n pg.reset();\\n}\\n
Removes a Graphics object from the page and frees any resources\\nassociated with it.
\\nlet bg;\\nfunction setup() {\\n bg = createCanvas(100, 100);\\n bg.background(0);\\n image(bg, 0, 0);\\n bg.remove();\\n}\\n
\\nlet bg;\\nfunction setup() {\\n pixelDensity(1);\\n createCanvas(100, 100);\\n stroke(255);\\n fill(0);\\n\\n // create and draw the background image\\n bg = createGraphics(100, 100);\\n bg.background(200);\\n bg.ellipse(50, 50, 80, 80);\\n}\\nfunction draw() {\\n let t = millis() / 1000;\\n // draw the background\\n if (bg) {\\n image(bg, frameCount % 100, 0);\\n image(bg, frameCount % 100 - 100, 0);\\n }\\n // draw the foreground\\n let p = p5.Vector.fromAngle(t, 35).add(50, 50);\\n ellipse(p.x, p.y, 30);\\n}\\nfunction mouseClicked() {\\n // remove the background\\n if (bg) {\\n bg.remove();\\n bg = null;\\n }\\n}\\n
Resize our canvas element.
Helper fxn to check font type (system or otf)
Helper fxn to measure ascent and descent.\\nAdapted from http://stackoverflow.com/a/25355178
p5.Renderer2D\\nThe 2D graphics canvas renderer class.\\nextends p5.Renderer
Generate a cubic Bezier representing an arc on the unit circle of total\\nangle size radians, beginning start radians above the x-axis. Up to\\nfour of these curves are combined to make a full arc.
size
start
See www.joecridge.me/bezier.pdf for an explanation of the method.
Creates a canvas element in the document, and sets the dimensions of it\\nin pixels. This method should be called only once at the start of setup.\\nCalling createCanvas more than once in a sketch will result in very\\nunpredictable behavior. If you want more than one drawing canvas\\nyou could use createGraphics (hidden by default but it can be shown).\\n\\nThe system variables width and height are set by the parameters passed\\nto this function. If createCanvas() is not used, the window will be\\ngiven a default size of 100x100 pixels.\\n\\nFor more ways to position the canvas, see the\\n\\npositioning the canvas wiki page.
width of the canvas
height of the canvas
either P2D or WEBGL
\\nfunction setup() {\\n createCanvas(100, 50);\\n background(153);\\n line(0, 0, width, height);\\n}\\n
Resizes the canvas to given width and height. The canvas will be cleared\\nand draw will be called immediately, allowing the sketch to re-render itself\\nin the resized canvas.
don't redraw the canvas immediately
Removes the default canvas for a p5 sketch that doesn't\\nrequire a canvas
\\nfunction setup() {\\n noCanvas();\\n}\\n
Creates and returns a new p5.Renderer object. Use this class if you need\\nto draw into an off-screen graphics buffer. The two parameters define the\\nwidth and height in pixels.
width of the offscreen graphics buffer
height of the offscreen graphics buffer
either P2D or WEBGL\\nundefined defaults to p2d
\\nlet pg;\\nfunction setup() {\\n createCanvas(100, 100);\\n pg = createGraphics(100, 100);\\n}\\nfunction draw() {\\n background(200);\\n pg.background(100);\\n pg.noStroke();\\n pg.ellipse(pg.width / 2, pg.height / 2, 50, 50);\\n image(pg, 50, 50);\\n image(pg, 0, 0, 50, 50);\\n}\\n
Blends the pixels in the display window according to the defined mode.\\nThere is a choice of the following modes to blend the source pixels (A)\\nwith the ones of pixels already in the display window (B):
BLEND
ADD
DARKEST
LIGHTEST
DIFFERENCE
EXCLUSION
MULTIPLY
SCREEN
REPLACE
OVERLAY
SCREEN\\n
HARD_LIGHT
SOFT_LIGHT
DODGE
BURN
SUBTRACT
blend mode to set for canvas.\\n either BLEND, DARKEST, LIGHTEST, DIFFERENCE, MULTIPLY,\\n EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\\n SOFT_LIGHT, DODGE, BURN, ADD, or SUBTRACT
\\nblendMode(LIGHTEST);\\nstrokeWeight(30);\\nstroke(80, 150, 255);\\nline(25, 25, 75, 75);\\nstroke(255, 50, 50);\\nline(75, 25, 25, 75);\\n
\\nblendMode(MULTIPLY);\\nstrokeWeight(30);\\nstroke(80, 150, 255);\\nline(25, 25, 75, 75);\\nstroke(255, 50, 50);\\nline(75, 25, 25, 75);\\n
shim for Uint8ClampedArray.slice\\n(allows arrayCopy to work with pixels[])\\nwith thanks to http://halfpapstudios.com/blog/tag/html5-canvas/\\nEnumerable set to false to protect for...in from\\nUint8ClampedArray.prototype pollution.
this is implementation of Object.assign() which is unavailable in\\nIE11 and (non-Chrome) Android browsers.\\nThe assign() method is used to copy the values of all enumerable\\nown properties from one or more source objects to a target object.\\nIt will return the target object.\\nModified from https://github.com/ljharb/object.assign
Stops p5.js from continuously executing the code within draw().\\nIf loop() is called, the code in draw() begins to run continuously again.\\nIf using noLoop() in setup(), it should be the last line inside the block.\\n\\nWhen noLoop() is used, it's not possible to manipulate or access the\\nscreen inside event handling functions such as mousePressed() or\\nkeyPressed(). Instead, use those functions to call redraw() or loop(),\\nwhich will run draw(), which can update the screen properly. This means\\nthat when noLoop() has been called, no drawing can happen, and functions\\nlike saveFrame() or loadPixels() may not be used.\\n\\nNote that if the sketch is resized, redraw() will be called to update\\nthe sketch, even after noLoop() has been specified. Otherwise, the sketch\\nwould enter an odd state until loop() was called.
\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n noLoop();\\n}\\n\\nfunction draw() {\\n line(10, 10, 90, 90);\\n}\\n
\\nlet x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n}\\n\\nfunction draw() {\\n background(204);\\n x = x + 0.1;\\n if (x > width) {\\n x = 0;\\n }\\n line(x, 0, x, height);\\n}\\n\\nfunction mousePressed() {\\n noLoop();\\n}\\n\\nfunction mouseReleased() {\\n loop();\\n}\\n
By default, p5.js loops through draw() continuously, executing the code\\nwithin it. However, the draw() loop may be stopped by calling noLoop().\\nIn that case, the draw() loop can be resumed with loop().
Avoid calling loop() from inside setup().
\\nlet x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n}\\n\\nfunction draw() {\\n background(204);\\n x = x + 0.1;\\n if (x > width) {\\n x = 0;\\n }\\n line(x, 0, x, height);\\n}\\n\\nfunction mousePressed() {\\n loop();\\n}\\n\\nfunction mouseReleased() {\\n noLoop();\\n}\\n
The push() function saves the current drawing style settings and\\ntransformations, while pop() restores these settings. Note that these\\nfunctions are always used together. They allow you to change the style\\nand transformation settings and later return to what you had. When a new\\nstate is started with push(), it builds on the current style and transform\\ninformation. The push() and pop() functions can be embedded to provide\\nmore control. (See the second example for a demonstration.)\\n\\npush() stores information related to the current transformation state\\nand style settings controlled by the following functions: fill(),\\nstroke(), tint(), strokeWeight(), strokeCap(), strokeJoin(),\\nimageMode(), rectMode(), ellipseMode(), colorMode(), textAlign(),\\ntextFont(), textSize(), textLeading().\\n\\nIn WEBGL mode additional style settings are stored. These are controlled by the following functions: setCamera(), ambientLight(), directionalLight(),\\npointLight(), texture(), specularMaterial(), shininess(), normalMaterial()\\nand shader().
\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\nstrokeWeight(10);\\nfill(204, 153, 0);\\ntranslate(50, 0);\\nellipse(0, 50, 33, 33); // Middle circle\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n
\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\nstrokeWeight(10);\\nfill(204, 153, 0);\\nellipse(33, 50, 33, 33); // Left-middle circle\\n\\npush(); // Start another new drawing state\\nstroke(0, 102, 153);\\nellipse(66, 50, 33, 33); // Right-middle circle\\npop(); // Restore previous state\\n\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n
\\nellipse(0, 50, 33, 33); // Left circle\\n\\npush(); // Start a new drawing state\\ntranslate(50, 0);\\nstrokeWeight(10);\\nfill(204, 153, 0);\\nellipse(0, 50, 33, 33); // Middle circle\\npop(); // Restore original state\\n\\nellipse(100, 50, 33, 33); // Right circle\\n
Executes the code within draw() one time. This functions allows the\\n program to update the display window only when necessary, for example\\n when an event registered by mousePressed() or keyPressed() occurs.\\n \\n In structuring a program, it only makes sense to call redraw() within\\n events such as mousePressed(). This is because redraw() does not run\\n draw() immediately (it only sets a flag that indicates an update is\\n needed).\\n \\n The redraw() function does not work properly when called inside draw().\\n To enable/disable animations, use loop() and noLoop().\\n \\n In addition you can set the number of redraws per method call. Just\\n add an integer as single parameter for the number of redraws.
Redraw for n-times. The default value is 1.
\\n let x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n }\\nfunction draw() {\\n background(204);\\n line(x, 0, x, height);\\n }\\nfunction mousePressed() {\\n x += 1;\\n redraw();\\n }\\n
\\n let x = 0;\\nfunction setup() {\\n createCanvas(100, 100);\\n noLoop();\\n }\\nfunction draw() {\\n background(204);\\n x += 1;\\n line(x, 0, x, height);\\n }\\nfunction mousePressed() {\\n redraw(5);\\n }\\n
Multiplies the current matrix by the one specified through the parameters.\\nThis is a powerful operation that can perform the equivalent of translate,\\nscale, shear and rotate all at once. You can learn more about transformation\\nmatrices on \\nWikipedia.
The naming of the arguments here follows the naming of the \\nWHATWG specification and corresponds to a\\ntransformation matrix of the\\nform:
\\n\\n
numbers which define the 2x3 matrix to be multiplied
\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n background(200);\\n // Equivalent to translate(x, y);\\n applyMatrix(1, 0, 0, 1, 40 + step, 50);\\n rect(0, 0, 50, 50);\\n}\\n
\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n background(200);\\n translate(50, 50);\\n // Equivalent to scale(x, y);\\n applyMatrix(1 / step, 0, 0, 1 / step, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n
\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n var angle = map(step, 0, 20, 0, TWO_PI);\\n var cos_a = cos(angle);\\n var sin_a = sin(angle);\\n background(200);\\n translate(50, 50);\\n // Equivalent to rotate(angle);\\n applyMatrix(cos_a, sin_a, -sin_a, cos_a, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n
\\nfunction setup() {\\n frameRate(10);\\n rectMode(CENTER);\\n}\\n\\nfunction draw() {\\n var step = frameCount % 20;\\n var angle = map(step, 0, 20, -PI / 4, PI / 4);\\n background(200);\\n translate(50, 50);\\n // equivalent to shearX(angle);\\n var shear_factor = 1 / tan(PI / 2 - angle);\\n applyMatrix(1, 0, shear_factor, 1, 0, 0);\\n rect(0, 0, 50, 50);\\n}\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateY(PI / 6);\\n stroke(153);\\n box(35);\\n var rad = millis() / 1000;\\n // Set rotation angles\\n var ct = cos(rad);\\n var st = sin(rad);\\n // Matrix for rotation around the Y axis\\n applyMatrix( ct, 0.0, st, 0.0,\\n 0.0, 1.0, 0.0, 0.0,\\n -st, 0.0, ct, 0.0,\\n 0.0, 0.0, 0.0, 1.0);\\n stroke(255);\\n box(50);\\n}\\n
Replaces the current matrix with the identity matrix.
\\ntranslate(50, 50);\\napplyMatrix(0.5, 0.5, -0.5, 0.5, 0, 0);\\nrect(0, 0, 20, 20);\\n// Note that the translate is also reset.\\nresetMatrix();\\nrect(0, 0, 20, 20);\\n
Rotates a shape the amount specified by the angle parameter. This\\nfunction accounts for angleMode, so angles can be entered in either\\nRADIANS or DEGREES.\\n\\nObjects are always rotated around their relative position to the\\norigin and positive numbers rotate objects in a clockwise direction.\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nrotate(HALF_PI) and then rotate(HALF_PI) is the same as rotate(PI).\\nAll tranformations are reset when draw() begins again.\\n\\nTechnically, rotate() multiplies the current transformation matrix\\nby a rotation matrix. This function can be further controlled by\\nthe push() and pop().
the angle of rotation, specified in radians\\n or degrees, depending on current angleMode
(in 3d) the axis to rotate around
\\ntranslate(width / 2, height / 2);\\nrotate(PI / 3.0);\\nrect(-26, -26, 52, 52);\\n
Rotates around X axis.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateX(millis() / 1000);\\n box();\\n}\\n
Rotates around Y axis.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateY(millis() / 1000);\\n box();\\n}\\n
Rotates around Z axis. Webgl mode only.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(255);\\n rotateZ(millis() / 1000);\\n box();\\n}\\n
Increases or decreases the size of a shape by expanding and contracting\\nvertices. Objects always scale from their relative origin to the\\ncoordinate system. Scale values are specified as decimal percentages.\\nFor example, the function call scale(2.0) increases the dimension of a\\nshape by 200%.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function multiply the effect. For example, calling scale(2.0)\\nand then scale(1.5) is the same as scale(3.0). If scale() is called\\nwithin draw(), the transformation is reset when the loop begins again.\\n\\nUsing this function with the z parameter is only available in WEBGL mode.\\nThis function can be further controlled with push() and pop().
\\nrect(30, 20, 50, 50);\\nscale(0.5);\\nrect(30, 20, 50, 50);\\n
\\nrect(30, 20, 50, 50);\\nscale(0.5, 1.3);\\nrect(30, 20, 50, 50);\\n
percent to scale the object, or percentage to\\n scale the object in the x-axis if multiple arguments\\n are given
percent to scale the object in the y-axis
percent to scale the object in the z-axis (webgl only)
per-axis percents to scale the object
Shears a shape around the x-axis the amount specified by the angle\\nparameter. Angles should be specified in the current angleMode.\\nObjects are always sheared around their relative position to the origin\\nand positive numbers shear objects in a clockwise direction.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nshearX(PI/2) and then shearX(PI/2) is the same as shearX(PI).\\nIf shearX() is called within the draw(), the transformation is reset when\\nthe loop begins again.\\n\\nTechnically, shearX() multiplies the current transformation matrix by a\\nrotation matrix. This function can be further controlled by the\\npush() and pop() functions.
angle of shear specified in radians or degrees,\\n depending on current angleMode
\\ntranslate(width / 4, height / 4);\\nshearX(PI / 4.0);\\nrect(0, 0, 30, 30);\\n
Shears a shape around the y-axis the amount specified by the angle\\nparameter. Angles should be specified in the current angleMode. Objects\\nare always sheared around their relative position to the origin and\\npositive numbers shear objects in a clockwise direction.\\n\\nTransformations apply to everything that happens after and subsequent\\ncalls to the function accumulates the effect. For example, calling\\nshearY(PI/2) and then shearY(PI/2) is the same as shearY(PI). If\\nshearY() is called within the draw(), the transformation is reset when\\nthe loop begins again.\\n\\nTechnically, shearY() multiplies the current transformation matrix by a\\nrotation matrix. This function can be further controlled by the\\npush() and pop() functions.
\\ntranslate(width / 4, height / 4);\\nshearY(PI / 4.0);\\nrect(0, 0, 30, 30);\\n
Specifies an amount to displace objects within the display window.\\nThe x parameter specifies left/right translation, the y parameter\\nspecifies up/down translation.\\n\\nTransformations are cumulative and apply to everything that happens after\\nand subsequent calls to the function accumulates the effect. For example,\\ncalling translate(50, 0) and then translate(20, 0) is the same as\\ntranslate(70, 0). If translate() is called within draw(), the\\ntransformation is reset when the loop begins again. This function can be\\nfurther controlled by using push() and pop().
\\ntranslate(30, 20);\\nrect(0, 0, 55, 55);\\n
\\nrect(0, 0, 55, 55); // Draw rect at original 0,0\\ntranslate(30, 20);\\nrect(0, 0, 55, 55); // Draw rect at new 0,0\\ntranslate(14, 14);\\nrect(0, 0, 55, 55); // Draw rect at new 0,0\\n
\\nfunction draw() {\\n background(200);\\n rectMode(CENTER);\\n translate(width / 2, height / 2);\\n translate(p5.Vector.fromAngle(millis() / 1000, 40));\\n rect(0, 0, 20, 20);\\n}\\n
left/right translation
up/down translation
forward/backward translation (webgl only)
the vector to translate by
Creates a new instance of p5.StringDict using the key-value pair\\n or the object you provide.
\\n function setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // logs true to console\\n let anotherDictionary = createStringDict({ happy: 'coding' });\\n print(anotherDictionary.hasKey('happy')); // logs true to console\\n }\\n
object
Creates a new instance of p5.NumberDict using the key-value pair\\n or object you provide.
\\n function setup() {\\n let myDictionary = createNumberDict(100, 42);\\n print(myDictionary.hasKey(100)); // logs true to console\\n let anotherDictionary = createNumberDict({ 200: 84 });\\n print(anotherDictionary.hasKey(200)); // logs true to console\\n }\\n
Returns the number of key-value pairs currently stored in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createNumberDict(1, 10);\\n myDictionary.create(2, 20);\\n myDictionary.create(3, 30);\\n print(myDictionary.size()); // logs 3 to the console\\n}\\n
Returns true if the given key exists in the Dictionary,\\notherwise returns false.
that you want to look up
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // logs true to console\\n}\\n
Returns the value stored at the given key.
key you want to access
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n let myValue = myDictionary.get('p5');\\n print(myValue === 'js'); // logs true to console\\n}\\n
Updates the value associated with the given key in case it already exists\\nin the Dictionary. Otherwise a new key-value pair is added.
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.set('p5', 'JS');\\n myDictionary.print(); // logs \\\"key: p5 - value: JS\\\" to console\\n}\\n
private helper function to handle the user passing in objects\\nduring construction or calls to create()
Creates a new key-value pair in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.create('happy', 'coding');\\n myDictionary.print();\\n // above logs \\\"key: p5 - value: js, key: happy - value: coding\\\" to console\\n}\\n
key/value pair
Removes all previously stored key-value pairs from the Dictionary.
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n print(myDictionary.hasKey('p5')); // prints 'true'\\n myDictionary.clear();\\n print(myDictionary.hasKey('p5')); // prints 'false'\\n}\\n
Removes the key-value pair stored at the given key from the Dictionary.
for the pair to remove
\\nfunction setup() {\\n let myDictionary = createStringDict('p5', 'js');\\n myDictionary.create('happy', 'coding');\\n myDictionary.print();\\n // above logs \\\"key: p5 - value: js, key: happy - value: coding\\\" to console\\n myDictionary.remove('p5');\\n myDictionary.print();\\n // above logs \\\"key: happy value: coding\\\" to console\\n}\\n
Logs the set of items currently stored in the Dictionary to the console.
Converts the Dictionary into a CSV file for local download.
\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n createStringDict({\\n john: 1940,\\n paul: 1942,\\n george: 1943,\\n ringo: 1940\\n }).saveTable('beatles');\\n }\\n}\\n
Converts the Dictionary into a JSON file for local download.
\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n createStringDict({\\n john: 1940,\\n paul: 1942,\\n george: 1943,\\n ringo: 1940\\n }).saveJSON('beatles');\\n }\\n}\\n
private helper function to ensure that the user passed in valid\\nvalues for the Dictionary type
Add the given number to the value currently stored at the given key.\\nThe sum then replaces the value previously stored in the Dictionary.
for the value you wish to add to
to add to the value
\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 5);\\n myDictionary.add(2, 2);\\n print(myDictionary.get(2)); // logs 7 to console.\\n}\\n
Subtract the given number from the value currently stored at the given key.\\nThe difference then replaces the value previously stored in the Dictionary.
for the value you wish to subtract from
to subtract from the value
\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 5);\\n myDictionary.sub(2, 2);\\n print(myDictionary.get(2)); // logs 3 to console.\\n}\\n
Multiply the given number with the value currently stored at the given key.\\nThe product then replaces the value previously stored in the Dictionary.
for value you wish to multiply
to multiply the value by
\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 4);\\n myDictionary.mult(2, 2);\\n print(myDictionary.get(2)); // logs 8 to console.\\n}\\n
Divide the given number with the value currently stored at the given key.\\nThe quotient then replaces the value previously stored in the Dictionary.
for value you wish to divide
to divide the value by
\\nfunction setup() {\\n let myDictionary = createNumberDict(2, 8);\\n myDictionary.div(2, 2);\\n print(myDictionary.get(2)); // logs 4 to console.\\n}\\n
private helper function for finding lowest or highest value\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'
Return the lowest number currently stored in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\\n let lowestValue = myDictionary.minValue(); // value is -10\\n print(lowestValue);\\n}\\n
Return the highest number currently stored in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\\n let highestValue = myDictionary.maxValue(); // value is 3\\n print(highestValue);\\n}\\n
private helper function for finding lowest or highest key\\nthe argument 'flip' is used to flip the comparison arrow\\nfrom 'less than' to 'greater than'
Return the lowest key currently used in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\\n let lowestKey = myDictionary.minKey(); // value is 1.2\\n print(lowestKey);\\n}\\n
Return the highest key currently used in the Dictionary.
\\nfunction setup() {\\n let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\\n let highestKey = myDictionary.maxKey(); // value is 4\\n print(highestKey);\\n}\\n
The system variable deviceOrientation always contains the orientation of\\nthe device. The value of this variable will either be set 'landscape'\\nor 'portrait'. If no data is available it will be set to 'undefined'.\\neither LANDSCAPE or PORTRAIT.
The system variable accelerationX always contains the acceleration of the\\ndevice along the x axis. Value is represented as meters per second squared.
\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationX);\\n}\\n
The system variable accelerationY always contains the acceleration of the\\ndevice along the y axis. Value is represented as meters per second squared.
\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationY);\\n}\\n
The system variable accelerationZ always contains the acceleration of the\\ndevice along the z axis. Value is represented as meters per second squared.
\\n// Move a touchscreen device to register\\n// acceleration changes.\\nfunction draw() {\\n background(220, 50);\\n fill('magenta');\\n ellipse(width / 2, height / 2, accelerationZ);\\n}\\n
The system variable pAccelerationX always contains the acceleration of the\\ndevice along the x axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.
The system variable pAccelerationY always contains the acceleration of the\\ndevice along the y axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.
The system variable pAccelerationZ always contains the acceleration of the\\ndevice along the z axis in the frame previous to the current frame. Value\\nis represented as meters per second squared.
The system variable rotationX always contains the rotation of the\\ndevice along the x axis. Value is represented as 0 to +/-180 degrees.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n //rotateZ(radians(rotationZ));\\n rotateX(radians(rotationX));\\n //rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n
The system variable rotationY always contains the rotation of the\\ndevice along the y axis. Value is represented as 0 to +/-90 degrees.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n //rotateZ(radians(rotationZ));\\n //rotateX(radians(rotationX));\\n rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n
The system variable rotationZ always contains the rotation of the\\ndevice along the z axis. Value is represented as 0 to 359 degrees.\\n\\nUnlike rotationX and rotationY, this variable is available for devices\\nwith a built-in compass only.\\n\\nNote: The order the rotations are called is important, ie. if used\\ntogether, it must be called in the order Z-X-Y or there might be\\nunexpected behaviour.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateZ(radians(rotationZ));\\n //rotateX(radians(rotationX));\\n //rotateY(radians(rotationY));\\n box(200, 200, 200);\\n}\\n
The system variable pRotationX always contains the rotation of the\\ndevice along the x axis in the frame previous to the current frame. Value\\nis represented as 0 to +/-180 degrees.\\n\\npRotationX can also be used with rotationX to determine the rotate\\ndirection of the device along the X-axis.
\\n// A simple if statement looking at whether\\n// rotationX - pRotationX < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\n// Simple range conversion to make things simpler.\\n// This is not absolutely necessary but the logic\\n// will be different in that case.\\n\\nlet rX = rotationX + 180;\\nlet pRX = pRotationX + 180;\\n\\nif ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\\n rotateDirection = 'clockwise';\\n} else if (rX - pRX < 0 || rX - pRX > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\n\\nprint(rotateDirection);\\n
The system variable pRotationY always contains the rotation of the\\ndevice along the y axis in the frame previous to the current frame. Value\\nis represented as 0 to +/-90 degrees.\\n\\npRotationY can also be used with rotationY to determine the rotate\\ndirection of the device along the Y-axis.
\\n// A simple if statement looking at whether\\n// rotationY - pRotationY < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\n// Simple range conversion to make things simpler.\\n// This is not absolutely necessary but the logic\\n// will be different in that case.\\n\\nlet rY = rotationY + 180;\\nlet pRY = pRotationY + 180;\\n\\nif ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\\n rotateDirection = 'clockwise';\\n} else if (rY - pRY < 0 || rY - pRY > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\nprint(rotateDirection);\\n
The system variable pRotationZ always contains the rotation of the\\ndevice along the z axis in the frame previous to the current frame. Value\\nis represented as 0 to 359 degrees.\\n\\npRotationZ can also be used with rotationZ to determine the rotate\\ndirection of the device along the Z-axis.
\\n// A simple if statement looking at whether\\n// rotationZ - pRotationZ < 0 is true or not will be\\n// sufficient for determining the rotate direction\\n// in most cases.\\n\\n// Some extra logic is needed to account for cases where\\n// the angles wrap around.\\nlet rotateDirection = 'clockwise';\\n\\nif (\\n (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\\n rotationZ - pRotationZ < -270\\n) {\\n rotateDirection = 'clockwise';\\n} else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\\n rotateDirection = 'counter-clockwise';\\n}\\nprint(rotateDirection);\\n
When a device is rotated, the axis that triggers the deviceTurned()\\nmethod is stored in the turnAxis variable. The turnAxis variable is only defined within\\nthe scope of deviceTurned().
\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees in the\\n// X-axis to change the value.\\n\\nvar value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (turnAxis === 'X') {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n }\\n}\\n
The setMoveThreshold() function is used to set the movement threshold for\\nthe deviceMoved() function. The default threshold is set to 0.5.
The threshold value
\\n// Run this example on a mobile device\\n// You will need to move the device incrementally further\\n// the closer the square's color gets to white in order to change the value.\\n\\nlet value = 0;\\nlet threshold = 0.5;\\nfunction setup() {\\n setMoveThreshold(threshold);\\n}\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n threshold = threshold + 0.1;\\n if (value > 255) {\\n value = 0;\\n threshold = 30;\\n }\\n setMoveThreshold(threshold);\\n}\\n
The setShakeThreshold() function is used to set the movement threshold for\\nthe deviceShaken() function. The default threshold is set to 30.
\\n// Run this example on a mobile device\\n// You will need to shake the device more firmly\\n// the closer the box's fill gets to white in order to change the value.\\n\\nlet value = 0;\\nlet threshold = 30;\\nfunction setup() {\\n setShakeThreshold(threshold);\\n}\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n threshold = threshold + 5;\\n if (value > 255) {\\n value = 0;\\n threshold = 30;\\n }\\n setShakeThreshold(threshold);\\n}\\n
The deviceMoved() function is called when the device is moved by more than\\nthe threshold value along X, Y or Z axis. The default threshold is set to 0.5.\\nThe threshold value can be changed using setMoveThreshold().
\\n// Run this example on a mobile device\\n// Move the device around\\n// to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n
The deviceTurned() function is called when the device rotates by\\nmore than 90 degrees continuously.\\n\\nThe axis that triggers the deviceTurned() method is stored in the turnAxis\\nvariable. The deviceTurned() method can be locked to trigger on any axis:\\nX, Y or Z by comparing the turnAxis variable to 'X', 'Y' or 'Z'.
\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees\\n// to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n}\\n
\\n// Run this example on a mobile device\\n// Rotate the device by 90 degrees in the\\n// X-axis to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceTurned() {\\n if (turnAxis === 'X') {\\n if (value === 0) {\\n value = 255;\\n } else if (value === 255) {\\n value = 0;\\n }\\n }\\n}\\n
The deviceShaken() function is called when the device total acceleration\\nchanges of accelerationX and accelerationY values is more than\\nthe threshold value. The default threshold is set to 30.\\nThe threshold value can be changed using setShakeThreshold().
\\n// Run this example on a mobile device\\n// Shake the device to change the value.\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction deviceShaken() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n
The boolean system variable keyIsPressed is true if any key is pressed\\nand false if no keys are pressed.
\\nfunction draw() {\\n if (keyIsPressed === true) {\\n fill(0);\\n } else {\\n fill(255);\\n }\\n rect(25, 25, 50, 50);\\n}\\n
The system variable key always contains the value of the most recent\\nkey on the keyboard that was typed. To get the proper capitalization, it\\nis best to use it within keyTyped(). For non-ASCII keys, use the keyCode\\nvariable.
\\n// Click any key to display it!\\n// (Not Guaranteed to be Case Sensitive)\\nfunction setup() {\\n fill(245, 123, 158);\\n textSize(50);\\n}\\n\\nfunction draw() {\\n background(200);\\n text(key, 33, 65); // Display last key pressed.\\n}\\n
The variable keyCode is used to detect special keys such as BACKSPACE,\\nDELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL, OPTION, ALT, UP_ARROW,\\nDOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\\nYou can also check for custom keys by looking up the keyCode of any key\\non a site like this: keycode.info.
\\nlet fillVal = 126;\\nfunction draw() {\\n fill(fillVal);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction keyPressed() {\\n if (keyCode === UP_ARROW) {\\n fillVal = 255;\\n } else if (keyCode === DOWN_ARROW) {\\n fillVal = 0;\\n }\\n return false; // prevent default\\n}\\n
\\nfunction draw() {}\\nfunction keyPressed() {\\n background('yellow');\\n text(`${key} ${keyCode}`, 10, 40);\\n print(key, ' ', keyCode);\\n return false; // prevent default\\n}\\n
The keyPressed() function is called once every time a key is pressed. The\\nkeyCode for the key that was pressed is stored in the keyCode variable.\\n\\nFor non-ASCII keys, use the keyCode variable. You can check if the keyCode\\nequals BACKSPACE, DELETE, ENTER, RETURN, TAB, ESCAPE, SHIFT, CONTROL,\\nOPTION, ALT, UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW.\\n\\nFor ASCII keys, the key that was pressed is stored in the key variable. However, it\\ndoes not distinguish between uppercase and lowercase. For this reason, it\\nis recommended to use keyTyped() to read the key variable, in which the\\ncase of the variable will be distinguished.\\n\\nBecause of how operating systems handle key repeats, holding down a key\\nmay cause multiple calls to keyTyped() (and keyReleased() as well). The\\nrate of repeat is set by the operating system and how each computer is\\nconfigured.\\nBrowsers may have different default\\nbehaviors attached to various key events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyPressed() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyPressed() {\\n if (keyCode === LEFT_ARROW) {\\n value = 255;\\n } else if (keyCode === RIGHT_ARROW) {\\n value = 0;\\n }\\n}\\n
\\nfunction keyPressed() {\\n // Do something\\n return false; // prevent any default behaviour\\n}\\n
The keyReleased() function is called once every time a key is released.\\nSee key and keyCode for more information.\\nBrowsers may have different default\\nbehaviors attached to various key events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyReleased() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n return false; // prevent any default behavior\\n}\\n
The keyTyped() function is called once every time a key is pressed, but\\naction keys such as Ctrl, Shift, and Alt are ignored. The most recent\\nkey pressed will be stored in the key variable.\\n\\nBecause of how operating systems handle key repeats, holding down a key\\nwill cause multiple calls to keyTyped() (and keyReleased() as well). The\\nrate of repeat is set by the operating system and how each computer is\\nconfigured.\\nBrowsers may have different default behaviors attached to various key\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.
\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction keyTyped() {\\n if (key === 'a') {\\n value = 255;\\n } else if (key === 'b') {\\n value = 0;\\n }\\n // uncomment to prevent any default behavior\\n // return false;\\n}\\n
The onblur function is called when the user is no longer focused\\non the p5 element. Because the keyup events will not fire if the user is\\nnot focused on the element we must assume all keys currently down have\\nbeen released.
The keyIsDown() function checks if the key is currently down, i.e. pressed.\\nIt can be used if you have an object that moves, and you want several keys\\nto be able to affect its behaviour simultaneously, such as moving a\\nsprite diagonally. You can put in any number representing the keyCode of\\nthe key, or use any of the variable keyCode names listed\\nhere.
The key to check for.
\\nlet x = 100;\\nlet y = 100;\\n\\nfunction setup() {\\n createCanvas(512, 512);\\n fill(255, 0, 0);\\n}\\n\\nfunction draw() {\\n if (keyIsDown(LEFT_ARROW)) {\\n x -= 5;\\n }\\n\\n if (keyIsDown(RIGHT_ARROW)) {\\n x += 5;\\n }\\n\\n if (keyIsDown(UP_ARROW)) {\\n y -= 5;\\n }\\n\\n if (keyIsDown(DOWN_ARROW)) {\\n y += 5;\\n }\\n\\n clear();\\n ellipse(x, y, 50, 50);\\n}\\n
\\nlet diameter = 50;\\n\\nfunction setup() {\\n createCanvas(512, 512);\\n}\\n\\nfunction draw() {\\n // 107 and 187 are keyCodes for \\\"+\\\"\\n if (keyIsDown(107) || keyIsDown(187)) {\\n diameter += 1;\\n }\\n\\n // 109 and 189 are keyCodes for \\\"-\\\"\\n if (keyIsDown(109) || keyIsDown(189)) {\\n diameter -= 1;\\n }\\n\\n clear();\\n fill(255, 0, 0);\\n ellipse(50, 50, diameter, diameter);\\n}\\n
The system variable mouseX always contains the current horizontal\\nposition of the mouse, relative to (0, 0) of the canvas. If touch is\\nused instead of mouse input, mouseX will hold the x value of the most\\nrecent touch point.
\\n// Move the mouse across the canvas\\nfunction draw() {\\n background(244, 248, 252);\\n line(mouseX, 0, mouseX, 100);\\n}\\n
The system variable mouseY always contains the current vertical position\\nof the mouse, relative to (0, 0) of the canvas. If touch is\\nused instead of mouse input, mouseY will hold the y value of the most\\nrecent touch point.
\\n// Move the mouse across the canvas\\nfunction draw() {\\n background(244, 248, 252);\\n line(0, mouseY, 100, mouseY);\\n}\\n
The system variable pmouseX always contains the horizontal position of\\nthe mouse or finger in the frame previous to the current frame, relative to\\n(0, 0) of the canvas. Note: pmouseX will be reset to the current mouseX\\nvalue at the start of each touch event.
\\n// Move the mouse across the canvas to leave a trail\\nfunction setup() {\\n //slow down the frameRate to make it more visible\\n frameRate(10);\\n}\\n\\nfunction draw() {\\n background(244, 248, 252);\\n line(mouseX, mouseY, pmouseX, pmouseY);\\n print(pmouseX + ' -> ' + mouseX);\\n}\\n
The system variable pmouseY always contains the vertical position of the\\nmouse or finger in the frame previous to the current frame, relative to\\n(0, 0) of the canvas. Note: pmouseY will be reset to the current mouseY\\nvalue at the start of each touch event.
\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n //draw a square only if the mouse is not moving\\n if (mouseY === pmouseY && mouseX === pmouseX) {\\n rect(20, 20, 60, 60);\\n }\\n\\n print(pmouseY + ' -> ' + mouseY);\\n}\\n
The system variable winMouseX always contains the current horizontal\\nposition of the mouse, relative to (0, 0) of the window.
\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n const body = document.getElementsByTagName('body')[0];\\n myCanvas.parent(body);\\n}\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n //move the canvas to the horizontal mouse position\\n //relative to the window\\n myCanvas.position(winMouseX + 1, windowHeight / 2);\\n\\n //the y of the square is relative to the canvas\\n rect(20, mouseY, 60, 60);\\n}\\n
The system variable winMouseY always contains the current vertical\\nposition of the mouse, relative to (0, 0) of the window.
\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n const body = document.getElementsByTagName('body')[0];\\n myCanvas.parent(body);\\n}\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n //move the canvas to the vertical mouse position\\n //relative to the window\\n myCanvas.position(windowWidth / 2, winMouseY + 1);\\n\\n //the x of the square is relative to the canvas\\n rect(mouseX, 20, 60, 60);\\n}\\n
The system variable pwinMouseX always contains the horizontal position\\nof the mouse in the frame previous to the current frame, relative to\\n(0, 0) of the window. Note: pwinMouseX will be reset to the current winMouseX\\nvalue at the start of each touch event.
\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n noStroke();\\n fill(237, 34, 93);\\n}\\n\\nfunction draw() {\\n clear();\\n //the difference between previous and\\n //current x position is the horizontal mouse speed\\n let speed = abs(winMouseX - pwinMouseX);\\n //change the size of the circle\\n //according to the horizontal speed\\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\\n //move the canvas to the mouse position\\n myCanvas.position(winMouseX + 1, winMouseY + 1);\\n}\\n
The system variable pwinMouseY always contains the vertical position of\\nthe mouse in the frame previous to the current frame, relative to (0, 0)\\nof the window. Note: pwinMouseY will be reset to the current winMouseY\\nvalue at the start of each touch event.
\\nlet myCanvas;\\n\\nfunction setup() {\\n //use a variable to store a pointer to the canvas\\n myCanvas = createCanvas(100, 100);\\n noStroke();\\n fill(237, 34, 93);\\n}\\n\\nfunction draw() {\\n clear();\\n //the difference between previous and\\n //current y position is the vertical mouse speed\\n let speed = abs(winMouseY - pwinMouseY);\\n //change the size of the circle\\n //according to the vertical speed\\n ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\\n //move the canvas to the mouse position\\n myCanvas.position(winMouseX + 1, winMouseY + 1);\\n}\\n
Processing automatically tracks if the mouse button is pressed and which\\nbutton is pressed. The value of the system variable mouseButton is either\\nLEFT, RIGHT, or CENTER depending on which button was pressed last.\\nWarning: different browsers may track mouseButton differently.
\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n if (mouseIsPressed) {\\n if (mouseButton === LEFT) {\\n ellipse(50, 50, 50, 50);\\n }\\n if (mouseButton === RIGHT) {\\n rect(25, 25, 50, 50);\\n }\\n if (mouseButton === CENTER) {\\n triangle(23, 75, 50, 20, 78, 75);\\n }\\n }\\n\\n print(mouseButton);\\n}\\n
The boolean system variable mouseIsPressed is true if the mouse is pressed\\nand false if not.
\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n\\n if (mouseIsPressed) {\\n ellipse(50, 50, 50, 50);\\n } else {\\n rect(25, 25, 50, 50);\\n }\\n\\n print(mouseIsPressed);\\n}\\n
The mouseMoved() function is called every time the mouse moves and a mouse\\nbutton is not pressed.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
optional MouseEvent callback argument.
\\n// Move the mouse across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n
\\nfunction mouseMoved() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseMoved(event) {\\n console.log(event);\\n}\\n
The mouseDragged() function is called once every time the mouse moves and\\na mouse button is pressed. If no mouseDragged() function is defined, the\\ntouchMoved() function will be called instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\n// Drag the mouse across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseDragged() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n
\\nfunction mouseDragged() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseDragged(event) {\\n console.log(event);\\n}\\n
The mousePressed() function is called once after every time a mouse button\\nis pressed. The mouseButton variable (see the related reference entry)\\ncan be used to determine which button has been pressed. If no\\nmousePressed() function is defined, the touchStarted() function will be\\ncalled instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\n// Click within the image to change\\n// the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mousePressed() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction mousePressed() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mousePressed(event) {\\n console.log(event);\\n}\\n
The mouseReleased() function is called every time a mouse button is\\nreleased. If no mouseReleased() function is defined, the touchEnded()\\nfunction will be called instead if it is defined.\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction mouseReleased() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction mouseReleased() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseReleased(event) {\\n console.log(event);\\n}\\n
The mouseClicked() function is called once after a mouse button has been\\npressed and then released.\\nBrowsers handle clicks differently, so this function is only guaranteed to be\\nrun when the left mouse button is clicked. To handle other mouse buttons\\nbeing pressed or released, see mousePressed() or mouseReleased().\\nBrowsers may have different default\\nbehaviors attached to various mouse events. To prevent any default\\nbehavior for this event, add "return false" to the end of the method.
\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction mouseClicked() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction mouseClicked() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction mouseClicked(event) {\\n console.log(event);\\n}\\n
The doubleClicked() function is executed every time a event\\nlistener has detected a dblclick event which is a part of the\\nDOM L3 specification. The doubleClicked event is fired when a\\npointing device button (usually a mouse's primary button)\\nis clicked twice on a single element. For more info on the\\ndblclick event refer to mozilla's documentation here:\\nhttps://developer.mozilla.org/en-US/docs/Web/Events/dblclick
\\n// Click within the image to change\\n// the value of the rectangle\\n// after the mouse has been double clicked\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\n\\nfunction doubleClicked() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction doubleClicked() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a MouseEvent object\\n// as a callback argument\\nfunction doubleClicked(event) {\\n console.log(event);\\n}\\n
The function mouseWheel() is executed every time a vertical mouse wheel\\nevent is detected either triggered by an actual mouse wheel or by a\\ntouchpad.\\nThe event.delta property returns the amount the mouse wheel\\nhave scrolled. The values can be positive or negative depending on the\\nscroll direction (on OS X with "natural" scrolling enabled, the signs\\nare inverted).\\nBrowsers may have different default behaviors attached to various\\nmouse events. To prevent any default behavior for this event, add\\n"return false" to the end of the method.\\nDue to the current support of the "wheel" event on Safari, the function\\nmay only work as expected if "return false" is included while using Safari.
optional WheelEvent callback argument.
\\nlet pos = 25;\\n\\nfunction draw() {\\n background(237, 34, 93);\\n fill(0);\\n rect(25, pos, 50, 50);\\n}\\n\\nfunction mouseWheel(event) {\\n print(event.delta);\\n //move the square according to the vertical scroll amount\\n pos += event.delta;\\n //uncomment to block page scrolling\\n //return false;\\n}\\n
The system variable touches[] contains an array of the positions of all\\ncurrent touch points, relative to (0, 0) of the canvas, and IDs identifying a\\nunique touch as it moves. Each element in the array is an object with x, y,\\nand id properties.
The touches[] array is not supported on Safari and IE on touch-based\\ndesktops (laptops).
\\n// On a touchscreen device, touch\\n// the canvas using one or more fingers\\n// at the same time\\nfunction draw() {\\n clear();\\n let display = touches.length + ' touches';\\n text(display, 5, 10);\\n}\\n
The touchStarted() function is called once after every time a touch is\\nregistered. If no touchStarted() function is defined, the mousePressed()\\nfunction will be called instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.
optional TouchEvent callback argument.
\\n// Touch within the image to change\\n// the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchStarted() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction touchStarted() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchStarted(event) {\\n console.log(event);\\n}\\n
The touchMoved() function is called every time a touch move is registered.\\nIf no touchMoved() function is defined, the mouseDragged() function will\\nbe called instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.
\\n// Move your finger across the page\\n// to change its value\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchMoved() {\\n value = value + 5;\\n if (value > 255) {\\n value = 0;\\n }\\n}\\n
\\nfunction touchMoved() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchMoved(event) {\\n console.log(event);\\n}\\n
The touchEnded() function is called every time a touch ends. If no\\ntouchEnded() function is defined, the mouseReleased() function will be\\ncalled instead if it is defined.\\nBrowsers may have different default behaviors attached to various touch\\nevents. To prevent any default behavior for this event, add "return false"\\nto the end of the method.
\\n// Release touch within the image to\\n// change the value of the rectangle\\n\\nlet value = 0;\\nfunction draw() {\\n fill(value);\\n rect(25, 25, 50, 50);\\n}\\nfunction touchEnded() {\\n if (value === 0) {\\n value = 255;\\n } else {\\n value = 0;\\n }\\n}\\n
\\nfunction touchEnded() {\\n ellipse(mouseX, mouseY, 5, 5);\\n // prevent default\\n return false;\\n}\\n
\\n// returns a TouchEvent object\\n// as a callback argument\\nfunction touchEnded(event) {\\n console.log(event);\\n}\\n
This module defines the filters for use with image buffers.
This module is basically a collection of functions stored in an object\\nas opposed to modules. The functions are destructive, modifying\\nthe passed in canvas rather than creating a copy.
Generally speaking users of this module will use the Filters.apply method\\non a canvas to create an effect.
A number of functions are borrowed/adapted from\\nhttp://www.html5rocks.com/en/tutorials/canvas/imagefilters/\\nor the java processing implementation.
This module defines the p5 methods for the p5.Image class\\nfor drawing images to the main display canvas.
Creates a new p5.Image (the datatype for storing images). This provides a\\nfresh buffer of pixels to play with. Set the size of the buffer with the\\nwidth and height parameters.\\n\\n.pixels gives access to an array containing the values for all the pixels\\nin the display window.\\nThese values are numbers. This array is the size (including an appropriate\\nfactor for the pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. See .pixels for\\nmore info. It may also be simpler to use set() or get().\\n\\nBefore accessing the pixels of an image, the data must loaded with the\\nloadPixels() function. After the array data has been modified, the\\nupdatePixels() function must be run to update the changes.
width in pixels
height in pixels
\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n
\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < img.width; i++) {\\n for (let j = 0; j < img.height; j++) {\\n img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\\n }\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\nimage(img, 34, 34);\\n
\\nlet pink = color(255, 102, 204);\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nlet d = pixelDensity();\\nlet halfImage = 4 * (img.width * d) * (img.height / 2 * d);\\nfor (let i = 0; i < halfImage; i += 4) {\\n img.pixels[i] = red(pink);\\n img.pixels[i + 1] = green(pink);\\n img.pixels[i + 2] = blue(pink);\\n img.pixels[i + 3] = alpha(pink);\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n
Save the current canvas as an image. The browser will either save the\\nfile immediately, or prompt the user with a dialogue window.
\\n function setup() {\\n let c = createCanvas(100, 100);\\n background(255, 0, 0);\\n saveCanvas(c, 'myCanvas', 'jpg');\\n }\\n
\\n // note that this example has the same result as above\\n // if no canvas is specified, defaults to main canvas\\n function setup() {\\n let c = createCanvas(100, 100);\\n background(255, 0, 0);\\n saveCanvas('myCanvas', 'jpg');\\n\\n // all of the following are valid\\n saveCanvas(c, 'myCanvas', 'jpg');\\n saveCanvas(c, 'myCanvas.jpg');\\n saveCanvas(c, 'myCanvas');\\n saveCanvas(c);\\n saveCanvas('myCanvas', 'png');\\n saveCanvas('myCanvas');\\n saveCanvas();\\n }\\n
a variable\\n representing a specific html5 canvas (optional)
'jpg' or 'png'
Capture a sequence of frames that can be used to create a movie.\\nAccepts a callback. For example, you may wish to send the frames\\nto a server where they can be stored or converted into a movie.\\nIf no callback is provided, the browser will pop up save dialogues in an\\nattempt to download all of the images that have just been created. With the\\ncallback provided the image data isn't saved by default but instead passed\\nas an argument to the callback function as an array of objects, with the\\nsize of array equal to the total number of frames.
Note that saveFrames() will only save the first 15 frames of an animation.\\nTo export longer animations, you might look into a library like\\nccapture.js.
Duration in seconds to save the frames for.
Framerate to save the frames in.
A callback function that will be executed\\n to handle the image data. This function\\n should accept an array as argument. The\\n array will contain the specified number of\\n frames of objects. Each object has three\\n properties: imageData - an\\n image/octet-stream, filename and extension.
\\n function draw() {\\n background(mouseX);\\n }\\n\\n function mousePressed() {\\n saveFrames('out', 'png', 1, 25, data => {\\n print(data);\\n });\\n }\\n
Loads an image from a path and creates a p5.Image from it.\\n\\nThe image may not be immediately available for rendering\\nIf you want to ensure that the image is ready before doing\\nanything with it, place the loadImage() call in preload().\\nYou may also supply a callback function to handle the image when it's ready.\\n\\nThe path to the image should be relative to the HTML file\\nthat links in your sketch. Loading an image from a URL or other\\nremote location may be blocked due to your browser's built-in\\nsecurity.
Path of the image to be loaded
Function to be called once\\n the image is loaded. Will be passed the\\n p5.Image.
called with event error if\\n the image fails to load.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n}\\n
\\nfunction setup() {\\n // here we use a callback to display the image after loading\\n loadImage('assets/laDefense.jpg', img => {\\n image(img, 0, 0);\\n });\\n}\\n
Draw an image to the p5.js canvas.
This function can be used with different numbers of parameters. The\\nsimplest use requires only three parameters: img, x, and y—where (x, y) is\\nthe position of the image. Two more parameters can optionally be added to\\nspecify the width and height of the image.
This function can also be used with all eight Number parameters. To\\ndifferentiate between all these parameters, p5.js uses the language of\\n"destination rectangle" (which corresponds to "dx", "dy", etc.) and "source\\nimage" (which corresponds to "sx", "sy", etc.) below. Specifying the\\n"source image" dimensions can be useful when you want to display a\\nsubsection of the source image instead of the whole thing. Here's a diagram\\nto explain further:\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n // Top-left corner of the img is at (0, 0)\\n // Width and height are the img's original width and height\\n image(img, 0, 0);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n background(50);\\n // Top-left corner of the img is at (10, 10)\\n // Width and height are 50 x 50\\n image(img, 10, 10, 50, 50);\\n}\\n
\\nfunction setup() {\\n // Here, we use a callback to display the image after loading\\n loadImage('assets/laDefense.jpg', img => {\\n image(img, 0, 0);\\n });\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/gradient.png');\\n}\\nfunction setup() {\\n // 1. Background image\\n // Top-left corner of the img is at (0, 0)\\n // Width and height are the img's original width and height, 100 x 100\\n image(img, 0, 0);\\n // 2. Top right image\\n // Top-left corner of destination rectangle is at (50, 0)\\n // Destination rectangle width and height are 40 x 20\\n // The next parameters are relative to the source image:\\n // - Starting at position (50, 50) on the source image, capture a 50 x 50\\n // subsection\\n // - Draw this subsection to fill the dimensions of the destination rectangle\\n image(img, 50, 0, 40, 20, 50, 50, 50, 50);\\n}\\n
the image to display
the x-coordinate of the top-left corner of the image
the y-coordinate of the top-left corner of the image
the width to draw the image
the height to draw the image
the x-coordinate of the destination\\n rectangle in which to draw the source image
the y-coordinate of the destination\\n rectangle in which to draw the source image
the width of the destination rectangle
the height of the destination rectangle
the x-coordinate of the subsection of the source\\nimage to draw into the destination rectangle
the y-coordinate of the subsection of the source\\nimage to draw into the destination rectangle
the width of the subsection of the\\n source image to draw into the destination\\n rectangle
the height of the subsection of the\\n source image to draw into the destination rectangle
Sets the fill value for displaying images. Images can be tinted to\\nspecified colors or made transparent by including an alpha value.\\n\\nTo apply transparency to an image without affecting its color, use\\nwhite as the tint color and specify an alpha value. For instance,\\ntint(255, 128) will make an image 50% transparent (assuming the default\\nalpha range of 0-255, which can be changed with colorMode()).\\n\\nThe value for the gray parameter must be less than or equal to the current\\nmaximum value as specified by colorMode(). The default maximum value is\\n255.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(0, 153, 204); // Tint blue\\n image(img, 50, 0);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(0, 153, 204, 126); // Tint blue and set transparency\\n image(img, 50, 0);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n tint(255, 126); // Apply transparency without changing color\\n image(img, 50, 0);\\n}\\n
the tint color
Removes the current fill value for displaying images and reverts to\\ndisplaying images with their original hues.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n tint(0, 153, 204); // Tint blue\\n image(img, 0, 0);\\n noTint(); // Disable tint\\n image(img, 50, 0);\\n}\\n
Set image mode. Modifies the location from which images are drawn by\\nchanging the way in which parameters given to image() are interpreted.\\nThe default mode is imageMode(CORNER), which interprets the second and\\nthird parameters of image() as the upper-left corner of the image. If\\ntwo additional parameters are specified, they are used to set the image's\\nwidth and height.\\n\\nimageMode(CORNERS) interprets the second and third parameters of image()\\nas the location of one corner, and the fourth and fifth parameters as the\\nopposite corner.\\n\\nimageMode(CENTER) interprets the second and third parameters of image()\\nas the image's center point. If two additional parameters are specified,\\nthey are used to set the image's width and height.
either CORNER, CORNERS, or CENTER
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CORNER);\\n image(img, 10, 10, 50, 50);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CORNERS);\\n image(img, 10, 10, 90, 40);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n imageMode(CENTER);\\n image(img, 50, 50, 80, 80);\\n}\\n
This module defines the p5.Image class and P5 methods for\\ndrawing images to the main display canvas.
Image width.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n image(img, 0, 0);\\n for (let i = 0; i < img.width; i++) {\\n let c = img.get(i, img.height / 2);\\n stroke(c);\\n line(i, height / 2, i, height);\\n }\\n}\\n
Image height.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n image(img, 0, 0);\\n for (let i = 0; i < img.height; i++) {\\n let c = img.get(img.width / 2, i);\\n stroke(c);\\n line(0, i, width / 2, i);\\n }\\n}\\n
Array containing the values for all the pixels in the display window.\\nThese values are numbers. This array is the size (include an appropriate\\nfactor for pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. Retina and other\\nhigh denisty displays may have more pixels (by a factor of\\npixelDensity^2).\\nFor example, if the image is 100x100 pixels, there will be 40,000. With\\npixelDensity = 2, there will be 160,000. The first four values\\n(indices 0-3) in the array will be the R, G, B, A values of the pixel at\\n(0, 0). The second four values (indices 4-7) will contain the R, G, B, A\\nvalues of the pixel at (1, 0). More generally, to set values for a pixel\\nat (x, y):
let d = pixelDensity();\\nfor (let i = 0; i < d; i++) {\\n for (let j = 0; j < d; j++) {\\n // loop over\\n index = 4 * ((y * d + j) * width * d + (x * d + i));\\n pixels[index] = r;\\n pixels[index+1] = g;\\n pixels[index+2] = b;\\n pixels[index+3] = a;\\n }\\n}\\n
\\nBefore accessing this array, the data must loaded with the loadPixels()\\nfunction. After the array data has been modified, the updatePixels()\\nfunction must be run to update the changes.
\\nlet pink = color(255, 102, 204);\\nlet img = createImage(66, 66);\\nimg.loadPixels();\\nfor (let i = 0; i < 4 * (width * height / 2); i += 4) {\\n img.pixels[i] = red(pink);\\n img.pixels[i + 1] = green(pink);\\n img.pixels[i + 2] = blue(pink);\\n img.pixels[i + 3] = alpha(pink);\\n}\\nimg.updatePixels();\\nimage(img, 17, 17);\\n
Loads the pixels data for this image into the [pixels] attribute.
\\nlet myImage;\\nlet halfImage;\\n\\nfunction preload() {\\n myImage = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n myImage.loadPixels();\\n halfImage = 4 * myImage.width * myImage.height / 2;\\n for (let i = 0; i < halfImage; i++) {\\n myImage.pixels[i + halfImage] = myImage.pixels[i];\\n }\\n myImage.updatePixels();\\n}\\n\\nfunction draw() {\\n image(myImage, 0, 0, width, height);\\n}\\n
Updates the backing canvas for this image with the contents of\\nthe [pixels] array.
x-offset of the target update area for the\\n underlying canvas
y-offset of the target update area for the\\n underlying canvas
height of the target update area for the\\n underlying canvas
Get a region of pixels from an image.
If no params are passed, the whole image is returned.\\nIf x and y are the only params passed a single pixel is extracted.\\nIf all params are passed a rectangle region is extracted and a p5.Image\\nis returned.
\\nlet myImage;\\nlet c;\\n\\nfunction preload() {\\n myImage = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n background(myImage);\\n noStroke();\\n c = myImage.get(60, 90);\\n fill(c);\\n rect(25, 25, 50, 50);\\n}\\n\\n//get() returns color here\\n
x-coordinate of the pixel
y-coordinate of the pixel
Set the color of a single pixel or write an image into\\nthis p5.Image.
Note that for a large number of pixels this will\\nbe slower than directly manipulating the pixels array\\nand then calling updatePixels().
grayscale value | pixel array |\\n a p5.Color | image to copy
Resize the image to a new width and height. To make the image scale\\nproportionally, use 0 as the value for the wide or high parameter.\\nFor instance, to make the width of an image 150 pixels, and change\\nthe height using the same proportion, use resize(150, 0).
the resized image width
the resized image height
\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction draw() {\\n image(img, 0, 0);\\n}\\n\\nfunction mousePressed() {\\n img.resize(50, 100);\\n}\\n
Copies a region of pixels from one image to another. If no\\nsrcImage is specified this is used as the source. If the source\\nand destination regions aren't the same size, it will\\nautomatically resize source pixels to fit the specified\\ntarget region.
\\nlet photo;\\nlet bricks;\\nlet x;\\nlet y;\\n\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks.jpg');\\n}\\n\\nfunction setup() {\\n x = bricks.width / 2;\\n y = bricks.height / 2;\\n photo.copy(bricks, 0, 0, x, y, 0, 0, x, y);\\n image(photo, 0, 0);\\n}\\n
source image
X coordinate of the source's upper left corner
Y coordinate of the source's upper left corner
source image width
source image height
X coordinate of the destination's upper left corner
Y coordinate of the destination's upper left corner
destination image width
destination image height
Masks part of an image from displaying by loading another\\nimage and using it's alpha channel as an alpha channel for\\nthis image.
\\nlet photo, maskImage;\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n maskImage = loadImage('assets/mask2.png');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100);\\n photo.mask(maskImage);\\n image(photo, 0, 0);\\n}\\n
Applies an image filter to a p5.Image
either THRESHOLD, GRAY, OPAQUE, INVERT,\\n POSTERIZE, BLUR, ERODE, DILATE or BLUR.\\n See Filters.js for docs on\\n each available filter
an optional parameter unique\\n to each filter, see above
\\nlet photo1;\\nlet photo2;\\n\\nfunction preload() {\\n photo1 = loadImage('assets/rockies.jpg');\\n photo2 = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n photo2.filter(GRAY);\\n image(photo1, 0, 0);\\n image(photo2, width / 2, 0);\\n}\\n
Copies a region of pixels from one image to another, using a specified\\nblend mode to do the operation.
\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n
\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n
\\nlet mountains;\\nlet bricks;\\n\\nfunction preload() {\\n mountains = loadImage('assets/rockies.jpg');\\n bricks = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\\n image(mountains, 0, 0);\\n image(bricks, 0, 0);\\n}\\n
the blend mode. either\\n BLEND, DARKEST, LIGHTEST, DIFFERENCE,\\n MULTIPLY, EXCLUSION, SCREEN, REPLACE, OVERLAY, HARD_LIGHT,\\n SOFT_LIGHT, DODGE, BURN, ADD or NORMAL.
Available blend modes are: normal | multiply | screen | overlay |\\n darken | lighten | color-dodge | color-burn | hard-light |\\n soft-light | difference | exclusion | hue | saturation |\\n color | luminosity
http://blogs.adobe.com/webplatform/2013/01/28/blending-features-in-canvas/
Saves the image to a file and force the browser to download it.\\nAccepts two strings for filename and file extension\\nSupports png (default) and jpg.
give your file a name
'png' or 'jpg'
\\nlet photo;\\n\\nfunction preload() {\\n photo = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction draw() {\\n image(photo, 0, 0);\\n}\\n\\nfunction keyTyped() {\\n if (key === 's') {\\n photo.save('photo', 'png');\\n }\\n}\\n
Uint8ClampedArray\\ncontaining the values for all the pixels in the display window.\\nThese values are numbers. This array is the size (include an appropriate\\nfactor for pixelDensity) of the display window x4,\\nrepresenting the R, G, B, A values in order for each pixel, moving from\\nleft to right across each row, then down each column. Retina and other\\nhigh density displays will have more pixels[] (by a factor of\\npixelDensity^2).\\nFor example, if the image is 100x100 pixels, there will be 40,000. On a\\nretina display, there will be 160,000.\\n\\nThe first four values (indices 0-3) in the array will be the R, G, B, A\\nvalues of the pixel at (0, 0). The second four values (indices 4-7) will\\ncontain the R, G, B, A values of the pixel at (1, 0). More generally, to\\nset values for a pixel at (x, y):
While the above method is complex, it is flexible enough to work with\\nany pixelDensity. Note that set() will automatically take care of\\nsetting all the appropriate values in pixels[] for a given (x, y) at\\nany pixelDensity, but the performance may not be as fast when lots of\\nmodifications are made to the pixel array.\\n\\nBefore accessing this array, the data must loaded with the loadPixels()\\nfunction. After the array data has been modified, the updatePixels()\\nfunction must be run to update the changes.\\n\\nNote that this is not a standard javascript array. This means that\\nstandard javascript functions such as slice() or\\narrayCopy() do not\\nwork.
\\nlet pink = color(255, 102, 204);\\nloadPixels();\\nlet d = pixelDensity();\\nlet halfImage = 4 * (width * d) * (height / 2 * d);\\nfor (let i = 0; i < halfImage; i += 4) {\\n pixels[i] = red(pink);\\n pixels[i + 1] = green(pink);\\n pixels[i + 2] = blue(pink);\\n pixels[i + 3] = alpha(pink);\\n}\\nupdatePixels();\\n
\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\\n}\\n
\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\\n}\\n
\\nlet img0;\\nlet img1;\\n\\nfunction preload() {\\n img0 = loadImage('assets/rockies.jpg');\\n img1 = loadImage('assets/bricks_third.jpg');\\n}\\n\\nfunction setup() {\\n background(img0);\\n image(img1, 0, 0);\\n blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\\n}\\n
Copies a region of the canvas to another region of the canvas\\nand copies a region of pixels from an image used as the srcImg parameter\\ninto the canvas srcImage is specified this is used as the source. If\\nthe source and destination regions aren't the same size, it will\\nautomatically resize source pixels to fit the specified\\ntarget region.
\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n background(img);\\n copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\\n stroke(255);\\n noFill();\\n // Rectangle shows area being copied\\n rect(7, 22, 10, 10);\\n}\\n
Applies a filter to the canvas.\\n
The presets options are:\\n
THRESHOLD\\nConverts the image to black and white pixels depending if they are above or\\nbelow the threshold defined by the level parameter. The parameter must be\\nbetween 0.0 (black) and 1.0 (white). If no level is specified, 0.5 is used.\\n
GRAY\\nConverts any colors in the image to grayscale equivalents. No parameter\\nis used.\\n
OPAQUE\\nSets the alpha channel to entirely opaque. No parameter is used.\\n
INVERT\\nSets each pixel to its inverse value. No parameter is used.\\n
POSTERIZE\\nLimits each channel of the image to the number of colors specified as the\\nparameter. The parameter can be set to values between 2 and 255, but\\nresults are most noticeable in the lower ranges.\\n
BLUR\\nExecutes a Gaussian blur with the level parameter specifying the extent\\nof the blurring. If no parameter is used, the blur is equivalent to\\nGaussian blur of radius 1. Larger values increase the blur.\\n
ERODE\\nReduces the light areas. No parameter is used.\\n
DILATE\\nIncreases the light areas. No parameter is used.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(THRESHOLD);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(GRAY);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(OPAQUE);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(INVERT);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(POSTERIZE, 3);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(DILATE);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(BLUR, 3);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/bricks.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n filter(ERODE);\\n}\\n
Get a region of pixels, or a single pixel, from the canvas.
Returns an array of [R,G,B,A] values for any pixel or grabs a section of\\nan image. If no parameters are specified, the entire image is returned.\\nUse the x and y parameters to get the value of one pixel. Get a section of\\nthe display window by specifying additional w and h parameters. When\\ngetting an image, the x and y parameters define the coordinates for the\\nupper-left corner of the image, regardless of the current imageMode().\\n\\nTo get the color components scaled according to the current color ranges\\nand taking into account colorMode, use getColor instead of get.\\n\\nGetting the color of a single pixel with get(x, y) is easy, but not as fast\\nas grabbing the data directly from pixels[]. The equivalent statement to\\nget(x, y) using pixels[] with pixel density d is
let x, y, d; // set these to the coordinates\\nlet off = (y * width + x) * d * 4;\\nlet components = [\\n pixels[off],\\n pixels[off + 1],\\n pixels[off + 2],\\n pixels[off + 3]\\n];\\nprint(components);\\n
See the reference for pixels[] for more information.
If you want to extract an array of colors or a subimage from an p5.Image object,\\ntake a look at p5.Image.get()
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n let c = get();\\n image(c, width / 2, 0);\\n}\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\nfunction setup() {\\n image(img, 0, 0);\\n let c = get(50, 90);\\n fill(c);\\n noStroke();\\n rect(25, 25, 50, 50);\\n}\\n
Loads the pixel data for the display window into the pixels[] array. This\\nfunction must always be called before reading from or writing to pixels[].\\nNote that only changes made with set() or direct manipulation of pixels[]\\nwill occur.
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n image(img, 0, 0, width, height);\\n let d = pixelDensity();\\n let halfImage = 4 * (width * d) * (height * d / 2);\\n loadPixels();\\n for (let i = 0; i < halfImage; i++) {\\n pixels[i + halfImage] = pixels[i];\\n }\\n updatePixels();\\n}\\n
Changes the color of any pixel, or writes an image directly to the\\ndisplay window.
The x and y parameters specify the pixel to change and the c parameter\\nspecifies the color value. This can be a p5.Color object, or [R, G, B, A]\\npixel array. It can also be a single grayscale value.\\nWhen setting an image, the x and y parameters define the coordinates for\\nthe upper-left corner of the image, regardless of the current imageMode().\\n
\\nAfter using set(), you must call updatePixels() for your changes to appear.\\nThis should be called once all pixels have been set, and must be called before\\ncalling .get() or drawing the image.\\n
Setting the color of a single pixel with set(x, y) is easy, but not as\\nfast as putting the data directly into pixels[]. Setting the pixels[]\\nvalues directly may be complicated when working with a retina display,\\nbut will perform better when lots of pixels need to be set directly on\\nevery loop.
insert a grayscale value | a pixel array |\\n a p5.Color object | a p5.Image to copy
\\nlet black = color(0);\\nset(30, 20, black);\\nset(85, 20, black);\\nset(85, 75, black);\\nset(30, 75, black);\\nupdatePixels();\\n
\\nfor (let i = 30; i < width - 15; i++) {\\n for (let j = 20; j < height - 25; j++) {\\n let c = color(204 - j, 153 - i, 0);\\n set(i, j, c);\\n }\\n}\\nupdatePixels();\\n
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies.jpg');\\n}\\n\\nfunction setup() {\\n set(0, 0, img);\\n updatePixels();\\n line(0, 0, width, height);\\n line(0, height, width, 0);\\n}\\n
Updates the display window with the data in the pixels[] array.\\nUse in conjunction with loadPixels(). If you're only reading pixels from\\nthe array, there's no need to call updatePixels() — updating is only\\nnecessary to apply changes. updatePixels() should be called anytime the\\npixels array is manipulated or set() is called, and only changes made with\\nset() or direct changes to pixels[] will occur.
x-coordinate of the upper-left corner of region\\n to update
y-coordinate of the upper-left corner of region\\n to update
width of region to update
height of region to update
Loads a JSON file from a file or a URL, and returns an Object.\\nNote that even if the JSON file contains an Array, an Object will be\\nreturned with index numbers as keys.
This method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. JSONP is supported via a polyfill and you\\ncan pass in as the second argument an object with definitions of the json\\ncallback following the syntax specified here.
This method is suitable for fetching files up to size of 64MB.
Calling loadJSON() inside preload() guarantees to complete the\\noperation before setup() and draw() are called.
\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\nlet earthquakes;\\nfunction preload() {\\n // Get the most recent earthquake in the database\\n let url =\\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\\n 'summary/all_day.geojson';\\n earthquakes = loadJSON(url);\\n}\\n\\nfunction setup() {\\n noLoop();\\n}\\n\\nfunction draw() {\\n background(200);\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n}\\n
Outside of preload(), you may supply a callback function to handle the\\nobject:
\\nfunction setup() {\\n noLoop();\\n let url =\\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\\n 'summary/all_day.geojson';\\n loadJSON(url, drawEarthquake);\\n}\\n\\nfunction draw() {\\n background(200);\\n}\\n\\nfunction drawEarthquake(earthquakes) {\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n}\\n
name of the file or url to load
options object for jsonp related settings
"json" or "jsonp"
function to be executed after\\n loadJSON() completes, data is passed\\n in as first argument
function to be executed if\\n there is an error, response is passed\\n in as first argument
Reads the contents of a file and creates a String array of its individual\\nlines. If the name of the file is used as the parameter, as in the above\\nexample, the file must be located in the sketch directory/folder.\\n\\nAlternatively, the file maybe be loaded from anywhere on the local\\ncomputer using an absolute path (something that starts with / on Unix and\\nLinux, or a drive letter on Windows), or the filename parameter can be a\\nURL for a file found on a network.\\n\\nThis method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed.
function to be executed after loadStrings()\\n completes, Array is passed in as first\\n argument
Calling loadStrings() inside preload() guarantees to complete the\\noperation before setup() and draw() are called.
\\nlet result;\\nfunction preload() {\\n result = loadStrings('assets/test.txt');\\n}\\n\\nfunction setup() {\\n background(200);\\n let ind = floor(random(result.length));\\n text(result[ind], 10, 10, 80, 80);\\n}\\n
\\nfunction setup() {\\n loadStrings('assets/test.txt', pickString);\\n}\\n\\nfunction pickString(result) {\\n background(200);\\n let ind = floor(random(result.length));\\n text(result[ind], 10, 10, 80, 80);\\n}\\n
Reads the contents of a file or URL and creates a p5.Table object with\\nits values. If a file is specified, it must be located in the sketch's\\n"data" folder. The filename parameter can also be a URL to a file found\\nonline. By default, the file is assumed to be comma-separated (in CSV\\nformat). Table only looks for a header row if the 'header' option is\\nincluded.
Possible options include:\\n
When passing in multiple options, pass them in as separate parameters,\\nseperated by commas. For example:\\n\\n\\nloadTable('my_csv_file.csv', 'csv', 'header');\\n\\n
\\nloadTable('my_csv_file.csv', 'csv', 'header');\\n
All files loaded and saved use UTF-8 encoding.
This method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. Calling loadTable() inside preload()\\nguarantees to complete the operation before setup() and draw() are called.\\n
\\n// Given the following CSV file called \\\"mammals.csv\\\"\\n// located in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n //the file can be remote\\n //table = loadTable(\\\"http://p5js.org/reference/assets/mammals.csv\\\",\\n // \\\"csv\\\", \\\"header\\\");\\n}\\n\\nfunction setup() {\\n //count the columns\\n print(table.getRowCount() + ' total rows in table');\\n print(table.getColumnCount() + ' total columns in table');\\n\\n print(table.getColumn('name'));\\n //[\\\"Goat\\\", \\\"Leopard\\\", \\\"Zebra\\\"]\\n\\n //cycle through the table\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++) {\\n print(table.getString(r, c));\\n }\\n}\\n
name of the file or URL to load
"header" "csv" "tsv"
function to be executed after\\n loadTable() completes. On success, the\\n Table object is passed in as the\\n first argument.
Reads the contents of a file and creates an XML object with its values.\\nIf the name of the file is used as the parameter, as in the above example,\\nthe file must be located in the sketch directory/folder.
Alternatively, the file maybe be loaded from anywhere on the local\\ncomputer using an absolute path (something that starts with / on Unix and\\nLinux, or a drive letter on Windows), or the filename parameter can be a\\nURL for a file found on a network.
This method is asynchronous, meaning it may not finish before the next\\nline in your sketch is executed. Calling loadXML() inside preload()\\nguarantees to complete the operation before setup() and draw() are called.
Outside of preload(), you may supply a callback function to handle the\\nobject.
function to be executed after loadXML()\\n completes, XML object is passed in as\\n first argument
function to be executed after loadBytes()\\n completes
function to be executed if there\\n is an error
\\nlet data;\\n\\nfunction preload() {\\n data = loadBytes('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n for (let i = 0; i < 5; i++) {\\n console.log(data.bytes[i].toString(16));\\n }\\n}\\n
Method for executing an HTTP GET request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\\ncalling httpDo(path, 'GET'). The 'binary' datatype will return\\na Blob object, and the 'arrayBuffer' datatype will return an ArrayBuffer\\nwhich can be used to initialize typed arrays (such as Uint8Array).
httpDo(path, 'GET')
\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\nlet earthquakes;\\nfunction preload() {\\n // Get the most recent earthquake in the database\\n let url =\\n 'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\\n 'format=geojson&limit=1&orderby=time';\\n httpGet(url, 'jsonp', false, function(response) {\\n // when the HTTP request completes, populate the variable that holds the\\n // earthquake data used in the visualization.\\n earthquakes = response;\\n });\\n}\\n\\nfunction draw() {\\n if (!earthquakes) {\\n // Wait until the earthquake data has loaded before drawing.\\n return;\\n }\\n background(200);\\n // Get the magnitude and name of the earthquake out of the loaded JSON\\n let earthquakeMag = earthquakes.features[0].properties.mag;\\n let earthquakeName = earthquakes.features[0].properties.place;\\n ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\\n textAlign(CENTER);\\n text(earthquakeName, 0, height - 30, width, 30);\\n noLoop();\\n}\\n
"json", "jsonp", "binary", "arrayBuffer",\\n "xml", or "text"
param data passed sent with request
function to be executed after\\n httpGet() completes, data is passed in\\n as first argument
Method for executing an HTTP POST request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text. This is equivalent to\\ncalling httpDo(path, 'POST').
httpDo(path, 'POST')
\\n// Examples use jsonplaceholder.typicode.com for a Mock Data API\\n\\nlet url = 'https://jsonplaceholder.typicode.com/posts';\\nlet postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is way cool.' };\\n\\nfunction setup() {\\n createCanvas(800, 800);\\n}\\n\\nfunction mousePressed() {\\n // Pick new random color values\\n let r = random(255);\\n let g = random(255);\\n let b = random(255);\\n\\n httpPost(url, 'json', postData, function(result) {\\n strokeWeight(2);\\n stroke(r, g, b);\\n fill(r, g, b, 127);\\n ellipse(mouseX, mouseY, 200, 200);\\n text(result.body, mouseX, mouseY);\\n });\\n}\\n
\\nlet url = 'https://invalidURL'; // A bad URL that will cause errors\\nlet postData = { title: 'p5 Clicked!', body: 'p5.js is way cool.' };\\n\\nfunction setup() {\\n createCanvas(800, 800);\\n}\\n\\nfunction mousePressed() {\\n // Pick new random color values\\n let r = random(255);\\n let g = random(255);\\n let b = random(255);\\n\\n httpPost(\\n url,\\n 'json',\\n postData,\\n function(result) {\\n // ... won't be called\\n },\\n function(error) {\\n strokeWeight(2);\\n stroke(r, g, b);\\n fill(r, g, b, 127);\\n text(error.toString(), mouseX, mouseY);\\n }\\n );\\n}\\n
"json", "jsonp", "xml", or "text".\\n If omitted, httpPost() will guess.
function to be executed after\\n httpPost() completes, data is passed in\\n as first argument
Method for executing an HTTP request. If data type is not specified,\\np5 will try to guess based on the URL, defaulting to text.\\nFor more advanced use, you may also pass in the path as the first argument\\nand a object as the second argument, the signature follows the one specified\\nin the Fetch API specification.\\nThis method is suitable for fetching files up to size of 64MB when "GET" is used.
\\n// Examples use USGS Earthquake API:\\n// https://earthquake.usgs.gov/fdsnws/event/1/#methods\\n\\n// displays an animation of all USGS earthquakes\\nlet earthquakes;\\nlet eqFeatureIndex = 0;\\n\\nfunction preload() {\\n let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\\n httpDo(\\n url,\\n {\\n method: 'GET',\\n // Other Request options, like special headers for apis\\n headers: { authorization: 'Bearer secretKey' }\\n },\\n function(res) {\\n earthquakes = res;\\n }\\n );\\n}\\n\\nfunction draw() {\\n // wait until the data is loaded\\n if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\\n return;\\n }\\n clear();\\n\\n let feature = earthquakes.features[eqFeatureIndex];\\n let mag = feature.properties.mag;\\n let rad = mag / 11 * ((width + height) / 2);\\n fill(255, 0, 0, 100);\\n ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\\n\\n if (eqFeatureIndex >= earthquakes.features.length) {\\n eqFeatureIndex = 0;\\n } else {\\n eqFeatureIndex += 1;\\n }\\n}\\n
either "GET", "POST", or "PUT",\\n defaults to "GET"
"json", "jsonp", "xml", or "text"
Request object options as documented in the\\n "fetch" API\\nreference
name of the file to be created
\\nfunction setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n}\\n\\nfunction mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n var writer = createWriter('squares.txt');\\n for (let i = 0; i < 10; i++) {\\n writer.print(i * i);\\n }\\n writer.close();\\n writer.clear();\\n }\\n}\\n
Writes data to the PrintWriter stream
all data to be written by the PrintWriter
\\n// creates a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// write 'Hello world!'' to the file\\nwriter.write(['Hello world!']);\\n// close the PrintWriter and save the file\\nwriter.close();\\n
\\n// creates a file called 'newFile2.txt'\\nlet writer = createWriter('newFile2.txt');\\n// write 'apples,bananas,123' to the file\\nwriter.write(['apples', 'bananas', 123]);\\n// close the PrintWriter and save the file\\nwriter.close();\\n
\\n// creates a file called 'newFile3.txt'\\nlet writer = createWriter('newFile3.txt');\\n// write 'My name is: Teddy' to the file\\nwriter.write('My name is:');\\nwriter.write(' Teddy');\\n// close the PrintWriter and save the file\\nwriter.close();\\n
Writes data to the PrintWriter stream, and adds a new line at the end
all data to be printed by the PrintWriter
\\n// creates a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// creates a file containing\\n// My name is:\\n// Teddy\\nwriter.print('My name is:');\\nwriter.print('Teddy');\\n// close the PrintWriter and save the file\\nwriter.close();\\n
\\nlet writer;\\n\\nfunction setup() {\\n createCanvas(400, 400);\\n // create a PrintWriter\\n writer = createWriter('newFile.txt');\\n}\\n\\nfunction draw() {\\n // print all mouseX and mouseY coordinates to the stream\\n writer.print([mouseX, mouseY]);\\n}\\n\\nfunction mouseClicked() {\\n // close the PrintWriter and save the file\\n writer.close();\\n}\\n
Clears the data already written to the PrintWriter object
\\n// create writer object\\nlet writer = createWriter('newFile.txt');\\nwriter.write(['clear me']);\\n// clear writer object here\\nwriter.clear();\\n// close writer\\nwriter.close();\\n
Closes the PrintWriter
\\n// create a file called 'newFile.txt'\\nlet writer = createWriter('newFile.txt');\\n// close the PrintWriter and save the file\\nwriter.close();\\n
\\n// create a file called 'newFile2.txt'\\nlet writer = createWriter('newFile2.txt');\\n// write some data to the file\\nwriter.write([100, 101, 102]);\\n// close the PrintWriter and save the file\\nwriter.close();\\n
Save an image, text, json, csv, wav, or html. Prompts download to\\nthe client's computer. Note that it is not recommended to call save()\\nwithin draw if it's looping, as the save() function will open a new save\\ndialog every frame.
The default behavior is to save the canvas as an image. You can\\noptionally specify a filename.\\nFor example:
\\n save();\\n save('myCanvas.jpg'); // save a specific canvas with a filename\\n
Alternately, the first parameter can be a pointer to a canvas\\np5.Element, an Array of Strings,\\nan Array of JSON, a JSON object, a p5.Table, a p5.Image, or a\\np5.SoundFile (requires p5.sound). The second parameter is a filename\\n(including extension). The third parameter is for options specific\\nto this type of object. This method will save a file that fits the\\ngiven parameters. For example:
\\n // Saves canvas as an image\\n save('myCanvas.jpg');\\n\\n // Saves pImage as a png image\\n let img = createImage(10, 10);\\n save(img, 'my.png');\\n\\n // Saves canvas as an image\\n let cnv = createCanvas(100, 100);\\n save(cnv, 'myCanvas.jpg');\\n\\n // Saves p5.Renderer object as an image\\n let gb = createGraphics(100, 100);\\n save(gb, 'myGraphics.jpg');\\n\\n let myTable = new p5.Table();\\n\\n // Saves table as html file\\n save(myTable, 'myTable.html');\\n\\n // Comma Separated Values\\n save(myTable, 'myTable.csv');\\n\\n // Tab Separated Values\\n save(myTable, 'myTable.tsv');\\n\\n let myJSON = { a: 1, b: true };\\n\\n // Saves pretty JSON\\n save(myJSON, 'my.json');\\n\\n // Optimizes JSON filesize\\n save(myJSON, 'my.json', true);\\n\\n // Saves array of strings to a text file with line breaks after each item\\n let arrayOfStrings = ['a', 'b'];\\n save(arrayOfStrings, 'my.txt');\\n
If filename is provided, will\\n save canvas as an image with\\n either png or jpg extension\\n depending on the filename.\\n If object is provided, will\\n save depending on the object\\n and filename (see examples\\n above).
If an object is provided as the first\\n parameter, then the second parameter\\n indicates the filename,\\n and should include an appropriate\\n file extension (see examples above).
Additional options depend on\\n filetype. For example, when saving JSON,\\n true indicates that the\\n output will be optimized for filesize,\\n rather than readability.
true
Writes the contents of an Array or a JSON object to a .json file.\\nThe file saving process and location of the saved file will\\nvary between web browsers.
If true, removes line breaks\\n and spaces from the output\\n file to optimize filesize\\n (but not readability).
\\n let json = {}; // new JSON Object\\n\\n json.id = 0;\\n json.species = 'Panthera leo';\\n json.name = 'Lion';\\n\\n function setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n }\\n\\n function mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n saveJSON(json, 'lion.json');\\n }\\n }\\n\\n // saves the following to a file called \\\"lion.json\\\":\\n // {\\n // \\\"id\\\": 0,\\n // \\\"species\\\": \\\"Panthera leo\\\",\\n // \\\"name\\\": \\\"Lion\\\"\\n // }\\n
Writes an array of Strings to a text file, one line per String.\\nThe file saving process and location of the saved file will\\nvary between web browsers.
string array to be written
filename for output
the filename's extension
\\n let words = 'apple bear cat dog';\\n\\n // .split() outputs an Array\\n let list = split(words, ' ');\\n\\n function setup() {\\n createCanvas(100, 100);\\n background(200);\\n text('click here to save', 10, 10, 70, 80);\\n }\\n\\n function mousePressed() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n saveStrings(list, 'nouns.txt');\\n }\\n }\\n\\n // Saves the following to a file called 'nouns.txt':\\n //\\n // apple\\n // bear\\n // cat\\n // dog\\n
Writes the contents of a Table object to a file. Defaults to a\\ntext file with comma-separated-values ('csv') but can also\\nuse tab separation ('tsv'), or generate an HTML table ('html').\\nThe file saving process and location of the saved file will\\nvary between web browsers.
the Table object to save to a file
the filename to which the Table should be saved
can be one of "tsv", "csv", or "html"
\\n let table;\\n\\n function setup() {\\n table = new p5.Table();\\n\\n table.addColumn('id');\\n table.addColumn('species');\\n table.addColumn('name');\\n\\n let newRow = table.addRow();\\n newRow.setNum('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Panthera leo');\\n newRow.setString('name', 'Lion');\\n\\n // To save, un-comment next line then click 'run'\\n // saveTable(table, 'new.csv');\\n }\\n\\n // Saves the following to a file called 'new.csv':\\n // id,species,name\\n // 0,Panthera leo,Lion\\n
Table Options
Generic class for handling tabular data, typically from a\\nCSV, TSV, or other sort of spreadsheet file.
CSV files are\\n\\ncomma separated values, often with the data in quotes. TSV\\nfiles use tabs as separators, and usually don't bother with the\\nquotes.
File names should end with .csv if they're comma separated.
A rough "spec" for CSV can be found\\nhere.
To load files, use the loadTable method.
To save tables to your computer, use the save method\\n or the saveTable method.
Possible options include:
Use addRow() to add a new row of data to a p5.Table object. By default,\\nan empty row is created. Typically, you would store a reference to\\nthe new row in a TableRow object (see newRow in the example above),\\nand then set individual values using set().
If a p5.TableRow object is included as a parameter, then that row is\\nduplicated and added to the table.
row to be added to the table
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //add a row\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Canis Lupus');\\n newRow.setString('name', 'Wolf');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n
Removes a row from the table object.
ID number of the row to remove
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //remove the first row\\n table.removeRow(0);\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n}\\n
Returns a reference to the specified p5.TableRow. The reference\\ncan then be used to get and set values of the selected row.
ID number of the row to get
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let row = table.getRow(1);\\n //print it column by column\\n //note: a row is an object, not an array\\n for (let c = 0; c < table.getColumnCount(); c++) {\\n print(row.getString(c));\\n }\\n}\\n
Gets all rows from the table. Returns an array of p5.TableRows.
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n\\n //warning: rows is an array of objects\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].set('name', 'Unicorn');\\n }\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n
Finds the first row in the Table that contains the value\\nprovided, and returns a reference to that row. Even if\\nmultiple rows are possible matches, only the first matching\\nrow is returned. The column to search may be specified by\\neither its ID or title.
The value to match
ID number or title of the\\n column to search
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //find the animal named zebra\\n let row = table.findRow('Zebra', 'name');\\n //find the corresponding species\\n print(row.getString('species'));\\n }\\n
Finds the rows in the Table that contain the value\\nprovided, and returns references to those rows. Returns an\\nArray, so for must be used to iterate through all the rows,\\nas shown in the example above. The column to search may be\\nspecified by either its ID or title.
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //add another goat\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Scape Goat');\\n newRow.setString('name', 'Goat');\\n\\n //find the rows containing animals named Goat\\n let rows = table.findRows('Goat', 'name');\\n print(rows.length + ' Goats found');\\n }\\n
Finds the first row in the Table that matches the regular\\nexpression provided, and returns a reference to that row.\\nEven if multiple rows are possible matches, only the first\\nmatching row is returned. The column to search may be\\nspecified by either its ID or title.
The regular expression to match
The column ID (number) or\\n title (string)
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //Search using specified regex on a given column, return TableRow object\\n let mammal = table.matchRow(new RegExp('ant'), 1);\\n print(mammal.getString(1));\\n //Output \\\"Panthera pardus\\\"\\n}\\n
Finds the rows in the Table that match the regular expression provided,\\nand returns references to those rows. Returns an array, so for must be\\nused to iterate through all the rows, as shown in the example. The\\ncolumn to search may be specified by either its ID or title.
\\nlet table;\\n\\nfunction setup() {\\n table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', 'Lion');\\n newRow.setString('type', 'Mammal');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Snake');\\n newRow.setString('type', 'Reptile');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Mosquito');\\n newRow.setString('type', 'Insect');\\n\\n newRow = table.addRow();\\n newRow.setString('name', 'Lizard');\\n newRow.setString('type', 'Reptile');\\n\\n let rows = table.matchRows('R.*', 'type');\\n for (let i = 0; i < rows.length; i++) {\\n print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\\n }\\n}\\n// Sketch prints:\\n// Snake: Reptile\\n// Lizard: Reptile\\n
Retrieves all values in the specified column, and returns them\\nas an array. The column may be specified by either its ID or title.
String or Number of the column to return
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n //getColumn returns an array that can be printed directly\\n print(table.getColumn('species'));\\n //outputs [\\\"Capra hircus\\\", \\\"Panthera pardus\\\", \\\"Equus zebra\\\"]\\n }\\n
Removes all rows from a Table. While all rows are removed,\\ncolumns and column titles are maintained.
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.clearRows();\\n print(table.getRowCount() + ' total rows in table');\\n print(table.getColumnCount() + ' total columns in table');\\n }\\n
Use addColumn() to add a new column to a Table object.\\nTypically, you will want to specify a title, so the column\\nmay be easily referenced later by name. (If no title is\\nspecified, the new column's title will be null.)
title of the given column
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.addColumn('carnivore');\\n table.set(0, 'carnivore', 'no');\\n table.set(1, 'carnivore', 'yes');\\n table.set(2, 'carnivore', 'no');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n }\\n
Returns the total number of columns in a Table.
\\n // given the cvs file \\\"blobs.csv\\\" in /assets directory\\n // ID, Name, Flavor, Shape, Color\\n // Blob1, Blobby, Sweet, Blob, Pink\\n // Blob2, Saddy, Savory, Blob, Blue\\n\\n let table;\\n\\n function preload() {\\n table = loadTable('assets/blobs.csv');\\n }\\n\\n function setup() {\\n createCanvas(200, 100);\\n textAlign(CENTER);\\n background(255);\\n }\\n\\n function draw() {\\n let numOfColumn = table.getColumnCount();\\n text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\\n }\\n
Returns the total number of rows in a Table.
\\n // given the cvs file \\\"blobs.csv\\\" in /assets directory\\n //\\n // ID, Name, Flavor, Shape, Color\\n // Blob1, Blobby, Sweet, Blob, Pink\\n // Blob2, Saddy, Savory, Blob, Blue\\n\\n let table;\\n\\n function preload() {\\n table = loadTable('assets/blobs.csv');\\n }\\n\\n function setup() {\\n createCanvas(200, 100);\\n textAlign(CENTER);\\n background(255);\\n }\\n\\n function draw() {\\n text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\\n }\\n
Removes any of the specified characters (or "tokens").
If no column is specified, then the values in all columns and\\nrows are processed. A specific column may be referenced by\\neither its ID or title.
String listing characters to be removed
Column ID (number)\\n or name (string)
\\n function setup() {\\n let table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', ' $Lion ,');\\n newRow.setString('type', ',,,Mammal');\\n\\n newRow = table.addRow();\\n newRow.setString('name', '$Snake ');\\n newRow.setString('type', ',,,Reptile');\\n\\n table.removeTokens(',$ ');\\n print(table.getArray());\\n }\\n\\n // prints:\\n // 0 \\\"Lion\\\" \\\"Mamal\\\"\\n // 1 \\\"Snake\\\" \\\"Reptile\\\"\\n
Trims leading and trailing whitespace, such as spaces and tabs,\\nfrom String table values. If no column is specified, then the\\nvalues in all columns and rows are trimmed. A specific column\\nmay be referenced by either its ID or title.
\\n function setup() {\\n let table = new p5.Table();\\n\\n table.addColumn('name');\\n table.addColumn('type');\\n\\n let newRow = table.addRow();\\n newRow.setString('name', ' Lion ,');\\n newRow.setString('type', ' Mammal ');\\n\\n newRow = table.addRow();\\n newRow.setString('name', ' Snake ');\\n newRow.setString('type', ' Reptile ');\\n\\n table.trim();\\n print(table.getArray());\\n }\\n\\n // prints:\\n // 0 \\\"Lion\\\" \\\"Mamal\\\"\\n // 1 \\\"Snake\\\" \\\"Reptile\\\"\\n
Use removeColumn() to remove an existing column from a Table\\nobject. The column to be removed may be identified by either\\nits title (a String) or its index value (an int).\\nremoveColumn(0) would remove the first column, removeColumn(1)\\nwould remove the second column, and so on.
columnName (string) or ID (number)
\\n // Given the CSV file \\\"mammals.csv\\\"\\n // in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n table.removeColumn('id');\\n print(table.getColumnCount());\\n }\\n
Stores a value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.
row ID
column ID (Number)\\n or title (String)
value to assign
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n table.set(0, 'species', 'Canis Lupus');\\n table.set(0, 'name', 'Wolf');\\n\\n //print the results\\n for (let r = 0; r < table.getRowCount(); r++)\\n for (let c = 0; c < table.getColumnCount(); c++)\\n print(table.getString(r, c));\\n}\\n
Stores a Float value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n table.setNum(1, 'id', 1);\\n\\n print(table.getColumn(0));\\n //[\\\"0\\\", 1, \\\"2\\\"]\\n}\\n
Stores a String value in the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified\\nby either its ID or title.
\\n// Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n //add a row\\n let newRow = table.addRow();\\n newRow.setString('id', table.getRowCount() - 1);\\n newRow.setString('species', 'Canis Lupus');\\n newRow.setString('name', 'Wolf');\\n\\n print(table.getArray());\\n}\\n
Retrieves a value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.
columnName (string) or\\n ID (number)
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.get(0, 1));\\n //Capra hircus\\n print(table.get(0, 'species'));\\n //Capra hircus\\n}\\n
Retrieves a Float value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.getNum(1, 0) + 100);\\n //id 1 + 100 = 101\\n}\\n
Retrieves a String value from the Table's specified row and column.\\nThe row is specified by its ID, while the column may be specified by\\neither its ID or title.
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n // table is comma separated value \\\"CSV\\\"\\n // and has specifiying header for column labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n print(table.getString(0, 0)); // 0\\n print(table.getString(0, 1)); // Capra hircus\\n print(table.getString(0, 2)); // Goat\\n print(table.getString(1, 0)); // 1\\n print(table.getString(1, 1)); // Panthera pardus\\n print(table.getString(1, 2)); // Leopard\\n print(table.getString(2, 0)); // 2\\n print(table.getString(2, 1)); // Equus zebra\\n print(table.getString(2, 2)); // Zebra\\n}\\n
Retrieves all table data and returns as an object. If a column name is\\npassed in, each row object will be stored with that attribute as its\\ntitle.
Name of the column which should be used to\\n title each row object (optional)
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder:\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leopard\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let tableObject = table.getObject();\\n\\n print(tableObject);\\n //outputs an object\\n}\\n
Retrieves all table data and returns it as a multidimensional array.
\\n// Given the CSV file \\\"mammals.csv\\\"\\n// in the project's \\\"assets\\\" folder\\n//\\n// id,species,name\\n// 0,Capra hircus,Goat\\n// 1,Panthera pardus,Leoperd\\n// 2,Equus zebra,Zebra\\n\\nlet table;\\n\\nfunction preload() {\\n // table is comma separated value \\\"CSV\\\"\\n // and has specifiying header for column labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n}\\n\\nfunction setup() {\\n let tableArray = table.getArray();\\n for (let i = 0; i < tableArray.length; i++) {\\n print(tableArray[i]);\\n }\\n}\\n
Stores a value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.
Column ID (Number)\\n or Title (String)
The value to be stored
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].set('name', 'Unicorn');\\n }\\n\\n //print the results\\n print(table.getArray());\\n }\\n
Stores a Float value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.
The value to be stored\\n as a Float
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n rows[r].setNum('id', r + 10);\\n }\\n\\n print(table.getArray());\\n }\\n
Stores a String value in the TableRow's specified column.\\nThe column may be specified by either its ID or title.
The value to be stored\\n as a String
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n let name = rows[r].getString('name');\\n rows[r].setString('name', 'A ' + name + ' named George');\\n }\\n\\n print(table.getArray());\\n }\\n
Retrieves a value from the TableRow's specified column.\\nThe column may be specified by either its ID or title.
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let names = [];\\n let rows = table.getRows();\\n for (let r = 0; r < rows.length; r++) {\\n names.push(rows[r].get('name'));\\n }\\n\\n print(names);\\n }\\n
Retrieves a Float value from the TableRow's specified\\ncolumn. The column may be specified by either its ID or\\ntitle.
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n let minId = Infinity;\\n let maxId = -Infinity;\\n for (let r = 0; r < rows.length; r++) {\\n let id = rows[r].getNum('id');\\n minId = min(minId, id);\\n maxId = min(maxId, id);\\n }\\n print('minimum id = ' + minId + ', maximum id = ' + maxId);\\n }\\n
Retrieves an String value from the TableRow's specified\\ncolumn. The column may be specified by either its ID or\\ntitle.
\\n // Given the CSV file \\\"mammals.csv\\\" in the project's \\\"assets\\\" folder:\\n //\\n // id,species,name\\n // 0,Capra hircus,Goat\\n // 1,Panthera pardus,Leopard\\n // 2,Equus zebra,Zebra\\n\\n let table;\\n\\n function preload() {\\n //my table is comma separated value \\\"csv\\\"\\n //and has a header specifying the columns labels\\n table = loadTable('assets/mammals.csv', 'csv', 'header');\\n }\\n\\n function setup() {\\n let rows = table.getRows();\\n let longest = '';\\n for (let r = 0; r < rows.length; r++) {\\n let species = rows[r].getString('species');\\n if (longest.length < species.length) {\\n longest = species;\\n }\\n }\\n\\n print('longest: ' + longest);\\n }\\n
Gets a copy of the element's parent. Returns the parent as another\\np5.XML object.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let children = xml.getChildren('animal');\\n let parent = children[1].getParent();\\n print(parent.getName());\\n}\\n\\n// Sketch prints:\\n// mammals\\n
Gets the element's full name, which is returned as a String.
\\n // The following short XML file called \\\"mammals.xml\\\" is parsed\\n // in the code below.\\n //\\n // \\n // <mammals>\\n // <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n // <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n // <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n // </mammals>\\n\\n let xml;\\n\\n function preload() {\\n xml = loadXML('assets/mammals.xml');\\n }\\n\\n function setup() {\\n print(xml.getName());\\n }\\n\\n // Sketch prints:\\n // mammals\\n
Sets the element's name, which is specified as a String.
new name of the node
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.getName());\\n xml.setName('fish');\\n print(xml.getName());\\n}\\n\\n// Sketch prints:\\n// mammals\\n// fish\\n
Checks whether or not the element has any children, and returns the result\\nas a boolean.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.hasChildren());\\n}\\n\\n// Sketch prints:\\n// true\\n
Get the names of all of the element's children, and returns the names as an\\narray of Strings. This is the same as looping through and calling getName()\\non each child element individually.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.listChildren());\\n}\\n\\n// Sketch prints:\\n// [\\\"animal\\\", \\\"animal\\\", \\\"animal\\\"]\\n
Returns all of the element's children as an array of p5.XML objects. When\\nthe name parameter is specified, then it will return all children that match\\nthat name.
element name
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let animals = xml.getChildren('animal');\\n\\n for (let i = 0; i < animals.length; i++) {\\n print(animals[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n
Returns the first of the element's children that matches the name parameter\\nor the child of the given index.It returns undefined if no matching\\nchild is found.
element name or index
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n
\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let secondChild = xml.getChild(1);\\n print(secondChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Leopard\\\"\\n
Appends a new child to the element. The child can be specified with\\neither a String, which will be used as the new tag's name, or as a\\nreference to an existing p5.XML object.\\nA reference to the newly created child is returned as an p5.XML object.
a p5.XML Object which will be the child to be added
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let child = new p5.XML();\\n child.setName('animal');\\n child.setAttribute('id', '3');\\n child.setAttribute('species', 'Ornithorhynchus anatinus');\\n child.setContent('Platypus');\\n xml.addChild(child);\\n\\n let animals = xml.getChildren('animal');\\n print(animals[animals.length - 1].getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n
Removes the element specified by name or index.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n xml.removeChild('animal');\\n let children = xml.getChildren();\\n for (let i = 0; i < children.length; i++) {\\n print(children[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Leopard\\\"\\n// \\\"Zebra\\\"\\n
\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n xml.removeChild(1);\\n let children = xml.getChildren();\\n for (let i = 0; i < children.length; i++) {\\n print(children[i].getContent());\\n }\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Zebra\\\"\\n
Counts the specified element's number of attributes, returned as an Number.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getAttributeCount());\\n}\\n\\n// Sketch prints:\\n// 2\\n
Gets all of the specified element's attributes, and returns them as an\\narray of Strings.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.listAttributes());\\n}\\n\\n// Sketch prints:\\n// [\\\"id\\\", \\\"species\\\"]\\n
Checks whether or not an element has the specified attribute.
attribute to be checked
\\n // The following short XML file called \\\"mammals.xml\\\" is parsed\\n // in the code below.\\n //\\n // \\n // <mammals>\\n // <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n // <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n // <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n // </mammals>\\n\\n let xml;\\n\\n function preload() {\\n xml = loadXML('assets/mammals.xml');\\n }\\n\\n function setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.hasAttribute('species'));\\n print(firstChild.hasAttribute('color'));\\n }\\n\\n // Sketch prints:\\n // true\\n // false\\n
Returns an attribute value of the element as an Number. If the defaultValue\\nparameter is specified and the attribute doesn't exist, then defaultValue\\nis returned. If no defaultValue is specified and the attribute doesn't\\nexist, the value 0 is returned.
the non-null full name of the attribute
the default value of the attribute
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getNum('id'));\\n}\\n\\n// Sketch prints:\\n// 0\\n
Returns an attribute value of the element as an String. If the defaultValue\\nparameter is specified and the attribute doesn't exist, then defaultValue\\nis returned. If no defaultValue is specified and the attribute doesn't\\nexist, null is returned.
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getString('species'));\\n}\\n\\n// Sketch prints:\\n// \\\"Capra hircus\\\"\\n
Sets the content of an element's attribute. The first parameter specifies\\nthe attribute name, while the second specifies the new content.
the full name of the attribute
the value of the attribute
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getString('species'));\\n firstChild.setAttribute('species', 'Jamides zebra');\\n print(firstChild.getString('species'));\\n}\\n\\n// Sketch prints:\\n// \\\"Capra hircus\\\"\\n// \\\"Jamides zebra\\\"\\n
Returns the content of an element. If there is no such content,\\ndefaultValue is returned if specified, otherwise null is returned.
value returned if no content is found
Sets the element's content.
the new content
\\n// The following short XML file called \\\"mammals.xml\\\" is parsed\\n// in the code below.\\n//\\n// \\n// <mammals>\\n// <animal id=\\\"0\\\" species=\\\"Capra hircus\\\">Goat</animal>\\n// <animal id=\\\"1\\\" species=\\\"Panthera pardus\\\">Leopard</animal>\\n// <animal id=\\\"2\\\" species=\\\"Equus zebra\\\">Zebra</animal>\\n// </mammals>\\n\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n let firstChild = xml.getChild('animal');\\n print(firstChild.getContent());\\n firstChild.setContent('Mountain Goat');\\n print(firstChild.getContent());\\n}\\n\\n// Sketch prints:\\n// \\\"Goat\\\"\\n// \\\"Mountain Goat\\\"\\n
Serializes the element into a string. This function is useful for preparing\\nthe content to be sent over a http request or saved to file.
\\nlet xml;\\n\\nfunction preload() {\\n xml = loadXML('assets/mammals.xml');\\n}\\n\\nfunction setup() {\\n print(xml.serialize());\\n}\\n\\n// Sketch prints:\\n// \\n// Goat\\n// Leopard\\n// Zebra\\n// \\n
Calculates the absolute value (magnitude) of a number. Maps to Math.abs().\\nThe absolute value of a number is always positive.
number to compute
\\nfunction setup() {\\n let x = -3;\\n let y = abs(x);\\n\\n print(x); // -3\\n print(y); // 3\\n}\\n
Calculates the closest int value that is greater than or equal to the\\nvalue of the parameter. Maps to Math.ceil(). For example, ceil(9.03)\\nreturns the value 10.
number to round up
\\nfunction draw() {\\n background(200);\\n // map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n //Get the ceiling of the mapped number.\\n let bx = ceil(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n
Constrains a value between a minimum and maximum value.
number to constrain
minimum limit
maximum limit
\\nfunction draw() {\\n background(200);\\n\\n let leftWall = 25;\\n let rightWall = 75;\\n\\n // xm is just the mouseX, while\\n // xc is the mouseX, but constrained\\n // between the leftWall and rightWall!\\n let xm = mouseX;\\n let xc = constrain(mouseX, leftWall, rightWall);\\n\\n // Draw the walls.\\n stroke(150);\\n line(leftWall, 0, leftWall, height);\\n line(rightWall, 0, rightWall, height);\\n\\n // Draw xm and xc as circles.\\n noStroke();\\n fill(150);\\n ellipse(xm, 33, 9, 9); // Not Constrained\\n fill(0);\\n ellipse(xc, 66, 9, 9); // Constrained\\n}\\n
Calculates the distance between two points.
\\n// Move your mouse inside the canvas to see the\\n// change in distance between two points!\\nfunction draw() {\\n background(200);\\n fill(0);\\n\\n let x1 = 10;\\n let y1 = 90;\\n let x2 = mouseX;\\n let y2 = mouseY;\\n\\n line(x1, y1, x2, y2);\\n ellipse(x1, y1, 7, 7);\\n ellipse(x2, y2, 7, 7);\\n\\n // d is the length of the line\\n // the distance from point 1 to point 2.\\n let d = int(dist(x1, y1, x2, y2));\\n\\n // Let's write d along the line we are drawing!\\n push();\\n translate((x1 + x2) / 2, (y1 + y2) / 2);\\n rotate(atan2(y2 - y1, x2 - x1));\\n text(nfc(d, 1), 0, -5);\\n pop();\\n // Fancy!\\n}\\n
z-coordinate of the first point
z-coordinate of the second point
Returns Euler's number e (2.71828...) raised to the power of the n\\nparameter. Maps to Math.exp().
exponent to raise
\\nfunction draw() {\\n background(200);\\n\\n // Compute the exp() function with a value between 0 and 2\\n let xValue = map(mouseX, 0, width, 0, 2);\\n let yValue = exp(xValue);\\n\\n let y = map(yValue, 0, 8, height, 0);\\n\\n let legend = 'exp (' + nfc(xValue, 3) + ')\\\\n= ' + nf(yValue, 1, 4);\\n stroke(150);\\n line(mouseX, y, mouseX, height);\\n fill(0);\\n text(legend, 5, 15);\\n noStroke();\\n ellipse(mouseX, y, 7, 7);\\n\\n // Draw the exp(x) curve,\\n // over the domain of x from 0 to 2\\n noFill();\\n stroke(0);\\n beginShape();\\n for (let x = 0; x < width; x++) {\\n xValue = map(x, 0, width, 0, 2);\\n yValue = exp(xValue);\\n y = map(yValue, 0, 8, height, 0);\\n vertex(x, y);\\n }\\n\\n endShape();\\n line(0, 0, 0, height);\\n line(0, height - 1, width, height - 1);\\n}\\n
Calculates the closest int value that is less than or equal to the\\nvalue of the parameter. Maps to Math.floor().
number to round down
\\nfunction draw() {\\n background(200);\\n //map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n //Get the floor of the mapped number.\\n let bx = floor(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n
Calculates a number between two numbers at a specific increment. The amt\\nparameter is the amount to interpolate between the two values where 0.0\\nequal to the first point, 0.1 is very near the first point, 0.5 is\\nhalf-way in between, and 1.0 is equal to the second point. If the\\nvalue of amt is more than 1.0 or less than 0.0, the number will be\\ncalculated accordingly in the ratio of the two given numbers. The lerp\\nfunction is convenient for creating motion along a straight\\npath and for drawing dotted lines.
first value
second value
number
\\nfunction setup() {\\n background(200);\\n let a = 20;\\n let b = 80;\\n let c = lerp(a, b, 0.2);\\n let d = lerp(a, b, 0.5);\\n let e = lerp(a, b, 0.8);\\n\\n let y = 50;\\n\\n strokeWeight(5);\\n stroke(0); // Draw the original points in black\\n point(a, y);\\n point(b, y);\\n\\n stroke(100); // Draw the lerp points in gray\\n point(c, y);\\n point(d, y);\\n point(e, y);\\n}\\n
Calculates the natural logarithm (the base-e logarithm) of a number. This\\nfunction expects the n parameter to be a value greater than 0.0. Maps to\\nMath.log().
number greater than 0
\\nfunction draw() {\\n background(200);\\n let maxX = 2.8;\\n let maxY = 1.5;\\n\\n // Compute the natural log of a value between 0 and maxX\\n let xValue = map(mouseX, 0, width, 0, maxX);\\n let yValue, y;\\n if (xValue > 0) {\\n // Cannot take the log of a negative number.\\n yValue = log(xValue);\\n y = map(yValue, -maxY, maxY, height, 0);\\n\\n // Display the calculation occurring.\\n let legend = 'log(' + nf(xValue, 1, 2) + ')\\\\n= ' + nf(yValue, 1, 3);\\n stroke(150);\\n line(mouseX, y, mouseX, height);\\n fill(0);\\n text(legend, 5, 15);\\n noStroke();\\n ellipse(mouseX, y, 7, 7);\\n }\\n\\n // Draw the log(x) curve,\\n // over the domain of x from 0 to maxX\\n noFill();\\n stroke(0);\\n beginShape();\\n for (let x = 0; x < width; x++) {\\n xValue = map(x, 0, width, 0, maxX);\\n yValue = log(xValue);\\n y = map(yValue, -maxY, maxY, height, 0);\\n vertex(x, y);\\n }\\n endShape();\\n line(0, 0, 0, height);\\n line(0, height / 2, width, height / 2);\\n}\\n
Calculates the magnitude (or length) of a vector. A vector is a direction\\nin space commonly used in computer graphics and linear algebra. Because it\\nhas no "start" position, the magnitude of a vector can be thought of as\\nthe distance from the coordinate 0,0 to its x,y value. Therefore, mag() is\\na shortcut for writing dist(0, 0, x, y).
\\nfunction setup() {\\n let x1 = 20;\\n let x2 = 80;\\n let y1 = 30;\\n let y2 = 70;\\n\\n line(0, 0, x1, y1);\\n print(mag(x1, y1)); // Prints \\\"36.05551275463989\\\"\\n line(0, 0, x2, y1);\\n print(mag(x2, y1)); // Prints \\\"85.44003745317531\\\"\\n line(0, 0, x1, y2);\\n print(mag(x1, y2)); // Prints \\\"72.80109889280519\\\"\\n line(0, 0, x2, y2);\\n print(mag(x2, y2)); // Prints \\\"106.3014581273465\\\"\\n}\\n
Re-maps a number from one range to another.\\n\\nIn the first example above, the number 25 is converted from a value in the\\nrange of 0 to 100 into a value that ranges from the left edge of the\\nwindow (0) to the right edge (width).
the incoming value to be converted
lower bound of the value's current range
upper bound of the value's current range
lower bound of the value's target range
upper bound of the value's target range
constrain the value to the newly mapped range
\\nlet value = 25;\\nlet m = map(value, 0, 100, 0, width);\\nellipse(m, 50, 10, 10);\\n
\\nfunction setup() {\\n noStroke();\\n}\\n\\nfunction draw() {\\n background(204);\\n let x1 = map(mouseX, 0, width, 25, 75);\\n ellipse(x1, 25, 25, 25);\\n //This ellipse is constrained to the 0-100 range\\n //after setting withinBounds to true\\n let x2 = map(mouseX, 0, width, 0, 100, true);\\n ellipse(x2, 75, 25, 25);\\n}\\n
Determines the largest value in a sequence of numbers, and then returns\\nthat value. max() accepts any number of Number parameters, or an Array\\nof any length.
\\nfunction setup() {\\n // Change the elements in the array and run the sketch\\n // to show how max() works!\\n let numArray = [2, 1, 5, 4, 8, 9];\\n fill(0);\\n noStroke();\\n text('Array Elements', 0, 10);\\n // Draw all numbers in the array\\n let spacing = 15;\\n let elemsY = 25;\\n for (let i = 0; i < numArray.length; i++) {\\n text(numArray[i], i * spacing, elemsY);\\n }\\n let maxX = 33;\\n let maxY = 80;\\n // Draw the Maximum value in the array.\\n textSize(32);\\n text(max(numArray), maxX, maxY);\\n}\\n
Number to compare
Numbers to compare
Determines the smallest value in a sequence of numbers, and then returns\\nthat value. min() accepts any number of Number parameters, or an Array\\nof any length.
\\nfunction setup() {\\n // Change the elements in the array and run the sketch\\n // to show how min() works!\\n let numArray = [2, 1, 5, 4, 8, 9];\\n fill(0);\\n noStroke();\\n text('Array Elements', 0, 10);\\n // Draw all numbers in the array\\n let spacing = 15;\\n let elemsY = 25;\\n for (let i = 0; i < numArray.length; i++) {\\n text(numArray[i], i * spacing, elemsY);\\n }\\n let maxX = 33;\\n let maxY = 80;\\n // Draw the Minimum value in the array.\\n textSize(32);\\n text(min(numArray), maxX, maxY);\\n}\\n
Normalizes a number from another range into a value between 0 and 1.\\nIdentical to map(value, low, high, 0, 1).\\nNumbers outside of the range are not clamped to 0 and 1, because\\nout-of-range values are often intentional and useful. (See the example above.)
incoming value to be normalized
\\nfunction draw() {\\n background(200);\\n let currentNum = mouseX;\\n let lowerBound = 0;\\n let upperBound = width; //100;\\n let normalized = norm(currentNum, lowerBound, upperBound);\\n let lineY = 70;\\n stroke(3);\\n line(0, lineY, width, lineY);\\n //Draw an ellipse mapped to the non-normalized value.\\n noStroke();\\n fill(50);\\n let s = 7; // ellipse size\\n ellipse(currentNum, lineY, s, s);\\n\\n // Draw the guide\\n let guideY = lineY + 15;\\n text('0', 0, guideY);\\n textAlign(RIGHT);\\n text('100', width, guideY);\\n\\n // Draw the normalized value\\n textAlign(LEFT);\\n fill(0);\\n textSize(32);\\n let normalY = 40;\\n let normalX = 20;\\n text(normalized, normalX, normalY);\\n}\\n
Facilitates exponential expressions. The pow() function is an efficient\\nway of multiplying numbers by themselves (or their reciprocals) in large\\nquantities. For example, pow(3, 5) is equivalent to the expression\\n33333 and pow(3, -5) is equivalent to 1 / 33333. Maps to\\nMath.pow().
base of the exponential expression
power by which to raise the base
\\nfunction setup() {\\n //Exponentially increase the size of an ellipse.\\n let eSize = 3; // Original Size\\n let eLoc = 10; // Original Location\\n\\n ellipse(eLoc, eLoc, eSize, eSize);\\n\\n ellipse(eLoc * 2, eLoc * 2, pow(eSize, 2), pow(eSize, 2));\\n\\n ellipse(eLoc * 4, eLoc * 4, pow(eSize, 3), pow(eSize, 3));\\n\\n ellipse(eLoc * 8, eLoc * 8, pow(eSize, 4), pow(eSize, 4));\\n}\\n
Calculates the integer closest to the n parameter. For example,\\nround(133.8) returns the value 134. Maps to Math.round().
number to round
\\nfunction draw() {\\n background(200);\\n //map, mouseX between 0 and 5.\\n let ax = map(mouseX, 0, 100, 0, 5);\\n let ay = 66;\\n\\n // Round the mapped number.\\n let bx = round(map(mouseX, 0, 100, 0, 5));\\n let by = 33;\\n\\n // Multiply the mapped numbers by 20 to more easily\\n // see the changes.\\n stroke(0);\\n fill(0);\\n line(0, ay, ax * 20, ay);\\n line(0, by, bx * 20, by);\\n\\n // Reformat the float returned by map and draw it.\\n noStroke();\\n text(nfc(ax, 2), ax, ay - 5);\\n text(nfc(bx, 1), bx, by - 5);\\n}\\n
Squares a number (multiplies a number by itself). The result is always a\\npositive number, as multiplying two negative numbers always yields a\\npositive result. For example, -1 * -1 = 1.
number to square
\\nfunction draw() {\\n background(200);\\n let eSize = 7;\\n let x1 = map(mouseX, 0, width, 0, 10);\\n let y1 = 80;\\n let x2 = sq(x1);\\n let y2 = 20;\\n\\n // Draw the non-squared.\\n line(0, y1, width, y1);\\n ellipse(x1, y1, eSize, eSize);\\n\\n // Draw the squared.\\n line(0, y2, width, y2);\\n ellipse(x2, y2, eSize, eSize);\\n\\n // Draw dividing line.\\n stroke(100);\\n line(0, height / 2, width, height / 2);\\n\\n // Draw text.\\n let spacing = 15;\\n noStroke();\\n fill(0);\\n text('x = ' + x1, 0, y1 + spacing);\\n text('sq(x) = ' + x2, 0, y2 + spacing);\\n}\\n
Calculates the square root of a number. The square root of a number is\\nalways positive, even though there may be a valid negative root. The\\nsquare root s of number a is such that s*s = a. It is the opposite of\\nsquaring. Maps to Math.sqrt().
non-negative number to square root
\\nfunction draw() {\\n background(200);\\n let eSize = 7;\\n let x1 = mouseX;\\n let y1 = 80;\\n let x2 = sqrt(x1);\\n let y2 = 20;\\n\\n // Draw the non-squared.\\n line(0, y1, width, y1);\\n ellipse(x1, y1, eSize, eSize);\\n\\n // Draw the squared.\\n line(0, y2, width, y2);\\n ellipse(x2, y2, eSize, eSize);\\n\\n // Draw dividing line.\\n stroke(100);\\n line(0, height / 2, width, height / 2);\\n\\n // Draw text.\\n noStroke();\\n fill(0);\\n let spacing = 15;\\n text('x = ' + x1, 0, y1 + spacing);\\n text('sqrt(x) = ' + x2, 0, y2 + spacing);\\n}\\n
Creates a new p5.Vector (the datatype for storing vectors). This provides a\\ntwo or three dimensional vector, specifically a Euclidean (also known as\\ngeometric) vector. A vector is an entity that has both magnitude and\\ndirection.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noStroke();\\n fill(255, 102, 204);\\n}\\n\\nfunction draw() {\\n background(255);\\n pointLight(color(255), createVector(sin(millis() / 1000) * 20, -40, -10));\\n scale(0.75);\\n sphere();\\n}\\n
Returns the Perlin noise value at specified coordinates. Perlin noise is\\na random sequence generator producing a more natural ordered, harmonic\\nsuccession of numbers compared to the standard random() function.\\nIt was invented by Ken Perlin in the 1980s and been used since in\\ngraphical applications to produce procedural textures, natural motion,\\nshapes, terrains etc. The main difference to the\\nrandom() function is that Perlin noise is defined in an infinite\\nn-dimensional space where each pair of coordinates corresponds to a\\nfixed semi-random value (fixed only for the lifespan of the program; see\\nthe noiseSeed() function). p5.js can compute 1D, 2D and 3D noise,\\ndepending on the number of coordinates given. The resulting value will\\nalways be between 0.0 and 1.0. The noise value can be animated by moving\\nthrough the noise space as demonstrated in the example above. The 2nd\\nand 3rd dimension can also be interpreted as time.The actual\\nnoise is structured similar to an audio signal, in respect to the\\nfunction's use of frequencies. Similar to the concept of harmonics in\\nphysics, perlin noise is computed over several octaves which are added\\ntogether for the final result. Another way to adjust the\\ncharacter of the resulting sequence is the scale of the input\\ncoordinates. As the function works within an infinite space the value of\\nthe coordinates doesn't matter as such, only the distance between\\nsuccessive coordinates does (eg. when using noise() within a\\nloop). As a general rule the smaller the difference between coordinates,\\nthe smoother the resulting noise sequence will be. Steps of 0.005-0.03\\nwork best for most applications, but this will differ depending on use.
x-coordinate in noise space
y-coordinate in noise space
z-coordinate in noise space
\\nlet xoff = 0.0;\\n\\nfunction draw() {\\n background(204);\\n xoff = xoff + 0.01;\\n let n = noise(xoff) * width;\\n line(n, 0, n, height);\\n}\\n
let noiseScale=0.02;\\n\\nfunction draw() {\\n background(0);\\n for (let x=0; x < width; x++) {\\n let noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale);\\n stroke(noiseVal*255);\\n line(x, mouseY+noiseVal*80, x, height);\\n }\\n}\\n
Adjusts the character and level of detail produced by the Perlin noise\\n function. Similar to harmonics in physics, noise is computed over\\n several octaves. Lower octaves contribute more to the output signal and\\n as such define the overall intensity of the noise, whereas higher octaves\\n create finer grained details in the noise sequence.\\n \\n By default, noise is computed over 4 octaves with each octave contributing\\n exactly half than its predecessor, starting at 50% strength for the 1st\\n octave. This falloff amount can be changed by adding an additional function\\n parameter. Eg. a falloff factor of 0.75 means each octave will now have\\n 75% impact (25% less) of the previous lower octave. Any value between\\n 0.0 and 1.0 is valid, however note that values greater than 0.5 might\\n result in greater than 1.0 values returned by noise().\\n \\n By changing these parameters, the signal created by the noise()\\n function can be adapted to fit very specific needs and characteristics.
number of octaves to be used by the noise
falloff factor for each octave
\\n let noiseVal;\\n let noiseScale = 0.02;\\nfunction setup() {\\n createCanvas(100, 100);\\n }\\nfunction draw() {\\n background(0);\\n for (let y = 0; y < height; y++) {\\n for (let x = 0; x < width / 2; x++) {\\n noiseDetail(2, 0.2);\\n noiseVal = noise((mouseX + x) * noiseScale, (mouseY + y) * noiseScale);\\n stroke(noiseVal * 255);\\n point(x, y);\\n noiseDetail(8, 0.65);\\n noiseVal = noise(\\n (mouseX + x + width / 2) * noiseScale,\\n (mouseY + y) * noiseScale\\n );\\n stroke(noiseVal * 255);\\n point(x + width / 2, y);\\n }\\n }\\n }\\n
Sets the seed value for noise(). By default, noise()\\nproduces different results each time the program is run. Set the\\nvalue parameter to a constant to return the same pseudo-random\\nnumbers each time the software is run.
the seed value
let xoff = 0.0;\\n\\nfunction setup() {\\n noiseSeed(99);\\n stroke(0, 10);\\n}\\n\\nfunction draw() {\\n xoff = xoff + .01;\\n let n = noise(xoff) * width;\\n line(n, 0, n, height);\\n}\\n
The x component of the vector
The y component of the vector
The z component of the vector
Returns a string representation of a vector v by calling String(v)\\nor v.toString(). This method is useful for logging vectors in the\\nconsole.
\\nfunction setup() {\\n let v = createVector(20, 30);\\n print(String(v)); // prints \\\"p5.Vector Object : [20, 30, 0]\\\"\\n}\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text(v1.toString(), 10, 25, 90, 75);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Sets the x, y, and z component of the vector using two or three separate\\nvariables, the data from a p5.Vector, or the values from a float array.
\\nfunction setup() {\\n let v = createVector(1, 2, 3);\\n v.set(4, 5, 6); // Sets vector to [4, 5, 6]\\n\\n let v1 = createVector(0, 0, 0);\\n let arr = [1, 2, 3];\\n v1.set(arr); // Sets vector to [1, 2, 3]\\n}\\n
\\nlet v0, v1;\\nfunction setup() {\\n createCanvas(100, 100);\\n\\n v0 = createVector(0, 0);\\n v1 = createVector(50, 50);\\n}\\n\\nfunction draw() {\\n background(240);\\n\\n drawArrow(v0, v1, 'black');\\n v1.set(v1.x + random(-1, 1), v1.y + random(-1, 1));\\n\\n noStroke();\\n text('x: ' + round(v1.x) + ' y: ' + round(v1.y), 20, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the x component of the vector
the y component of the vector
the z component of the vector
the vector to set
Gets a copy of the vector, returns a p5.Vector object.
\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = v1.copy();\\nprint(v1.x === v2.x && v1.y === v2.y && v1.z === v2.z);\\n// Prints \\\"true\\\"\\n
Adds x, y, and z components to a vector, adds one vector to another, or\\nadds two independent vectors together. The version of the method that adds\\ntwo vectors together is a static method and returns a p5.Vector, the others\\nacts directly on the vector. See the examples for more context.
\\nlet v = createVector(1, 2, 3);\\nv.add(4, 5, 6);\\n// v's components are set to [5, 7, 9]\\n
\\n// Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(2, 3, 4);\\n\\nlet v3 = p5.Vector.add(v1, v2);\\n// v3 has components [3, 5, 7]\\nprint(v3);\\n
\\n// red vector + blue vector = purple vector\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(-30, 20);\\n drawArrow(v1, v2, 'blue');\\n\\n let v3 = p5.Vector.add(v1, v2);\\n drawArrow(v0, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the x component of the vector to be added
the y component of the vector to be added
the z component of the vector to be added
the vector to add
a p5.Vector to add
the vector to receive the result
Subtracts x, y, and z components from a vector, subtracts one vector from\\nanother, or subtracts two independent vectors. The version of the method\\nthat subtracts two vectors is a static method and returns a p5.Vector, the\\nother acts directly on the vector. See the examples for more context.
\\nlet v = createVector(4, 5, 6);\\nv.sub(1, 1, 1);\\n// v's components are set to [3, 4, 5]\\n
\\n// Static method\\nlet v1 = createVector(2, 3, 4);\\nlet v2 = createVector(1, 2, 3);\\n\\nlet v3 = p5.Vector.sub(v1, v2);\\n// v3 has components [1, 1, 1]\\nprint(v3);\\n
\\n// red vector - blue vector = purple vector\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(70, 50);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX, mouseY);\\n drawArrow(v0, v2, 'blue');\\n\\n let v3 = p5.Vector.sub(v1, v2);\\n drawArrow(v2, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the x component of the vector to subtract
the y component of the vector to subtract
the z component of the vector to subtract
the vector to subtract
a p5.Vector to subtract from
a p5.Vector to subtract
if undefined a new vector will be created
Multiply the vector by a scalar. The static version of this method\\ncreates a new p5.Vector while the non static version acts on the vector\\ndirectly. See the examples for more context.
\\nlet v = createVector(1, 2, 3);\\nv.mult(2);\\n// v's components are set to [2, 4, 6]\\n
\\n// Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = p5.Vector.mult(v1, 2);\\n// v2 has components [2, 4, 6]\\nprint(v2);\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(25, -25);\\n drawArrow(v0, v1, 'red');\\n\\n let num = map(mouseX, 0, width, -2, 2, true);\\n let v2 = p5.Vector.mult(v1, num);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('multiplied by ' + num.toFixed(2), 5, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the number to multiply with the vector
the vector to multiply
Divide the vector by a scalar. The static version of this method creates a\\nnew p5.Vector while the non static version acts on the vector directly.\\nSee the examples for more context.
\\nlet v = createVector(6, 4, 2);\\nv.div(2); //v's components are set to [3, 2, 1]\\n
\\n// Static method\\nlet v1 = createVector(6, 4, 2);\\nlet v2 = p5.Vector.div(v1, 2);\\n// v2 has components [3, 2, 1]\\nprint(v2);\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 100);\\n let v1 = createVector(50, -50);\\n drawArrow(v0, v1, 'red');\\n\\n let num = map(mouseX, 0, width, 10, 0.5, true);\\n let v2 = p5.Vector.div(v1, num);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('divided by ' + num.toFixed(2), 10, 90);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the number to divide the vector by
the vector to divide
Calculates the magnitude (length) of the vector and returns the result as\\na float (this is simply the equation sqrt(xx + yy + z*z).)
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text('vector length: ' + v1.mag().toFixed(2), 10, 70, 90, 30);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
\\nlet v = createVector(20.0, 30.0, 40.0);\\nlet m = v.mag();\\nprint(m); // Prints \\\"53.85164807134504\\\"\\n
the vector to return the magnitude of
Calculates the squared magnitude of the vector and returns the result\\nas a float (this is simply the equation (xx + yy + z*z).)\\nFaster if the real length is not required in the\\ncase of comparing vectors, etc.
\\n// Static method\\nlet v1 = createVector(6, 4, 2);\\nprint(v1.magSq()); // Prints \\\"56\\\"\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'black');\\n\\n noStroke();\\n text('vector length squared: ' + v1.magSq().toFixed(2), 10, 45, 90, 55);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Calculates the dot product of two vectors. The version of the method\\nthat computes the dot product of two independent vectors is a static\\nmethod. See the examples for more context.
\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(2, 3, 4);\\n\\nprint(v1.dot(v2)); // Prints \\\"20\\\"\\n
\\n//Static method\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(3, 2, 1);\\nprint(p5.Vector.dot(v1, v2)); // Prints \\\"10\\\"\\n
value component of the vector or a p5.Vector
the first p5.Vector
the second p5.Vector
Calculates and returns a vector composed of the cross product between\\ntwo vectors. Both the static and non static methods return a new p5.Vector.\\nSee the examples for more context.
\\nlet v1 = createVector(1, 2, 3);\\nlet v2 = createVector(1, 2, 3);\\n\\nv1.cross(v2); // v's components are [0, 0, 0]\\n
\\n// Static method\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet crossProduct = p5.Vector.cross(v1, v2);\\n// crossProduct has components [0, 0, 1]\\nprint(crossProduct);\\n
p5.Vector to be crossed
Calculates the Euclidean distance between two points (considering a\\npoint as a vector object).
\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet distance = v1.dist(v2); // distance is 1.4142...\\nprint(distance);\\n
\\n// Static method\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet distance = p5.Vector.dist(v1, v2);\\n// distance is 1.4142...\\nprint(distance);\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n\\n let v1 = createVector(70, 50);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX, mouseY);\\n drawArrow(v0, v2, 'blue');\\n\\n noStroke();\\n text('distance between vectors: ' + v2.dist(v1).toFixed(2), 5, 50, 95, 50);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the x, y, and z coordinates of a p5.Vector
Normalize the vector to length 1 (make it a unit vector).
\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.normalize();\\n// v's components are set to\\n// [0.4454354, 0.8908708, 0.089087084]\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'red');\\n v1.normalize();\\n drawArrow(v0, v1.mult(35), 'blue');\\n\\n noFill();\\n ellipse(50, 50, 35 * 2);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Limit the magnitude of this vector to the value used for the max\\nparameter.
the maximum magnitude for the vector
\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.limit(5);\\n// v's components are set to\\n// [2.2271771, 4.4543543, 0.4454354]\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'red');\\n drawArrow(v0, v1.limit(35), 'blue');\\n\\n noFill();\\n ellipse(50, 50, 35 * 2);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Set the magnitude of this vector to the value used for the len\\nparameter.
the new length for this vector
\\nlet v = createVector(10, 20, 2);\\n// v has components [10.0, 20.0, 2.0]\\nv.setMag(10);\\n// v's components are set to [6.0, 8.0, 0.0]\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(0, 0);\\n let v1 = createVector(50, 50);\\n\\n drawArrow(v0, v1, 'red');\\n\\n let length = map(mouseX, 0, width, 0, 141, true);\\n v1.setMag(length);\\n drawArrow(v0, v1, 'blue');\\n\\n noStroke();\\n text('magnitude set to: ' + length.toFixed(2), 10, 70, 90, 30);\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Calculate the angle of rotation for this vector (only 2D vectors)
\\nfunction setup() {\\n let v1 = createVector(30, 50);\\n print(v1.heading()); // 1.0303768265243125\\n\\n v1 = createVector(40, 50);\\n print(v1.heading()); // 0.8960553845713439\\n\\n v1 = createVector(30, 70);\\n print(v1.heading()); // 1.1659045405098132\\n}\\n
\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(mouseX - 50, mouseY - 50);\\n\\n drawArrow(v0, v1, 'black');\\n\\n let myHeading = v1.heading();\\n noStroke();\\n text(\\n 'vector heading: ' +\\n myHeading.toFixed(2) +\\n ' radians or ' +\\n degrees(myHeading).toFixed(2) +\\n ' degrees',\\n 10,\\n 50,\\n 90,\\n 50\\n );\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Rotate the vector by an angle (only 2D vectors), magnitude remains the\\nsame
the angle of rotation
\\nlet v = createVector(10.0, 20.0);\\n// v has components [10.0, 20.0, 0.0]\\nv.rotate(HALF_PI);\\n// v's components are set to [-20.0, 9.999999, 0.0]\\n
\\nlet angle = 0;\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = createVector(50, 0);\\n\\n drawArrow(v0, v1.rotate(angle), 'black');\\n angle += 0.01;\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Calculates and returns the angle (in radians) between two vectors.
x, y, and z components of a p5.Vector
\\nlet v1 = createVector(1, 0, 0);\\nlet v2 = createVector(0, 1, 0);\\n\\nlet angle = v1.angleBetween(v2);\\n// angle is PI/2\\nprint(angle);\\n
\\nfunction draw() {\\n background(240);\\n let v0 = createVector(50, 50);\\n\\n let v1 = createVector(50, 0);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(mouseX - 50, mouseY - 50);\\n drawArrow(v0, v2, 'blue');\\n\\n let angleBetween = v1.angleBetween(v2);\\n noStroke();\\n text(\\n 'angle between: ' +\\n angleBetween.toFixed(2) +\\n ' radians or ' +\\n degrees(angleBetween).toFixed(2) +\\n ' degrees',\\n 10,\\n 50,\\n 90,\\n 50\\n );\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Linear interpolate the vector to another vector
\\nlet v = createVector(1, 1, 0);\\n\\nv.lerp(3, 3, 0, 0.5); // v now has components [2,2,0]\\n
\\nlet v1 = createVector(0, 0, 0);\\nlet v2 = createVector(100, 100, 0);\\n\\nlet v3 = p5.Vector.lerp(v1, v2, 0.5);\\n// v3 has components [50,50,0]\\nprint(v3);\\n
\\nlet step = 0.01;\\nlet amount = 0;\\n\\nfunction draw() {\\n background(240);\\n let v0 = createVector(0, 0);\\n\\n let v1 = createVector(mouseX, mouseY);\\n drawArrow(v0, v1, 'red');\\n\\n let v2 = createVector(90, 90);\\n drawArrow(v0, v2, 'blue');\\n\\n if (amount > 1 || amount < 0) {\\n step *= -1;\\n }\\n amount += step;\\n let v3 = p5.Vector.lerp(v1, v2, amount);\\n\\n drawArrow(v0, v3, 'purple');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
the x component
the y component
the z component
the amount of interpolation; some value between 0.0\\n (old vector) and 1.0 (new vector). 0.9 is very near\\n the new vector. 0.5 is halfway in between.
the p5.Vector to lerp to
Return a representation of this vector as a float array. This is only\\nfor temporary use. If used in any other fashion, the contents should be\\ncopied by using the p5.Vector.copy() method to copy into your own\\narray.
\\nfunction setup() {\\n let v = createVector(20, 30);\\n print(v.array()); // Prints : Array [20, 30, 0]\\n}\\n
\\nlet v = createVector(10.0, 20.0, 30.0);\\nlet f = v.array();\\nprint(f[0]); // Prints \\\"10.0\\\"\\nprint(f[1]); // Prints \\\"20.0\\\"\\nprint(f[2]); // Prints \\\"30.0\\\"\\n
Equality check against a p5.Vector
\\nlet v1 = createVector(5, 10, 20);\\nlet v2 = createVector(5, 10, 20);\\nlet v3 = createVector(13, 10, 19);\\n\\nprint(v1.equals(v2.x, v2.y, v2.z)); // true\\nprint(v1.equals(v3.x, v3.y, v3.z)); // false\\n
\\nlet v1 = createVector(10.0, 20.0, 30.0);\\nlet v2 = createVector(10.0, 20.0, 30.0);\\nlet v3 = createVector(0.0, 0.0, 0.0);\\nprint(v1.equals(v2)); // true\\nprint(v1.equals(v3)); // false\\n
the vector to compare
Make a new 2D vector from an angle
the desired angle, in radians
the length of the new vector (defaults to 1)
\\nfunction draw() {\\n background(200);\\n\\n // Create a variable, proportional to the mouseX,\\n // varying from 0-360, to represent an angle in degrees.\\n angleMode(DEGREES);\\n let myDegrees = map(mouseX, 0, width, 0, 360);\\n\\n // Display that variable in an onscreen text.\\n // (Note the nfc() function to truncate additional decimal places,\\n // and the \\\"\\\\xB0\\\" character for the degree symbol.)\\n let readout = 'angle = ' + nfc(myDegrees, 1) + '\\\\xB0';\\n noStroke();\\n fill(0);\\n text(readout, 5, 15);\\n\\n // Create a p5.Vector using the fromAngle function,\\n // and extract its x and y components.\\n let v = p5.Vector.fromAngle(radians(myDegrees), 30);\\n let vx = v.x;\\n let vy = v.y;\\n\\n push();\\n translate(width / 2, height / 2);\\n noFill();\\n stroke(150);\\n line(0, 0, 30, 0);\\n stroke(0);\\n line(0, 0, vx, vy);\\n pop();\\n}\\n
Make a new 3D vector from a pair of ISO spherical angles
the polar angle, in radians (zero is up)
the azimuthal angle, in radians\\n (zero is out of the screen)
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n fill(255);\\n noStroke();\\n}\\nfunction draw() {\\n background(255);\\n\\n let t = millis() / 1000;\\n\\n // add three point lights\\n pointLight(color('#f00'), p5.Vector.fromAngles(t * 1.0, t * 1.3, 100));\\n pointLight(color('#0f0'), p5.Vector.fromAngles(t * 1.1, t * 1.2, 100));\\n pointLight(color('#00f'), p5.Vector.fromAngles(t * 1.2, t * 1.1, 100));\\n\\n sphere(35);\\n}\\n
Make a new 2D unit vector from a random angle
\\nlet v = p5.Vector.random2D();\\n// May make v's attributes something like:\\n// [0.61554617, -0.51195765, 0.0] or\\n// [-0.4695841, -0.14366731, 0.0] or\\n// [0.6091097, -0.22805278, 0.0]\\nprint(v);\\n
\\nfunction setup() {\\n frameRate(1);\\n}\\n\\nfunction draw() {\\n background(240);\\n\\n let v0 = createVector(50, 50);\\n let v1 = p5.Vector.random2D();\\n drawArrow(v0, v1.mult(50), 'black');\\n}\\n\\n// draw an arrow for a vector at a given base position\\nfunction drawArrow(base, vec, myColor) {\\n push();\\n stroke(myColor);\\n strokeWeight(3);\\n fill(myColor);\\n translate(base.x, base.y);\\n line(0, 0, vec.x, vec.y);\\n rotate(vec.heading());\\n let arrowSize = 7;\\n translate(vec.mag() - arrowSize, 0);\\n triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\\n pop();\\n}\\n
Make a new random 3D unit vector.
\\nlet v = p5.Vector.random3D();\\n// May make v's attributes something like:\\n// [0.61554617, -0.51195765, 0.599168] or\\n// [-0.4695841, -0.14366731, -0.8711202] or\\n// [0.6091097, -0.22805278, -0.7595902]\\nprint(v);\\n
Multiplies a vector by a scalar and returns a new vector.
Divides a vector by a scalar and returns a new vector.
Calculates the dot product of two vectors.
Calculates the cross product of two vectors.
Linear interpolate a vector to another vector and return the result as a\\nnew vector.
Sets the seed value for random().
By default, random() produces different results each time the program\\nis run. Set the seed parameter to a constant to return the same\\npseudo-random numbers each time the software is run.
\\nrandomSeed(99);\\nfor (let i = 0; i < 100; i++) {\\n let r = random(0, 255);\\n stroke(r);\\n line(i, 0, i, 100);\\n}\\n
Return a random floating-point number.
Takes either 0, 1 or 2 arguments.
If no argument is given, returns a random number from 0\\nup to (but not including) 1.
If one argument is given and it is a number, returns a random number from 0\\nup to (but not including) the number.
If one argument is given and it is an array, returns a random element from\\nthat array.
If two arguments are given, returns a random number from the\\nfirst argument up to (but not including) the second argument.
\\nfor (let i = 0; i < 100; i++) {\\n let r = random(50);\\n stroke(r * 5);\\n line(50, i, 50 + r, i);\\n}\\n
\\nfor (let i = 0; i < 100; i++) {\\n let r = random(-50, 50);\\n line(50, i, 50 + r, i);\\n}\\n
\\n// Get a random element from an array using the random(Array) syntax\\nlet words = ['apple', 'bear', 'cat', 'dog'];\\nlet word = random(words); // select random word\\ntext(word, 10, 50); // draw the word\\n
the lower bound (inclusive)
the upper bound (exclusive)
the array to choose from
Returns a random number fitting a Gaussian, or\\n normal, distribution. There is theoretically no minimum or maximum\\n value that randomGaussian() might return. Rather, there is\\n just a very low probability that values far from the mean will be\\n returned; and a higher probability that numbers near the mean will\\n be returned.\\n \\n Takes either 0, 1 or 2 arguments.\\n If no args, returns a mean of 0 and standard deviation of 1.\\n If one arg, that arg is the mean (standard deviation is 1).\\n If two args, first is mean, second is standard deviation.
the mean
the standard deviation
\\n for (let y = 0; y < 100; y++) {\\n let x = randomGaussian(50, 15);\\n line(50, y, x, y);\\n }\\n
\\n let distribution = new Array(360);\\nfunction setup() {\\n createCanvas(100, 100);\\n for (let i = 0; i < distribution.length; i++) {\\n distribution[i] = floor(randomGaussian(0, 15));\\n }\\n }\\nfunction draw() {\\n background(204);\\n translate(width / 2, width / 2);\\n for (let i = 0; i < distribution.length; i++) {\\n rotate(TWO_PI / distribution.length);\\n stroke(0);\\n let dist = abs(distribution[i]);\\n line(0, 0, dist, 0);\\n }\\n }\\n
The inverse of cos(), returns the arc cosine of a value. This function\\nexpects the values in the range of -1 to 1 and values are returned in\\nthe range 0 to PI (3.1415927).
the value whose arc cosine is to be returned
\\nlet a = PI;\\nlet c = cos(a);\\nlet ac = acos(c);\\n// Prints: \\\"3.1415927 : -1.0 : 3.1415927\\\"\\nprint(a + ' : ' + c + ' : ' + ac);\\n
\\nlet a = PI + PI / 4.0;\\nlet c = cos(a);\\nlet ac = acos(c);\\n// Prints: \\\"3.926991 : -0.70710665 : 2.3561943\\\"\\nprint(a + ' : ' + c + ' : ' + ac);\\n
The inverse of sin(), returns the arc sine of a value. This function\\nexpects the values in the range of -1 to 1 and values are returned\\nin the range -PI/2 to PI/2.
the value whose arc sine is to be returned
\\nlet a = PI + PI / 3;\\nlet s = sin(a);\\nlet as = asin(s);\\n// Prints: \\\"1.0471976 : 0.86602545 : 1.0471976\\\"\\nprint(a + ' : ' + s + ' : ' + as);\\n
\\nlet a = PI + PI / 3.0;\\nlet s = sin(a);\\nlet as = asin(s);\\n// Prints: \\\"4.1887903 : -0.86602545 : -1.0471976\\\"\\nprint(a + ' : ' + s + ' : ' + as);\\n
The inverse of tan(), returns the arc tangent of a value. This function\\nexpects the values in the range of -Infinity to Infinity (exclusive) and\\nvalues are returned in the range -PI/2 to PI/2.
the value whose arc tangent is to be returned
\\nlet a = PI + PI / 3;\\nlet t = tan(a);\\nlet at = atan(t);\\n// Prints: \\\"1.0471976 : 1.7320509 : 1.0471976\\\"\\nprint(a + ' : ' + t + ' : ' + at);\\n
\\nlet a = PI + PI / 3.0;\\nlet t = tan(a);\\nlet at = atan(t);\\n// Prints: \\\"4.1887903 : 1.7320513 : 1.0471977\\\"\\nprint(a + ' : ' + t + ' : ' + at);\\n
Calculates the angle (in radians) from a specified point to the coordinate\\norigin as measured from the positive x-axis. Values are returned as a\\nfloat in the range from PI to -PI. The atan2() function is most often used\\nfor orienting geometry to the position of the cursor.\\n\\nNote: The y-coordinate of the point is the first parameter, and the\\nx-coordinate is the second parameter, due the the structure of calculating\\nthe tangent.
y-coordinate of the point
x-coordinate of the point
\\nfunction draw() {\\n background(204);\\n translate(width / 2, height / 2);\\n let a = atan2(mouseY - height / 2, mouseX - width / 2);\\n rotate(a);\\n rect(-30, -5, 60, 10);\\n}\\n
Calculates the cosine of an angle. This function takes into account the\\ncurrent angleMode. Values are returned in the range -1 to 1.
the angle
\\nlet a = 0.0;\\nlet inc = TWO_PI / 25.0;\\nfor (let i = 0; i < 25; i++) {\\n line(i * 4, 50, i * 4, 50 + cos(a) * 40.0);\\n a = a + inc;\\n}\\n
Calculates the sine of an angle. This function takes into account the\\ncurrent angleMode. Values are returned in the range -1 to 1.
\\nlet a = 0.0;\\nlet inc = TWO_PI / 25.0;\\nfor (let i = 0; i < 25; i++) {\\n line(i * 4, 50, i * 4, 50 + sin(a) * 40.0);\\n a = a + inc;\\n}\\n
Calculates the tangent of an angle. This function takes into account\\nthe current angleMode. Values are returned in the range -1 to 1.
\\nlet a = 0.0;\\nlet inc = TWO_PI / 50.0;\\nfor (let i = 0; i < 100; i = i + 2) {\\n line(i, 50, i, 50 + tan(a) * 2.0);\\n a = a + inc;\\n}\\n
Converts a radian measurement to its corresponding value in degrees.\\nRadians and degrees are two ways of measuring the same thing. There are\\n360 degrees in a circle and 2*PI radians in a circle. For example,\\n90° = PI/2 = 1.5707964. This function does not take into account the\\ncurrent angleMode.
the radians value to convert to degrees
\\nlet rad = PI / 4;\\nlet deg = degrees(rad);\\nprint(rad + ' radians is ' + deg + ' degrees');\\n// Prints: 0.7853981633974483 radians is 45 degrees\\n
Converts a degree measurement to its corresponding value in radians.\\nRadians and degrees are two ways of measuring the same thing. There are\\n360 degrees in a circle and 2*PI radians in a circle. For example,\\n90° = PI/2 = 1.5707964. This function does not take into account the\\ncurrent angleMode.
the degree value to convert to radians
\\nlet deg = 45.0;\\nlet rad = radians(deg);\\nprint(deg + ' degrees is ' + rad + ' radians');\\n// Prints: 45 degrees is 0.7853981633974483 radians\\n
Sets the current mode of p5 to given mode. Default mode is RADIANS.
either RADIANS or DEGREES
\\nfunction draw() {\\n background(204);\\n angleMode(DEGREES); // Change the mode to DEGREES\\n let a = atan2(mouseY - height / 2, mouseX - width / 2);\\n translate(width / 2, height / 2);\\n push();\\n rotate(a);\\n rect(-20, -5, 40, 10); // Larger rectangle is rotating in degrees\\n pop();\\n angleMode(RADIANS); // Change the mode to RADIANS\\n rotate(a); // variable a stays the same\\n rect(-40, -5, 20, 10); // Smaller rectangle is rotating in radians\\n}\\n
Sets the current alignment for drawing text. Accepts two\\narguments: horizAlign (LEFT, CENTER, or RIGHT) and\\nvertAlign (TOP, BOTTOM, CENTER, or BASELINE).
The horizAlign parameter is in reference to the x value\\nof the text() function, while the vertAlign parameter is\\nin reference to the y value.
So if you write textAlign(LEFT), you are aligning the left\\nedge of your text to the x value you give in text(). If you\\nwrite textAlign(RIGHT, TOP), you are aligning the right edge\\nof your text to the x value and the top of edge of the text\\nto the y value.
\\ntextSize(16);\\ntextAlign(RIGHT);\\ntext('ABCD', 50, 30);\\ntextAlign(CENTER);\\ntext('EFGH', 50, 50);\\ntextAlign(LEFT);\\ntext('IJKL', 50, 70);\\n
\\ntextSize(16);\\nstrokeWeight(0.5);\\n\\nline(0, 12, width, 12);\\ntextAlign(CENTER, TOP);\\ntext('TOP', 0, 12, width);\\n\\nline(0, 37, width, 37);\\ntextAlign(CENTER, CENTER);\\ntext('CENTER', 0, 37, width);\\n\\nline(0, 62, width, 62);\\ntextAlign(CENTER, BASELINE);\\ntext('BASELINE', 0, 62, width);\\n\\nline(0, 87, width, 87);\\ntextAlign(CENTER, BOTTOM);\\ntext('BOTTOM', 0, 87, width);\\n
horizontal alignment, either LEFT,\\n CENTER, or RIGHT
vertical alignment, either TOP,\\n BOTTOM, CENTER, or BASELINE
Sets/gets the spacing, in pixels, between lines of text. This\\nsetting will be used in all subsequent calls to the text() function.
\\n// Text to display. The \\\"\\\\n\\\" is a \\\"new line\\\" character\\nlet lines = 'L1\\\\nL2\\\\nL3';\\ntextSize(12);\\n\\ntextLeading(10); // Set leading to 10\\ntext(lines, 10, 25);\\n\\ntextLeading(20); // Set leading to 20\\ntext(lines, 40, 25);\\n\\ntextLeading(30); // Set leading to 30\\ntext(lines, 70, 25);\\n
the size in pixels for spacing between lines
Sets/gets the current font size. This size will be used in all subsequent\\ncalls to the text() function. Font size is measured in pixels.
\\ntextSize(12);\\ntext('Font Size 12', 10, 30);\\ntextSize(14);\\ntext('Font Size 14', 10, 60);\\ntextSize(16);\\ntext('Font Size 16', 10, 90);\\n
the size of the letters in units of pixels
Sets/gets the style of the text for system fonts to NORMAL, ITALIC, BOLD or BOLDITALIC.\\nNote: this may be is overridden by CSS styling. For non-system fonts\\n(opentype, truetype, etc.) please load styled fonts instead.
\\nstrokeWeight(0);\\ntextSize(12);\\ntextStyle(NORMAL);\\ntext('Font Style Normal', 10, 15);\\ntextStyle(ITALIC);\\ntext('Font Style Italic', 10, 40);\\ntextStyle(BOLD);\\ntext('Font Style Bold', 10, 65);\\ntextStyle(BOLDITALIC);\\ntext('Font Style Bold Italic', 10, 90);\\n
styling for text, either NORMAL,\\n ITALIC, BOLD or BOLDITALIC
Calculates and returns the width of any character or text string.
the String of characters to measure
\\ntextSize(28);\\n\\nlet aChar = 'P';\\nlet cWidth = textWidth(aChar);\\ntext(aChar, 0, 40);\\nline(cWidth, 0, cWidth, 50);\\n\\nlet aString = 'p5.js';\\nlet sWidth = textWidth(aString);\\ntext(aString, 0, 85);\\nline(sWidth, 50, sWidth, 100);\\n
Returns the ascent of the current font at its current size. The ascent\\nrepresents the distance, in pixels, of the tallest character above\\nthe baseline.
\\nlet base = height * 0.75;\\nlet scalar = 0.8; // Different for each font\\n\\ntextSize(32); // Set initial text size\\nlet asc = textAscent() * scalar; // Calc ascent\\nline(0, base - asc, width, base - asc);\\ntext('dp', 0, base); // Draw text on baseline\\n\\ntextSize(64); // Increase text size\\nasc = textAscent() * scalar; // Recalc ascent\\nline(40, base - asc, width, base - asc);\\ntext('dp', 40, base); // Draw text on baseline\\n
Returns the descent of the current font at its current size. The descent\\nrepresents the distance, in pixels, of the character with the longest\\ndescender below the baseline.
\\nlet base = height * 0.75;\\nlet scalar = 0.8; // Different for each font\\n\\ntextSize(32); // Set initial text size\\nlet desc = textDescent() * scalar; // Calc ascent\\nline(0, base + desc, width, base + desc);\\ntext('dp', 0, base); // Draw text on baseline\\n\\ntextSize(64); // Increase text size\\ndesc = textDescent() * scalar; // Recalc ascent\\nline(40, base + desc, width, base + desc);\\ntext('dp', 40, base); // Draw text on baseline\\n
Helper function to measure ascent and descent.
Loads an opentype font file (.otf, .ttf) from a file or a URL,\\nand returns a PFont Object. This method is asynchronous,\\nmeaning it may not finish before the next line in your sketch\\nis executed.\\n\\nThe path to the font should be relative to the HTML file\\nthat links in your sketch. Loading fonts from a URL or other\\nremote location may be blocked due to your browser's built-in\\nsecurity.
function to be executed after\\n loadFont() completes
function to be executed if\\n an error occurs
Calling loadFont() inside preload() guarantees that the load\\noperation will have completed before setup() and draw() are called.
\\nlet myFont;\\nfunction preload() {\\n myFont = loadFont('assets/inconsolata.otf');\\n}\\n\\nfunction setup() {\\n fill('#ED225D');\\n textFont(myFont);\\n textSize(36);\\n text('p5*js', 10, 50);\\n}\\n
\\nfunction setup() {\\n loadFont('assets/inconsolata.otf', drawText);\\n}\\n\\nfunction drawText(font) {\\n fill('#ED225D');\\n textFont(font, 36);\\n text('p5*js', 10, 50);\\n}\\n
You can also use the font filename string (without the file extension) to style other HTML\\nelements.
\\nfunction preload() {\\n loadFont('assets/inconsolata.otf');\\n}\\n\\nfunction setup() {\\n let myDiv = createDiv('hello there');\\n myDiv.style('font-family', 'Inconsolata');\\n}\\n
Draws text to the screen. Displays the information specified in the first\\nparameter on the screen in the position specified by the additional\\nparameters. A default font will be used unless a font is set with the\\ntextFont() function and a default size will be used unless a font is set\\nwith textSize(). Change the color of the text with the fill() function.\\nChange the outline of the text with the stroke() and strokeWeight()\\nfunctions.\\n\\nThe text displays in relation to the textAlign() function, which gives the\\noption to draw to the left, right, and center of the coordinates.\\n\\nThe x2 and y2 parameters define a rectangular area to display within and\\nmay only be used with string data. When these parameters are specified,\\nthey are interpreted based on the current rectMode() setting. Text that\\ndoes not fit completely within the rectangle specified will not be drawn\\nto the screen. If x2 and y2 are not specified, the baseline alignment is the\\ndefault, which means that the text will be drawn upwards from x and y.\\n\\nWEBGL: Only opentype/truetype fonts are supported. You must load a font using the\\nloadFont() method (see the example above).\\nstroke() currently has no effect in webgl mode.
the alphanumeric\\n symbols to be displayed
x-coordinate of text
y-coordinate of text
by default, the width of the text box,\\n see rectMode() for more info
by default, the height of the text box,\\n see rectMode() for more info
\\ntextSize(32);\\ntext('word', 10, 30);\\nfill(0, 102, 153);\\ntext('word', 10, 60);\\nfill(0, 102, 153, 51);\\ntext('word', 10, 90);\\n
\\nlet s = 'The quick brown fox jumped over the lazy dog.';\\nfill(50);\\ntext(s, 10, 10, 70, 80); // Text wraps within text box\\n
\\nlet inconsolata;\\nfunction preload() {\\n inconsolata = loadFont('assets/inconsolata.otf');\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n textFont(inconsolata);\\n textSize(width / 3);\\n textAlign(CENTER, CENTER);\\n}\\nfunction draw() {\\n background(0);\\n let time = millis();\\n rotateX(time / 1000);\\n rotateZ(time / 1234);\\n text('p5.js', 0, 0);\\n}\\n
Sets the current font that will be drawn with the text() function.\\n\\nWEBGL: Only fonts loaded via loadFont() are supported.
\\nfill(0);\\ntextSize(12);\\ntextFont('Georgia');\\ntext('Georgia', 12, 30);\\ntextFont('Helvetica');\\ntext('Helvetica', 12, 60);\\n
\\nlet fontRegular, fontItalic, fontBold;\\nfunction preload() {\\n fontRegular = loadFont('assets/Regular.otf');\\n fontItalic = loadFont('assets/Italic.ttf');\\n fontBold = loadFont('assets/Bold.ttf');\\n}\\nfunction setup() {\\n background(210);\\n fill(0)\\n .strokeWeight(0)\\n .textSize(10);\\n textFont(fontRegular);\\n text('Font Style Normal', 10, 30);\\n textFont(fontItalic);\\n text('Font Style Italic', 10, 50);\\n textFont(fontBold);\\n text('Font Style Bold', 10, 70);\\n}\\n
a font loaded via loadFont(), or a String\\nrepresenting a web safe font (a font\\nthat is generally available across all systems)
the font size to use
Underlying opentype font implementation
Returns a tight bounding box for the given text string using this\\nfont (currently only supports single lines)
a line of text
x-position
y-position
font size to use (optional) Default is 12.
opentype options (optional)\\n opentype fonts contains alignment and baseline options.\\n Default is 'LEFT' and 'alphabetic'
\\nlet font;\\nlet textString = 'Lorem ipsum dolor sit amet.';\\nfunction preload() {\\n font = loadFont('./assets/Regular.otf');\\n}\\nfunction setup() {\\n background(210);\\n\\n let bbox = font.textBounds(textString, 10, 30, 12);\\n fill(255);\\n stroke(0);\\n rect(bbox.x, bbox.y, bbox.w, bbox.h);\\n fill(0);\\n noStroke();\\n\\n textFont(font);\\n textSize(12);\\n text(textString, 10, 30);\\n}\\n
Computes an array of points following the path for specified text
font size to use (optional)
an (optional) object that can contain:
sampleFactor - the ratio of path-length to number of samples\\n(default=.1); higher values yield more points and are therefore\\nmore precise
simplifyThreshold - if set to a non-zero value, collinear points will be\\nbe removed from the polygon; the value represents the threshold angle to use\\nwhen determining whether two edges are collinear
\\nlet font;\\nfunction preload() {\\n font = loadFont('assets/inconsolata.otf');\\n}\\n\\nlet points;\\nlet bounds;\\nfunction setup() {\\n createCanvas(100, 100);\\n stroke(0);\\n fill(255, 104, 204);\\n\\n points = font.textToPoints('p5', 0, 0, 10, {\\n sampleFactor: 5,\\n simplifyThreshold: 0\\n });\\n bounds = font.textBounds(' p5 ', 0, 0, 10);\\n}\\n\\nfunction draw() {\\n background(255);\\n beginShape();\\n translate(-bounds.x * width / bounds.w, -bounds.y * height / bounds.h);\\n for (let i = 0; i < points.length; i++) {\\n let p = points[i];\\n vertex(\\n p.x * width / bounds.w +\\n sin(20 * p.y / bounds.h + millis() / 1000) * width / 30,\\n p.y * height / bounds.h\\n );\\n }\\n endShape(CLOSE);\\n}\\n
Adds a value to the end of an array. Extends the length of\\nthe array by one. Maps to Array.push().
Array to append
to be added to the Array
\\nfunction setup() {\\n var myArray = ['Mango', 'Apple', 'Papaya'];\\n print(myArray); // ['Mango', 'Apple', 'Papaya']\\n\\n append(myArray, 'Peach');\\n print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']\\n}\\n
Copies an array (or part of an array) to another array. The src array is\\ncopied to the dst array, beginning at the position specified by\\nsrcPosition and into the position specified by dstPosition. The number of\\nelements to copy is determined by length. Note that copying values\\noverwrites existing values in the destination array. To append values\\ninstead of overwriting them, use concat().\\n\\nThe simplified version with only two arguments, arrayCopy(src, dst),\\ncopies an entire array to another of the same size. It is equivalent to\\narrayCopy(src, 0, dst, 0, src.length).\\n\\nUsing this function is far more efficient for copying array data than\\niterating through a for() loop and copying each element individually.
\\nvar src = ['A', 'B', 'C'];\\nvar dst = [1, 2, 3];\\nvar srcPosition = 1;\\nvar dstPosition = 0;\\nvar length = 2;\\n\\nprint(src); // ['A', 'B', 'C']\\nprint(dst); // [ 1 , 2 , 3 ]\\n\\narrayCopy(src, srcPosition, dst, dstPosition, length);\\nprint(dst); // ['B', 'C', 3]\\n
the source Array
starting position in the source Array
the destination Array
starting position in the destination Array
number of Array elements to be copied
Concatenates two arrays, maps to Array.concat(). Does not modify the\\ninput arrays.
first Array to concatenate
second Array to concatenate
\\nfunction setup() {\\n var arr1 = ['A', 'B', 'C'];\\n var arr2 = [1, 2, 3];\\n\\n print(arr1); // ['A','B','C']\\n print(arr2); // [1,2,3]\\n\\n var arr3 = concat(arr1, arr2);\\n\\n print(arr1); // ['A','B','C']\\n print(arr2); // [1, 2, 3]\\n print(arr3); // ['A','B','C', 1, 2, 3]\\n}\\n
Reverses the order of an array, maps to Array.reverse()
Array to reverse
\\nfunction setup() {\\n var myArray = ['A', 'B', 'C'];\\n print(myArray); // ['A','B','C']\\n\\n reverse(myArray);\\n print(myArray); // ['C','B','A']\\n}\\n
Decreases an array by one element and returns the shortened array,\\nmaps to Array.pop().
Array to shorten
\\nfunction setup() {\\n var myArray = ['A', 'B', 'C'];\\n print(myArray); // ['A', 'B', 'C']\\n var newArray = shorten(myArray);\\n print(myArray); // ['A','B','C']\\n print(newArray); // ['A','B']\\n}\\n
Randomizes the order of the elements of an array. Implements\\n\\nFisher-Yates Shuffle Algorithm.
Array to shuffle
modify passed array
\\nfunction setup() {\\n var regularArr = ['ABC', 'def', createVector(), TAU, Math.E];\\n print(regularArr);\\n shuffle(regularArr, true); // force modifications to passed array\\n print(regularArr);\\n\\n // By default shuffle() returns a shuffled cloned array:\\n var newArr = shuffle(regularArr);\\n print(regularArr);\\n print(newArr);\\n}\\n
Sorts an array of numbers from smallest to largest, or puts an array of\\nwords in alphabetical order. The original array is not modified; a\\nre-ordered array is returned. The count parameter states the number of\\nelements to sort. For example, if there are 12 elements in an array and\\ncount is set to 5, only the first 5 elements in the array will be sorted.
Array to sort
number of elements to sort, starting from 0
\\nfunction setup() {\\n var words = ['banana', 'apple', 'pear', 'lime'];\\n print(words); // ['banana', 'apple', 'pear', 'lime']\\n var count = 4; // length of array\\n\\n words = sort(words, count);\\n print(words); // ['apple', 'banana', 'lime', 'pear']\\n}\\n
\\nfunction setup() {\\n var numbers = [2, 6, 1, 5, 14, 9, 8, 12];\\n print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]\\n var count = 5; // Less than the length of the array\\n\\n numbers = sort(numbers, count);\\n print(numbers); // [1,2,5,6,14,9,8,12]\\n}\\n
Inserts a value or an array of values into an existing array. The first\\nparameter specifies the initial array to be modified, and the second\\nparameter defines the data to be inserted. The third parameter is an index\\nvalue which specifies the array position from which to insert data.\\n(Remember that array index numbering starts at zero, so the first position\\nis 0, the second position is 1, and so on.)
Array to splice into
value to be spliced in
in the array from which to insert data
\\nfunction setup() {\\n var myArray = [0, 1, 2, 3, 4];\\n var insArray = ['A', 'B', 'C'];\\n print(myArray); // [0, 1, 2, 3, 4]\\n print(insArray); // ['A','B','C']\\n\\n splice(myArray, insArray, 3);\\n print(myArray); // [0,1,2,'A','B','C',3,4]\\n}\\n
Extracts an array of elements from an existing array. The list parameter\\ndefines the array from which the elements will be copied, and the start\\nand count parameters specify which elements to extract. If no count is\\ngiven, elements will be extracted from the start to the end of the array.\\nWhen specifying the start, remember that the first array element is 0.\\nThis function does not change the source array.
Array to extract from
position to begin
number of values to extract
\\nfunction setup() {\\n var myArray = [1, 2, 3, 4, 5];\\n print(myArray); // [1, 2, 3, 4, 5]\\n\\n var sub1 = subset(myArray, 0, 3);\\n var sub2 = subset(myArray, 2, 2);\\n print(sub1); // [1,2,3]\\n print(sub2); // [3,4]\\n}\\n
Converts a string to its floating point representation. The contents of a\\nstring must resemble a number, or NaN (not a number) will be returned.\\nFor example, float("1234.56") evaluates to 1234.56, but float("giraffe")\\nwill return NaN.
When an array of values is passed in, then an array of floats of the same\\nlength is returned.
float string to parse
\\nvar str = '20';\\nvar diameter = float(str);\\nellipse(width / 2, height / 2, diameter, diameter);\\n
\\nprint(float('10.31')); // 10.31\\nprint(float('Infinity')); // Infinity\\nprint(float('-Infinity')); // -Infinity\\n
Converts a boolean, string, or float to its integer representation.\\nWhen an array of values is passed in, then an int array of the same length\\nis returned.
\\nprint(int('10')); // 10\\nprint(int(10.31)); // 10\\nprint(int(-10)); // -10\\nprint(int(true)); // 1\\nprint(int(false)); // 0\\nprint(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]\\nprint(int(Infinity)); // Infinity\\nprint(int('-Infinity')); // -Infinity\\n
value to parse
the radix to convert to (default: 10)
values to parse
Converts a boolean, string or number to its string representation.\\nWhen an array of values is passed in, then an array of strings of the same\\nlength is returned.
\\nprint(str('10')); // \\\"10\\\"\\nprint(str(10.31)); // \\\"10.31\\\"\\nprint(str(-10)); // \\\"-10\\\"\\nprint(str(true)); // \\\"true\\\"\\nprint(str(false)); // \\\"false\\\"\\nprint(str([true, '10.3', 9.8])); // [ \\\"true\\\", \\\"10.3\\\", \\\"9.8\\\" ]\\n
Converts a number or string to its boolean representation.\\nFor a number, any non-zero value (positive or negative) evaluates to true,\\nwhile zero evaluates to false. For a string, the value "true" evaluates to\\ntrue, while any other value evaluates to false. When an array of number or\\nstring values is passed in, then a array of booleans of the same length is\\nreturned.
\\nprint(boolean(0)); // false\\nprint(boolean(1)); // true\\nprint(boolean('true')); // true\\nprint(boolean('abcd')); // false\\nprint(boolean([0, 12, 'true'])); // [false, true, true]\\n
Converts a number, string representation of a number, or boolean to its byte\\nrepresentation. A byte can be only a whole number between -128 and 127, so\\nwhen a value outside of this range is converted, it wraps around to the\\ncorresponding byte representation. When an array of number, string or boolean\\nvalues is passed in, then an array of bytes the same length is returned.
\\nprint(byte(127)); // 127\\nprint(byte(128)); // -128\\nprint(byte(23.4)); // 23\\nprint(byte('23.4')); // 23\\nprint(byte('hello')); // NaN\\nprint(byte(true)); // 1\\nprint(byte([0, 255, '100'])); // [0, -1, 100]\\n
Converts a number or string to its corresponding single-character\\nstring representation. If a string parameter is provided, it is first\\nparsed as an integer and then translated into a single-character string.\\nWhen an array of number or string values is passed in, then an array of\\nsingle-character strings of the same length is returned.
\\nprint(char(65)); // \\\"A\\\"\\nprint(char('65')); // \\\"A\\\"\\nprint(char([65, 66, 67])); // [ \\\"A\\\", \\\"B\\\", \\\"C\\\" ]\\nprint(join(char([65, 66, 67]), '')); // \\\"ABC\\\"\\n
Converts a single-character string to its corresponding integer\\nrepresentation. When an array of single-character string values is passed\\nin, then an array of integers of the same length is returned.
\\nprint(unchar('A')); // 65\\nprint(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]\\nprint(unchar(split('ABC', ''))); // [ 65, 66, 67 ]\\n
Converts a number to a string in its equivalent hexadecimal notation. If a\\nsecond parameter is passed, it is used to set the number of characters to\\ngenerate in the hexadecimal notation. When an array is passed in, an\\narray of strings in hexadecimal notation of the same length is returned.
\\nprint(hex(255)); // \\\"000000FF\\\"\\nprint(hex(255, 6)); // \\\"0000FF\\\"\\nprint(hex([0, 127, 255], 6)); // [ \\\"000000\\\", \\\"00007F\\\", \\\"0000FF\\\" ]\\nprint(Infinity); // \\\"FFFFFFFF\\\"\\nprint(-Infinity); // \\\"00000000\\\"\\n
array of values to parse
Converts a string representation of a hexadecimal number to its equivalent\\ninteger value. When an array of strings in hexadecimal notation is passed\\nin, an array of integers of the same length is returned.
\\nprint(unhex('A')); // 10\\nprint(unhex('FF')); // 255\\nprint(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]\\n
Combines an array of Strings into one String, each separated by the\\ncharacter(s) used for the separator parameter. To join arrays of ints or\\nfloats, it's necessary to first convert them to Strings using nf() or\\nnfs().
array of Strings to be joined
String to be placed between each item
\\nvar array = ['Hello', 'world!'];\\nvar separator = ' ';\\nvar message = join(array, separator);\\ntext(message, 5, 50);\\n
This function is used to apply a regular expression to a piece of text,\\nand return matching groups (elements found inside parentheses) as a\\nString array. If there are no matches, a null value will be returned.\\nIf no groups are specified in the regular expression, but the sequence\\nmatches, an array of length 1 (with the matched text as the first element\\nof the array) will be returned.\\n\\nTo use the function, first check to see if the result is null. If the\\nresult is null, then the sequence did not match at all. If the sequence\\ndid match, an array is returned.\\n\\nIf there are groups (specified by sets of parentheses) in the regular\\nexpression, then the contents of each will be returned in the array.\\nElement [0] of a regular expression match returns the entire matching\\nstring, and the match groups start at element [1] (the first group is [1],\\nthe second [2], and so on).
the String to be searched
the regexp to be used for matching
\\nvar string = 'Hello p5js*!';\\nvar regexp = 'p5js\\\\\\\\*';\\nvar m = match(string, regexp);\\ntext(m, 5, 50);\\n
This function is used to apply a regular expression to a piece of text,\\nand return a list of matching groups (elements found inside parentheses)\\nas a two-dimensional String array. If there are no matches, a null value\\nwill be returned. If no groups are specified in the regular expression,\\nbut the sequence matches, a two dimensional array is still returned, but\\nthe second dimension is only of length one.\\n\\nTo use the function, first check to see if the result is null. If the\\nresult is null, then the sequence did not match at all. If the sequence\\ndid match, a 2D array is returned.\\n\\nIf there are groups (specified by sets of parentheses) in the regular\\nexpression, then the contents of each will be returned in the array.\\nAssuming a loop with counter variable i, element [i][0] of a regular\\nexpression match returns the entire matching string, and the match groups\\nstart at element [i][1] (the first group is [i][1], the second [i][2],\\nand so on).
\\nvar string = 'Hello p5js*! Hello world!';\\nvar regexp = 'Hello';\\nmatchAll(string, regexp);\\n
Utility function for formatting numbers into strings. There are two\\nversions: one for formatting floats, and one for formatting ints.\\nThe values for the digits, left, and right parameters should always\\nbe positive integers.\\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\\nif greater than the current length of the number.\\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\\nthe result will be 123.200.
\\nvar myFont;\\nfunction preload() {\\n myFont = loadFont('assets/fonts/inconsolata.ttf');\\n}\\nfunction setup() {\\n background(200);\\n var num1 = 321;\\n var num2 = -1321;\\n\\n noStroke();\\n fill(0);\\n textFont(myFont);\\n textSize(22);\\n\\n text(nf(num1, 4, 2), 10, 30);\\n text(nf(num2, 4, 2), 10, 80);\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n
the Number to format
number of digits to the left of the\\n decimal point
number of digits to the right of the\\n decimal point
the Numbers to format
Utility function for formatting numbers into strings and placing\\nappropriate commas to mark units of 1000. There are two versions: one\\nfor formatting ints, and one for formatting an array of ints. The value\\nfor the right parameter should always be a positive integer.
\\nfunction setup() {\\n background(200);\\n var num = 11253106.115;\\n var numArr = [1, 1, 2];\\n\\n noStroke();\\n fill(0);\\n textSize(12);\\n\\n // Draw formatted numbers\\n text(nfc(num, 4), 10, 30);\\n text(nfc(numArr, 2), 10, 80);\\n\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n
Utility function for formatting numbers into strings. Similar to nf() but\\nputs a "+" in front of positive numbers and a "-" in front of negative\\nnumbers. There are two versions: one for formatting floats, and one for\\nformatting ints. The values for left, and right parameters\\nshould always be positive integers.
\\nfunction setup() {\\n background(200);\\n var num1 = 11253106.115;\\n var num2 = -11253106.115;\\n\\n noStroke();\\n fill(0);\\n textSize(12);\\n\\n // Draw formatted numbers\\n text(nfp(num1, 4, 2), 10, 30);\\n text(nfp(num2, 4, 2), 10, 80);\\n\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n
number of digits to the left of the decimal\\n point
Utility function for formatting numbers into strings. Similar to nf() but\\nputs an additional "_" (space) in front of positive numbers just in case to align it with negative\\nnumbers which includes "-" (minus) sign.\\nThe main usecase of nfs() can be seen when one wants to align the digits (place values) of a positive\\nnumber with some negative number (See the example to get a clear picture).\\nThere are two versions: one for formatting float, and one for formatting int.\\nThe values for the digits, left, and right parameters should always be positive integers.\\n(IMP): The result on the canvas basically the expected alignment can vary based on the typeface you are using.\\n(NOTE): Be cautious when using left and right parameters as it prepends numbers of 0's if the parameter\\nif greater than the current length of the number.\\nFor example if number is 123.2 and left parameter passed is 4 which is greater than length of 123\\n(integer part) i.e 3 than result will be 0123.2. Same case for right parameter i.e. if right is 3 than\\nthe result will be 123.200.
\\nvar myFont;\\nfunction preload() {\\n myFont = loadFont('assets/fonts/inconsolata.ttf');\\n}\\nfunction setup() {\\n background(200);\\n var num1 = 321;\\n var num2 = -1321;\\n\\n noStroke();\\n fill(0);\\n textFont(myFont);\\n textSize(22);\\n\\n // nfs() aligns num1 (positive number) with num2 (negative number) by\\n // adding a blank space in front of the num1 (positive number)\\n // [left = 4] in num1 add one 0 in front, to align the digits with num2\\n // [right = 2] in num1 and num2 adds two 0's after both numbers\\n // To see the differences check the example of nf() too.\\n text(nfs(num1, 4, 2), 10, 30);\\n text(nfs(num2, 4, 2), 10, 80);\\n // Draw dividing line\\n stroke(120);\\n line(0, 50, width, 50);\\n}\\n
The split() function maps to String.split(), it breaks a String into\\npieces using a character or string as the delimiter. The delim parameter\\nspecifies the character or characters that mark the boundaries between\\neach piece. A String[] array is returned that contains each of the pieces.
The splitTokens() function works in a similar fashion, except that it\\nsplits using a range of characters instead of a specific character or\\nsequence.
the String to be split
the String used to separate the data
\\nvar names = 'Pat,Xio,Alex';\\nvar splitString = split(names, ',');\\ntext(splitString[0], 5, 30);\\ntext(splitString[1], 5, 50);\\ntext(splitString[2], 5, 70);\\n
The splitTokens() function splits a String at one or many character\\ndelimiters or "tokens." The delim parameter specifies the character or\\ncharacters to be used as a boundary.\\n\\nIf no delim characters are specified, any whitespace character is used to\\nsplit. Whitespace characters include tab (\\\\t), line feed (\\\\n), carriage\\nreturn (\\\\r), form feed (\\\\f), and space.
list of individual Strings that will be used as\\n separators
\\nfunction setup() {\\n var myStr = 'Mango, Banana, Lime';\\n var myStrArr = splitTokens(myStr, ',');\\n\\n print(myStrArr); // prints : [\\\"Mango\\\",\\\" Banana\\\",\\\" Lime\\\"]\\n}\\n
Removes whitespace characters from the beginning and end of a String. In\\naddition to standard whitespace characters such as space, carriage return,\\nand tab, this function also removes the Unicode "nbsp" character.
\\nvar string = trim(' No new lines\\\\n ');\\ntext(string + ' here', 2, 50);\\n
a String to be trimmed
an Array of Strings to be trimmed
p5.js communicates with the clock on your computer. The day() function\\nreturns the current day as a value from 1 - 31.
\\nvar d = day();\\ntext('Current day: \\\\n' + d, 5, 50);\\n
p5.js communicates with the clock on your computer. The hour() function\\nreturns the current hour as a value from 0 - 23.
\\nvar h = hour();\\ntext('Current hour:\\\\n' + h, 5, 50);\\n
p5.js communicates with the clock on your computer. The minute() function\\nreturns the current minute as a value from 0 - 59.
\\nvar m = minute();\\ntext('Current minute: \\\\n' + m, 5, 50);\\n
Returns the number of milliseconds (thousandths of a second) since\\nstarting the program. This information is often used for timing events and\\nanimation sequences.
\\nvar millisecond = millis();\\ntext('Milliseconds \\\\nrunning: \\\\n' + millisecond, 5, 40);\\n
p5.js communicates with the clock on your computer. The month() function\\nreturns the current month as a value from 1 - 12.
\\nvar m = month();\\ntext('Current month: \\\\n' + m, 5, 50);\\n
p5.js communicates with the clock on your computer. The second() function\\nreturns the current second as a value from 0 - 59.
\\nvar s = second();\\ntext('Current second: \\\\n' + s, 5, 50);\\n
p5.js communicates with the clock on your computer. The year() function\\nreturns the current year as an integer (2014, 2015, 2016, etc).
\\nvar y = year();\\ntext('Current year: \\\\n' + y, 5, 50);\\n
Draw a plane with given a width and height
width of the plane
height of the plane
Optional number of triangle\\n subdivisions in x-dimension
Optional number of triangle\\n subdivisions in y-dimension
\\n// draw a plane\\n// with width 50 and height 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n plane(50, 50);\\n}\\n
Draw a box with given width, height and depth
width of the box
height of the box
depth of the box
\\n// draw a spinning box\\n// with width, height and depth of 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n box(50);\\n}\\n
Draw a sphere with given radius
radius of circle
number of segments,\\n the more segments the smoother geometry\\n default is 24
number of segments,\\n the more segments the smoother geometry\\n default is 16
\\n// draw a sphere with radius 40\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n sphere(40);\\n}\\n
Draw a cylinder with given radius and height
radius of the surface
height of the cylinder
number of segments in y-dimension,\\n the more segments the smoother geometry\\n default is 1
whether to draw the bottom of the cylinder
whether to draw the top of the cylinder
\\n// draw a spinning cylinder\\n// with radius 20 and height 50\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateZ(frameCount * 0.01);\\n cylinder(20, 50);\\n}\\n
Draw a cone with given radius and height
radius of the bottom surface
height of the cone
number of segments,\\n the more segments the smoother geometry\\n default is 1
whether to draw the base of the cone
\\n// draw a spinning cone\\n// with radius 40 and height 70\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateZ(frameCount * 0.01);\\n cone(40, 70);\\n}\\n
Draw an ellipsoid with given radius
x-radius of ellipsoid
y-radius of ellipsoid
z-radius of ellipsoid
number of segments,\\n the more segments the smoother geometry\\n default is 24. Avoid detail number above\\n 150, it may crash the browser.
number of segments,\\n the more segments the smoother geometry\\n default is 16. Avoid detail number above\\n 150, it may crash the browser.
\\n// draw an ellipsoid\\n// with radius 30, 40 and 40.\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipsoid(30, 40, 40);\\n}\\n
Draw a torus with given radius and tube radius
radius of the whole ring
radius of the tube
number of segments in x-dimension,\\n the more segments the smoother geometry\\n default is 24
number of segments in y-dimension,\\n the more segments the smoother geometry\\n default is 16
\\n// draw a spinning torus\\n// with ring radius 30 and tube radius 15\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n torus(30, 15);\\n}\\n
Allows movement around a 3D sketch using a mouse or trackpad. Left-clicking\\nand dragging will rotate the camera position about the center of the sketch,\\nright-clicking and dragging will pan the camera position without rotation,\\nand using the mouse wheel (scrolling) will move the camera closer or further\\nfrom the center of the sketch. This function can be called with parameters\\ndictating sensitivity to mouse movement along the X and Y axes. Calling\\nthis function without parameters is equivalent to calling orbitControl(1,1).\\nTo reverse direction of movement in either axis, enter a negative number\\nfor sensitivity.
sensitivity to mouse movement along X axis
sensitivity to mouse movement along Y axis
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n rotateY(0.5);\\n box(30, 50);\\n}\\n
debugMode() helps visualize 3D space by adding a grid to indicate where the\\n‘ground’ is in a sketch and an axes icon which indicates the +X, +Y, and +Z\\ndirections. This function can be called without parameters to create a\\ndefault grid and axes icon, or it can be called according to the examples\\nabove to customize the size and position of the grid and/or axes icon. The\\ngrid is drawn using the most recently set stroke color and weight. To\\nspecify these parameters, add a call to stroke() and strokeWeight()\\njust before the end of the draw() loop.
By default, the grid will run through the origin (0,0,0) of the sketch\\nalong the XZ plane\\nand the axes icon will be offset from the origin. Both the grid and axes\\nicon will be sized according to the current canvas size. Note that because the\\ngrid runs parallel to the default camera view, it is often helpful to use\\ndebugMode along with orbitControl to allow full view of the grid.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode();\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n // Press the spacebar to turn debugMode off!\\n if (keyIsDown(32)) {\\n noDebugMode();\\n }\\n}\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(GRID);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(AXES);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(GRID, 100, 10, 0, 0, 0);\\n}\\n\\nfunction draw() {\\n background(200);\\n orbitControl();\\n box(15, 30);\\n}\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\\n normalMaterial();\\n debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);\\n}\\n\\nfunction draw() {\\n noStroke();\\n background(200);\\n orbitControl();\\n box(15, 30);\\n // set the stroke color and weight for the grid!\\n stroke(255, 0, 150);\\n strokeWeight(0.8);\\n}\\n
either GRID or AXES
size of one side of the grid
number of divisions in the grid
X axis offset from origin (0,0,0)
Y axis offset from origin (0,0,0)
Z axis offset from origin (0,0,0)
size of axes icon
Turns off debugMode() in a 3D sketch.
Creates an ambient light with a color
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n ambientLight(150);\\n ambientMaterial(250);\\n noStroke();\\n sphere(40);\\n}\\n
the alpha value
the ambient light color
Creates a directional light with a color and a direction
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n //move your mouse to change light direction\\n let dirX = (mouseX / width - 0.5) * 2;\\n let dirY = (mouseY / height - 0.5) * 2;\\n directionalLight(250, 250, 250, -dirX, -dirY, -1);\\n noStroke();\\n sphere(40);\\n}\\n
red or hue value (depending on the current\\ncolor mode),
green or saturation value
blue or brightness value
the direction of the light
color Array, CSS color string,\\n or p5.Color value
x axis direction
y axis direction
z axis direction
Creates a point light with a color and a light position
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n //move your mouse to change light position\\n let locX = mouseX - width / 2;\\n let locY = mouseY - height / 2;\\n // to set the light position,\\n // think of the world's coordinate as:\\n // -width/2,-height/2 -------- width/2,-height/2\\n // | |\\n // | 0,0 |\\n // | |\\n // -width/2,height/2--------width/2,height/2\\n pointLight(250, 250, 250, locX, locY, 50);\\n noStroke();\\n sphere(40);\\n}\\n
x axis position
y axis position
z axis position
the position of the light
color Array, CSS color string,\\nor p5.Color value
Sets the default ambient and directional light. The defaults are ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1). Lights need to be included in the draw() to remain persistent in a looping program. Placing them in the setup() of a looping program will cause them to only have an effect the first time through the loop.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n lights();\\n rotateX(millis() / 1000);\\n rotateY(millis() / 1000);\\n rotateZ(millis() / 1000);\\n box();\\n}\\n
Load a 3d model from an OBJ file.\\n\\nOne of the limitations of the OBJ format is that it doesn't have a built-in\\nsense of scale. This means that models exported from different programs might\\nbe very different sizes. If your model isn't displaying, try calling\\nloadModel() with the normalized parameter set to true. This will resize the\\nmodel to a scale appropriate for p5. You can also make additional changes to\\nthe final size of your model with the scale() function.
\\n//draw a spinning octahedron\\nlet octahedron;\\n\\nfunction preload() {\\n octahedron = loadModel('assets/octahedron.obj');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n model(octahedron);\\n}\\n
\\n//draw a spinning teapot\\nlet teapot;\\n\\nfunction preload() {\\n // Load model with normalise parameter set to true\\n teapot = loadModel('assets/teapot.obj', true);\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n scale(0.4); // Scaled to make model fit into canvas\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n normalMaterial(); // For effect\\n model(teapot);\\n}\\n
Path of the model to be loaded
If true, scale the model to a\\n standardized size when loading
Function to be called\\n once the model is loaded. Will be passed\\n the 3D model object.
Parse OBJ lines into model. For reference, this is what a simple model of a\\nsquare might look like:
v -0.5 -0.5 0.5\\nv -0.5 -0.5 -0.5\\nv -0.5 0.5 -0.5\\nv -0.5 0.5 0.5
f 4 3 2 1
Render a 3d model to the screen.
Loaded 3d model to be rendered
Loads a custom shader from the provided vertex and fragment\\nshader paths. The shader files are loaded asynchronously in the\\nbackground, so this method should be used in preload().
For now, there are three main types of shaders. p5 will automatically\\nsupply appropriate vertices, normals, colors, and lighting attributes\\nif the parameters defined in the shader match the names.
path to file containing vertex shader\\nsource code
path to file containing fragment shader\\nsource code
callback to be executed after loadShader\\ncompletes. On success, the Shader object is passed as the first argument.
callback to be executed when an error\\noccurs inside loadShader. On error, the error is passed as the first\\nargument.
\\nlet mandel;\\nfunction preload() {\\n // load the shader definitions from files\\n mandel = loadShader('assets/shader.vert', 'assets/shader.frag');\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n // use the shader\\n shader(mandel);\\n noStroke();\\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\\n}\\n\\nfunction draw() {\\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\\n}\\n
source code for the vertex shader
source code for the fragment shader
\\n// the 'varying's are shared between both vertex & fragment shaders\\nlet varying = 'precision highp float; varying vec2 vPos;';\\n\\n// the vertex shader is called for each vertex\\nlet vs =\\n varying +\\n 'attribute vec3 aPosition;' +\\n 'void main() { vPos = (gl_Position = vec4(aPosition,1.0)).xy; }';\\n\\n// the fragment shader is called for each pixel\\nlet fs =\\n varying +\\n 'uniform vec2 p;' +\\n 'uniform float r;' +\\n 'const int I = 500;' +\\n 'void main() {' +\\n ' vec2 c = p + vPos * r, z = c;' +\\n ' float n = 0.0;' +\\n ' for (int i = I; i > 0; i --) {' +\\n ' if(z.x*z.x+z.y*z.y > 4.0) {' +\\n ' n = float(i)/float(I);' +\\n ' break;' +\\n ' }' +\\n ' z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;' +\\n ' }' +\\n ' gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);' +\\n '}';\\n\\nlet mandel;\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n\\n // create and initialize the shader\\n mandel = createShader(vs, fs);\\n shader(mandel);\\n noStroke();\\n\\n // 'p' is the center point of the Mandelbrot image\\n mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\\n}\\n\\nfunction draw() {\\n // 'r' is the size of the image in Mandelbrot-space\\n mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\\n quad(-1, -1, 1, -1, 1, 1, -1, 1);\\n}\\n
The shader() function lets the user provide a custom shader\\nto fill in shapes in WEBGL mode. Users can create their\\nown shaders by loading vertex and fragment shaders with\\nloadShader().
the desired p5.Shader to use for rendering\\nshapes.
This function restores the default shaders in WEBGL mode. Code that runs\\nafter resetShader() will not be affected by previously defined\\nshaders. Should be run after shader().
Normal material for geometry. You can view all\\npossible materials in this\\nexample.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(200);\\n normalMaterial();\\n sphere(40);\\n}\\n
Texture for geometry. You can view other possible materials in this\\nexample.
2-dimensional graphics\\n to render as texture
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n rotateZ(frameCount * 0.01);\\n rotateX(frameCount * 0.01);\\n rotateY(frameCount * 0.01);\\n //pass image as texture\\n texture(img);\\n box(200, 200, 200);\\n}\\n
\\nlet pg;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n pg = createGraphics(200, 200);\\n pg.textSize(75);\\n}\\n\\nfunction draw() {\\n background(0);\\n pg.background(255);\\n pg.text('hello!', 0, 100);\\n //pass image as texture\\n texture(pg);\\n rotateX(0.5);\\n noStroke();\\n plane(50);\\n}\\n
\\nlet vid;\\nfunction preload() {\\n vid = createVideo('assets/fingers.mov');\\n vid.hide();\\n}\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(0);\\n //pass video frame as texture\\n texture(vid);\\n rect(-40, -40, 80, 80);\\n}\\n\\nfunction mousePressed() {\\n vid.loop();\\n}\\n
Sets the coordinate space for texture mapping. The default mode is IMAGE\\nwhich refers to the actual coordinates of the image.\\nNORMAL refers to a normalized space of values ranging from 0 to 1.\\nThis function only works in WEBGL mode.
With IMAGE, if an image is 100 x 200 pixels, mapping the image onto the entire\\nsize of a quad would require the points (0,0) (100, 0) (100,200) (0,200).\\nThe same mapping in NORMAL is (0,0) (1,0) (1,1) (0,1).
either IMAGE or NORMAL
\\nlet img;\\n\\nfunction preload() {\\n img = loadImage('assets/laDefense.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n texture(img);\\n textureMode(NORMAL);\\n beginShape();\\n vertex(-50, -50, 0, 0);\\n vertex(50, -50, 1, 0);\\n vertex(50, 50, 1, 1);\\n vertex(-50, 50, 0, 1);\\n endShape();\\n}\\n
Sets the global texture wrapping mode. This controls how textures behave\\nwhen their uv's go outside of the 0 - 1 range. There are three options:\\nCLAMP, REPEAT, and MIRROR.
CLAMP causes the pixels at the edge of the texture to extend to the bounds\\nREPEAT causes the texture to tile repeatedly until reaching the bounds\\nMIRROR works similarly to REPEAT but it flips the texture with every new tile
REPEAT & MIRROR are only available if the texture\\nis a power of two size (128, 256, 512, 1024, etc.).
This method will affect all textures in your sketch until a subsequent\\ntextureWrap call is made.
If only one argument is provided, it will be applied to both the\\nhorizontal and vertical axes.
either CLAMP, REPEAT, or MIRROR
\\nlet img;\\nfunction preload() {\\n img = loadImage('assets/rockies128.jpg');\\n}\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n textureWrap(MIRROR);\\n}\\n\\nfunction draw() {\\n background(0);\\n\\n let dX = mouseX;\\n let dY = mouseY;\\n\\n let u = lerp(1.0, 2.0, dX);\\n let v = lerp(1.0, 2.0, dY);\\n\\n scale(width / 2);\\n\\n texture(img);\\n\\n beginShape(TRIANGLES);\\n vertex(-1, -1, 0, 0, 0);\\n vertex(1, -1, 0, u, 0);\\n vertex(1, 1, 0, u, v);\\n\\n vertex(1, 1, 0, u, v);\\n vertex(-1, 1, 0, 0, v);\\n vertex(-1, -1, 0, 0, 0);\\n endShape();\\n}\\n
Ambient material for geometry with a given color. You can view all\\npossible materials in this\\nexample.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n ambientLight(200);\\n ambientMaterial(70, 130, 230);\\n sphere(40);\\n}\\n
gray value, red or hue value\\n (depending on the current color mode),
opacity
color, color Array, or CSS color string
Specular material for geometry with a given color. You can view all\\npossible materials in this\\nexample.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n ambientLight(50);\\n pointLight(250, 250, 250, 100, 100, 30);\\n specularMaterial(250);\\n sphere(40);\\n}\\n
color Array, or CSS color string
Sets the amount of gloss in the surface of shapes.\\nUsed in combination with specularMaterial() in setting\\nthe material properties of shapes. The default and minimum value is 1.
Degree of Shininess.\\n Defaults to 1.
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(0);\\n noStroke();\\n let locX = mouseX - width / 2;\\n let locY = mouseY - height / 2;\\n ambientLight(60, 60, 60);\\n pointLight(255, 255, 255, locX, locY, 50);\\n specularMaterial(250);\\n translate(-25, 0, 0);\\n shininess(1);\\n sphere(20);\\n translate(50, 0, 0);\\n shininess(20);\\n sphere(20);\\n}\\n
Sets the camera position for a 3D sketch. Parameters for this function define\\nthe position for the camera, the center of the sketch (where the camera is\\npointing), and an up direction (the orientation of the camera).
When called with no arguments, this function creates a default camera\\nequivalent to\\ncamera(0, 0, (height/2.0) / tan(PI*30.0 / 180.0), 0, 0, 0, 0, 1, 0);
camera position value on x axis
camera position value on y axis
camera position value on z axis
x coordinate representing center of the sketch
y coordinate representing center of the sketch
z coordinate representing center of the sketch
x component of direction 'up' from camera
y component of direction 'up' from camera
z component of direction 'up' from camera
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\nfunction draw() {\\n background(204);\\n //move the camera away from the plane by a sin wave\\n camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\\n plane(10, 10);\\n}\\n
Sets a perspective projection for the camera in a 3D sketch. This projection\\nrepresents depth through foreshortening: objects that are close to the camera\\nappear their actual size while those that are further away from the camera\\nappear smaller. The parameters to this function define the viewing frustum\\n(the truncated pyramid within which objects are seen by the camera) through\\nvertical field of view, aspect ratio (usually width/height), and near and far\\nclipping planes.
When called with no arguments, the defaults\\nprovided are equivalent to\\nperspective(PI/3.0, width/height, eyeZ/10.0, eyeZ10.0), where eyeZ\\nis equal to ((height/2.0) / tan(PI60.0/360.0));
camera frustum vertical field of view,\\n from bottom to top of view, in angleMode units
camera frustum aspect ratio
frustum near plane length
frustum far plane length
\\n//drag the mouse to look around!\\n//you will see there's a vanishing point\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n perspective(PI / 3.0, width / height, 0.1, 500);\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n normalMaterial();\\n\\n rotateX(-0.3);\\n rotateY(-0.2);\\n translate(0, 0, -50);\\n\\n push();\\n translate(-15, 0, sin(frameCount / 30) * 95);\\n box(30);\\n pop();\\n push();\\n translate(15, 0, sin(frameCount / 30 + PI) * 95);\\n box(30);\\n pop();\\n}\\n
Sets an orthographic projection for the camera in a 3D sketch and defines a\\nbox-shaped viewing frustum within which objects are seen. In this projection,\\nall objects with the same dimension appear the same size, regardless of\\nwhether they are near or far from the camera. The parameters to this\\nfunction specify the viewing frustum where left and right are the minimum and\\nmaximum x values, top and bottom are the minimum and maximum y values, and near\\nand far are the minimum and maximum z values. If no parameters are given, the\\ndefault is used: ortho(-width/2, width/2, -height/2, height/2).
camera frustum left plane
camera frustum right plane
camera frustum bottom plane
camera frustum top plane
camera frustum near plane
camera frustum far plane
\\n//drag the mouse to look around!\\n//there's no vanishing point\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\\n}\\nfunction draw() {\\n background(200);\\n orbitControl();\\n normalMaterial();\\n\\n rotateX(0.2);\\n rotateY(-0.2);\\n push();\\n translate(-15, 0, sin(frameCount / 30) * 65);\\n box(30);\\n pop();\\n push();\\n translate(15, 0, sin(frameCount / 30 + PI) * 65);\\n box(30);\\n pop();\\n}\\n
Creates a new p5.Camera object and tells the\\nrenderer to use that camera.\\nReturns the p5.Camera object.
Sets a perspective projection for a p5.Camera object and sets parameters\\nfor that projection according to perspective()\\nsyntax.
Sets an orthographic projection for a p5.Camera object and sets parameters\\nfor that projection according to ortho() syntax.
Panning rotates the camera view to the left and right.
amount to rotate camera in current\\nangleMode units.\\nGreater than 0 values rotate counterclockwise (to the left).
Tilting rotates the camera view up and down.
\\nlet cam;\\nlet delta = 0.01;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n // set initial tilt\\n cam.tilt(-0.8);\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // pan camera according to angle 'delta'\\n cam.tilt(delta);\\n\\n // every 160 frames, switch direction\\n if (frameCount % 160 === 0) {\\n delta *= -1;\\n }\\n\\n rotateY(frameCount * 0.01);\\n translate(0, -100, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n translate(0, 35, 0);\\n box(20);\\n}\\n
Reorients the camera to look at a position in world space.
x position of a point in world space
y position of a point in world space
z position of a point in world space
\\nlet cam;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // look at a new random point every 60 frames\\n if (frameCount % 60 === 0) {\\n cam.lookAt(random(-100, 100), random(-50, 50), 0);\\n }\\n\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n
Sets a camera's position and orientation. This is equivalent to calling\\ncamera() on a p5.Camera object.
Move camera along its local axes while maintaining current camera orientation.
amount to move along camera's left-right axis
amount to move along camera's up-down axis
amount to move along camera's forward-backward axis
\\n// see the camera move along its own axes while maintaining its orientation\\nlet cam;\\nlet delta = 0.5;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // move the camera along its local axes\\n cam.move(delta, delta, 0);\\n\\n // every 100 frames, switch direction\\n if (frameCount % 150 === 0) {\\n delta *= -1;\\n }\\n\\n translate(-10, -10, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n translate(15, 15, 0);\\n box(50, 8, 50);\\n}\\n
Set camera position in world-space while maintaining current camera\\norientation.
\\n// press '1' '2' or '3' keys to set camera position\\n\\nlet cam;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n cam = createCamera();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // '1' key\\n if (keyIsDown(49)) {\\n cam.setPosition(30, 0, 80);\\n }\\n // '2' key\\n if (keyIsDown(50)) {\\n cam.setPosition(0, 0, 80);\\n }\\n // '3' key\\n if (keyIsDown(51)) {\\n cam.setPosition(-30, 0, 80);\\n }\\n\\n box(20);\\n}\\n
Sets rendererGL's current camera to a p5.Camera object. Allows switching\\nbetween multiple cameras.
p5.Camera object
\\nlet cam1, cam2;\\nlet currentCamera;\\n\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n normalMaterial();\\n\\n cam1 = createCamera();\\n cam2 = createCamera();\\n cam2.setPosition(30, 0, 50);\\n cam2.lookAt(0, 0, 0);\\n cam2.ortho();\\n\\n // set variable for previously active camera:\\n currentCamera = 1;\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // camera 1:\\n cam1.lookAt(0, 0, 0);\\n cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);\\n\\n // every 100 frames, switch between the two cameras\\n if (frameCount % 100 === 0) {\\n if (currentCamera === 1) {\\n setCamera(cam1);\\n currentCamera = 0;\\n } else {\\n setCamera(cam2);\\n currentCamera = 1;\\n }\\n }\\n\\n drawBoxes();\\n}\\n\\nfunction drawBoxes() {\\n rotateX(frameCount * 0.01);\\n translate(-100, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n translate(35, 0, 0);\\n box(20);\\n}\\n
computes smooth normals per vertex as an average of each\\nface.
Averages the vertex normals. Used in curved\\nsurfaces
Averages pole normals. Used in spherical primitives
Modifies all vertices to be centered within the range -100 to 100.
Set attributes for the WebGL Drawing context.\\nThis is a way of adjusting how the WebGL\\nrenderer works to fine-tune the display and performance.\\n\\nNote that this will reinitialize the drawing context\\nif called after the WebGL canvas is made.\\n\\nIf an object is passed as the parameter, all attributes\\nnot declared in the object will be set to defaults.\\n\\nThe available attributes are:\\n\\nalpha - indicates if the canvas contains an alpha buffer\\ndefault is false\\n\\ndepth - indicates whether the drawing buffer has a depth buffer\\nof at least 16 bits - default is true\\n\\nstencil - indicates whether the drawing buffer has a stencil buffer\\nof at least 8 bits\\n\\nantialias - indicates whether or not to perform anti-aliasing\\ndefault is false\\n\\npremultipliedAlpha - indicates that the page compositor will assume\\nthe drawing buffer contains colors with pre-multiplied alpha\\ndefault is false\\n\\npreserveDrawingBuffer - if true the buffers will not be cleared and\\nand will preserve their values until cleared or overwritten by author\\n(note that p5 clears automatically on draw loop)\\ndefault is true\\n\\nperPixelLighting - if true, per-pixel lighting will be used in the\\nlighting shader.\\ndefault is false\\n
\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(255);\\n push();\\n rotateZ(frameCount * 0.02);\\n rotateX(frameCount * 0.02);\\n rotateY(frameCount * 0.02);\\n fill(0, 0, 0);\\n box(50);\\n pop();\\n}\\n
\\nfunction setup() {\\n setAttributes('antialias', true);\\n createCanvas(100, 100, WEBGL);\\n}\\n\\nfunction draw() {\\n background(255);\\n push();\\n rotateZ(frameCount * 0.02);\\n rotateX(frameCount * 0.02);\\n rotateY(frameCount * 0.02);\\n fill(0, 0, 0);\\n box(50);\\n pop();\\n}\\n
\\n// press the mouse button to enable perPixelLighting\\nfunction setup() {\\n createCanvas(100, 100, WEBGL);\\n noStroke();\\n fill(255);\\n}\\n\\nvar lights = [\\n { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\\n { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\\n { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\\n { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\\n { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\\n { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\\n];\\n\\nfunction draw() {\\n var t = millis() / 1000 + 1000;\\n background(0);\\n directionalLight(color('#222'), 1, 1, 1);\\n\\n for (var i = 0; i < lights.length; i++) {\\n var light = lights[i];\\n pointLight(\\n color(light.c),\\n p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\\n );\\n }\\n\\n specularMaterial(255);\\n sphere(width * 0.1);\\n\\n rotateX(t * 0.77);\\n rotateY(t * 0.83);\\n rotateZ(t * 0.91);\\n torus(width * 0.3, width * 0.07, 24, 10);\\n}\\n\\nfunction mousePressed() {\\n setAttributes('perPixelLighting', true);\\n noStroke();\\n fill(255);\\n}\\nfunction mouseReleased() {\\n setAttributes('perPixelLighting', false);\\n noStroke();\\n fill(255);\\n}\\n
Name of attribute
New value of named attribute
object with key-value pairs
Wrapper around gl.uniform functions.\\nAs we store uniform info in the shader we can use that\\nto do type checking on the supplied data and call\\nthe appropriate function.
the name of the uniform in the\\nshader program
the data to be associated\\nwith that uniform; type varies (could be a single numerical value, array,\\nmatrix, or texture / sampler reference)
Searches the page for an element with the given ID, class, or tag name (using the '#' or '.'\\nprefixes to specify an ID or class respectively, and none for a tag) and returns it as\\na p5.Element. If a class or tag name is given with more than 1 element,\\nonly the first element will be returned.\\nThe DOM node itself can be accessed with .elt.\\nReturns null if none found. You can also specify a container to search within.
id, class, or tag name of element to search for
id, p5.Element, or\\n HTML element to search within
\\nfunction setup() {\\n createCanvas(100, 100);\\n //translates canvas 50px down\\n select('canvas').position(100, 100);\\n}\\n
\\n// these are all valid calls to select()\\nvar a = select('#moo');\\nvar b = select('#blah', '#myContainer');\\nvar c, e;\\nif (b) {\\n c = select('#foo', b);\\n}\\nvar d = document.getElementById('beep');\\nif (d) {\\n e = select('p', d);\\n}\\n[a, b, c, d, e]; // unused\\n
Searches the page for elements with the given class or tag name (using the '.' prefix\\nto specify a class and no prefix for a tag) and returns them as p5.Elements\\nin an array.\\nThe DOM node itself can be accessed with .elt.\\nReturns an empty array if none found.\\nYou can also specify a container to search within.
class or tag name of elements to search for
id, p5.Element, or HTML element to search within
\\nfunction setup() {\\n createButton('btn');\\n createButton('2nd btn');\\n createButton('3rd btn');\\n var buttons = selectAll('button');\\n\\n for (var i = 0; i < buttons.length; i++) {\\n buttons[i].size(100, 100);\\n }\\n}\\n
\\n// these are all valid calls to selectAll()\\nvar a = selectAll('.moo');\\na = selectAll('div');\\na = selectAll('button', '#myContainer');\\n\\nvar d = select('#container');\\na = selectAll('p', d);\\n\\nvar f = document.getElementById('beep');\\na = select('.blah', f);\\n\\na; // unused\\n
Helper function for select and selectAll
Helper function for getElement and getElements.
Removes all elements created by p5, except any canvas / graphics\\nelements created by createCanvas or createGraphics.\\nEvent handlers are removed, and element is removed from the DOM.
\\nfunction setup() {\\n createCanvas(100, 100);\\n createDiv('this is some text');\\n createP('this is a paragraph');\\n}\\nfunction mousePressed() {\\n removeElements(); // this will remove the div and p, not canvas\\n}\\n
The .changed() function is called when the value of an\\nelement changes.\\nThis can be used to attach an element specific event listener.
function to be fired when the value of\\n an element changes.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\nvar sel;\\n\\nfunction setup() {\\n textAlign(CENTER);\\n background(200);\\n sel = createSelect();\\n sel.position(10, 10);\\n sel.option('pear');\\n sel.option('kiwi');\\n sel.option('grape');\\n sel.changed(mySelectEvent);\\n}\\n\\nfunction mySelectEvent() {\\n var item = sel.value();\\n background(200);\\n text(\\\"it's a \\\" + item + '!', 50, 50);\\n}\\n
\\nvar checkbox;\\nvar cnv;\\n\\nfunction setup() {\\n checkbox = createCheckbox(' fill');\\n checkbox.changed(changeFill);\\n cnv = createCanvas(100, 100);\\n cnv.position(0, 30);\\n noFill();\\n}\\n\\nfunction draw() {\\n background(200);\\n ellipse(50, 50, 50, 50);\\n}\\n\\nfunction changeFill() {\\n if (checkbox.checked()) {\\n fill(0);\\n } else {\\n noFill();\\n }\\n}\\n
The .input() function is called when any user input is\\ndetected with an element. The input event is often used\\nto detect keystrokes in a input element, or changes on a\\nslider element. This can be used to attach an element specific\\nevent listener.
function to be fired when any user input is\\n detected within the element.\\n if false is passed instead, the previously\\n firing function will no longer fire.
\\n// Open your console to see the output\\nfunction setup() {\\n var inp = createInput('');\\n inp.input(myInputEvent);\\n}\\n\\nfunction myInputEvent() {\\n console.log('you are typing: ', this.value());\\n}\\n
Helpers for create methods.
Creates a <div></div> element in the DOM with given inner HTML.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
inner HTML for element created
\\ncreateDiv('this is some text');\\n
Creates a <p></p> element in the DOM with given inner HTML. Used\\nfor paragraph length text.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
\\ncreateP('this is some text');\\n
Creates a <span></span> element in the DOM with given inner HTML.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
\\ncreateSpan('this is some text');\\n
Creates an <img> element in the DOM with given src and\\nalternate text.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
\\ncreateImg('http://p5js.org/img/asterisk-01.png');\\n
src path or url for image
alternate text to be used if image does not load
callback to be called once image data is loaded
Creates an <a></a> element in the DOM for including a hyperlink.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
url of page to link to
inner html of link element to display
target where new link should open,\\n could be _blank, _self, _parent, _top.
\\ncreateA('http://p5js.org/', 'this is a link');\\n
Creates a slider <input></input> element in the DOM.\\nUse .size() to set the display length of the slider.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
minimum value of the slider
maximum value of the slider
default value of the slider
step size for each tick of the slider (if step is set to 0, the slider will move continuously from the minimum to the maximum value)
\\nvar slider;\\nfunction setup() {\\n slider = createSlider(0, 255, 100);\\n slider.position(10, 10);\\n slider.style('width', '80px');\\n}\\n\\nfunction draw() {\\n var val = slider.value();\\n background(val);\\n}\\n
\\nvar slider;\\nfunction setup() {\\n colorMode(HSB);\\n slider = createSlider(0, 360, 60, 40);\\n slider.position(10, 10);\\n slider.style('width', '80px');\\n}\\n\\nfunction draw() {\\n var val = slider.value();\\n background(val, 100, 100, 1);\\n}\\n
Creates a <button></button> element in the DOM.\\nUse .size() to set the display size of the button.\\nUse .mousePressed() to specify behavior on press.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
label displayed on the button
value of the button
\\nvar button;\\nfunction setup() {\\n createCanvas(100, 100);\\n background(0);\\n button = createButton('click me');\\n button.position(19, 19);\\n button.mousePressed(changeBG);\\n}\\n\\nfunction changeBG() {\\n var val = random(255);\\n background(val);\\n}\\n
Creates a checkbox <input></input> element in the DOM.\\nCalling .checked() on a checkbox returns if it is checked or not
label displayed after checkbox
value of the checkbox; checked is true, unchecked is false
\\nvar checkbox;\\n\\nfunction setup() {\\n checkbox = createCheckbox('label', false);\\n checkbox.changed(myCheckedEvent);\\n}\\n\\nfunction myCheckedEvent() {\\n if (this.checked()) {\\n console.log('Checking!');\\n } else {\\n console.log('Unchecking!');\\n }\\n}\\n
Creates a dropdown menu <select></select> element in the DOM.\\nIt also helps to assign select-box methods to p5.Element when selecting existing select box
\\nvar sel;\\n\\nfunction setup() {\\n textAlign(CENTER);\\n background(200);\\n sel = createSelect();\\n sel.position(10, 10);\\n sel.option('pear');\\n sel.option('kiwi');\\n sel.option('grape');\\n sel.changed(mySelectEvent);\\n}\\n\\nfunction mySelectEvent() {\\n var item = sel.value();\\n background(200);\\n text('It is a ' + item + '!', 50, 50);\\n}\\n
true if dropdown should support multiple selections
DOM select element
Creates a radio button <input></input> element in the DOM.\\nThe .option() method can be used to set options for the radio after it is\\ncreated. The .value() method will return the currently selected option.
the id and name of the created div and input field respectively
\\nvar radio;\\n\\nfunction setup() {\\n radio = createRadio();\\n radio.option('black');\\n radio.option('white');\\n radio.option('gray');\\n radio.style('width', '60px');\\n textAlign(CENTER);\\n fill(255, 0, 0);\\n}\\n\\nfunction draw() {\\n var val = radio.value();\\n background(val);\\n text(val, width / 2, height / 2);\\n}\\n
\\nvar radio;\\n\\nfunction setup() {\\n radio = createRadio();\\n radio.option('apple', 1);\\n radio.option('bread', 2);\\n radio.option('juice', 3);\\n radio.style('width', '60px');\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n background(200);\\n var val = radio.value();\\n if (val) {\\n text('item cost is $' + val, width / 2, height / 2);\\n }\\n}\\n
Creates a colorPicker element in the DOM for color input.\\nThe .value() method will return a hex string (#rrggbb) of the color.\\nThe .color() method will return a p5.Color object with the current chosen color.
default color of element
\\nvar inp1, inp2;\\nfunction setup() {\\n createCanvas(100, 100);\\n background('grey');\\n inp1 = createColorPicker('#ff0000');\\n inp2 = createColorPicker(color('yellow'));\\n inp1.input(setShade1);\\n inp2.input(setShade2);\\n setMidShade();\\n}\\n\\nfunction setMidShade() {\\n // Finding a shade between the two\\n var commonShade = lerpColor(inp1.color(), inp2.color(), 0.5);\\n fill(commonShade);\\n rect(20, 20, 60, 60);\\n}\\n\\nfunction setShade1() {\\n setMidShade();\\n console.log('You are choosing shade 1 to be : ', this.value());\\n}\\nfunction setShade2() {\\n setMidShade();\\n console.log('You are choosing shade 2 to be : ', this.value());\\n}\\n
Creates an <input></input> element in the DOM for text input.\\nUse .size() to set the display length of the box.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
default value of the input box
type of text, ie text, password etc. Defaults to text
\\nfunction setup() {\\n var inp = createInput('');\\n inp.input(myInputEvent);\\n}\\n\\nfunction myInputEvent() {\\n console.log('you are typing: ', this.value());\\n}\\n
Creates an <input></input> element in the DOM of type 'file'.\\nThis allows users to select local files for use in a sketch.
callback function for when a file loaded
optional to allow multiple files selected
\\nlet input;\\nlet img;\\n\\nfunction setup() {\\n input = createFileInput(handleFile);\\n input.position(0, 0);\\n}\\n\\nfunction draw() {\\n background(255);\\n if (img) {\\n image(img, 0, 0, width, height);\\n }\\n}\\n\\nfunction handleFile(file) {\\n print(file);\\n if (file.type === 'image') {\\n img = createImg(file.data);\\n img.hide();\\n } else {\\n img = null;\\n }\\n}\\n
Creates an HTML5 <video> element in the DOM for simple playback\\nof audio/video. Shown by default, can be hidden with .hide()\\nand drawn into canvas using video(). Appends to the container\\nnode if one is specified, otherwise appends to body. The first parameter\\ncan be either a single string path to a video file, or an array of string\\npaths to different formats of the same video. This is useful for ensuring\\nthat your video can play across different browsers, as each supports\\ndifferent formats. See this\\npage for further information about supported formats.
path to a video file, or array of paths for\\n supporting different browsers
callback function to be called upon\\n 'canplaythrough' event fire, that is, when the\\n browser can play the media, and estimates that\\n enough data has been loaded to play the media\\n up to its end without having to stop for\\n further buffering of content
\\nvar vid;\\nfunction setup() {\\n noCanvas();\\n\\n vid = createVideo(\\n ['assets/small.mp4', 'assets/small.ogv', 'assets/small.webm'],\\n vidLoad\\n );\\n\\n vid.size(100, 100);\\n}\\n\\n// This function is called when the video loads\\nfunction vidLoad() {\\n vid.loop();\\n vid.volume(0);\\n}\\n
Creates a hidden HTML5 <audio> element in the DOM for simple audio\\nplayback. Appends to the container node if one is specified,\\notherwise appends to body. The first parameter\\ncan be either a single string path to a audio file, or an array of string\\npaths to different formats of the same audio. This is useful for ensuring\\nthat your audio can play across different browsers, as each supports\\ndifferent formats. See this\\npage for further information about supported formats.
path to an audio file, or array of paths\\n for supporting different browsers
\\nvar ele;\\nfunction setup() {\\n ele = createAudio('assets/beat.mp3');\\n\\n // here we set the element to autoplay\\n // The element will play as soon\\n // as it is able to do so.\\n ele.autoplay(true);\\n}\\n
Creates a new HTML5 <video> element that contains the audio/video\\nfeed from a webcam. The element is separate from the canvas and is\\ndisplayed by default. The element can be hidden using .hide(). The feed\\ncan be drawn onto the canvas using image(). The loadedmetadata property can\\nbe used to detect when the element has fully loaded (see second example).
More specific properties of the feed can be passing in a Constraints object.\\nSee the\\n W3C\\nspec for possible properties. Note that not all of these are supported\\nby all browsers.
Security note: A new browser security specification requires that getUserMedia,\\nwhich is behind createCapture(), only works when you're running the code locally,\\nor on HTTPS. Learn more here\\nand here.
type of capture, either VIDEO or\\n AUDIO if none specified, default both,\\n or a Constraints object
function to be called once\\n stream has loaded
\\nvar capture;\\n\\nfunction setup() {\\n createCanvas(480, 480);\\n capture = createCapture(VIDEO);\\n capture.hide();\\n}\\n\\nfunction draw() {\\n image(capture, 0, 0, width, width * capture.height / capture.width);\\n filter(INVERT);\\n}\\n
\\nfunction setup() {\\n createCanvas(480, 120);\\n var constraints = {\\n video: {\\n mandatory: {\\n minWidth: 1280,\\n minHeight: 720\\n },\\n optional: [{ maxFrameRate: 10 }]\\n },\\n audio: true\\n };\\n createCapture(constraints, function(stream) {\\n console.log(stream);\\n });\\n}\\n
\\nvar capture;\\n\\nfunction setup() {\\n createCanvas(640, 480);\\n capture = createCapture(VIDEO);\\n}\\nfunction draw() {\\n background(0);\\n if (capture.loadedmetadata) {\\n var c = capture.get(0, 0, 100, 100);\\n image(c, 0, 0);\\n }\\n}\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1381,\n \"description\": \"Creates element with given tag in the DOM with given content.\\nAppends to the container node if one is specified, otherwise\\nappends to body.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"createElement\",\n \"params\": [\n {\n \"name\": \"tag\",\n \"description\": \"tag for the new element\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"content\",\n \"description\": \"html content to be inserted into the element\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"pointer to p5.Element holding created node\",\n \"type\": \"p5.Element\"\n },\n \"example\": [\n \"\\n\\ncreateElement('h2', 'im an h2 p5.element!');\\n\"\n ],\n \"class\": \"p5\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1407,\n \"description\": \"Adds specified class to the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addClass\",\n \"params\": [\n {\n \"name\": \"class\",\n \"description\": \"name of class to add\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div = createDiv('div');\\n div.addClass('myClass');\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1432,\n \"description\": \"Removes specified class from the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeClass\",\n \"params\": [\n {\n \"name\": \"class\",\n \"description\": \"name of class to remove\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n // In this example, a class is set when the div is created\\n // and removed when mouse is pressed. This could link up\\n // with a CSS style rule to toggle style properties.\\nvar div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('myClass');\\n }\\nfunction mousePressed() {\\n div.removeClass('myClass');\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1463,\n \"description\": \"Checks if specified class already set to element\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hasClass\",\n \"return\": {\n \"description\": \"a boolean value if element has specified class\",\n \"type\": \"Boolean\"\n },\n \"params\": [\n {\n \"name\": \"c\",\n \"description\": \"class name of class to check\\n\",\n \"type\": \"String\"\n }\n ],\n \"example\": [\n \"\\n \\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n if (div.hasClass('show')) {\\n div.addClass('show');\\n } else {\\n div.removeClass('show');\\n }\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1492,\n \"description\": \"Toggles element class\\n\",\n \"itemtype\": \"method\",\n \"name\": \"toggleClass\",\n \"params\": [\n {\n \"name\": \"c\",\n \"description\": \"class name to toggle\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n div.toggleClass('show');\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1525,\n \"description\": \"Attaches the element as a child to the parent specified.\\n Accepts either a string ID, DOM node, or p5.Element.\\n If no argument is specified, an array of children DOM nodes is returned.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"child\",\n \"return\": {\n \"description\": \"an array of child nodes\",\n \"type\": \"Node[]\"\n },\n \"example\": [\n \"\\n \\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div0.child(div1); // use p5.Element\\n \\n \\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div1.id('apples');\\n div0.child('apples'); // use id\\n \\n \\n // this example assumes there is a div already on the page\\n // with id \\\"myChildDiv\\\"\\n var div0 = createDiv('this is the parent');\\n var elt = document.getElementById('myChildDiv');\\n div0.child(elt); // use element from page\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1525,\n \"params\": [],\n \"return\": {\n \"description\": \"an array of child nodes\",\n \"type\": \"Node[]\"\n }\n },\n {\n \"line\": 1553,\n \"params\": [\n {\n \"name\": \"child\",\n \"description\": \"the ID, DOM node, or p5.Element\\n to add to the current element\\n\",\n \"type\": \"String|p5.Element\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1575,\n \"description\": \"Centers a p5 Element either vertically, horizontally,\\nor both, relative to its parent or according to\\nthe body if the Element has no parent. If no argument is passed\\nthe Element is aligned both vertically and horizontally.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"center\",\n \"params\": [\n {\n \"name\": \"align\",\n \"description\": \"passing 'vertical', 'horizontal' aligns element accordingly\\n\",\n \"type\": \"String\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var div = createDiv('').size(10, 10);\\n div.style('background-color', 'orange');\\n div.center();\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1629,\n \"description\": \"If an argument is given, sets the inner HTML of the element,\\n replacing any existing html. If true is included as a second\\n argument, html is appended instead of replacing existing html.\\n If no arguments are given, returns\\n the inner HTML of the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"html\",\n \"return\": {\n \"description\": \"the inner HTML of the element\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n \\n var div = createDiv('').size(100, 100);\\n div.html('hi');\\n \\n \\n var div = createDiv('Hello ').size(100, 100);\\n div.html('World', true);\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1629,\n \"params\": [],\n \"return\": {\n \"description\": \"the inner HTML of the element\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1650,\n \"params\": [\n {\n \"name\": \"html\",\n \"description\": \"the HTML to be placed inside the element\\n\",\n \"type\": \"String\",\n \"optional\": true\n },\n {\n \"name\": \"append\",\n \"description\": \"whether to append HTML to existing\\n\",\n \"type\": \"Boolean\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1668,\n \"description\": \"Sets the position of the element relative to (0, 0) of the\\n window. Essentially, sets position:absolute and left and top\\n properties of style. If no arguments given returns the x and y position\\n of the element in an object.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"position\",\n \"return\": {\n \"description\": \"the x and y position of the element in an object\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n \\n function setup() {\\n var cnv = createCanvas(100, 100);\\n // positions canvas 50px to the right and 100px\\n // below upper left corner of the window\\n cnv.position(50, 100);\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1668,\n \"params\": [],\n \"return\": {\n \"description\": \"the x and y position of the element in an object\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 1687,\n \"params\": [\n {\n \"name\": \"x\",\n \"description\": \"x-position relative to upper left of window\\n\",\n \"type\": \"Number\",\n \"optional\": true\n },\n {\n \"name\": \"y\",\n \"description\": \"y-position relative to upper left of window\\n\",\n \"type\": \"Number\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1762,\n \"description\": \"Sets the given style (css) property (1st arg) of the element with the\\ngiven value (2nd arg). If a single argument is given, .style()\\nreturns the value of the given property; however, if the single argument\\nis given in css syntax ('text-align:center'), .style() sets the css\\nappropriately.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"style\",\n \"return\": {\n \"description\": \"value of property\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nvar myDiv = createDiv('I like pandas.');\\nmyDiv.style('font-size', '18px');\\nmyDiv.style('color', '#ff0000');\\n\\n\\nvar col = color(25, 23, 200, 50);\\nvar button = createButton('button');\\nbutton.style('background-color', col);\\nbutton.position(10, 10);\\n\\n\\nvar myDiv;\\nfunction setup() {\\n background(200);\\n myDiv = createDiv('I like gray.');\\n myDiv.position(20, 20);\\n}\\n\\nfunction draw() {\\n myDiv.style('font-size', mouseX + 'px');\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1762,\n \"params\": [\n {\n \"name\": \"property\",\n \"description\": \"property to be set\\n\",\n \"type\": \"String\"\n }\n ],\n \"return\": {\n \"description\": \"value of property\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1797,\n \"params\": [\n {\n \"name\": \"property\",\n \"description\": \"\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign to property\\n\",\n \"type\": \"String|Number|p5.Color\"\n }\n ],\n \"chainable\": 1,\n \"return\": {\n \"description\": \"current value of property, if no value is given as second argument\",\n \"type\": \"String\"\n }\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1851,\n \"description\": \"Adds a new attribute or changes the value of an existing attribute\\n on the specified element. If no value is specified, returns the\\n value of the given attribute, or null if attribute is not set.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"attribute\",\n \"return\": {\n \"description\": \"value of attribute\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n \\n var myDiv = createDiv('I like pandas.');\\n myDiv.attribute('align', 'center');\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1851,\n \"params\": [],\n \"return\": {\n \"description\": \"value of attribute\",\n \"type\": \"String\"\n }\n },\n {\n \"line\": 1866,\n \"params\": [\n {\n \"name\": \"attr\",\n \"description\": \"attribute to set\\n\",\n \"type\": \"String\"\n },\n {\n \"name\": \"value\",\n \"description\": \"value to assign to attribute\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1895,\n \"description\": \"Removes an attribute on the specified element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeAttribute\",\n \"params\": [\n {\n \"name\": \"attr\",\n \"description\": \"attribute to remove\\n\",\n \"type\": \"String\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var button;\\n var checkbox;\\nfunction setup() {\\n checkbox = createCheckbox('enable', true);\\n checkbox.changed(enableButton);\\n button = createButton('button');\\n button.position(10, 10);\\n }\\nfunction enableButton() {\\n if (this.checked()) {\\n // Re-enable the button\\n button.removeAttribute('disabled');\\n } else {\\n // Disable the button\\n button.attribute('disabled', '');\\n }\\n }\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1940,\n \"description\": \"Either returns the value of the element if no arguments\\ngiven, or sets the value of the element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"value\",\n \"return\": {\n \"description\": \"value of the element\",\n \"type\": \"String|Number\"\n },\n \"example\": [\n \"\\n\\n// gets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('');\\n}\\n\\nfunction mousePressed() {\\n print(inp.value());\\n}\\n\\n\\n// sets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('myValue');\\n}\\n\\nfunction mousePressed() {\\n inp.value('myValue');\\n}\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 1940,\n \"params\": [],\n \"return\": {\n \"description\": \"value of the element\",\n \"type\": \"String|Number\"\n }\n },\n {\n \"line\": 1970,\n \"params\": [\n {\n \"name\": \"value\",\n \"description\": \"\",\n \"type\": \"String|Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 1986,\n \"description\": \"Shows the current element. Essentially, setting display:block for the style.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"show\",\n \"chainable\": 1,\n \"example\": [\n \"\\n \\n var div = createDiv('div');\\n div.style('display', 'none');\\n div.show(); // turns display to block\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2004,\n \"description\": \"Hides the current element. Essentially, setting display:none for the style.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hide\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nvar div = createDiv('this is a div');\\ndiv.hide();\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2020,\n \"description\": \"Sets the width and height of the element. AUTO can be used to\\n only adjust one dimension at a time. If no arguments are given, it\\n returns the width and height of the element in an object. In case of\\n elements which need to be loaded, such as images, it is recommended\\n to call the function after the element has finished loading.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"size\",\n \"return\": {\n \"description\": \"the width and height of the element in an object\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n \\n let div = createDiv('this is a div');\\n div.size(100, 100);\\n let img = createImg('assets/laDefense.jpg', () => {\\n img.size(10, AUTO);\\n });\\n \"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2020,\n \"params\": [],\n \"return\": {\n \"description\": \"the width and height of the element in an object\",\n \"type\": \"Object\"\n }\n },\n {\n \"line\": 2039,\n \"params\": [\n {\n \"name\": \"w\",\n \"description\": \"width of the element, either AUTO, or a number\\n\",\n \"type\": \"Number|Constant\"\n },\n {\n \"name\": \"h\",\n \"description\": \"height of the element, either AUTO, or a number\\n\",\n \"type\": \"Number|Constant\",\n \"optional\": true\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2099,\n \"description\": \"Removes the element and deregisters all listeners.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"remove\",\n \"example\": [\n \"\\n\\nvar myDiv = createDiv('this is some text');\\nmyDiv.remove();\\n\"\n ],\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2119,\n \"description\": \"Registers a callback that gets called every time a file that is\\ndropped on the element has been loaded.\\np5 will load every dropped file into memory and pass it as a p5.File object to the callback.\\nMultiple files dropped at the same time will result in multiple calls to the callback.\\nYou can optionally pass a second callback which will be registered to the raw\\ndrop event.\\nThe callback will thus be provided the original\\nDragEvent.\\nDropping multiple files at the same time will trigger the second callback once per drop,\\nwhereas the first callback will trigger for each loaded file.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"drop\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"callback to receive loaded file, called for each file dropped.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"fxn\",\n \"description\": \"callback triggered once when files are dropped with the drop event.\\n\",\n \"type\": \"Function\",\n \"optional\": true\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop file', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction gotFile(file) {\\n background(200);\\n text('received file:', width / 2, height / 2);\\n text(file.name, width / 2, height / 2 + 50);\\n}\\n\\n\\n\\nvar img;\\n\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop image', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction draw() {\\n if (img) {\\n image(img, 0, 0, width, height);\\n }\\n}\\n\\nfunction gotFile(file) {\\n img = createImg(file.data).hide();\\n}\\n\"\n ],\n \"alt\": \"Canvas turns into whatever image is dragged/dropped onto it.\",\n \"class\": \"p5.Element\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2253,\n \"description\": \"Path to the media element source.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"src\",\n \"return\": {\n \"description\": \"src\",\n \"type\": \"String\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\n\\nfunction setup() {\\n background(250);\\n\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n //We'll set up our example so that\\n //when you click on the text,\\n //an alert box displays the MediaElement's\\n //src field.\\n textAlign(CENTER);\\n text('Click Me!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Show our p5.MediaElement's src field\\n alert(ele.src);\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2319,\n \"description\": \"Play an HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"play\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nvar ele;\\n\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Here we call the play() function on\\n //the p5.MediaElement we created above.\\n //This will start the audio sample.\\n ele.play();\\n\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2380,\n \"description\": \"Stops an HTML5 media element (sets current time to zero).\\n\",\n \"itemtype\": \"method\",\n \"name\": \"stop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and stops a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //if the sample is currently playing\\n //calling the stop() function on\\n //our p5.MediaElement will stop\\n //it and reset its current\\n //time to 0 (i.e. it will start\\n //at the beginning the next time\\n //you play it)\\n ele.stop();\\n\\n sampleIsPlaying = false;\\n text('Click to play!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to stop!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2444,\n \"description\": \"Pauses an HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"pause\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and pauses a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //Calling pause() on our\\n //p5.MediaElement will stop it\\n //playing, but when we call the\\n //loop() or play() functions\\n //the sample will start from\\n //where we paused it.\\n ele.pause();\\n\\n sampleIsPlaying = false;\\n text('Click to resume!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.pause() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to pause!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2506,\n \"description\": \"Set 'loop' to true for an HTML5 media element, and starts playing.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"loop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsLooping = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to loop!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (!sampleIsLooping) {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsLooping = true;\\n text('Click to stop!', width / 2, height / 2);\\n } else {\\n ele.stop();\\n\\n sampleIsLooping = false;\\n text('Click to loop!', width / 2, height / 2);\\n }\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2562,\n \"description\": \"Set 'loop' to false for an HTML5 media element. Element will stop\\nwhen it reaches the end.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"noLoop\",\n \"chainable\": 1,\n \"example\": [\n \"\\n\\n//This example both starts\\n//and stops loop of sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n ele.noLoop();\\n text('No more Loops!', width / 2, height / 2);\\n } else {\\n ele.loop();\\n sampleIsPlaying = true;\\n text('Click to stop looping!', width / 2, height / 2);\\n }\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2614,\n \"description\": \"Set HTML5 media element to autoplay or not.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"autoplay\",\n \"params\": [\n {\n \"name\": \"autoplay\",\n \"description\": \"whether the element should autoplay\\n\",\n \"type\": \"Boolean\"\n }\n ],\n \"chainable\": 1,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2626,\n \"description\": \"Sets volume for this HTML5 media element. If no argument is given,\\nreturns the current volume.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"volume\",\n \"return\": {\n \"description\": \"current volume\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n // p5.MediaElement objects are usually created\\n // by calling the createAudio(), createVideo(),\\n // and createCapture() functions.\\n // In this example we create\\n // a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\nfunction mouseClicked() {\\n // Here we call the volume() function\\n // on the sound element to set its volume\\n // Volume must be between 0.0 and 1.0\\n ele.volume(0.2);\\n ele.play();\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n}\\n\\n\\nvar audio;\\nvar counter = 0;\\n\\nfunction loaded() {\\n audio.play();\\n}\\n\\nfunction setup() {\\n audio = createAudio('assets/lucky_dragons.mp3', loaded);\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n if (counter === 0) {\\n background(0, 255, 0);\\n text('volume(0.9)', width / 2, height / 2);\\n } else if (counter === 1) {\\n background(255, 255, 0);\\n text('volume(0.5)', width / 2, height / 2);\\n } else if (counter === 2) {\\n background(255, 0, 0);\\n text('volume(0.1)', width / 2, height / 2);\\n }\\n}\\n\\nfunction mousePressed() {\\n counter++;\\n if (counter === 0) {\\n audio.volume(0.9);\\n } else if (counter === 1) {\\n audio.volume(0.5);\\n } else if (counter === 2) {\\n audio.volume(0.1);\\n } else {\\n counter = 0;\\n audio.volume(0.9);\\n }\\n}\\n\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2626,\n \"params\": [],\n \"return\": {\n \"description\": \"current volume\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2699,\n \"params\": [\n {\n \"name\": \"val\",\n \"description\": \"volume between 0.0 and 1.0\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2712,\n \"description\": \"If no arguments are given, returns the current playback speed of the\\nelement. The speed parameter sets the speed where 2.0 will play the\\nelement twice as fast, 0.5 will play at half the speed, and -1 will play\\nthe element in normal speed in reverse.(Note that not all browsers support\\nbackward playback and even if they do, playback might not be smooth.)\\n\",\n \"itemtype\": \"method\",\n \"name\": \"speed\",\n \"return\": {\n \"description\": \"current playback speed of the element\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\nvar button;\\n\\nfunction setup() {\\n createCanvas(710, 400);\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n ele.loop();\\n background(200);\\n\\n button = createButton('2x speed');\\n button.position(100, 68);\\n button.mousePressed(twice_speed);\\n\\n button = createButton('half speed');\\n button.position(200, 68);\\n button.mousePressed(half_speed);\\n\\n button = createButton('reverse play');\\n button.position(300, 68);\\n button.mousePressed(reverse_speed);\\n\\n button = createButton('STOP');\\n button.position(400, 68);\\n button.mousePressed(stop_song);\\n\\n button = createButton('PLAY!');\\n button.position(500, 68);\\n button.mousePressed(play_speed);\\n}\\n\\nfunction twice_speed() {\\n ele.speed(2);\\n}\\n\\nfunction half_speed() {\\n ele.speed(0.5);\\n}\\n\\nfunction reverse_speed() {\\n ele.speed(-1);\\n}\\n\\nfunction stop_song() {\\n ele.stop();\\n}\\n\\nfunction play_speed() {\\n ele.play();\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2712,\n \"params\": [],\n \"return\": {\n \"description\": \"current playback speed of the element\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2783,\n \"params\": [\n {\n \"name\": \"speed\",\n \"description\": \"speed multiplier for element playback\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2800,\n \"description\": \"If no arguments are given, returns the current time of the element.\\nIf an argument is given the current time of the element is set to it.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"time\",\n \"return\": {\n \"description\": \"current time (in seconds)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nvar beginning = true;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('start at beginning', width / 2, height / 2);\\n}\\n\\n// this function fires with click anywhere\\nfunction mousePressed() {\\n if (beginning === true) {\\n // here we start the sound at the beginning\\n // time(0) is not necessary here\\n // as this produces the same result as\\n // play()\\n ele.play().time(0);\\n background(200);\\n text('jump 2 sec in', width / 2, height / 2);\\n beginning = false;\\n } else {\\n // here we jump 2 seconds into the sound\\n ele.play().time(2);\\n background(250);\\n text('start at beginning', width / 2, height / 2);\\n beginning = true;\\n }\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\",\n \"overloads\": [\n {\n \"line\": 2800,\n \"params\": [],\n \"return\": {\n \"description\": \"current time (in seconds)\",\n \"type\": \"Number\"\n }\n },\n {\n \"line\": 2845,\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"time to jump to (in seconds)\\n\",\n \"type\": \"Number\"\n }\n ],\n \"chainable\": 1\n }\n ]\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2859,\n \"description\": \"Returns the duration of the HTML5 media element.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"duration\",\n \"return\": {\n \"description\": \"duration\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/doorbell.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to know the duration!', 10, 25, 70, 80);\\n}\\nfunction mouseClicked() {\\n ele.play();\\n background(200);\\n //ele.duration dislpays the duration\\n text(ele.duration() + ' seconds', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 2998,\n \"description\": \"Schedule an event to be called when the audio or video\\nelement reaches the end. If the element is looping,\\nthis will not be called. The element is passed in\\nas the argument to the onended callback.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"onended\",\n \"params\": [\n {\n \"name\": \"callback\",\n \"description\": \"function to call when the\\n soundfile has ended. The\\n media element will be passed\\n in as the argument to the\\n callback.\\n\",\n \"type\": \"Function\"\n }\n ],\n \"chainable\": 1,\n \"example\": [\n \"\\n\\nfunction setup() {\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n audioEl.onended(sayDone);\\n}\\n\\nfunction sayDone(elt) {\\n alert('done playing ' + elt.src);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3029,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3031,\n \"description\": \"Send the audio output of this element to a specified audioNode or\\np5.sound object. If no element is provided, connects to p5's master\\noutput. That connection is established when this method is first called.\\nAll connections are removed by the .disconnect() method.\\nThis method is meant to be used with the p5.sound.js addon library.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"connect\",\n \"params\": [\n {\n \"name\": \"audioNode\",\n \"description\": \"AudioNode from the Web Audio API,\\nor an object from the p5.sound library\\n\",\n \"type\": \"AudioNode|Object\"\n }\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3080,\n \"description\": \"Disconnect all Web Audio routing, including to master output.\\nThis is useful if you want to re-route the output through\\naudio effects, for example.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"disconnect\",\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3095,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3097,\n \"description\": \"Show the default MediaElement controls, as determined by the web browser.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"showControls\",\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to Show Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.showControls();\\n background(200);\\n text('Controls Shown', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3128,\n \"description\": \"Hide the default mediaElement controls.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"hideControls\",\n \"example\": [\n \"\\n\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n ele.showControls();\\n background(200);\\n textAlign(CENTER);\\n text('Click to hide Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.hideControls();\\n background(200);\\n text('Controls hidden', width / 2, height / 2);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3157,\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3168,\n \"description\": \"Schedule events to trigger every time a MediaElement\\n(audio/video) reaches a playback cue point.\\nAccepts a callback function, a time (in seconds) at which to trigger\\nthe callback, and an optional parameter for the callback.\\nTime will be passed as the first parameter to the callback function,\\nand param will be the second parameter.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"addCue\",\n \"params\": [\n {\n \"name\": \"time\",\n \"description\": \"Time in seconds, relative to this media\\n element's playback. For example, to trigger\\n an event every time playback reaches two\\n seconds, pass in the number 2. This will be\\n passed as the first parameter to\\n the callback function.\\n\",\n \"type\": \"Number\"\n },\n {\n \"name\": \"callback\",\n \"description\": \"Name of a function that will be\\n called at the given time. The callback will\\n receive time and (optionally) param as its\\n two parameters.\\n\",\n \"type\": \"Function\"\n },\n {\n \"name\": \"value\",\n \"description\": \"An object to be passed as the\\n second parameter to the\\n callback function.\\n\",\n \"type\": \"Object\",\n \"optional\": true\n }\n ],\n \"return\": {\n \"description\": \"id ID of this cue,\\n useful for removeCue(id)\",\n \"type\": \"Number\"\n },\n \"example\": [\n \"\\n\\n//\\n//\\nfunction setup() {\\n noCanvas();\\n\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n\\n // schedule three calls to changeBackground\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n audioEl.addCue(5.0, changeBackground, color(255, 255, 0));\\n}\\n\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3232,\n \"description\": \"Remove a callback based on its ID. The ID is returned by the\\naddCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"removeCue\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the cue, as returned by addCue\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar audioEl, id1, id2;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n // schedule five calls to changeBackground\\n id1 = audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n id2 = audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n text('Click to remove first and last Cue!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n audioEl.removeCue(id1);\\n audioEl.removeCue(id2);\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3274,\n \"description\": \"Remove all of the callbacks that had originally been scheduled\\nvia the addCue method.\\n\",\n \"itemtype\": \"method\",\n \"name\": \"clearCues\",\n \"params\": [\n {\n \"name\": \"id\",\n \"description\": \"ID of the cue, as returned by addCue\\n\",\n \"type\": \"Number\"\n }\n ],\n \"example\": [\n \"\\n\\nvar audioEl;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n //Show the default MediaElement controls, as determined by the web browser\\n audioEl.showControls();\\n // schedule calls to changeBackground\\n background(200);\\n text('Click to change Cue!', 10, 25, 70, 80);\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n}\\nfunction mousePressed() {\\n // here we clear the scheduled callbacks\\n audioEl.clearCues();\\n // then we add some more callbacks\\n audioEl.addCue(1, changeBackground, color(2, 2, 2));\\n audioEl.addCue(3, changeBackground, color(255, 255, 0));\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n\"\n ],\n \"class\": \"p5.MediaElement\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3340,\n \"description\": \"Underlying File object. All normal File methods can be called on this.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"file\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3352,\n \"description\": \"File type (image, text, etc.)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"type\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3358,\n \"description\": \"File subtype (usually the file extension jpg, png, xml, etc.)\\n\",\n \"itemtype\": \"property\",\n \"name\": \"subtype\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3364,\n \"description\": \"File name\\n\",\n \"itemtype\": \"property\",\n \"name\": \"name\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3370,\n \"description\": \"File size\\n\",\n \"itemtype\": \"property\",\n \"name\": \"size\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.dom.js\",\n \"line\": 3377,\n \"description\": \"URL string containing image data.\\n\",\n \"itemtype\": \"property\",\n \"name\": \"data\",\n \"class\": \"p5.File\",\n \"module\": \"p5.dom\",\n \"submodule\": \"p5.dom\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 46,\n \"description\": \"p5.sound \\nhttps://p5js.org/reference/#/libraries/p5.sound\\nFrom the Processing Foundation and contributors\\nhttps://github.com/processing/p5.js-sound/graphs/contributors\\nMIT License (MIT)\\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE\\nSome of the many audio libraries & resources that inspire p5.sound:\\n\\nTONE.js (c) Yotam Mann. Licensed under The MIT License (MIT). https://github.com/TONEnoTONE/Tone.js\\nbuzz.js (c) Jay Salvat. Licensed under The MIT License (MIT). http://buzz.jaysalvat.com/\\nBoris Smus Web Audio API book, 2013. Licensed under the Apache License http://www.apache.org/licenses/LICENSE-2.0\\nwavesurfer.js https://github.com/katspaugh/wavesurfer.js\\nWeb Audio Components by Jordan Santell https://github.com/web-audio-components\\nWilm Thoben's Sound library for Processing https://github.com/processing/processing/tree/master/java/libraries/sound\\nWeb Audio API: http://w3.org/TR/webaudio/\\n\\n\\n\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 214,\n \"description\": \"Determine which filetypes are supported (inspired by buzz.js)\\nThe audio element (el) will only be used to test browser support for various audio formats\\n\",\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 363,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 740,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 810,\n \"class\": \"p5.sound\",\n \"module\": \"p5.sound\",\n \"submodule\": \"p5.sound\"\n },\n {\n \"file\": \"lib/addons/p5.sound.js\",\n \"line\": 1005,\n \"description\": \"Returns the Audio Context for this sketch. Useful for users\\nwho would like to dig deeper into the Web Audio API\\n.\\n\\nSome browsers require users to startAudioContext\\nwith a user gesture, such as touchStarted in the example below.\",\n \"itemtype\": \"method\",\n \"name\": \"getAudioContext\",\n \"return\": {\n \"description\": \"AudioContext for this sketch\",\n \"type\": \"Object\"\n },\n \"example\": [\n \"\\n\\n function draw() {\\n background(255);\\n textAlign(CENTER);\\n\\n if (getAudioContext().state !== 'running') {\\n text('click to start audio', width/2, height/2);\\n } else {\\n text('audio is enabled', width/2, height/2);\\n }\\n }\\n\\n function touchStarted() {\\n if (getAudioContext().state !== 'running') {\\n getAudioContext().resume();\\n }\\n var synth = new p5.MonoSynth();\\n synth.play('A4', 0.5, 0, 0.2);\\n }\\n\\n
Creates element with given tag in the DOM with given content.\\nAppends to the container node if one is specified, otherwise\\nappends to body.
tag for the new element
html content to be inserted into the element
\\ncreateElement('h2', 'im an h2 p5.element!');\\n
Adds specified class to the element.
name of class to add
\\n var div = createDiv('div');\\n div.addClass('myClass');\\n
Removes specified class from the element.
name of class to remove
\\n // In this example, a class is set when the div is created\\n // and removed when mouse is pressed. This could link up\\n // with a CSS style rule to toggle style properties.\\nvar div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('myClass');\\n }\\nfunction mousePressed() {\\n div.removeClass('myClass');\\n }\\n
Checks if specified class already set to element
class name of class to check
\\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n if (div.hasClass('show')) {\\n div.addClass('show');\\n } else {\\n div.removeClass('show');\\n }\\n }\\n
Toggles element class
class name to toggle
\\n var div;\\nfunction setup() {\\n div = createDiv('div');\\n div.addClass('show');\\n }\\nfunction mousePressed() {\\n div.toggleClass('show');\\n }\\n
Attaches the element as a child to the parent specified.\\n Accepts either a string ID, DOM node, or p5.Element.\\n If no argument is specified, an array of children DOM nodes is returned.
\\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div0.child(div1); // use p5.Element\\n
\\n var div0 = createDiv('this is the parent');\\n var div1 = createDiv('this is the child');\\n div1.id('apples');\\n div0.child('apples'); // use id\\n
\\n // this example assumes there is a div already on the page\\n // with id \\\"myChildDiv\\\"\\n var div0 = createDiv('this is the parent');\\n var elt = document.getElementById('myChildDiv');\\n div0.child(elt); // use element from page\\n
the ID, DOM node, or p5.Element\\n to add to the current element
Centers a p5 Element either vertically, horizontally,\\nor both, relative to its parent or according to\\nthe body if the Element has no parent. If no argument is passed\\nthe Element is aligned both vertically and horizontally.
passing 'vertical', 'horizontal' aligns element accordingly
\\nfunction setup() {\\n var div = createDiv('').size(10, 10);\\n div.style('background-color', 'orange');\\n div.center();\\n}\\n
If an argument is given, sets the inner HTML of the element,\\n replacing any existing html. If true is included as a second\\n argument, html is appended instead of replacing existing html.\\n If no arguments are given, returns\\n the inner HTML of the element.
\\n var div = createDiv('').size(100, 100);\\n div.html('hi');\\n
\\n var div = createDiv('Hello ').size(100, 100);\\n div.html('World', true);\\n
the HTML to be placed inside the element
whether to append HTML to existing
Sets the position of the element relative to (0, 0) of the\\n window. Essentially, sets position:absolute and left and top\\n properties of style. If no arguments given returns the x and y position\\n of the element in an object.
\\n function setup() {\\n var cnv = createCanvas(100, 100);\\n // positions canvas 50px to the right and 100px\\n // below upper left corner of the window\\n cnv.position(50, 100);\\n }\\n
x-position relative to upper left of window
y-position relative to upper left of window
Sets the given style (css) property (1st arg) of the element with the\\ngiven value (2nd arg). If a single argument is given, .style()\\nreturns the value of the given property; however, if the single argument\\nis given in css syntax ('text-align:center'), .style() sets the css\\nappropriately.
\\nvar myDiv = createDiv('I like pandas.');\\nmyDiv.style('font-size', '18px');\\nmyDiv.style('color', '#ff0000');\\n
\\nvar col = color(25, 23, 200, 50);\\nvar button = createButton('button');\\nbutton.style('background-color', col);\\nbutton.position(10, 10);\\n
\\nvar myDiv;\\nfunction setup() {\\n background(200);\\n myDiv = createDiv('I like gray.');\\n myDiv.position(20, 20);\\n}\\n\\nfunction draw() {\\n myDiv.style('font-size', mouseX + 'px');\\n}\\n
property to be set
value to assign to property
Adds a new attribute or changes the value of an existing attribute\\n on the specified element. If no value is specified, returns the\\n value of the given attribute, or null if attribute is not set.
\\n var myDiv = createDiv('I like pandas.');\\n myDiv.attribute('align', 'center');\\n
attribute to set
value to assign to attribute
Removes an attribute on the specified element.
attribute to remove
\\n var button;\\n var checkbox;\\nfunction setup() {\\n checkbox = createCheckbox('enable', true);\\n checkbox.changed(enableButton);\\n button = createButton('button');\\n button.position(10, 10);\\n }\\nfunction enableButton() {\\n if (this.checked()) {\\n // Re-enable the button\\n button.removeAttribute('disabled');\\n } else {\\n // Disable the button\\n button.attribute('disabled', '');\\n }\\n }\\n
Either returns the value of the element if no arguments\\ngiven, or sets the value of the element.
\\n// gets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('');\\n}\\n\\nfunction mousePressed() {\\n print(inp.value());\\n}\\n
\\n// sets the value\\nvar inp;\\nfunction setup() {\\n inp = createInput('myValue');\\n}\\n\\nfunction mousePressed() {\\n inp.value('myValue');\\n}\\n
Shows the current element. Essentially, setting display:block for the style.
\\n var div = createDiv('div');\\n div.style('display', 'none');\\n div.show(); // turns display to block\\n
Hides the current element. Essentially, setting display:none for the style.
\\nvar div = createDiv('this is a div');\\ndiv.hide();\\n
Sets the width and height of the element. AUTO can be used to\\n only adjust one dimension at a time. If no arguments are given, it\\n returns the width and height of the element in an object. In case of\\n elements which need to be loaded, such as images, it is recommended\\n to call the function after the element has finished loading.
\\n let div = createDiv('this is a div');\\n div.size(100, 100);\\n let img = createImg('assets/laDefense.jpg', () => {\\n img.size(10, AUTO);\\n });\\n
width of the element, either AUTO, or a number
height of the element, either AUTO, or a number
Removes the element and deregisters all listeners.
\\nvar myDiv = createDiv('this is some text');\\nmyDiv.remove();\\n
Registers a callback that gets called every time a file that is\\ndropped on the element has been loaded.\\np5 will load every dropped file into memory and pass it as a p5.File object to the callback.\\nMultiple files dropped at the same time will result in multiple calls to the callback.
You can optionally pass a second callback which will be registered to the raw\\ndrop event.\\nThe callback will thus be provided the original\\nDragEvent.\\nDropping multiple files at the same time will trigger the second callback once per drop,\\nwhereas the first callback will trigger for each loaded file.
callback to receive loaded file, called for each file dropped.
callback triggered once when files are dropped with the drop event.
\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop file', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction gotFile(file) {\\n background(200);\\n text('received file:', width / 2, height / 2);\\n text(file.name, width / 2, height / 2 + 50);\\n}\\n
\\nvar img;\\n\\nfunction setup() {\\n var c = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('drop image', width / 2, height / 2);\\n c.drop(gotFile);\\n}\\n\\nfunction draw() {\\n if (img) {\\n image(img, 0, 0, width, height);\\n }\\n}\\n\\nfunction gotFile(file) {\\n img = createImg(file.data).hide();\\n}\\n
Path to the media element source.
\\nvar ele;\\n\\nfunction setup() {\\n background(250);\\n\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n //We'll set up our example so that\\n //when you click on the text,\\n //an alert box displays the MediaElement's\\n //src field.\\n textAlign(CENTER);\\n text('Click Me!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Show our p5.MediaElement's src field\\n alert(ele.src);\\n }\\n}\\n
Play an HTML5 media element.
\\nvar ele;\\n\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/beat.mp3');\\n\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n //Here we call the play() function on\\n //the p5.MediaElement we created above.\\n //This will start the audio sample.\\n ele.play();\\n\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n }\\n}\\n
Stops an HTML5 media element (sets current time to zero).
\\n//This example both starts\\n//and stops a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //if the sample is currently playing\\n //calling the stop() function on\\n //our p5.MediaElement will stop\\n //it and reset its current\\n //time to 0 (i.e. it will start\\n //at the beginning the next time\\n //you play it)\\n ele.stop();\\n\\n sampleIsPlaying = false;\\n text('Click to play!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to stop!', width / 2, height / 2);\\n }\\n }\\n}\\n
Pauses an HTML5 media element.
\\n//This example both starts\\n//and pauses a sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n //Calling pause() on our\\n //p5.MediaElement will stop it\\n //playing, but when we call the\\n //loop() or play() functions\\n //the sample will start from\\n //where we paused it.\\n ele.pause();\\n\\n sampleIsPlaying = false;\\n text('Click to resume!', width / 2, height / 2);\\n } else {\\n //loop our sound element until we\\n //call ele.pause() on it.\\n ele.loop();\\n\\n sampleIsPlaying = true;\\n text('Click to pause!', width / 2, height / 2);\\n }\\n }\\n}\\n
Set 'loop' to true for an HTML5 media element, and starts playing.
\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsLooping = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to loop!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (!sampleIsLooping) {\\n //loop our sound element until we\\n //call ele.stop() on it.\\n ele.loop();\\n\\n sampleIsLooping = true;\\n text('Click to stop!', width / 2, height / 2);\\n } else {\\n ele.stop();\\n\\n sampleIsLooping = false;\\n text('Click to loop!', width / 2, height / 2);\\n }\\n }\\n}\\n
Set 'loop' to false for an HTML5 media element. Element will stop\\nwhen it reaches the end.
\\n//This example both starts\\n//and stops loop of sound sample\\n//when the user clicks the canvas\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\n//while our audio is playing,\\n//this will be set to true\\nvar sampleIsPlaying = false;\\n\\nfunction setup() {\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to play!', width / 2, height / 2);\\n}\\n\\nfunction mouseClicked() {\\n //here we test if the mouse is over the\\n //canvas element when it's clicked\\n if (mouseX >= 0 && mouseX <= width && mouseY >= 0 && mouseY <= height) {\\n background(200);\\n\\n if (sampleIsPlaying) {\\n ele.noLoop();\\n text('No more Loops!', width / 2, height / 2);\\n } else {\\n ele.loop();\\n sampleIsPlaying = true;\\n text('Click to stop looping!', width / 2, height / 2);\\n }\\n }\\n}\\n
Set HTML5 media element to autoplay or not.
whether the element should autoplay
Sets volume for this HTML5 media element. If no argument is given,\\nreturns the current volume.
\\nvar ele;\\nfunction setup() {\\n // p5.MediaElement objects are usually created\\n // by calling the createAudio(), createVideo(),\\n // and createCapture() functions.\\n // In this example we create\\n // a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to Play!', width / 2, height / 2);\\n}\\nfunction mouseClicked() {\\n // Here we call the volume() function\\n // on the sound element to set its volume\\n // Volume must be between 0.0 and 1.0\\n ele.volume(0.2);\\n ele.play();\\n background(200);\\n text('You clicked Play!', width / 2, height / 2);\\n}\\n
\\nvar audio;\\nvar counter = 0;\\n\\nfunction loaded() {\\n audio.play();\\n}\\n\\nfunction setup() {\\n audio = createAudio('assets/lucky_dragons.mp3', loaded);\\n textAlign(CENTER);\\n}\\n\\nfunction draw() {\\n if (counter === 0) {\\n background(0, 255, 0);\\n text('volume(0.9)', width / 2, height / 2);\\n } else if (counter === 1) {\\n background(255, 255, 0);\\n text('volume(0.5)', width / 2, height / 2);\\n } else if (counter === 2) {\\n background(255, 0, 0);\\n text('volume(0.1)', width / 2, height / 2);\\n }\\n}\\n\\nfunction mousePressed() {\\n counter++;\\n if (counter === 0) {\\n audio.volume(0.9);\\n } else if (counter === 1) {\\n audio.volume(0.5);\\n } else if (counter === 2) {\\n audio.volume(0.1);\\n } else {\\n counter = 0;\\n audio.volume(0.9);\\n }\\n}\\n
volume between 0.0 and 1.0
If no arguments are given, returns the current playback speed of the\\nelement. The speed parameter sets the speed where 2.0 will play the\\nelement twice as fast, 0.5 will play at half the speed, and -1 will play\\nthe element in normal speed in reverse.(Note that not all browsers support\\nbackward playback and even if they do, playback might not be smooth.)
\\n//Clicking the canvas will loop\\n//the audio sample until the user\\n//clicks again to stop it\\n\\n//We will store the p5.MediaElement\\n//object in here\\nvar ele;\\nvar button;\\n\\nfunction setup() {\\n createCanvas(710, 400);\\n //Here we create a p5.MediaElement object\\n //using the createAudio() function.\\n ele = createAudio('assets/beat.mp3');\\n ele.loop();\\n background(200);\\n\\n button = createButton('2x speed');\\n button.position(100, 68);\\n button.mousePressed(twice_speed);\\n\\n button = createButton('half speed');\\n button.position(200, 68);\\n button.mousePressed(half_speed);\\n\\n button = createButton('reverse play');\\n button.position(300, 68);\\n button.mousePressed(reverse_speed);\\n\\n button = createButton('STOP');\\n button.position(400, 68);\\n button.mousePressed(stop_song);\\n\\n button = createButton('PLAY!');\\n button.position(500, 68);\\n button.mousePressed(play_speed);\\n}\\n\\nfunction twice_speed() {\\n ele.speed(2);\\n}\\n\\nfunction half_speed() {\\n ele.speed(0.5);\\n}\\n\\nfunction reverse_speed() {\\n ele.speed(-1);\\n}\\n\\nfunction stop_song() {\\n ele.stop();\\n}\\n\\nfunction play_speed() {\\n ele.play();\\n}\\n
speed multiplier for element playback
If no arguments are given, returns the current time of the element.\\nIf an argument is given the current time of the element is set to it.
\\nvar ele;\\nvar beginning = true;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('start at beginning', width / 2, height / 2);\\n}\\n\\n// this function fires with click anywhere\\nfunction mousePressed() {\\n if (beginning === true) {\\n // here we start the sound at the beginning\\n // time(0) is not necessary here\\n // as this produces the same result as\\n // play()\\n ele.play().time(0);\\n background(200);\\n text('jump 2 sec in', width / 2, height / 2);\\n beginning = false;\\n } else {\\n // here we jump 2 seconds into the sound\\n ele.play().time(2);\\n background(250);\\n text('start at beginning', width / 2, height / 2);\\n beginning = true;\\n }\\n}\\n
time to jump to (in seconds)
Returns the duration of the HTML5 media element.
\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio().\\n ele = createAudio('assets/doorbell.mp3');\\n background(250);\\n textAlign(CENTER);\\n text('Click to know the duration!', 10, 25, 70, 80);\\n}\\nfunction mouseClicked() {\\n ele.play();\\n background(200);\\n //ele.duration dislpays the duration\\n text(ele.duration() + ' seconds', width / 2, height / 2);\\n}\\n
Schedule an event to be called when the audio or video\\nelement reaches the end. If the element is looping,\\nthis will not be called. The element is passed in\\nas the argument to the onended callback.
function to call when the\\n soundfile has ended. The\\n media element will be passed\\n in as the argument to the\\n callback.
\\nfunction setup() {\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n audioEl.onended(sayDone);\\n}\\n\\nfunction sayDone(elt) {\\n alert('done playing ' + elt.src);\\n}\\n
Send the audio output of this element to a specified audioNode or\\np5.sound object. If no element is provided, connects to p5's master\\noutput. That connection is established when this method is first called.\\nAll connections are removed by the .disconnect() method.
This method is meant to be used with the p5.sound.js addon library.
AudioNode from the Web Audio API,\\nor an object from the p5.sound library
Disconnect all Web Audio routing, including to master output.\\nThis is useful if you want to re-route the output through\\naudio effects, for example.
Show the default MediaElement controls, as determined by the web browser.
\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n background(200);\\n textAlign(CENTER);\\n text('Click to Show Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.showControls();\\n background(200);\\n text('Controls Shown', width / 2, height / 2);\\n}\\n
Hide the default mediaElement controls.
\\nvar ele;\\nfunction setup() {\\n //p5.MediaElement objects are usually created\\n //by calling the createAudio(), createVideo(),\\n //and createCapture() functions.\\n //In this example we create\\n //a new p5.MediaElement via createAudio()\\n ele = createAudio('assets/lucky_dragons.mp3');\\n ele.showControls();\\n background(200);\\n textAlign(CENTER);\\n text('Click to hide Controls!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n ele.hideControls();\\n background(200);\\n text('Controls hidden', width / 2, height / 2);\\n}\\n
Schedule events to trigger every time a MediaElement\\n(audio/video) reaches a playback cue point.
Accepts a callback function, a time (in seconds) at which to trigger\\nthe callback, and an optional parameter for the callback.
Time will be passed as the first parameter to the callback function,\\nand param will be the second parameter.
Time in seconds, relative to this media\\n element's playback. For example, to trigger\\n an event every time playback reaches two\\n seconds, pass in the number 2. This will be\\n passed as the first parameter to\\n the callback function.
Name of a function that will be\\n called at the given time. The callback will\\n receive time and (optionally) param as its\\n two parameters.
An object to be passed as the\\n second parameter to the\\n callback function.
\\n//\\n//\\nfunction setup() {\\n noCanvas();\\n\\n var audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n\\n // schedule three calls to changeBackground\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n audioEl.addCue(5.0, changeBackground, color(255, 255, 0));\\n}\\n\\nfunction changeBackground(val) {\\n background(val);\\n}\\n
Remove a callback based on its ID. The ID is returned by the\\naddCue method.
ID of the cue, as returned by addCue
\\nvar audioEl, id1, id2;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n audioEl.showControls();\\n // schedule five calls to changeBackground\\n id1 = audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n id2 = audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n text('Click to remove first and last Cue!', 10, 25, 70, 80);\\n}\\nfunction mousePressed() {\\n audioEl.removeCue(id1);\\n audioEl.removeCue(id2);\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n
Remove all of the callbacks that had originally been scheduled\\nvia the addCue method.
\\nvar audioEl;\\nfunction setup() {\\n background(255, 255, 255);\\n audioEl = createAudio('assets/beat.mp3');\\n //Show the default MediaElement controls, as determined by the web browser\\n audioEl.showControls();\\n // schedule calls to changeBackground\\n background(200);\\n text('Click to change Cue!', 10, 25, 70, 80);\\n audioEl.addCue(0.5, changeBackground, color(255, 0, 0));\\n audioEl.addCue(1.0, changeBackground, color(0, 255, 0));\\n audioEl.addCue(2.5, changeBackground, color(0, 0, 255));\\n audioEl.addCue(3.0, changeBackground, color(0, 255, 255));\\n audioEl.addCue(4.2, changeBackground, color(255, 255, 0));\\n}\\nfunction mousePressed() {\\n // here we clear the scheduled callbacks\\n audioEl.clearCues();\\n // then we add some more callbacks\\n audioEl.addCue(1, changeBackground, color(2, 2, 2));\\n audioEl.addCue(3, changeBackground, color(255, 255, 0));\\n}\\nfunction changeBackground(val) {\\n background(val);\\n}\\n
Underlying File object. All normal File methods can be called on this.
File type (image, text, etc.)
File subtype (usually the file extension jpg, png, xml, etc.)
File name
File size
URL string containing image data.
p5.sound \\nhttps://p5js.org/reference/#/libraries/p5.sound
From the Processing Foundation and contributors\\nhttps://github.com/processing/p5.js-sound/graphs/contributors
MIT License (MIT)\\nhttps://github.com/processing/p5.js-sound/blob/master/LICENSE
Some of the many audio libraries & resources that inspire p5.sound:
Wilm Thoben's Sound library for Processing https://github.com/processing/processing/tree/master/java/libraries/sound
Web Audio API: http://w3.org/TR/webaudio/
Determine which filetypes are supported (inspired by buzz.js)\\nThe audio element (el) will only be used to test browser support for various audio formats
Returns the Audio Context for this sketch. Useful for users\\nwho would like to dig deeper into the Web Audio API\\n.
Some browsers require users to startAudioContext\\nwith a user gesture, such as touchStarted in the example below.
\\n function draw() {\\n background(255);\\n textAlign(CENTER);\\n\\n if (getAudioContext().state !== 'running') {\\n text('click to start audio', width/2, height/2);\\n } else {\\n text('audio is enabled', width/2, height/2);\\n }\\n }\\n\\n function touchStarted() {\\n if (getAudioContext().state !== 'running') {\\n getAudioContext().resume();\\n }\\n var synth = new p5.MonoSynth();\\n synth.play('A4', 0.5, 0, 0.2);\\n }\\n\\n
It is a good practice to give users control over starting audio playback.\\nThis practice is enforced by Google Chrome's autoplay policy as of r70\\n(info), iOS Safari, and other browsers.\\n
\\nuserStartAudio() starts the Audio Context on a user gesture. It utilizes\\nthe StartAudioContext library by\\nYotam Mann (MIT Licence, 2016). Read more at https://github.com/tambien/StartAudioContext.\\n
Starting the audio context on a user gesture can be as simple as userStartAudio().\\nOptional parameters let you decide on a specific element that will start the audio context,\\nand/or call a function once the audio context is started.
userStartAudio()
This argument can be an Element,\\n Selector String, NodeList, p5.Element,\\n jQuery Element, or an Array of any of those.
Callback to invoke when the AudioContext has started
\\nfunction setup() {\\n var myDiv = createDiv('click to start audio');\\n myDiv.position(0, 0);\\n\\n var mySynth = new p5.MonoSynth();\\n\\n // This won't play until the context has started\\n mySynth.play('A6');\\n\\n // Start the audio context on a click/touch event\\n userStartAudio().then(function() {\\n myDiv.remove();\\n });\\n}\\n
Master contains AudioContext and the master sound output.
Returns a number representing the master amplitude (volume) for sound\\nin this sketch.
Scale the output of all sound in this sketch
rampTime
How This Works: When you load the p5.sound module, it\\ncreates a single instance of p5sound. All sound objects in this\\nmodule output to p5sound before reaching your computer's output.\\nSo if you change the amplitude of p5sound, it impacts all of the\\nsound in this module.
If no value is provided, returns a Web Audio API Gain Node
Volume (amplitude) between 0.0\\n and 1.0 or modulating signal/oscillator
Fade for t seconds
Schedule this event to happen at\\n t seconds in the future
p5.soundOut is the p5.sound master output. It sends output to\\nthe destination of this window's web audio context. It contains\\nWeb Audio API nodes including a dyanmicsCompressor (.limiter),\\nand Gain Nodes for .input and .output.
p5.soundOut
.limiter
.input
.output
Returns a number representing the sample rate, in samples per second,\\nof all sound objects in this audio context. It is determined by the\\nsampling rate of your operating system's sound card, and it is not\\ncurrently possile to change.\\nIt is often 44100, or twice the range of human hearing.
Returns the closest MIDI note value for\\na given frequency.
A freqeuncy, for example, the "A"\\n above Middle C is 440Hz
Returns the frequency value of a MIDI note value.\\nGeneral MIDI treats notes as integers where middle C\\nis 60, C# is 61, D is 62 etc. Useful for generating\\nmusical frequencies with oscillators.
The number of a MIDI note
\\nvar notes = [60, 64, 67, 72];\\nvar i = 0;\\n\\nfunction setup() {\\n osc = new p5.Oscillator('Triangle');\\n osc.start();\\n frameRate(1);\\n}\\n\\nfunction draw() {\\n var freq = midiToFreq(notes[i]);\\n osc.freq(freq);\\n i++;\\n if (i >= notes.length){\\n i = 0;\\n }\\n}\\n
List the SoundFile formats that you will include. LoadSound\\nwill search your directory for these extensions, and will pick\\na format that is compatable with the client's web browser.\\nHere is a free online file\\nconverter.
i.e. 'mp3', 'wav', 'ogg'
\\nfunction preload() {\\n // set the global sound formats\\n soundFormats('mp3', 'ogg');\\n\\n // load either beatbox.mp3, or .ogg, depending on browser\\n mySound = loadSound('assets/beatbox.mp3');\\n}\\n\\nfunction setup() {\\n mySound.play();\\n}\\n
Used by Osc and Envelope to chain signal math
loadSound() returns a new p5.SoundFile from a specified\\npath. If called during preload(), the p5.SoundFile will be ready\\nto play in time for setup() and draw(). If called outside of\\npreload, the p5.SoundFile will not be ready immediately, so\\nloadSound accepts a callback as the second parameter. Using a\\n\\nlocal server is recommended when loading external files.
Path to the sound file, or an array with\\n paths to soundfiles in multiple formats\\n i.e. ['sound.ogg', 'sound.mp3'].\\n Alternately, accepts an object: either\\n from the HTML5 File API, or a p5.File.
Name of a function to call if there is\\n an error loading the file.
Name of a function to call while file is loading.\\n This function will receive the percentage loaded\\n so far, from 0.0 to 1.0.
\\nfunction preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n}\\n\\nfunction setup() {\\n mySound.setVolume(0.1);\\n mySound.play();\\n}\\n
Returns true if the sound file finished loading successfully.
Play the p5.SoundFile
(optional) schedule playback to start (in seconds from now).
(optional) playback rate
(optional) amplitude (volume)\\n of playback
(optional) cue start time in seconds
(optional) duration of playback in seconds
p5.SoundFile has two play modes: restart and\\nsustain. Play Mode determines what happens to a\\np5.SoundFile if it is triggered while in the middle of playback.\\nIn sustain mode, playback will continue simultaneous to the\\nnew playback. In restart mode, play() will stop playback\\nand start over. With untilDone, a sound will play only if it's\\nnot already playing. Sustain is the default mode.
restart
sustain
'restart' or 'sustain' or 'untilDone'
\\nvar mySound;\\nfunction preload(){\\n mySound = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\nfunction mouseClicked() {\\n mySound.playMode('sustain');\\n mySound.play();\\n}\\nfunction keyPressed() {\\n mySound.playMode('restart');\\n mySound.play();\\n}\\n\\n
Pauses a file that is currently playing. If the file is not\\nplaying, then nothing will happen.
After pausing, .play() will resume from the paused\\nposition.\\nIf p5.SoundFile had been set to loop before it was paused,\\nit will continue to loop after it is unpaused with .play().
(optional) schedule event to occur\\n seconds from now
\\nvar soundFile;\\n\\nfunction preload() {\\n soundFormats('ogg', 'mp3');\\n soundFile = loadSound('assets/Damscray_-_Dancing_Tiger_02.mp3');\\n}\\nfunction setup() {\\n background(0, 255, 0);\\n soundFile.setVolume(0.1);\\n soundFile.loop();\\n}\\nfunction keyTyped() {\\n if (key == 'p') {\\n soundFile.pause();\\n background(255, 0, 0);\\n }\\n}\\n\\nfunction keyReleased() {\\n if (key == 'p') {\\n soundFile.play();\\n background(0, 255, 0);\\n }\\n}\\n
Loop the p5.SoundFile. Accepts optional parameters to set the\\nplayback rate, playback volume, loopStart, loopEnd.
(optional) playback volume
(optional) startTime in seconds
(optional) loop duration in seconds
Set a p5.SoundFile's looping flag to true or false. If the sound\\nis currently playing, this change will take effect when it\\nreaches the end of the current playback.
set looping to true or false
Returns 'true' if a p5.SoundFile is currently looping and playing, 'false' if not.
Returns true if a p5.SoundFile is playing, false if not (i.e.\\npaused or stopped).
Returns true if a p5.SoundFile is paused, false if not (i.e.\\nplaying or stopped).
Stop soundfile playback.
(optional) schedule event to occur\\n in seconds from now
Multiply the output volume (amplitude) of a sound file\\nbetween 0.0 (silence) and 1.0 (full volume).\\n1.0 is the maximum amplitude of a digital sound, so multiplying\\nby greater than 1.0 may cause digital distortion. To\\nfade, provide a rampTime parameter. For more\\ncomplex fades, see the Envelope class.
Alternately, you can pass in a signal source such as an\\noscillator to modulate the amplitude with an audio signal.
Set the stereo panning of a p5.sound object to\\na floating point number between -1.0 (left) and 1.0 (right).\\nDefault is 0.0 (center).
Set the stereo panner
schedule this event to happen\\n seconds from now
\\n\\n var ball = {};\\n var soundFile;\\n\\n function preload() {\\n soundFormats('ogg', 'mp3');\\n soundFile = loadSound('assets/beatbox.mp3');\\n }\\n\\n function draw() {\\n background(0);\\n ball.x = constrain(mouseX, 0, width);\\n ellipse(ball.x, height/2, 20, 20)\\n }\\n\\n function mousePressed(){\\n // map the ball's x location to a panning degree\\n // between -1.0 (left) and 1.0 (right)\\n var panning = map(ball.x, 0., width,-1.0, 1.0);\\n soundFile.pan(panning);\\n soundFile.play();\\n }\\n
Returns the current stereo pan position (-1.0 to 1.0)
Set the playback rate of a sound file. Will change the speed and the pitch.\\nValues less than zero will reverse the audio buffer.
Set the playback rate. 1.0 is normal,\\n .5 is half-speed, 2.0 is twice as fast.\\n Values less than zero play backwards.
\\nvar song;\\n\\nfunction preload() {\\n song = loadSound('assets/Damscray_DancingTiger.mp3');\\n}\\n\\nfunction setup() {\\n song.loop();\\n}\\n\\nfunction draw() {\\n background(200);\\n\\n // Set the rate to a range between 0.1 and 4\\n // Changing the rate also alters the pitch\\n var speed = map(mouseY, 0.1, height, 0, 2);\\n speed = constrain(speed, 0.01, 4);\\n song.rate(speed);\\n\\n // Draw a circle to show what is going on\\n stroke(0);\\n fill(51, 100);\\n ellipse(mouseX, 100, 48, 48);\\n}\\n\\n
Returns the duration of a sound file in seconds.
Return the current position of the p5.SoundFile playhead, in seconds.\\nTime is relative to the normal buffer direction, so if reverseBuffer\\nhas been called, currentTime will count backwards.
reverseBuffer
Move the playhead of the song to a position, in seconds. Start timing\\nand playback duration. If none are given, will reset the file to play\\nentire duration from start to finish.
cueTime of the soundFile in seconds.
duration in seconds.
Return the number of channels in a sound file.\\nFor example, Mono = 1, Stereo = 2.
Return the sample rate of the sound file.
Return the number of samples in a sound file.\\nEqual to sampleRate * duration.
Returns an array of amplitude peaks in a p5.SoundFile that can be\\nused to draw a static waveform. Scans through the p5.SoundFile's\\naudio buffer to find the greatest amplitudes. Accepts one\\nparameter, 'length', which determines size of the array.\\nLarger arrays result in more precise waveform visualizations.
Inspired by Wavesurfer.js.
length is the size of the returned array.\\n Larger length results in more precision.\\n Defaults to 5*width of the browser window.
Reverses the p5.SoundFile's buffer source.\\nPlayback must be handled separately (see example).
\\nvar drum;\\n\\nfunction preload() {\\n drum = loadSound('assets/drum.mp3');\\n}\\n\\nfunction setup() {\\n drum.reverseBuffer();\\n drum.play();\\n}\\n\\n
Schedule an event to be called when the soundfile\\nreaches the end of a buffer. If the soundfile is\\nplaying through once, this will be called when it\\nends. If it is looping, it will be called when\\nstop is called.
function to call when the\\n soundfile has ended.
Connects the output of a p5sound object to input of another\\np5.sound object. For example, you may connect a p5.SoundFile to an\\nFFT or an Effect. If no parameter is given, it will connect to\\nthe master output. Most p5sound objects connect to the master\\noutput when they are created.
Audio object that accepts an input
Disconnects the output of this p5sound object.
Reset the source for this SoundFile to a\\nnew path (URL).
path to audio file
Callback
Replace the current Audio Buffer with a new Buffer.
Array of Float32 Array(s). 2 Float32 Arrays\\n will create a stereo source. 1 will create\\n a mono source.
processPeaks returns an array of timestamps where it thinks there is a beat.
This is an asynchronous function that processes the soundfile in an offline audio context,\\nand sends the results to your callback function.
The process involves running the soundfile through a lowpass filter, and finding all of the\\npeaks above the initial threshold. If the total number of peaks are below the minimum number of peaks,\\nit decreases the threshold and re-runs the analysis until either minPeaks or minThreshold are reached.
a function to call once this data is returned
initial threshold defaults to 0.9
minimum threshold defaults to 0.22
minimum number of peaks defaults to 200
\\nvar mySound;\\nfunction preload() {\\n mySound = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n // schedule calls to changeText\\n mySound.addCue(0.50, changeText, \\\"hello\\\" );\\n mySound.addCue(1.00, changeText, \\\"p5\\\" );\\n mySound.addCue(1.50, changeText, \\\"what\\\" );\\n mySound.addCue(2.00, changeText, \\\"do\\\" );\\n mySound.addCue(2.50, changeText, \\\"you\\\" );\\n mySound.addCue(3.00, changeText, \\\"want\\\" );\\n mySound.addCue(4.00, changeText, \\\"to\\\" );\\n mySound.addCue(5.00, changeText, \\\"make\\\" );\\n mySound.addCue(6.00, changeText, \\\"?\\\" );\\n}\\n\\nfunction changeText(val) {\\n background(0);\\n text(val, width/2, height/2);\\n}\\n\\nfunction mouseClicked() {\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n if (mySound.isPlaying() ) {\\n mySound.stop();\\n } else {\\n mySound.play();\\n }\\n }\\n}\\n
Save a p5.SoundFile as a .wav file. The browser will prompt the user\\nto download the file to their device. To upload a file to a server, see\\ngetBlob
name of the resulting .wav file.
\\n var inp, button, mySound;\\n var fileName = 'cool';\\n function preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n }\\n function setup() {\\n btn = createButton('click to save file');\\n btn.position(0, 0);\\n btn.mouseClicked(handleMouseClick);\\n }\\n\\n function handleMouseClick() {\\n mySound.save(fileName);\\n }\\n
This method is useful for sending a SoundFile to a server. It returns the\\n.wav-encoded audio data as a "Blob".\\nA Blob is a file-like data object that can be uploaded to a server\\nwith an http request. We'll\\nuse the httpDo options object to send a POST request with some\\nspecific options: we encode the request as multipart/form-data,\\nand attach the blob as one of the form values using FormData.
httpDo
multipart/form-data
FormData
\\n\\n function preload() {\\n mySound = loadSound('assets/doorbell.mp3');\\n }\\n\\n function setup() {\\n noCanvas();\\n var soundBlob = mySound.getBlob();\\n\\n // Now we can send the blob to a server...\\n var serverUrl = 'https://jsonplaceholder.typicode.com/posts';\\n var httpRequestOptions = {\\n method: 'POST',\\n body: new FormData().append('soundBlob', soundBlob),\\n headers: new Headers({\\n 'Content-Type': 'multipart/form-data'\\n })\\n };\\n httpDo(serverUrl, httpRequestOptions);\\n\\n // We can also create an `ObjectURL` pointing to the Blob\\n var blobUrl = URL.createObjectURL(soundBlob);\\n\\n // The `` Element accepts Object URL's\\n var htmlAudioElt = createAudio(blobUrl).showControls();\\n\\n createDiv();\\n\\n // The ObjectURL exists as long as this tab is open\\n var input = createInput(blobUrl);\\n input.attribute('readonly', true);\\n input.mouseClicked(function() { input.elt.select() });\\n }\\n\\n
Connects to the p5sound instance (master output) by default.\\nOptionally, you can pass in a specific source (i.e. a soundfile).
set the sound source\\n (optional, defaults to\\n master output)
a range between 0.0 and 1.0\\n to smooth amplitude readings
\\nfunction preload(){\\n sound1 = loadSound('assets/beat.mp3');\\n sound2 = loadSound('assets/drum.mp3');\\n}\\nfunction setup(){\\n amplitude = new p5.Amplitude();\\n sound1.play();\\n sound2.play();\\n amplitude.setInput(sound2);\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\nfunction mouseClicked(){\\n sound1.stop();\\n sound2.stop();\\n}\\n
Returns a single Amplitude reading at the moment it is called.\\nFor continuous readings, run in the draw loop.
Optionally return only channel 0 (left) or 1 (right)
\\nfunction preload(){\\n sound = loadSound('assets/beat.mp3');\\n}\\nfunction setup() {\\n amplitude = new p5.Amplitude();\\n sound.play();\\n}\\nfunction draw() {\\n background(0);\\n fill(255);\\n var level = amplitude.getLevel();\\n var size = map(level, 0, 1, 0, 200);\\n ellipse(width/2, height/2, size, size);\\n}\\nfunction mouseClicked(){\\n sound.stop();\\n}\\n
Determines whether the results of Amplitude.process() will be\\nNormalized. To normalize, Amplitude finds the difference the\\nloudest reading it has processed and the maximum amplitude of\\n1.0. Amplitude adds this difference to all values to produce\\nresults that will reliably map between 0.0 and 1.0. However,\\nif a louder moment occurs, the amount that Normalize adds to\\nall the values will change. Accepts an optional boolean parameter\\n(true or false). Normalizing is off by default.
set normalize to true (1) or false (0)
Smooth Amplitude analysis by averaging with the last analysis\\nframe. Off by default.
smoothing from 0.0 <= 1
Set the input source for the FFT analysis. If no source is\\nprovided, FFT will analyze all sound in the sketch.
p5.sound object (or web audio API source node)
Returns an array of amplitude values (between -1.0 and +1.0) that represent\\na snapshot of amplitude readings in a single buffer. Length will be\\nequal to bins (defaults to 1024). Can be used to draw the waveform\\nof a sound.
Must be a power of two between\\n 16 and 1024. Defaults to 1024.
If any value is provided, will return results\\n in a Float32 Array which is more precise\\n than a regular array.
Returns an array of amplitude values (between 0 and 255)\\nacross the frequency spectrum. Length is equal to FFT bins\\n(1024 by default). The array indices correspond to frequencies\\n(i.e. pitches), from the lowest to the highest that humans can\\nhear. Each value represents amplitude at that slice of the\\nfrequency spectrum. Must be called prior to using\\ngetEnergy().
If "dB," returns decibel\\n float measurements between\\n -140 and 0 (max).\\n Otherwise returns integers from 0-255.
\\nvar osc;\\nvar fft;\\n\\nfunction setup(){\\n createCanvas(100,100);\\n osc = new p5.Oscillator();\\n osc.amp(0);\\n osc.start();\\n fft = new p5.FFT();\\n}\\n\\nfunction draw(){\\n background(0);\\n\\n var freq = map(mouseX, 0, 800, 20, 15000);\\n freq = constrain(freq, 1, 20000);\\n osc.freq(freq);\\n\\n var spectrum = fft.analyze();\\n noStroke();\\n fill(0,255,0); // spectrum is green\\n for (var i = 0; i< spectrum.length; i++){\\n var x = map(i, 0, spectrum.length, 0, width);\\n var h = -height + map(spectrum[i], 0, 255, height, 0);\\n rect(x, height, width / spectrum.length, h );\\n }\\n\\n stroke(255);\\n text('Freq: ' + round(freq)+'Hz', 10, 10);\\n\\n isMouseOverCanvas();\\n}\\n\\n// only play sound when mouse is over canvas\\nfunction isMouseOverCanvas() {\\n var mX = mouseX, mY = mouseY;\\n if (mX > 0 && mX < width && mY < height && mY > 0) {\\n osc.amp(0.5, 0.2);\\n } else {\\n osc.amp(0, 0.2);\\n }\\n}\\n
Returns the amount of energy (volume) at a specific\\n\\nfrequency, or the average amount of energy between two\\nfrequencies. Accepts Number(s) corresponding\\nto frequency (in Hz), or a String corresponding to predefined\\nfrequency ranges ("bass", "lowMid", "mid", "highMid", "treble").\\nReturns a range between 0 (no energy/volume at that frequency) and\\n255 (maximum energy).\\nNOTE: analyze() must be called prior to getEnergy(). Analyze()\\ntells the FFT to analyze frequency data, and getEnergy() uses\\nthe results determine the value at a specific frequency or\\nrange of frequencies.
Will return a value representing\\n energy at this frequency. Alternately,\\n the strings "bass", "lowMid" "mid",\\n "highMid", and "treble" will return\\n predefined frequency ranges.
If a second frequency is given,\\n will return average amount of\\n energy that exists between the\\n two frequencies.
Returns the\\n\\nspectral centroid of the input signal.\\nNOTE: analyze() must be called prior to getCentroid(). Analyze()\\ntells the FFT to analyze frequency data, and getCentroid() uses\\nthe results determine the spectral centroid.
\\n\\n\\nfunction setup(){\\ncnv = createCanvas(100,100);\\nsound = new p5.AudioIn();\\nsound.start();\\nfft = new p5.FFT();\\nsound.connect(fft);\\n}\\n\\n\\nfunction draw(){\\n\\nvar centroidplot = 0.0;\\nvar spectralCentroid = 0;\\n\\n\\nbackground(0);\\nstroke(0,255,0);\\nvar spectrum = fft.analyze();\\nfill(0,255,0); // spectrum is green\\n\\n//draw the spectrum\\nfor (var i = 0; i< spectrum.length; i++){\\n var x = map(log(i), 0, log(spectrum.length), 0, width);\\n var h = map(spectrum[i], 0, 255, 0, height);\\n var rectangle_width = (log(i+1)-log(i))*(width/log(spectrum.length));\\n rect(x, height, rectangle_width, -h )\\n}\\n\\nvar nyquist = 22050;\\n\\n// get the centroid\\nspectralCentroid = fft.getCentroid();\\n\\n// the mean_freq_index calculation is for the display.\\nvar mean_freq_index = spectralCentroid/(nyquist/spectrum.length);\\n\\ncentroidplot = map(log(mean_freq_index), 0, log(spectrum.length), 0, width);\\n\\n\\nstroke(255,0,0); // the line showing where the centroid is will be red\\n\\nrect(centroidplot, 0, width / spectrum.length, height)\\nnoStroke();\\nfill(255,255,255); // text is white\\ntext(\\\"centroid: \\\", 10, 20);\\ntext(round(spectralCentroid)+\\\" Hz\\\", 10, 40);\\n}\\n
Smooth FFT analysis by averaging with the last analysis frame.
0.0 < smoothing < 1.0.\\n Defaults to 0.8.
Returns an array of average amplitude values for a given number\\nof frequency bands split equally. N defaults to 16.\\nNOTE: analyze() must be called prior to linAverages(). Analyze()\\ntells the FFT to analyze frequency data, and linAverages() uses\\nthe results to group them into a smaller set of averages.
Number of returned frequency groups
Returns an array of average amplitude values of the spectrum, for a given\\nset of \\nOctave Bands\\nNOTE: analyze() must be called prior to logAverages(). Analyze()\\ntells the FFT to analyze frequency data, and logAverages() uses\\nthe results to group them into a smaller set of averages.
Array of Octave Bands objects for grouping
Calculates and Returns the 1/N\\nOctave Bands\\nN defaults to 3 and minimum central frequency to 15.625Hz.\\n(1/3 Octave Bands ~= 31 Frequency Bands)\\nSetting fCtr0 to a central value of a higher octave will ignore the lower bands\\nand produce less frequency groups.
Specifies the 1/N type of generated octave bands
Minimum central frequency for the lowest band
Fade to value, for smooth transitions
Value to set this signal
Length of fade, in seconds from now
Connect a p5.sound object or Web Audio node to this\\np5.Signal so that its amplitude values can be scaled.
Add a constant value to this audio signal,\\nand return the resulting audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalAdd.
Multiply this signal by a constant value,\\nand return the resulting audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalMult.
to multiply
Scale this signal value to a given range,\\nand return the result as an audio signal. Does\\nnot change the value of the original signal,\\ninstead it returns a new p5.SignalScale.
input range minumum
input range maximum
Start an oscillator. Accepts an optional parameter to\\ndetermine how long (in seconds from now) until the\\noscillator starts.
startTime in seconds from now.
frequency in Hz.
Stop an oscillator. Accepts an optional parameter\\nto determine how long (in seconds from now) until the\\noscillator stops.
Time, in seconds from now.
Set the amplitude between 0 and 1.0. Or, pass in an object\\nsuch as an oscillator to modulate amplitude with an audio signal.
between 0 and 1.0\\n or a modulating signal/oscillator
create a fade that lasts rampTime
Set frequency of an oscillator to a value. Or, pass in an object\\nsuch as an oscillator to modulate the frequency with an audio signal.
Frequency in Hz\\n or modulating signal/oscillator
Ramp time (in seconds)
Schedule this event to happen\\n at x seconds from now
\\nvar osc = new p5.Oscillator(300);\\nosc.start();\\nosc.freq(40, 10);\\n
Set type to 'sine', 'triangle', 'sawtooth' or 'square'.
'sine', 'triangle', 'sawtooth' or 'square'.
Connect to a p5.sound / Web Audio object.
A p5.sound or Web Audio object
Disconnect all outputs
Pan between Left (-1) and Right (1)
Number between -1 and 1
Set the phase of an oscillator between 0.0 and 1.0.\\nIn this implementation, phase is a delay time\\nbased on the oscillator's current frequency.
float between 0.0 and 1.0
Add a value to the p5.Oscillator's output amplitude,\\nand return the oscillator. Calling this method again\\nwill override the initial add() with a new value.
Constant number to add
Multiply the p5.Oscillator's output amplitude\\nby a fixed value (i.e. turn it up!). Calling this method\\nagain will override the initial mult() with a new value.
Constant number to multiply
Scale this oscillator's amplitude values to a given\\nrange, and return the oscillator. Calling this method\\nagain will override the initial scale() with new values.
Time until envelope reaches attackLevel
Level once attack is complete.
Time until envelope reaches decayLevel.
Level after decay. The envelope will sustain here until it is released.
Duration of the release portion of the envelope.
Level at the end of the release.
Reset the envelope with a series of time/value pairs.
Time (in seconds) before level\\n reaches attackLevel
Typically an amplitude between\\n 0.0 and 1.0
Time
Amplitude (In a standard ADSR envelope,\\n decayLevel = sustainLevel)
Release Time (in seconds)
Amplitude
\\nvar t1 = 0.1; // attack time in seconds\\nvar l1 = 0.7; // attack level 0.0 to 1.0\\nvar t2 = 0.3; // decay time in seconds\\nvar l2 = 0.1; // decay level 0.0 to 1.0\\nvar t3 = 0.2; // sustain time in seconds\\nvar l3 = 0.5; // sustain level 0.0 to 1.0\\n// release level defaults to zero\\n\\nvar env;\\nvar triOsc;\\n\\nfunction setup() {\\n background(0);\\n noStroke();\\n fill(255);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope(t1, l1, t2, l2, t3, l3);\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env); // give the env control of the triOsc's amp\\n triOsc.start();\\n}\\n\\n// mouseClick triggers envelope if over canvas\\nfunction mouseClicked() {\\n // is mouse over canvas?\\n if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\\n env.play(triOsc);\\n }\\n}\\n
Set values like a traditional\\n\\nADSR envelope\\n.
Time (in seconds before envelope\\n reaches Attack Level
Time (in seconds) before envelope\\n reaches Decay/Sustain Level
Ratio between attackLevel and releaseLevel, on a scale from 0 to 1,\\n where 1.0 = attackLevel, 0.0 = releaseLevel.\\n The susRatio determines the decayLevel and the level at which the\\n sustain portion of the envelope will sustain.\\n For example, if attackLevel is 0.4, releaseLevel is 0,\\n and susAmt is 0.5, the decayLevel would be 0.2. If attackLevel is\\n increased to 1.0 (using setRange),\\n then decayLevel would increase proportionally, to become 0.5.
Time in seconds from now (defaults to 0)
Set max (attackLevel) and min (releaseLevel) of envelope.
attack level (defaults to 1)
release level (defaults to 0)
Assign a parameter to be controlled by this envelope.\\nIf a p5.Sound object is given, then the p5.Envelope will control its\\noutput gain. If multiple inputs are provided, the env will\\ncontrol all of them.
A p5.sound object or\\n Web Audio Param.
Set whether the envelope ramp is linear (default) or exponential.\\nExponential ramps can be useful because we perceive amplitude\\nand frequency logarithmically.
true is exponential, false is linear
Play tells the envelope to start acting on a given input.\\nIf the input is a p5.sound object (i.e. AudioIn, Oscillator,\\nSoundFile), then Envelope will control its output volume.\\nEnvelopes can also be used to control any \\nWeb Audio Audio Param.
time from now (in seconds) at which to play
time to sustain before releasing the envelope
\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar susPercent = 0.2;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(playEnv);\\n}\\n\\nfunction playEnv() {\\n // trigger env on triOsc, 0 seconds from now\\n // After decay, sustain for 0.2 seconds before release\\n env.play(triOsc, 0, 0.2);\\n}\\n
Trigger the Attack, and Decay portion of the Envelope.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go. Input can be\\nany p5.sound object, or a \\nWeb Audio Param.
p5.sound Object or Web Audio Param
time from now (in seconds)
\\n\\nvar attackLevel = 1.0;\\nvar releaseLevel = 0;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.3;\\nvar susPercent = 0.4;\\nvar releaseTime = 0.5;\\n\\nvar env, triOsc;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n background(200);\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime, susPercent, releaseTime);\\n env.setRange(attackLevel, releaseLevel);\\n\\n triOsc = new p5.Oscillator('triangle');\\n triOsc.amp(env);\\n triOsc.start();\\n triOsc.freq(220);\\n\\n cnv.mousePressed(envAttack);\\n}\\n\\nfunction envAttack() {\\n console.log('trigger attack');\\n env.triggerAttack();\\n\\n background(0,255,0);\\n text('attack!', width/2, height/2);\\n}\\n\\nfunction mouseReleased() {\\n env.triggerRelease();\\n\\n background(200);\\n text('click to play', width/2, height/2);\\n}\\n
Trigger the Release of the Envelope. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.
time to trigger the release
Exponentially ramp to a value using the first two\\nvalues from setADSR(attackTime, decayTime)\\nas \\ntime constants for simple exponential ramps.\\nIf the value is higher than current value, it uses attackTime,\\nwhile a decrease uses decayTime.
setADSR(attackTime, decayTime)
When to trigger the ramp
Target value
Second target value (optional)
\\nvar env, osc, amp, cnv;\\n\\nvar attackTime = 0.001;\\nvar decayTime = 0.2;\\nvar attackLevel = 1;\\nvar decayLevel = 0;\\n\\nfunction setup() {\\n cnv = createCanvas(100, 100);\\n fill(0,255,0);\\n noStroke();\\n\\n env = new p5.Envelope();\\n env.setADSR(attackTime, decayTime);\\n\\n osc = new p5.Oscillator();\\n osc.amp(env);\\n osc.start();\\n\\n amp = new p5.Amplitude();\\n\\n cnv.mousePressed(triggerRamp);\\n}\\n\\nfunction triggerRamp() {\\n env.ramp(osc, 0, attackLevel, decayLevel);\\n}\\n\\nfunction draw() {\\n background(20,20,20);\\n text('click me', 10, 20);\\n var h = map(amp.getLevel(), 0, 0.4, 0, height);;\\n\\n rect(0, height, width, -h);\\n}\\n
Add a value to the p5.Oscillator's output amplitude,\\nand return the oscillator. Calling this method\\nagain will override the initial add() with new values.
Multiply the p5.Envelope's output amplitude\\nby a fixed value. Calling this method\\nagain will override the initial mult() with new values.
Scale this envelope's amplitude values to a given\\nrange, and return the envelope. Calling this method\\nagain will override the initial scale() with new values.
Set the width of a Pulse object (an oscillator that implements\\nPulse Width Modulation).
Set type of noise to 'white', 'pink' or 'brown'.\\nWhite is the default.
'white', 'pink' or 'brown'
Client must allow browser to access their microphone / audioin source.\\nDefault: false. Will become true when the client enables acces.
Input amplitude, connect to it by default but not to master out
Start processing audio input. This enables the use of other\\nAudioIn methods like getLevel(). Note that by default, AudioIn\\nis not connected to p5.sound's output. So you won't hear\\nanything unless you use the connect() method.
Certain browsers limit access to the user's microphone. For example,\\nChrome only allows access from localhost and over https. For this reason,\\nyou may want to include an errorCallback—a function that is called in case\\nthe browser won't provide mic access.
Name of a function to call on\\n success.
Name of a function to call if\\n there was an error. For example,\\n some browsers do not support\\n getUserMedia.
Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel().\\nIf re-starting, the user may be prompted for permission access.
Connect to an audio unit. If no parameter is provided, will\\nconnect to the master output (i.e. your speakers).
An object that accepts audio input,\\n such as an FFT
Disconnect the AudioIn from all audio units. For example, if\\nconnect() had been called, disconnect() will stop sending\\nsignal to your speakers.
Read the Amplitude (volume level) of an AudioIn. The AudioIn\\nclass contains its own instance of the Amplitude class to help\\nmake it easy to get a microphone's volume level. Accepts an\\noptional smoothing value (0.0 < 1.0). NOTE: AudioIn must\\n.start() before using .getLevel().
Smoothing is 0.0 by default.\\n Smooths values based on previous values.
Set amplitude (volume) of a mic input between 0 and 1.0.
between 0 and 1.0
ramp time (optional)
Returns a list of available input sources. This is a wrapper\\nfor <a title="MediaDevices.enumerateDevices() - Web APIs | MDN" target="_blank" href=\\n "https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices"
\\nand it returns a Promise.\\n
and it returns a Promise.
This callback function handles the sources when they\\n have been enumerated. The callback function\\n receives the deviceList array as its only argument
This optional callback receives the error\\n message as its argument.
\\n var audiograb;\\n\\n function setup(){\\n //new audioIn\\n audioGrab = new p5.AudioIn();\\n\\n audioGrab.getSources(function(deviceList) {\\n //print out the array of available sources\\n console.log(deviceList);\\n //set the source to the first item in the deviceList array\\n audioGrab.setSource(0);\\n });\\n }\\n
Set the input source. Accepts a number representing a\\nposition in the array returned by getSources().\\nThis is only available in browsers that support\\n<a title="MediaDevices.enumerateDevices() - Web APIs | MDN" target="_blank" href=\\n"https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices"
\\nnavigator.mediaDevices.enumerateDevices().\\n
navigator.mediaDevices.enumerateDevices().
position of input source in the array
In classes that extend\\np5.Effect, connect effect nodes\\nto the wet parameter
Set the output volume of the filter.
amplitude between 0 and 1.0
create a fade that lasts until rampTime
schedule this event to happen in tFromNow seconds
Link effects together in a chainExample usage: filter.chain(reverb, delay, panner);\\nMay be used with an open-ended number of arguments
Chain together multiple sound objects
Adjust the dry/wet value.
The desired drywet value (0 - 1.0)
Send output to a p5.js-sound, Web Audio Node, or use signal to\\ncontrol an AudioParam
Disconnect all output.
The p5.Filter is built with a\\n\\nWeb Audio BiquadFilter Node.
Filter an audio signal according to a set\\nof filter parameters.
An object that outputs audio
Frequency in Hz, from 10 to 22050
Resonance/Width of the filter frequency\\n from 0.001 to 1000
Set the frequency and the resonance of the filter.
Resonance (Q) from 0.001 to 1000
Set the filter frequency, in Hz, from 10 to 22050 (the range of\\nhuman hearing, although in reality most people hear in a narrower\\nrange).
Filter Frequency
Controls either width of a bandpass frequency,\\nor the resonance of a low/highpass cutoff frequency.
Resonance/Width of filter freq\\n from 0.001 to 1000
Controls the gain attribute of a Biquad Filter.\\nThis is distinctly different from .amp() which is inherited from p5.Effect\\n.amp() controls the volume via the output gain node\\np5.Filter.gain() controls the gain parameter of a Biquad Filter node.
Toggle function. Switches between the specified type and allpass
Set the type of a p5.Filter. Possible types include:\\n"lowpass" (default), "highpass", "bandpass",\\n"lowshelf", "highshelf", "peaking", "notch",\\n"allpass".
The p5.EQ is built with abstracted p5.Filter objects.\\nTo modify any bands, use methods of the \\np5.Filter API, especially gain and freq.\\nBands are stored in an array, with indices 0 - 3, or 0 - 7
gain
freq
Process an input by connecting it to the EQ
Audio source
\\nWeb Audio Spatial Panner Node
Properties include
\\npanningModel: "equal power" or "HRTF"\\n
panningModel: "equal power" or "HRTF"
\\ndistanceModel: "linear", "inverse", or "exponential"\\n
distanceModel: "linear", "inverse", or "exponential"
Connect an audio sorce
Input source
Set the X,Y,Z position of the Panner
Getter and setter methods for position coordinates
Getter and setter methods for orient coordinates
Set the rolloff factor and max distance
Maxium distance between the source and the listener
How quickly the volume is reduced as the source moves away from the listener
The p5.Delay is built with two\\n\\nWeb Audio Delay Nodes, one for each stereo channel.
Add delay to an audio signal according to a set\\nof delay parameters.
Time (in seconds) of the delay/echo.\\n Some browsers limit delayTime to\\n 1 second.
sends the delay back through itself\\n in a loop that decreases in volume\\n each time.
Cutoff frequency. Only frequencies\\n below the lowPass will be part of the\\n delay.
Set the delay (echo) time, in seconds. Usually this value will be\\na floating point number between 0.0 and 1.0.
Time (in seconds) of the delay
Feedback occurs when Delay sends its signal back through its input\\nin a loop. The feedback amount determines how much signal to send each\\ntime through the loop. A feedback greater than 1.0 is not desirable because\\nit will increase the overall output each time through the loop,\\ncreating an infinite feedback loop. The default value is 0.5
0.0 to 1.0, or an object such as an\\n Oscillator that can be used to\\n modulate this param
Set a lowpass filter frequency for the delay. A lowpass filter\\nwill cut off any frequencies higher than the filter frequency.
A lowpass filter will cut off any\\n frequencies higher than the filter frequency.
Resonance of the filter frequency\\n cutoff, or an object (i.e. a p5.Oscillator)\\n that can be used to modulate this parameter.\\n High numbers (i.e. 15) will produce a resonance,\\n low numbers (i.e. .2) will produce a slope.
Choose a preset type of delay. 'pingPong' bounces the signal\\nfrom the left to the right channel to produce a stereo effect.\\nAny other parameter will revert to the default delay setting.
'pingPong' (1) or 'default' (0)
Set the output level of the delay effect.
Send output to a p5.sound or web audio object
Connect a source to the reverb, and assign reverb parameters.
p5.sound / Web Audio object with a sound\\n output.
Duration of the reverb, in seconds.\\n Min: 0, Max: 10. Defaults to 3.
Percentage of decay with each echo.\\n Min: 0, Max: 100. Defaults to 2.
Play the reverb backwards or forwards.
Set the reverb settings. Similar to .process(), but without\\nassigning a new input.
Set the output level of the reverb effect.
Internally, the p5.Convolver uses the a\\n\\nWeb Audio Convolver Node.
Create a p5.Convolver. Accepts a path to a soundfile\\nthat will be used to generate an impulse response.
function to call if loading is successful.\\n The object will be passed in as the argument\\n to the callback function.
function to call if loading is not successful.\\n A custom error will be passed in as the argument\\n to the callback function.
\\nvar cVerb, sound;\\nfunction preload() {\\n soundFormats('ogg', 'mp3');\\n\\n cVerb = createConvolver('assets/concrete-tunnel.mp3');\\n\\n sound = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n // disconnect from master output...\\n sound.disconnect();\\n\\n // ...and process with (i.e. connect to) cVerb\\n // so that we only hear the convolution\\n cVerb.process(sound);\\n\\n sound.play();\\n}\\n
If you load multiple impulse files using the .addImpulse method,\\nthey will be stored as Objects in this Array. Toggle between them\\nwith the toggleImpulse(id) method.
toggleImpulse(id)
Load and assign a new Impulse Response to the p5.Convolver.\\nThe impulse is added to the .impulses array. Previous\\nimpulses can be accessed with the .toggleImpulse(id)\\nmethod.
.impulses
.toggleImpulse(id)
function (optional)
Similar to .addImpulse, except that the .impulses\\nArray is reset to save memory. A new .impulses\\narray is created with this impulse as the only item.
If you have used .addImpulse() to add multiple impulses\\nto a p5.Convolver, then you can use this method to toggle between\\nthe items in the .impulses Array. Accepts a parameter\\nto identify which impulse you wish to use, identified either by its\\noriginal filename (String) or by its position in the .impulses\\n Array (Number).\\nYou can access the objects in the .impulses Array directly. Each\\nObject has two attributes: an .audioBuffer (type:\\nWeb Audio \\nAudioBuffer) and a .name, a String that corresponds\\nwith the original filename.
.addImpulse()
.impulses\\n
.audioBuffer
.name
Identify the impulse by its original filename\\n (String), or by its position in the\\n .impulses Array (Number).
Set the global tempo, in beats per minute, for all\\np5.Parts. This method will impact all active p5.Parts.
Beats Per Minute
Seconds from now
Array of values to pass into the callback\\nat each step of the phrase. Depending on the callback\\nfunction's requirements, these values may be numbers,\\nstrings, or an object with multiple parameters.\\nZero (0) indicates a rest.
Set the tempo of this part, in Beats Per Minute.
Returns the tempo, in Beats Per Minute, of this part.
Start playback of this part. It will play\\nthrough all of its phrases at a speed\\ndetermined by setBPM.
seconds from now
Loop playback of this part. It will begin\\nlooping through all of its phrases at a speed\\ndetermined by setBPM.
Tell the part to stop looping.
Stop the part and cue it to step 0. Playback will resume from the begining of the Part when it is played again.
Pause the part. Playback will resume\\nfrom the current step.
Add a p5.Phrase to this Part.
reference to a p5.Phrase
Remove a phrase from this part, based on the name it was\\ngiven when it was created.
Get a phrase from this part, based on the name it was\\ngiven when it was created. Now you can modify its array.
Find all sequences with the specified name, and replace their patterns with the specified array.
Set the function that will be called at every step. This will clear the previous function.
The name of the callback\\n you want to fire\\n on every beat/tatum.
Start playback of the score.
Stop playback of the score.
Pause playback of the score.
Loop playback of the score.
Stop looping playback of the score. If it\\nis currently playing, this will go into effect\\nafter the current round of playback completes.
Set the tempo for all parts in the score
musicalTimeMode uses Tone.Time convention\\ntrue if string, false if number
musicalTimeMode variables\\nmodify these only when the interval is specified in musicalTime format as a string
Set a limit to the number of loops to play. defaults to Infinity
Do not initiate the callback if timeFromNow is < 0\\nThis ususually occurs for a few milliseconds when the page\\nis not fully loaded
The callback should only be called until maxIterations is reached
Start the loop
schedule a starting time
Stop the loop
schedule a stopping time
Pause the loop
schedule a pausing time
Synchronize loops. Use this method to start two more more loops in synchronization\\nor to start a loop in synchronization with a loop that is already playing\\nThis method will schedule the implicit loop in sync with the explicit master loop\\ni.e. loopToStart.syncedStart(loopToSyncWith)
a p5.SoundLoop to sync with
Start the loops in sync after timeFromNow seconds
Getters and Setters, setting any paramter will result in a change in the clock's\\nfrequency, that will be reflected after the next callback\\nbeats per minute (defaults to 60)
number of quarter notes in a measure (defaults to 4)
length of the loops interval
how many times the callback has been called so far
The p5.Compressor is built with a Web Audio Dynamics Compressor Node\\n
Performs the same function as .connect, but also accepts\\noptional parameters to set compressor's audioParams
Sound source to be connected
The amount of time (in seconds) to reduce the gain by 10dB,\\n default = .003, range 0 - 1
A decibel value representing the range above the \\n threshold where the curve smoothly transitions to the "ratio" portion.\\n default = 30, range 0 - 40
The amount of dB change in input for a 1 dB change in output\\n default = 12, range 1 - 20
The decibel value above which the compression will start taking effect\\n default = -24, range -100 - 0
The amount of time (in seconds) to increase the gain by 10dB\\n default = .25, range 0 - 1
Set the paramters of a compressor.
Get current attack or set value w/ time ramp
Attack is the amount of time (in seconds) to reduce the gain by 10dB,\\n default = .003, range 0 - 1
Assign time value to schedule the change in value
Get current knee or set value w/ time ramp
Get current ratio or set value w/ time ramp
Get current threshold or set value w/ time ramp
Get current release or set value w/ time ramp
Return the current reduction value
Connect a specific device to the p5.SoundRecorder.\\nIf no parameter is given, p5.SoundRecorer will record\\nall audible p5.sound from your sketch.
p5.sound object or a web audio unit\\n that outputs sound
Start recording. To access the recording, provide\\na p5.SoundFile as the first parameter. The p5.SoundRecorder\\nwill send its recording to that p5.SoundFile for playback once\\nrecording is complete. Optional parameters include duration\\n(in seconds) of the recording, and a callback function that\\nwill be called once the complete recording has been\\ntransfered to the p5.SoundFile.
p5.SoundFile
Time (in seconds)
The name of a function that will be\\n called once the recording completes
Stop the recording. Once the recording is stopped,\\nthe results will be sent to the p5.SoundFile that\\nwas given on .record(), and if a callback function\\nwas provided on record, that function will be called.
Save a p5.SoundFile as a .wav file. The browser will prompt the user\\nto download the file to their device.\\nFor uploading audio to a server, use\\np5.SoundFile.saveBlob.
p5.SoundFile.saveBlob
p5.SoundFile that you wish to save
isDetected is set to true when a peak is detected.
The update method is run in the draw loop.
Accepts an FFT object. You must call .analyze()\\non the FFT object prior to updating the peakDetect\\nbecause it relies on a completed FFT analysis.
A p5.FFT object
onPeak accepts two arguments: a function to call when\\na peak is detected. The value of the peak,\\nbetween 0.0 and 1.0, is passed to the callback.
Name of a function that will\\n be called when a peak is\\n detected.
Optional value to pass\\n into the function when\\n a peak is detected.
\\nvar cnv, soundFile, fft, peakDetect;\\nvar ellipseWidth = 0;\\n\\nfunction preload() {\\n soundFile = loadSound('assets/beat.mp3');\\n}\\n\\nfunction setup() {\\n cnv = createCanvas(100,100);\\n textAlign(CENTER);\\n\\n fft = new p5.FFT();\\n peakDetect = new p5.PeakDetect();\\n\\n setupSound();\\n\\n // when a beat is detected, call triggerBeat()\\n peakDetect.onPeak(triggerBeat);\\n}\\n\\nfunction draw() {\\n background(0);\\n fill(255);\\n text('click to play', width/2, height/2);\\n\\n fft.analyze();\\n peakDetect.update(fft);\\n\\n ellipseWidth *= 0.95;\\n ellipse(width/2, height/2, ellipseWidth, ellipseWidth);\\n}\\n\\n// this function is called by peakDetect.onPeak\\nfunction triggerBeat() {\\n ellipseWidth = 50;\\n}\\n\\n// mouseclick starts/stops sound\\nfunction setupSound() {\\n cnv.mouseClicked( function() {\\n if (soundFile.isPlaying() ) {\\n soundFile.stop();\\n } else {\\n soundFile.play();\\n }\\n });\\n}\\n
Connect a source to the gain node.
Set the output level of the gain node.
Connect to p5 objects or Web Audio Nodes
Disconnect from soundOut
Play tells the MonoSynth to start playing a note. This method schedules\\nthe calling of .triggerAttack and .triggerRelease.
the note you want to play, specified as a\\n frequency in Hertz (Number) or as a midi\\n value in Note/Octave format ("C4", "Eb3"...etc")\\n See \\n Tone. Defaults to 440 hz.
velocity of the note to play (ranging from 0 to 1)
\\nvar monoSynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n monoSynth = new p5.MonoSynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // time from now (in seconds)\\n var time = 0;\\n // note duration (in seconds)\\n var dur = 1/6;\\n // note velocity (volume, from 0 to 1)\\n var v = random();\\n\\n monoSynth.play(\\\"Fb3\\\", v, 0, dur);\\n monoSynth.play(\\\"Gb3\\\", v, time += dur, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n
Trigger the Attack, and Decay portion of the Envelope.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go.
the note you want to play, specified as a\\n frequency in Hertz (Number) or as a midi\\n value in Note/Octave format ("C4", "Eb3"...etc")\\n See \\n Tone. Defaults to 440 hz
\\nvar monoSynth = new p5.MonoSynth();\\n\\nfunction mousePressed() {\\n monoSynth.triggerAttack(\\\"E3\\\");\\n}\\n\\nfunction mouseReleased() {\\n monoSynth.triggerRelease();\\n}\\n
Trigger the release of the Envelope. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.
Getters and Setters
MonoSynth amp
desired volume
Time to reach new volume
Get rid of the MonoSynth and free up its resources / memory.
An object that holds information about which notes have been played and\\nwhich notes are currently being played. New notes are added as keys\\non the fly. While a note has been attacked, but not released, the value of the\\nkey is the audiovoice which is generating that note. When notes are released,\\nthe value of the key becomes undefined.
A PolySynth must have at least 1 voice, defaults to 8
Monosynth that generates the sound for each note that is triggered. The\\np5.PolySynth defaults to using the p5.MonoSynth as its voice.
Play a note by triggering noteAttack and noteRelease with sustain time
midi note to play (ranging from 0 to 127 - 60 being a middle C)
\\nvar polySynth;\\n\\nfunction setup() {\\n var cnv = createCanvas(100, 100);\\n cnv.mousePressed(playSynth);\\n\\n polySynth = new p5.PolySynth();\\n\\n textAlign(CENTER);\\n text('click to play', width/2, height/2);\\n}\\n\\nfunction playSynth() {\\n // note duration (in seconds)\\n var dur = 0.1;\\n\\n // time from now (in seconds)\\n var time = 0;\\n\\n // velocity (volume, from 0 to 1)\\n var vel = 0.1;\\n\\n polySynth.play(\\\"G2\\\", vel, 0, dur);\\n polySynth.play(\\\"C3\\\", vel, 0, dur);\\n polySynth.play(\\\"G3\\\", vel, 0, dur);\\n\\n background(random(255), random(255), 255);\\n text('click to play', width/2, height/2);\\n}\\n
noteADSR sets the envelope for a specific note that has just been triggered.\\nUsing this method modifies the envelope of whichever audiovoice is being used\\nto play the desired note. The envelope should be reset before noteRelease is called\\nin order to prevent the modified envelope from being used on other notes.
Midi note on which ADSR should be set.
Set the PolySynths global envelope. This method modifies the envelopes of each\\nmonosynth so that all notes are played with this envelope.
Trigger the Attack, and Decay portion of a MonoSynth.\\nSimilar to holding down a key on a piano, but it will\\nhold the sustain level until you let go.
midi note on which attack should be triggered.
velocity of the note to play (ranging from 0 to 1)/
\\nvar polySynth = new p5.PolySynth();\\nvar pitches = [\\\"G\\\", \\\"D\\\", \\\"G\\\", \\\"C\\\"];\\nvar octaves = [2, 3, 4];\\n\\nfunction mousePressed() {\\n // play a chord: multiple notes at the same time\\n for (var i = 0; i < 4; i++) {\\n var note = random(pitches) + random(octaves);\\n polySynth.noteAttack(note, 0.1);\\n }\\n}\\n\\nfunction mouseReleased() {\\n // release all voices\\n polySynth.noteRelease();\\n}\\n
Trigger the Release of an AudioVoice note. This is similar to releasing\\nthe key on a piano and letting the sound fade according to the\\nrelease level and release time.
midi note on which attack should be triggered.\\n If no value is provided, all notes will be released.
\\nvar pitches = [\\\"G\\\", \\\"D\\\", \\\"G\\\", \\\"C\\\"];\\nvar octaves = [2, 3, 4];\\nvar polySynth = new p5.PolySynth();\\n\\nfunction mousePressed() {\\n // play a chord: multiple notes at the same time\\n for (var i = 0; i < 4; i++) {\\n var note = random(pitches) + random(octaves);\\n polySynth.noteAttack(note, 0.1);\\n }\\n}\\n\\nfunction mouseReleased() {\\n // release all voices\\n polySynth.noteRelease();\\n}\\n
The p5.Distortion is built with a\\n\\nWeb Audio WaveShaper Node.
Process a sound source, optionally specify amount and oversample values.
Set the amount and oversample of the waveshaper distortion.
Return the distortion amount, typically between 0-1.
Return the oversampling.
A rough \\\"spec\\\" for CSV can be found\\nhere.
\n * noStroke();\n * let c = color(0, 126, 255, 102);\n * fill(c);\n * rect(15, 15, 35, 70);\n * let value = alpha(c); // Sets 'value' to 102\n * fill(value);\n * rect(50, 15, 35, 70);\n *
\n * let c = color(175, 100, 220); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let blueValue = blue(c); // Get blue in 'c'\n * print(blueValue); // Prints \"220.0\"\n * fill(0, 0, blueValue); // Use 'blueValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n *
\n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = brightness(c); // Sets 'value' to 255\n * fill(value);\n * rect(50, 20, 35, 60);\n *
\n * noStroke();\n * colorMode(HSB, 255);\n * let c = color('hsb(60, 100%, 50%)');\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = brightness(c); // A 'value' of 50% is 127.5\n * fill(value);\n * rect(50, 20, 35, 60);\n *
\n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * rect(30, 20, 55, 55); // Draw rectangle\n *
\n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * ellipse(25, 25, 80, 80); // Draw left circle\n *\n * // Using only one value with color()\n * // generates a grayscale value.\n * c = color(65); // Update 'c' with grayscale value\n * fill(c); // Use updated 'c' as fill color\n * ellipse(75, 75, 80, 80); // Draw right circle\n *
\n * // Named SVG & CSS colors may be used,\n * let c = color('magenta');\n * fill(c); // Use 'c' as fill color\n * noStroke(); // Don't draw a stroke around shapes\n * rect(20, 20, 60, 60); // Draw rectangle\n *
\n * // as can hex color codes:\n * noStroke(); // Don't draw a stroke around shapes\n * let c = color('#0f0');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('#00ff00');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n *
\n * // RGB and RGBA color strings are also supported:\n * // these all set to the same color (solid blue)\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('rgb(0,0,255)');\n * fill(c); // Use 'c' as fill color\n * rect(10, 10, 35, 35); // Draw rectangle\n *\n * c = color('rgb(0%, 0%, 100%)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 35, 35); // Draw rectangle\n *\n * c = color('rgba(0, 0, 255, 1)');\n * fill(c); // Use updated 'c' as fill color\n * rect(10, 55, 35, 35); // Draw rectangle\n *\n * c = color('rgba(0%, 0%, 100%, 1)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 55, 35, 35); // Draw rectangle\n *
\n * // HSL color is also supported and can be specified\n * // by value\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('hsl(160, 100%, 50%)');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('hsla(160, 100%, 50%, 0.5)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n *
\n * // HSB color is also supported and can be specified\n * // by value\n * let c;\n * noStroke(); // Don't draw a stroke around shapes\n * c = color('hsb(160, 100%, 50%)');\n * fill(c); // Use 'c' as fill color\n * rect(0, 10, 45, 80); // Draw rectangle\n *\n * c = color('hsba(160, 100%, 50%, 0.5)');\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw rectangle\n *
\n * let c; // Declare color 'c'\n * noStroke(); // Don't draw a stroke around shapes\n *\n * // If no colorMode is specified, then the\n * // default of RGB with scale of 0-255 is used.\n * c = color(50, 55, 100); // Create a color for 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(0, 10, 45, 80); // Draw left rect\n *\n * colorMode(HSB, 100); // Use HSB with scale of 0-100\n * c = color(50, 55, 100); // Update 'c' with new color\n * fill(c); // Use updated 'c' as fill color\n * rect(55, 10, 45, 80); // Draw right rect\n *
\n * let c = color(20, 75, 200); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let greenValue = green(c); // Get green in 'c'\n * print(greenValue); // Print \"75.0\"\n * fill(0, greenValue, 0); // Use 'greenValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n *
\n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = hue(c); // Sets 'value' to \"0\"\n * fill(value);\n * rect(50, 20, 35, 60);\n *
\n * colorMode(RGB);\n * stroke(255);\n * background(51);\n * let from = color(218, 165, 32);\n * let to = color(72, 61, 139);\n * colorMode(RGB); // Try changing to HSB.\n * let interA = lerpColor(from, to, 0.33);\n * let interB = lerpColor(from, to, 0.66);\n * fill(from);\n * rect(10, 20, 20, 60);\n * fill(interA);\n * rect(30, 20, 20, 60);\n * fill(interB);\n * rect(50, 20, 20, 60);\n * fill(to);\n * rect(70, 20, 20, 60);\n *
\n * noStroke();\n * colorMode(HSL);\n * let c = color(156, 100, 50, 1);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = lightness(c); // Sets 'value' to 50\n * fill(value);\n * rect(50, 20, 35, 60);\n *
\n * let c = color(255, 204, 0); // Define color 'c'\n * fill(c); // Use color variable 'c' as fill color\n * rect(15, 20, 35, 60); // Draw left rectangle\n *\n * let redValue = red(c); // Get red in 'c'\n * print(redValue); // Print \"255.0\"\n * fill(redValue, 0, 0); // Use 'redValue' in new fill\n * rect(50, 20, 35, 60); // Draw right rectangle\n *
\n * colorMode(RGB, 255); // Sets the range for red, green, and blue to 255\n * let c = color(127, 255, 0);\n * colorMode(RGB, 1); // Sets the range for red, green, and blue to 1\n * let myColor = red(c);\n * print(myColor); // 0.4980392156862745\n *
\n * noStroke();\n * colorMode(HSB, 255);\n * let c = color(0, 126, 255);\n * fill(c);\n * rect(15, 20, 35, 60);\n * let value = saturation(c); // Sets 'value' to 126\n * fill(value);\n * rect(50, 20, 35, 60);\n *
\n * let myColor;\n * function setup() {\n * createCanvas(200, 200);\n * stroke(255);\n * myColor = color(100, 100, 250);\n * fill(myColor);\n * }\n *\n * function draw() {\n * rotate(HALF_PI);\n * text(myColor.toString(), 0, -5);\n * text(myColor.toString('#rrggbb'), 0, -30);\n * text(myColor.toString('rgba%'), 0, -55);\n * }\n *
\n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setRed(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n *
\n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setGreen(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n *
\n * let backgroundColor;\n *\n * function setup() {\n * backgroundColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * backgroundColor.setBlue(128 + 128 * sin(millis() / 1000));\n * background(backgroundColor);\n * }\n *
\n * let squareColor;\n *\n * function setup() {\n * ellipseMode(CORNERS);\n * strokeWeight(4);\n * squareColor = color(100, 50, 150);\n * }\n *\n * function draw() {\n * background(255);\n *\n * noFill();\n * stroke(0);\n * ellipse(10, 10, width - 10, height - 10);\n *\n * squareColor.setAlpha(128 + 128 * sin(millis() / 1000));\n * fill(squareColor);\n * noStroke();\n * rect(13, 13, width - 26, height - 26);\n * }\n *
\n * // todo\n *
\n * // Grayscale integer value\n * background(51);\n *
\n * // R, G & B integer values\n * background(255, 204, 0);\n *
\n * // H, S & B integer values\n * colorMode(HSB);\n * background(255, 204, 100);\n *
\n * // Named SVG/CSS color string\n * background('red');\n *
\n * // three-digit hexadecimal RGB notation\n * background('#fae');\n *
\n * // six-digit hexadecimal RGB notation\n * background('#222222');\n *
\n * // integer RGB notation\n * background('rgb(0,255,0)');\n *
\n * // integer RGBA notation\n * background('rgba(0,255,0, 0.25)');\n *
\n * // percentage RGB notation\n * background('rgb(100%,0%,10%)');\n *
\n * // percentage RGBA notation\n * background('rgba(100%,0%,100%,0.5)');\n *
\n * // p5 Color object\n * background(color(0, 0, 255));\n *
\n * // Clear the screen on mouse press.\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * ellipse(mouseX, mouseY, 20, 20);\n * }\n *\n * function mousePressed() {\n * clear();\n * }\n *
\n * noStroke();\n * colorMode(RGB, 100);\n * for (let i = 0; i < 100; i++) {\n * for (let j = 0; j < 100; j++) {\n * stroke(i, j, 0);\n * point(i, j);\n * }\n * }\n *
\n * noStroke();\n * colorMode(HSB, 100);\n * for (let i = 0; i < 100; i++) {\n * for (let j = 0; j < 100; j++) {\n * stroke(i, j, 100);\n * point(i, j);\n * }\n * }\n *
\n * colorMode(RGB, 255);\n * let c = color(127, 255, 0);\n *\n * colorMode(RGB, 1);\n * let myColor = c._getRed();\n * text(myColor, 10, 10, 80, 80);\n *
\n * noFill();\n * colorMode(RGB, 255, 255, 255, 1);\n * background(255);\n *\n * strokeWeight(4);\n * stroke(255, 0, 10, 0.3);\n * ellipse(40, 40, 50, 50);\n * ellipse(50, 50, 40, 40);\n *
\n * // Grayscale integer value\n * fill(51);\n * rect(20, 20, 60, 60);\n *
\n * // R, G & B integer values\n * fill(255, 204, 0);\n * rect(20, 20, 60, 60);\n *
\n * // H, S & B integer values\n * colorMode(HSB);\n * fill(255, 204, 100);\n * rect(20, 20, 60, 60);\n *
\n * // Named SVG/CSS color string\n * fill('red');\n * rect(20, 20, 60, 60);\n *
\n * // three-digit hexadecimal RGB notation\n * fill('#fae');\n * rect(20, 20, 60, 60);\n *
\n * // six-digit hexadecimal RGB notation\n * fill('#222222');\n * rect(20, 20, 60, 60);\n *
\n * // integer RGB notation\n * fill('rgb(0,255,0)');\n * rect(20, 20, 60, 60);\n *
\n * // integer RGBA notation\n * fill('rgba(0,255,0, 0.25)');\n * rect(20, 20, 60, 60);\n *
\n * // percentage RGB notation\n * fill('rgb(100%,0%,10%)');\n * rect(20, 20, 60, 60);\n *
\n * // percentage RGBA notation\n * fill('rgba(100%,0%,100%,0.5)');\n * rect(20, 20, 60, 60);\n *
\n * // p5 Color object\n * fill(color(0, 0, 255));\n * rect(20, 20, 60, 60);\n *
\n * rect(15, 10, 55, 55);\n * noFill();\n * rect(20, 20, 60, 60);\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noFill();\n * stroke(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(45, 45, 45);\n * }\n *
\n * noStroke();\n * rect(20, 20, 60, 60);\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * fill(240, 150, 150);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(45, 45, 45);\n * }\n *
\n * // Grayscale integer value\n * strokeWeight(4);\n * stroke(51);\n * rect(20, 20, 60, 60);\n *
\n * // R, G & B integer values\n * stroke(255, 204, 0);\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // H, S & B integer values\n * colorMode(HSB);\n * strokeWeight(4);\n * stroke(255, 204, 100);\n * rect(20, 20, 60, 60);\n *
\n * // Named SVG/CSS color string\n * stroke('red');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // three-digit hexadecimal RGB notation\n * stroke('#fae');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // six-digit hexadecimal RGB notation\n * stroke('#222222');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // integer RGB notation\n * stroke('rgb(0,255,0)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // integer RGBA notation\n * stroke('rgba(0,255,0,0.25)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // percentage RGB notation\n * stroke('rgb(100%,0%,10%)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // percentage RGBA notation\n * stroke('rgba(100%,0%,100%,0.5)');\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * // p5 Color object\n * stroke(color(0, 0, 255));\n * strokeWeight(4);\n * rect(20, 20, 60, 60);\n *
\n * arc(50, 50, 80, 80, 0, HALF_PI);\n *
\n * arc(50, 50, 80, 80, 0, PI);\n *
\n * arc(50, 50, 80, 80, 0, QUARTER_PI);\n *
\n * arc(50, 50, 80, 80, 0, TAU);\n *
\n * arc(50, 50, 80, 80, 0, TWO_PI);\n *
\n * function setup() {\n * angleMode(DEGREES);\n * }\n *
\n * function setup() {\n * angleMode(RADIANS);\n * }\n *
\n * let x = 10;\n * print('The value of x is ' + x);\n * // prints \"The value of x is 10\"\n *
\n * function setup() {\n * frameRate(30);\n * textSize(30);\n * textAlign(CENTER);\n * }\n *\n * function draw() {\n * background(200);\n * text(frameCount, width / 2, height / 2);\n * }\n
\n * // To demonstrate, put two windows side by side.\n * // Click on the window that the p5 sketch isn't in!\n * function draw() {\n * background(200);\n * noStroke();\n * fill(0, 200, 0);\n * ellipse(25, 25, 50, 50);\n *\n * if (!focused) {\n // or \"if (focused === false)\"\n * stroke(200, 0, 0);\n * line(0, 0, 100, 100);\n * line(100, 0, 0, 100);\n * }\n * }\n *
\n * // Move the mouse across the quadrants\n * // to see the cursor change\n * function draw() {\n * line(width / 2, 0, width / 2, height);\n * line(0, height / 2, width, height / 2);\n * if (mouseX < 50 && mouseY < 50) {\n * cursor(CROSS);\n * } else if (mouseX > 50 && mouseY < 50) {\n * cursor('progress');\n * } else if (mouseX > 50 && mouseY > 50) {\n * cursor('https://s3.amazonaws.com/mupublicdata/cursor.cur');\n * } else {\n * cursor('grab');\n * }\n * }\n *
\n * let rectX = 0;\n * let fr = 30; //starting FPS\n * let clr;\n *\n * function setup() {\n * background(200);\n * frameRate(fr); // Attempt to refresh at starting FPS\n * clr = color(255, 0, 0);\n * }\n *\n * function draw() {\n * background(200);\n * rectX = rectX += 1; // Move Rectangle\n *\n * if (rectX >= width) {\n // If you go off screen.\n * if (fr === 30) {\n * clr = color(0, 0, 255);\n * fr = 10;\n * frameRate(fr); // make frameRate 10 FPS\n * } else {\n * clr = color(255, 0, 0);\n * fr = 30;\n * frameRate(fr); // make frameRate 30 FPS\n * }\n * rectX = 0;\n * }\n * fill(clr);\n * rect(rectX, 40, 20, 20);\n * }\n *
\n * function setup() {\n * noCursor();\n * }\n *\n * function draw() {\n * background(200);\n * ellipse(mouseX, mouseY, 10, 10);\n * }\n *
\n * createCanvas(displayWidth, displayHeight);\n *
\n * createCanvas(windowWidth, windowHeight);\n *
\n * function setup() {\n * createCanvas(windowWidth, windowHeight);\n * }\n *\n * function draw() {\n * background(0, 100, 200);\n * }\n *\n * function windowResized() {\n * resizeCanvas(windowWidth, windowHeight);\n * }\n *
\n * // Clicking in the box toggles fullscreen on and off.\n * function setup() {\n * background(200);\n * }\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {\n * let fs = fullscreen();\n * fullscreen(!fs);\n * }\n * }\n *
\n * function setup() {\n * pixelDensity(1);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n *
\n * function setup() {\n * pixelDensity(3.0);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n *
\n * function setup() {\n * let density = displayDensity();\n * pixelDensity(density);\n * createCanvas(100, 100);\n * background(200);\n * ellipse(width / 2, height / 2, 50, 50);\n * }\n *
\n * let url;\n * let x = 100;\n *\n * function setup() {\n * fill(0);\n * noStroke();\n * url = getURL();\n * }\n *\n * function draw() {\n * background(200);\n * text(url, x, height / 2);\n * x--;\n * }\n *
\n * function setup() {\n * let urlPath = getURLPath();\n * for (let i = 0; i < urlPath.length; i++) {\n * text(urlPath[i], 10, i * 20 + 20);\n * }\n * }\n *
\n * // Example: http://p5js.org?year=2014&month=May&day=15\n *\n * function setup() {\n * let params = getURLParams();\n * text(params.day, 10, 20);\n * text(params.month, 10, 40);\n * text(params.year, 10, 60);\n * }\n *
\n * let img;\n * let c;\n * function preload() {\n * // preload() runs once\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * // setup() waits until preload() is done\n * img.loadPixels();\n * // get color of middle pixel\n * c = img.get(img.width / 2, img.height / 2);\n * }\n *\n * function draw() {\n * background(c);\n * image(img, 25, 25, 50, 50);\n * }\n *
\n * let a = 0;\n *\n * function setup() {\n * background(0);\n * noStroke();\n * fill(102);\n * }\n *\n * function draw() {\n * rect(a++ % width, 10, 2, 80);\n * }\n *
\n * let yPos = 0;\n * function setup() {\n * // setup() runs once\n * frameRate(30);\n * }\n * function draw() {\n * // draw() loops forever, until stopped\n * background(204);\n * yPos = yPos - 1;\n * if (yPos < 0) {\n * yPos = height;\n * }\n * line(0, yPos, width, yPos);\n * }\n *
\n * function draw() {\n * ellipse(50, 50, 10, 10);\n * }\n *\n * function mousePressed() {\n * remove(); // remove whole sketch on mouse press\n * }\n *
\n * p5.disableFriendlyErrors = true;\n *\n * function setup() {\n * createCanvas(100, 50);\n * }\n *
\n * function setup() {\n * let c = createCanvas(50, 50);\n * c.elt.style.border = '5px solid red';\n * }\n *\n * function draw() {\n * background(220);\n * }\n *
\n * // in the html file:\n * // <div id=\"myContainer\"></div>\n *\n * // in the js file:\n * let cnv = createCanvas(100, 100);\n * cnv.parent('myContainer');\n *
\n * let div0 = createDiv('this is the parent');\n * let div1 = createDiv('this is the child');\n * div1.parent(div0); // use p5.Element\n *
\n * let div0 = createDiv('this is the parent');\n * div0.id('apples');\n * let div1 = createDiv('this is the child');\n * div1.parent('apples'); // use id\n *
\n * let elt = document.getElementById('myParentDiv');\n * let div1 = createDiv('this is the child');\n * div1.parent(elt); // use element from page\n *
\n * function setup() {\n * let cnv = createCanvas(100, 100);\n * // Assigns a CSS selector ID to\n * // the canvas element.\n * cnv.id('mycanvas');\n * }\n *
\n * function setup() {\n * let cnv = createCanvas(100, 100);\n * // Assigns a CSS selector class 'small'\n * // to the canvas element.\n * cnv.class('small');\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mousePressed(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any click anywhere\n * function mousePressed() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.doubleClicked(changeGray); // attach listener for\n * // canvas double click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any double click anywhere\n * function doubleClicked() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is double clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseWheel(changeSize); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with mousewheel movement\n * // anywhere on screen\n * function mouseWheel() {\n * g = g + 10;\n * }\n *\n * // this function fires with mousewheel movement\n * // over canvas only\n * function changeSize(event) {\n * if (event.deltaY > 0) {\n * d = d + 10;\n * } else {\n * d = d - 10;\n * }\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseReleased(changeGray); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires after the mouse has been\n * // released\n * function mouseReleased() {\n * d = d + 10;\n * }\n *\n * // this function fires after the mouse has been\n * // released while on canvas\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n *\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseClicked(changeGray); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires after the mouse has been\n * // clicked anywhere\n * function mouseClicked() {\n * d = d + 10;\n * }\n *\n * // this function fires after the mouse has been\n * // clicked on canvas\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let d = 30;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseMoved(changeSize); // attach listener for\n * // activity on canvas only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * fill(200);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires when mouse moves anywhere on\n * // page\n * function mouseMoved() {\n * g = g + 5;\n * if (g > 255) {\n * g = 0;\n * }\n * }\n *\n * // this function fires when mouse moves over canvas\n * function changeSize() {\n * d = d + 2;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n *
\n * let cnv;\n * let d;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseOver(changeGray);\n * d = 10;\n * }\n *\n * function draw() {\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * function changeGray() {\n * d = d + 10;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n *
\n * let cnv;\n * let d;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.mouseOut(changeGray);\n * d = 10;\n * }\n *\n * function draw() {\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * function changeGray() {\n * d = d + 10;\n * if (d > 100) {\n * d = 0;\n * }\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchStarted(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any touch anywhere\n * function touchStarted() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchMoved(changeGray); // attach listener for\n * // canvas click only\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * let cnv;\n * let d;\n * let g;\n * function setup() {\n * cnv = createCanvas(100, 100);\n * cnv.touchEnded(changeGray); // attach listener for\n * // canvas click only\n * d = 10;\n * g = 100;\n * }\n *\n * function draw() {\n * background(g);\n * ellipse(width / 2, height / 2, d, d);\n * }\n *\n * // this function fires with any touch anywhere\n * function touchEnded() {\n * d = d + 10;\n * }\n *\n * // this function fires only when cnv is clicked\n * function changeGray() {\n * g = random(0, 255);\n * }\n *
\n * // To test this sketch, simply drag a\n * // file over the canvas\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(200);\n * textAlign(CENTER);\n * text('Drag file', width / 2, height / 2);\n * c.dragOver(dragOverCallback);\n * }\n *\n * // This function will be called whenever\n * // a file is dragged over the canvas\n * function dragOverCallback() {\n * background(240);\n * text('Dragged over', width / 2, height / 2);\n * }\n *
\n * // To test this sketch, simply drag a file\n * // over and then out of the canvas area\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(200);\n * textAlign(CENTER);\n * text('Drag file', width / 2, height / 2);\n * c.dragLeave(dragLeaveCallback);\n * }\n *\n * // This function will be called whenever\n * // a file is dragged out of the canvas\n * function dragLeaveCallback() {\n * background(240);\n * text('Dragged off', width / 2, height / 2);\n * }\n *
\n * let pg;\n * function setup() {\n * createCanvas(100, 100);\n * background(0);\n * pg = createGraphics(50, 100);\n * pg.fill(0);\n * frameRate(5);\n * }\n * function draw() {\n * image(pg, width / 2, 0);\n * pg.background(255);\n * // p5.Graphics object behave a bit differently in some cases\n * // The normal canvas on the left resets the translate\n * // with every loop through draw()\n * // the graphics object on the right doesn't automatically reset\n * // so translate() is additive and it moves down the screen\n * rect(0, 0, width / 2, 5);\n * pg.rect(0, 0, width / 2, 5);\n * translate(0, 5, 0);\n * pg.translate(0, 5, 0);\n * }\n * function mouseClicked() {\n * // if you click you will see that\n * // reset() resets the translate back to the initial state\n * // of the Graphics object\n * pg.reset();\n * }\n *
\n * let bg;\n * function setup() {\n * bg = createCanvas(100, 100);\n * bg.background(0);\n * image(bg, 0, 0);\n * bg.remove();\n * }\n *
\n * let bg;\n * function setup() {\n * pixelDensity(1);\n * createCanvas(100, 100);\n * stroke(255);\n * fill(0);\n *\n * // create and draw the background image\n * bg = createGraphics(100, 100);\n * bg.background(200);\n * bg.ellipse(50, 50, 80, 80);\n * }\n * function draw() {\n * let t = millis() / 1000;\n * // draw the background\n * if (bg) {\n * image(bg, frameCount % 100, 0);\n * image(bg, frameCount % 100 - 100, 0);\n * }\n * // draw the foreground\n * let p = p5.Vector.fromAngle(t, 35).add(50, 50);\n * ellipse(p.x, p.y, 30);\n * }\n * function mouseClicked() {\n * // remove the background\n * if (bg) {\n * bg.remove();\n * bg = null;\n * }\n * }\n *
\n * function setup() {\n * createCanvas(100, 50);\n * background(153);\n * line(0, 0, width, height);\n * }\n *
\n * function setup() {\n * noCanvas();\n * }\n *
\n * let pg;\n * function setup() {\n * createCanvas(100, 100);\n * pg = createGraphics(100, 100);\n * }\n * function draw() {\n * background(200);\n * pg.background(100);\n * pg.noStroke();\n * pg.ellipse(pg.width / 2, pg.height / 2, 50, 50);\n * image(pg, 50, 50);\n * image(pg, 0, 0, 50, 50);\n * }\n *
SCREEN\n *
\n * blendMode(LIGHTEST);\n * strokeWeight(30);\n * stroke(80, 150, 255);\n * line(25, 25, 75, 75);\n * stroke(255, 50, 50);\n * line(75, 25, 25, 75);\n *
\n * blendMode(MULTIPLY);\n * strokeWeight(30);\n * stroke(80, 150, 255);\n * line(25, 25, 75, 75);\n * stroke(255, 50, 50);\n * line(75, 25, 25, 75);\n *
\n * arc(50, 55, 50, 50, 0, HALF_PI);\n * noFill();\n * arc(50, 55, 60, 60, HALF_PI, PI);\n * arc(50, 55, 70, 70, PI, PI + QUARTER_PI);\n * arc(50, 55, 80, 80, PI + QUARTER_PI, TWO_PI);\n *
\n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI);\n *
\n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, OPEN);\n *
\n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, CHORD);\n *
\n * arc(50, 50, 80, 80, 0, PI + QUARTER_PI, PIE);\n *
\n * ellipse(56, 46, 55, 55);\n *
\n * // Draw a circle at location (30, 30) with a diameter of 20.\n * circle(30, 30, 20);\n *
\n * line(30, 20, 85, 75);\n *
\n * line(30, 20, 85, 20);\n * stroke(126);\n * line(85, 20, 85, 75);\n * stroke(255);\n * line(85, 75, 30, 75);\n *
\n * point(30, 20);\n * point(85, 20);\n * point(85, 75);\n * point(30, 75);\n *
\n * quad(38, 31, 86, 20, 69, 63, 30, 76);\n *
\n * // Draw a rectangle at location (30, 20) with a width and height of 55.\n * rect(30, 20, 55, 55);\n *
\n * // Draw a rectangle with rounded corners, each having a radius of 20.\n * rect(30, 20, 55, 55, 20);\n *
\n * // Draw a rectangle with rounded corners having the following radii:\n * // top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\n * rect(30, 20, 55, 55, 20, 15, 10, 5);\n *
\n * // Draw a square at location (30, 20) with a side size of 55.\n * square(30, 20, 55);\n *
\n * // Draw a square with rounded corners, each having a radius of 20.\n * square(30, 20, 55, 20);\n *
\n * // Draw a square with rounded corners having the following radii:\n * // top-left = 20, top-right = 15, bottom-right = 10, bottom-left = 5.\n * square(30, 20, 55, 20, 15, 10, 5);\n *
\n * triangle(30, 75, 58, 20, 86, 75);\n *
\n * ellipseMode(RADIUS); // Set ellipseMode to RADIUS\n * fill(255); // Set fill to white\n * ellipse(50, 50, 30, 30); // Draw white ellipse using RADIUS mode\n *\n * ellipseMode(CENTER); // Set ellipseMode to CENTER\n * fill(100); // Set fill to gray\n * ellipse(50, 50, 30, 30); // Draw gray ellipse using CENTER mode\n *
\n * ellipseMode(CORNER); // Set ellipseMode is CORNER\n * fill(255); // Set fill to white\n * ellipse(25, 25, 50, 50); // Draw white ellipse using CORNER mode\n *\n * ellipseMode(CORNERS); // Set ellipseMode to CORNERS\n * fill(100); // Set fill to gray\n * ellipse(25, 25, 50, 50); // Draw gray ellipse using CORNERS mode\n *
\n * background(0);\n * noStroke();\n * smooth();\n * ellipse(30, 48, 36, 36);\n * noSmooth();\n * ellipse(70, 48, 36, 36);\n *
\n * rectMode(CORNER); // Default rectMode is CORNER\n * fill(255); // Set fill to white\n * rect(25, 25, 50, 50); // Draw white rect using CORNER mode\n *\n * rectMode(CORNERS); // Set rectMode to CORNERS\n * fill(100); // Set fill to gray\n * rect(25, 25, 50, 50); // Draw gray rect using CORNERS mode\n *
\n * rectMode(RADIUS); // Set rectMode to RADIUS\n * fill(255); // Set fill to white\n * rect(50, 50, 30, 30); // Draw white rect using RADIUS mode\n *\n * rectMode(CENTER); // Set rectMode to CENTER\n * fill(100); // Set fill to gray\n * rect(50, 50, 30, 30); // Draw gray rect using CENTER mode\n *
\n * strokeWeight(12.0);\n * strokeCap(ROUND);\n * line(20, 30, 80, 30);\n * strokeCap(SQUARE);\n * line(20, 50, 80, 50);\n * strokeCap(PROJECT);\n * line(20, 70, 80, 70);\n *
\n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(MITER);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n *
\n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(BEVEL);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n *
\n * noFill();\n * strokeWeight(10.0);\n * strokeJoin(ROUND);\n * beginShape();\n * vertex(35, 20);\n * vertex(65, 50);\n * vertex(35, 80);\n * endShape();\n *
\n * strokeWeight(1); // Default\n * line(20, 20, 80, 20);\n * strokeWeight(4); // Thicker\n * line(20, 40, 80, 40);\n * strokeWeight(10); // Beastly\n * line(20, 70, 80, 70);\n *
\n * noFill();\n * stroke(255, 102, 0);\n * line(85, 20, 10, 10);\n * line(90, 90, 15, 80);\n * stroke(0, 0, 0);\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n *
\n * background(0, 0, 0);\n * noFill();\n * stroke(255);\n * bezier(250, 250, 0, 100, 100, 0, 100, 0, 0, 0, 100, 0);\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noFill();\n *\n * bezierDetail(5);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // prettier-ignore\n * bezier(-40, -40, 0,\n * 90, -40, 0,\n * -90, 40, 0,\n * 40, 40, 0);\n * }\n *
\n * noFill();\n * let x1 = 85,\n x2 = 10,\n x3 = 90,\n x4 = 15;\n * let y1 = 20,\n y2 = 10,\n y3 = 90,\n y4 = 80;\n * bezier(x1, y1, x2, y2, x3, y3, x4, y4);\n * fill(255);\n * let steps = 10;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = bezierPoint(x1, x2, x3, x4, t);\n * let y = bezierPoint(y1, y2, y3, y4, t);\n * ellipse(x, y, 5, 5);\n * }\n *
\n * noFill();\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n * let steps = 6;\n * fill(255);\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * // Get the location of the point\n * let x = bezierPoint(85, 10, 90, 15, t);\n * let y = bezierPoint(20, 10, 90, 80, t);\n * // Get the tangent points\n * let tx = bezierTangent(85, 10, 90, 15, t);\n * let ty = bezierTangent(20, 10, 90, 80, t);\n * // Calculate an angle from the tangent points\n * let a = atan2(ty, tx);\n * a += PI;\n * stroke(255, 102, 0);\n * line(x, y, cos(a) * 30 + x, sin(a) * 30 + y);\n * // The following line of code makes a line\n * // inverse of the above line\n * //line(x, y, cos(a)*-30 + x, sin(a)*-30 + y);\n * stroke(0);\n * ellipse(x, y, 5, 5);\n * }\n *
\n * noFill();\n * bezier(85, 20, 10, 10, 90, 90, 15, 80);\n * stroke(255, 102, 0);\n * let steps = 16;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = bezierPoint(85, 10, 90, 15, t);\n * let y = bezierPoint(20, 10, 90, 80, t);\n * let tx = bezierTangent(85, 10, 90, 15, t);\n * let ty = bezierTangent(20, 10, 90, 80, t);\n * let a = atan2(ty, tx);\n * a -= HALF_PI;\n * line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n * }\n *
\n * noFill();\n * stroke(255, 102, 0);\n * curve(5, 26, 5, 26, 73, 24, 73, 61);\n * stroke(0);\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * stroke(255, 102, 0);\n * curve(73, 24, 73, 61, 15, 65, 15, 65);\n *
\n * // Define the curve points as JavaScript objects\n * let p1 = { x: 5, y: 26 },\n p2 = { x: 73, y: 24 };\n * let p3 = { x: 73, y: 61 },\n p4 = { x: 15, y: 65 };\n * noFill();\n * stroke(255, 102, 0);\n * curve(p1.x, p1.y, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y);\n * stroke(0);\n * curve(p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y);\n * stroke(255, 102, 0);\n * curve(p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, p4.x, p4.y);\n *
\n * noFill();\n * stroke(255, 102, 0);\n * curve(5, 26, 0, 5, 26, 0, 73, 24, 0, 73, 61, 0);\n * stroke(0);\n * curve(5, 26, 0, 73, 24, 0, 73, 61, 0, 15, 65, 0);\n * stroke(255, 102, 0);\n * curve(73, 24, 0, 73, 61, 0, 15, 65, 0, 15, 65, 0);\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n *\n * curveDetail(5);\n * }\n * function draw() {\n * background(200);\n *\n * curve(250, 600, 0, -30, 40, 0, 30, 30, 0, -250, 600, 0);\n * }\n *
\n * // Move the mouse left and right to see the curve change\n *\n * function setup() {\n * createCanvas(100, 100);\n * noFill();\n * }\n *\n * function draw() {\n * background(204);\n * let t = map(mouseX, 0, width, -5, 5);\n * curveTightness(t);\n * beginShape();\n * curveVertex(10, 26);\n * curveVertex(10, 26);\n * curveVertex(83, 24);\n * curveVertex(83, 61);\n * curveVertex(25, 65);\n * curveVertex(25, 65);\n * endShape();\n * }\n *
\n * noFill();\n * curve(5, 26, 5, 26, 73, 24, 73, 61);\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * fill(255);\n * ellipseMode(CENTER);\n * let steps = 6;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = curvePoint(5, 5, 73, 73, t);\n * let y = curvePoint(26, 26, 24, 61, t);\n * ellipse(x, y, 5, 5);\n * x = curvePoint(5, 73, 73, 15, t);\n * y = curvePoint(26, 24, 61, 65, t);\n * ellipse(x, y, 5, 5);\n * }\n *
\n * noFill();\n * curve(5, 26, 73, 24, 73, 61, 15, 65);\n * let steps = 6;\n * for (let i = 0; i <= steps; i++) {\n * let t = i / steps;\n * let x = curvePoint(5, 73, 73, 15, t);\n * let y = curvePoint(26, 24, 61, 65, t);\n * //ellipse(x, y, 5, 5);\n * let tx = curveTangent(5, 73, 73, 15, t);\n * let ty = curveTangent(26, 24, 61, 65, t);\n * let a = atan2(ty, tx);\n * a -= PI / 2.0;\n * line(x, y, cos(a) * 8 + x, sin(a) * 8 + y);\n * }\n *
\n * translate(50, 50);\n * stroke(255, 0, 0);\n * beginShape();\n * // Exterior part of shape, clockwise winding\n * vertex(-40, -40);\n * vertex(40, -40);\n * vertex(40, 40);\n * vertex(-40, 40);\n * // Interior part of shape, counter-clockwise winding\n * beginContour();\n * vertex(-20, -20);\n * vertex(-20, 20);\n * vertex(20, 20);\n * vertex(20, -20);\n * endContour();\n * endShape(CLOSE);\n *
\n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape(CLOSE);\n *
\n * beginShape(POINTS);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n *
\n * beginShape(LINES);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n *
\n * noFill();\n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n *
\n * noFill();\n * beginShape();\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape(CLOSE);\n *
\n * beginShape(TRIANGLES);\n * vertex(30, 75);\n * vertex(40, 20);\n * vertex(50, 75);\n * vertex(60, 20);\n * vertex(70, 75);\n * vertex(80, 20);\n * endShape();\n *
\n * beginShape(TRIANGLE_STRIP);\n * vertex(30, 75);\n * vertex(40, 20);\n * vertex(50, 75);\n * vertex(60, 20);\n * vertex(70, 75);\n * vertex(80, 20);\n * vertex(90, 75);\n * endShape();\n *
\n * beginShape(TRIANGLE_FAN);\n * vertex(57.5, 50);\n * vertex(57.5, 15);\n * vertex(92, 50);\n * vertex(57.5, 85);\n * vertex(22, 50);\n * vertex(57.5, 15);\n * endShape();\n *
\n * beginShape(QUADS);\n * vertex(30, 20);\n * vertex(30, 75);\n * vertex(50, 75);\n * vertex(50, 20);\n * vertex(65, 20);\n * vertex(65, 75);\n * vertex(85, 75);\n * vertex(85, 20);\n * endShape();\n *
\n * beginShape(QUAD_STRIP);\n * vertex(30, 20);\n * vertex(30, 75);\n * vertex(50, 20);\n * vertex(50, 75);\n * vertex(65, 20);\n * vertex(65, 75);\n * vertex(85, 20);\n * vertex(85, 75);\n * endShape();\n *
\n * beginShape();\n * vertex(20, 20);\n * vertex(40, 20);\n * vertex(40, 40);\n * vertex(60, 40);\n * vertex(60, 60);\n * vertex(20, 60);\n * endShape(CLOSE);\n *
\n * noFill();\n * beginShape();\n * vertex(30, 20);\n * bezierVertex(80, 0, 80, 75, 30, 75);\n * endShape();\n *
\n * beginShape();\n * vertex(30, 20);\n * bezierVertex(80, 0, 80, 75, 30, 75);\n * bezierVertex(50, 80, 60, 25, 30, 20);\n * endShape();\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n * point(-25, 30);\n * point(25, 30);\n * point(25, -30);\n * point(-25, -30);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * vertex(-25, 30);\n * bezierVertex(25, 30, 25, -30, -25, -30);\n * endShape();\n *\n * beginShape();\n * vertex(-25, 30, 20);\n * bezierVertex(25, 30, 20, 25, -30, 20, -25, -30, 20);\n * endShape();\n * }\n *
\n * strokeWeight(5);\n * point(84, 91);\n * point(68, 19);\n * point(21, 17);\n * point(32, 91);\n * strokeWeight(1);\n *\n * noFill();\n * beginShape();\n * curveVertex(84, 91);\n * curveVertex(84, 91);\n * curveVertex(68, 19);\n * curveVertex(21, 17);\n * curveVertex(32, 91);\n * curveVertex(32, 91);\n * endShape();\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n *\n * point(-25, 25);\n * point(-25, 25);\n * point(-25, -25);\n * point(25, -25);\n * point(25, 25);\n * point(25, 25);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * curveVertex(-25, 25);\n * curveVertex(-25, 25);\n * curveVertex(-25, -25);\n * curveVertex(25, -25);\n * curveVertex(25, 25);\n * curveVertex(25, 25);\n * endShape();\n *\n * beginShape();\n * curveVertex(-25, 25, 20);\n * curveVertex(-25, 25, 20);\n * curveVertex(-25, -25, 20);\n * curveVertex(25, -25, 20);\n * curveVertex(25, 25, 20);\n * curveVertex(25, 25, 20);\n * endShape();\n * }\n *
\n * noFill();\n *\n * beginShape();\n * vertex(20, 20);\n * vertex(45, 20);\n * vertex(45, 80);\n * endShape(CLOSE);\n *\n * beginShape();\n * vertex(50, 20);\n * vertex(75, 20);\n * vertex(75, 80);\n * endShape();\n *
\n * strokeWeight(5);\n * point(20, 20);\n * point(80, 20);\n * point(50, 50);\n *\n * noFill();\n * strokeWeight(1);\n * beginShape();\n * vertex(20, 20);\n * quadraticVertex(80, 20, 50, 50);\n * endShape();\n *
\n * strokeWeight(5);\n * point(20, 20);\n * point(80, 20);\n * point(50, 50);\n *\n * point(20, 80);\n * point(80, 80);\n * point(80, 60);\n *\n * noFill();\n * strokeWeight(1);\n * beginShape();\n * vertex(20, 20);\n * quadraticVertex(80, 20, 50, 50);\n * quadraticVertex(20, 80, 80, 80);\n * vertex(80, 60);\n * endShape();\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * setAttributes('antialias', true);\n * }\n * function draw() {\n * orbitControl();\n * background(50);\n * strokeWeight(4);\n * stroke(255);\n *\n * point(-35, -35);\n * point(35, -35);\n * point(0, 0);\n * point(-35, 35);\n * point(35, 35);\n * point(35, 10);\n *\n * strokeWeight(1);\n * noFill();\n *\n * beginShape();\n * vertex(-35, -35);\n * quadraticVertex(35, -35, 0, 0);\n * quadraticVertex(-35, 35, 35, 35);\n * vertex(35, 10);\n * endShape();\n *\n * beginShape();\n * vertex(-35, -35, 20);\n * quadraticVertex(35, -35, 20, 0, 0, 20);\n * quadraticVertex(-35, 35, 20, 35, 35, 20);\n * vertex(35, 10, 20);\n * endShape();\n * }\n *
\n * strokeWeight(3);\n * beginShape(POINTS);\n * vertex(30, 20);\n * vertex(85, 20);\n * vertex(85, 75);\n * vertex(30, 75);\n * endShape();\n *
\n * createCanvas(100, 100, WEBGL);\n * background(240, 240, 240);\n * fill(237, 34, 93);\n * noStroke();\n * beginShape();\n * vertex(0, 35);\n * vertex(35, 0);\n * vertex(0, -35);\n * vertex(-35, 0);\n * endShape();\n *
\n * createCanvas(100, 100, WEBGL);\n * background(240, 240, 240);\n * fill(237, 34, 93);\n * noStroke();\n * beginShape();\n * vertex(-10, 10);\n * vertex(0, 35);\n * vertex(10, 10);\n * vertex(35, 0);\n * vertex(10, -8);\n * vertex(0, -35);\n * vertex(-10, -8);\n * vertex(-35, 0);\n * endShape();\n *
\n * strokeWeight(3);\n * stroke(237, 34, 93);\n * beginShape(LINES);\n * vertex(10, 35);\n * vertex(90, 35);\n * vertex(10, 65);\n * vertex(90, 65);\n * vertex(35, 10);\n * vertex(35, 90);\n * vertex(65, 10);\n * vertex(65, 90);\n * endShape();\n *
\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * noLoop();\n * }\n\n * function draw() {\n * line(10, 10, 90, 90);\n * }\n *
\n * let x = 0;\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * background(204);\n * x = x + 0.1;\n * if (x > width) {\n * x = 0;\n * }\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * noLoop();\n * }\n *\n * function mouseReleased() {\n * loop();\n * }\n *
\n * let x = 0;\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * x = x + 0.1;\n * if (x > width) {\n * x = 0;\n * }\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * loop();\n * }\n *\n * function mouseReleased() {\n * noLoop();\n * }\n *
\n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * strokeWeight(10);\n * fill(204, 153, 0);\n * translate(50, 0);\n * ellipse(0, 50, 33, 33); // Middle circle\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n *
\n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * strokeWeight(10);\n * fill(204, 153, 0);\n * ellipse(33, 50, 33, 33); // Left-middle circle\n *\n * push(); // Start another new drawing state\n * stroke(0, 102, 153);\n * ellipse(66, 50, 33, 33); // Right-middle circle\n * pop(); // Restore previous state\n *\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n *
\n * ellipse(0, 50, 33, 33); // Left circle\n *\n * push(); // Start a new drawing state\n * translate(50, 0);\n * strokeWeight(10);\n * fill(204, 153, 0);\n * ellipse(0, 50, 33, 33); // Middle circle\n * pop(); // Restore original state\n *\n * ellipse(100, 50, 33, 33); // Right circle\n *
\n * let x = 0;\n *\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * x += 1;\n * redraw();\n * }\n *
\n * let x = 0;\n *\n * function setup() {\n * createCanvas(100, 100);\n * noLoop();\n * }\n *\n * function draw() {\n * background(204);\n * x += 1;\n * line(x, 0, x, height);\n * }\n *\n * function mousePressed() {\n * redraw(5);\n * }\n *
\n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * background(200);\n * // Equivalent to translate(x, y);\n * applyMatrix(1, 0, 0, 1, 40 + step, 50);\n * rect(0, 0, 50, 50);\n * }\n *
\n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * background(200);\n * translate(50, 50);\n * // Equivalent to scale(x, y);\n * applyMatrix(1 / step, 0, 0, 1 / step, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n *
\n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * var angle = map(step, 0, 20, 0, TWO_PI);\n * var cos_a = cos(angle);\n * var sin_a = sin(angle);\n * background(200);\n * translate(50, 50);\n * // Equivalent to rotate(angle);\n * applyMatrix(cos_a, sin_a, -sin_a, cos_a, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n *
\n * function setup() {\n * frameRate(10);\n * rectMode(CENTER);\n * }\n *\n * function draw() {\n * var step = frameCount % 20;\n * var angle = map(step, 0, 20, -PI / 4, PI / 4);\n * background(200);\n * translate(50, 50);\n * // equivalent to shearX(angle);\n * var shear_factor = 1 / tan(PI / 2 - angle);\n * applyMatrix(1, 0, shear_factor, 1, 0, 0);\n * rect(0, 0, 50, 50);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noFill();\n * }\n *\n * function draw() {\n * background(200);\n * rotateY(PI / 6);\n * stroke(153);\n * box(35);\n * var rad = millis() / 1000;\n * // Set rotation angles\n * var ct = cos(rad);\n * var st = sin(rad);\n * // Matrix for rotation around the Y axis\n * // prettier-ignore\n * applyMatrix( ct, 0.0, st, 0.0,\n * 0.0, 1.0, 0.0, 0.0,\n * -st, 0.0, ct, 0.0,\n * 0.0, 0.0, 0.0, 1.0);\n * stroke(255);\n * box(50);\n * }\n *
\n * translate(50, 50);\n * applyMatrix(0.5, 0.5, -0.5, 0.5, 0, 0);\n * rect(0, 0, 20, 20);\n * // Note that the translate is also reset.\n * resetMatrix();\n * rect(0, 0, 20, 20);\n *
\n * translate(width / 2, height / 2);\n * rotate(PI / 3.0);\n * rect(-26, -26, 52, 52);\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateX(millis() / 1000);\n * box();\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateY(millis() / 1000);\n * box();\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(255);\n * rotateZ(millis() / 1000);\n * box();\n * }\n *
\n * rect(30, 20, 50, 50);\n * scale(0.5);\n * rect(30, 20, 50, 50);\n *
\n * rect(30, 20, 50, 50);\n * scale(0.5, 1.3);\n * rect(30, 20, 50, 50);\n *
\n * translate(width / 4, height / 4);\n * shearX(PI / 4.0);\n * rect(0, 0, 30, 30);\n *
\n * translate(width / 4, height / 4);\n * shearY(PI / 4.0);\n * rect(0, 0, 30, 30);\n *
\n * translate(30, 20);\n * rect(0, 0, 55, 55);\n *
\n * rect(0, 0, 55, 55); // Draw rect at original 0,0\n * translate(30, 20);\n * rect(0, 0, 55, 55); // Draw rect at new 0,0\n * translate(14, 14);\n * rect(0, 0, 55, 55); // Draw rect at new 0,0\n *
\n * function draw() {\n * background(200);\n * rectMode(CENTER);\n * translate(width / 2, height / 2);\n * translate(p5.Vector.fromAngle(millis() / 1000, 40));\n * rect(0, 0, 20, 20);\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // logs true to console\n *\n * let anotherDictionary = createStringDict({ happy: 'coding' });\n * print(anotherDictionary.hasKey('happy')); // logs true to console\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(100, 42);\n * print(myDictionary.hasKey(100)); // logs true to console\n *\n * let anotherDictionary = createNumberDict({ 200: 84 });\n * print(anotherDictionary.hasKey(200)); // logs true to console\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(1, 10);\n * myDictionary.create(2, 20);\n * myDictionary.create(3, 30);\n * print(myDictionary.size()); // logs 3 to the console\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // logs true to console\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * let myValue = myDictionary.get('p5');\n * print(myValue === 'js'); // logs true to console\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.set('p5', 'JS');\n * myDictionary.print(); // logs \"key: p5 - value: JS\" to console\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.create('happy', 'coding');\n * myDictionary.print();\n * // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * print(myDictionary.hasKey('p5')); // prints 'true'\n * myDictionary.clear();\n * print(myDictionary.hasKey('p5')); // prints 'false'\n * }\n *
\n * function setup() {\n * let myDictionary = createStringDict('p5', 'js');\n * myDictionary.create('happy', 'coding');\n * myDictionary.print();\n * // above logs \"key: p5 - value: js, key: happy - value: coding\" to console\n * myDictionary.remove('p5');\n * myDictionary.print();\n * // above logs \"key: happy value: coding\" to console\n * }\n *
\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * createStringDict({\n * john: 1940,\n * paul: 1942,\n * george: 1943,\n * ringo: 1940\n * }).saveTable('beatles');\n * }\n * }\n *
\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * createStringDict({\n * john: 1940,\n * paul: 1942,\n * george: 1943,\n * ringo: 1940\n * }).saveJSON('beatles');\n * }\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(2, 5);\n * myDictionary.add(2, 2);\n * print(myDictionary.get(2)); // logs 7 to console.\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(2, 5);\n * myDictionary.sub(2, 2);\n * print(myDictionary.get(2)); // logs 3 to console.\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(2, 4);\n * myDictionary.mult(2, 2);\n * print(myDictionary.get(2)); // logs 8 to console.\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict(2, 8);\n * myDictionary.div(2, 2);\n * print(myDictionary.get(2)); // logs 4 to console.\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n * let lowestValue = myDictionary.minValue(); // value is -10\n * print(lowestValue);\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict({ 2: -10, 4: 0.65, 1.2: 3 });\n * let highestValue = myDictionary.maxValue(); // value is 3\n * print(highestValue);\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n * let lowestKey = myDictionary.minKey(); // value is 1.2\n * print(lowestKey);\n * }\n *
\n * function setup() {\n * let myDictionary = createNumberDict({ 2: 4, 4: 6, 1.2: 3 });\n * let highestKey = myDictionary.maxKey(); // value is 4\n * print(highestKey);\n * }\n *
\n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationX);\n * }\n *
\n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationY);\n * }\n *
\n * // Move a touchscreen device to register\n * // acceleration changes.\n * function draw() {\n * background(220, 50);\n * fill('magenta');\n * ellipse(width / 2, height / 2, accelerationZ);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * //rotateZ(radians(rotationZ));\n * rotateX(radians(rotationX));\n * //rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * //rotateZ(radians(rotationZ));\n * //rotateX(radians(rotationX));\n * rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateZ(radians(rotationZ));\n * //rotateX(radians(rotationX));\n * //rotateY(radians(rotationY));\n * box(200, 200, 200);\n * }\n *
\n * // A simple if statement looking at whether\n * // rotationX - pRotationX < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * // Simple range conversion to make things simpler.\n * // This is not absolutely necessary but the logic\n * // will be different in that case.\n *\n * let rX = rotationX + 180;\n * let pRX = pRotationX + 180;\n *\n * if ((rX - pRX > 0 && rX - pRX < 270) || rX - pRX < -270) {\n * rotateDirection = 'clockwise';\n * } else if (rX - pRX < 0 || rX - pRX > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n *\n * print(rotateDirection);\n *
\n * // A simple if statement looking at whether\n * // rotationY - pRotationY < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * // Simple range conversion to make things simpler.\n * // This is not absolutely necessary but the logic\n * // will be different in that case.\n *\n * let rY = rotationY + 180;\n * let pRY = pRotationY + 180;\n *\n * if ((rY - pRY > 0 && rY - pRY < 270) || rY - pRY < -270) {\n * rotateDirection = 'clockwise';\n * } else if (rY - pRY < 0 || rY - pRY > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n * print(rotateDirection);\n *
\n * // A simple if statement looking at whether\n * // rotationZ - pRotationZ < 0 is true or not will be\n * // sufficient for determining the rotate direction\n * // in most cases.\n *\n * // Some extra logic is needed to account for cases where\n * // the angles wrap around.\n * let rotateDirection = 'clockwise';\n *\n * if (\n * (rotationZ - pRotationZ > 0 && rotationZ - pRotationZ < 270) ||\n * rotationZ - pRotationZ < -270\n * ) {\n * rotateDirection = 'clockwise';\n * } else if (rotationZ - pRotationZ < 0 || rotationZ - pRotationZ > 270) {\n * rotateDirection = 'counter-clockwise';\n * }\n * print(rotateDirection);\n *
\n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees in the\n * // X-axis to change the value.\n *\n * var value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (turnAxis === 'X') {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n * }\n *
\n * // Run this example on a mobile device\n * // You will need to move the device incrementally further\n * // the closer the square's color gets to white in order to change the value.\n *\n * let value = 0;\n * let threshold = 0.5;\n * function setup() {\n * setMoveThreshold(threshold);\n * }\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * threshold = threshold + 0.1;\n * if (value > 255) {\n * value = 0;\n * threshold = 30;\n * }\n * setMoveThreshold(threshold);\n * }\n *
\n * // Run this example on a mobile device\n * // You will need to shake the device more firmly\n * // the closer the box's fill gets to white in order to change the value.\n *\n * let value = 0;\n * let threshold = 30;\n * function setup() {\n * setShakeThreshold(threshold);\n * }\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * threshold = threshold + 5;\n * if (value > 255) {\n * value = 0;\n * threshold = 30;\n * }\n * setShakeThreshold(threshold);\n * }\n *
\n * // Run this example on a mobile device\n * // Move the device around\n * // to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n *
\n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees\n * // to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n *
\n * // Run this example on a mobile device\n * // Rotate the device by 90 degrees in the\n * // X-axis to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceTurned() {\n * if (turnAxis === 'X') {\n * if (value === 0) {\n * value = 255;\n * } else if (value === 255) {\n * value = 0;\n * }\n * }\n * }\n *
\n * // Run this example on a mobile device\n * // Shake the device to change the value.\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function deviceShaken() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n *
\n * function draw() {\n * if (keyIsPressed === true) {\n * fill(0);\n * } else {\n * fill(255);\n * }\n * rect(25, 25, 50, 50);\n * }\n *
\n * // Click any key to display it!\n * // (Not Guaranteed to be Case Sensitive)\n * function setup() {\n * fill(245, 123, 158);\n * textSize(50);\n * }\n *\n * function draw() {\n * background(200);\n * text(key, 33, 65); // Display last key pressed.\n * }\n *
\n * let fillVal = 126;\n * function draw() {\n * fill(fillVal);\n * rect(25, 25, 50, 50);\n * }\n *\n * function keyPressed() {\n * if (keyCode === UP_ARROW) {\n * fillVal = 255;\n * } else if (keyCode === DOWN_ARROW) {\n * fillVal = 0;\n * }\n * return false; // prevent default\n * }\n *
\n * function draw() {}\n * function keyPressed() {\n * background('yellow');\n * text(`${key} ${keyCode}`, 10, 40);\n * print(key, ' ', keyCode);\n * return false; // prevent default\n * }\n *
\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyPressed() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyPressed() {\n * if (keyCode === LEFT_ARROW) {\n * value = 255;\n * } else if (keyCode === RIGHT_ARROW) {\n * value = 0;\n * }\n * }\n *
\n * function keyPressed() {\n * // Do something\n * return false; // prevent any default behaviour\n * }\n *
\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyReleased() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * return false; // prevent any default behavior\n * }\n *
\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function keyTyped() {\n * if (key === 'a') {\n * value = 255;\n * } else if (key === 'b') {\n * value = 0;\n * }\n * // uncomment to prevent any default behavior\n * // return false;\n * }\n *
\n * let x = 100;\n * let y = 100;\n *\n * function setup() {\n * createCanvas(512, 512);\n * fill(255, 0, 0);\n * }\n *\n * function draw() {\n * if (keyIsDown(LEFT_ARROW)) {\n * x -= 5;\n * }\n *\n * if (keyIsDown(RIGHT_ARROW)) {\n * x += 5;\n * }\n *\n * if (keyIsDown(UP_ARROW)) {\n * y -= 5;\n * }\n *\n * if (keyIsDown(DOWN_ARROW)) {\n * y += 5;\n * }\n *\n * clear();\n * ellipse(x, y, 50, 50);\n * }\n *
\n * let diameter = 50;\n *\n * function setup() {\n * createCanvas(512, 512);\n * }\n *\n * function draw() {\n * // 107 and 187 are keyCodes for \"+\"\n * if (keyIsDown(107) || keyIsDown(187)) {\n * diameter += 1;\n * }\n *\n * // 109 and 189 are keyCodes for \"-\"\n * if (keyIsDown(109) || keyIsDown(189)) {\n * diameter -= 1;\n * }\n *\n * clear();\n * fill(255, 0, 0);\n * ellipse(50, 50, diameter, diameter);\n * }\n *
\n * // Move the mouse across the canvas\n * function draw() {\n * background(244, 248, 252);\n * line(mouseX, 0, mouseX, 100);\n * }\n *
\n * // Move the mouse across the canvas\n * function draw() {\n * background(244, 248, 252);\n * line(0, mouseY, 100, mouseY);\n * }\n *
\n * // Move the mouse across the canvas to leave a trail\n * function setup() {\n * //slow down the frameRate to make it more visible\n * frameRate(10);\n * }\n *\n * function draw() {\n * background(244, 248, 252);\n * line(mouseX, mouseY, pmouseX, pmouseY);\n * print(pmouseX + ' -> ' + mouseX);\n * }\n *
\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n * //draw a square only if the mouse is not moving\n * if (mouseY === pmouseY && mouseX === pmouseX) {\n * rect(20, 20, 60, 60);\n * }\n *\n * print(pmouseY + ' -> ' + mouseY);\n * }\n *
\n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * const body = document.getElementsByTagName('body')[0];\n * myCanvas.parent(body);\n * }\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * //move the canvas to the horizontal mouse position\n * //relative to the window\n * myCanvas.position(winMouseX + 1, windowHeight / 2);\n *\n * //the y of the square is relative to the canvas\n * rect(20, mouseY, 60, 60);\n * }\n *
\n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * const body = document.getElementsByTagName('body')[0];\n * myCanvas.parent(body);\n * }\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * //move the canvas to the vertical mouse position\n * //relative to the window\n * myCanvas.position(windowWidth / 2, winMouseY + 1);\n *\n * //the x of the square is relative to the canvas\n * rect(mouseX, 20, 60, 60);\n * }\n *
\n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * noStroke();\n * fill(237, 34, 93);\n * }\n *\n * function draw() {\n * clear();\n * //the difference between previous and\n * //current x position is the horizontal mouse speed\n * let speed = abs(winMouseX - pwinMouseX);\n * //change the size of the circle\n * //according to the horizontal speed\n * ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n * //move the canvas to the mouse position\n * myCanvas.position(winMouseX + 1, winMouseY + 1);\n * }\n *
\n * let myCanvas;\n *\n * function setup() {\n * //use a variable to store a pointer to the canvas\n * myCanvas = createCanvas(100, 100);\n * noStroke();\n * fill(237, 34, 93);\n * }\n *\n * function draw() {\n * clear();\n * //the difference between previous and\n * //current y position is the vertical mouse speed\n * let speed = abs(winMouseY - pwinMouseY);\n * //change the size of the circle\n * //according to the vertical speed\n * ellipse(50, 50, 10 + speed * 5, 10 + speed * 5);\n * //move the canvas to the mouse position\n * myCanvas.position(winMouseX + 1, winMouseY + 1);\n * }\n *
\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * if (mouseIsPressed) {\n * if (mouseButton === LEFT) {\n * ellipse(50, 50, 50, 50);\n * }\n * if (mouseButton === RIGHT) {\n * rect(25, 25, 50, 50);\n * }\n * if (mouseButton === CENTER) {\n * triangle(23, 75, 50, 20, 78, 75);\n * }\n * }\n *\n * print(mouseButton);\n * }\n *
\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n *\n * if (mouseIsPressed) {\n * ellipse(50, 50, 50, 50);\n * } else {\n * rect(25, 25, 50, 50);\n * }\n *\n * print(mouseIsPressed);\n * }\n *
\n * // Move the mouse across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n *
\n * function mouseMoved() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseMoved(event) {\n * console.log(event);\n * }\n *
\n * // Drag the mouse across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseDragged() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n *
\n * function mouseDragged() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseDragged(event) {\n * console.log(event);\n * }\n *
\n * // Click within the image to change\n * // the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mousePressed() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function mousePressed() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function mousePressed(event) {\n * console.log(event);\n * }\n *
\n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function mouseReleased() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function mouseReleased() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseReleased(event) {\n * console.log(event);\n * }\n *
\n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n *\n * function mouseClicked() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function mouseClicked() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function mouseClicked(event) {\n * console.log(event);\n * }\n *
\n * // Click within the image to change\n * // the value of the rectangle\n * // after the mouse has been double clicked\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n *\n * function doubleClicked() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function doubleClicked() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a MouseEvent object\n * // as a callback argument\n * function doubleClicked(event) {\n * console.log(event);\n * }\n *
\n * let pos = 25;\n *\n * function draw() {\n * background(237, 34, 93);\n * fill(0);\n * rect(25, pos, 50, 50);\n * }\n *\n * function mouseWheel(event) {\n * print(event.delta);\n * //move the square according to the vertical scroll amount\n * pos += event.delta;\n * //uncomment to block page scrolling\n * //return false;\n * }\n *
\n * // On a touchscreen device, touch\n * // the canvas using one or more fingers\n * // at the same time\n * function draw() {\n * clear();\n * let display = touches.length + ' touches';\n * text(display, 5, 10);\n * }\n *
\n * // Touch within the image to change\n * // the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchStarted() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function touchStarted() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a TouchEvent object\n * // as a callback argument\n * function touchStarted(event) {\n * console.log(event);\n * }\n *
\n * // Move your finger across the page\n * // to change its value\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchMoved() {\n * value = value + 5;\n * if (value > 255) {\n * value = 0;\n * }\n * }\n *
\n * function touchMoved() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a TouchEvent object\n * // as a callback argument\n * function touchMoved(event) {\n * console.log(event);\n * }\n *
\n * // Release touch within the image to\n * // change the value of the rectangle\n *\n * let value = 0;\n * function draw() {\n * fill(value);\n * rect(25, 25, 50, 50);\n * }\n * function touchEnded() {\n * if (value === 0) {\n * value = 255;\n * } else {\n * value = 0;\n * }\n * }\n *
\n * function touchEnded() {\n * ellipse(mouseX, mouseY, 5, 5);\n * // prevent default\n * return false;\n * }\n *
\n * // returns a TouchEvent object\n * // as a callback argument\n * function touchEnded(event) {\n * console.log(event);\n * }\n *
\n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n *
\n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < img.width; i++) {\n * for (let j = 0; j < img.height; j++) {\n * img.set(i, j, color(0, 90, 102, (i % img.width) * 2));\n * }\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n * image(img, 34, 34);\n *
\n * let pink = color(255, 102, 204);\n * let img = createImage(66, 66);\n * img.loadPixels();\n * let d = pixelDensity();\n * let halfImage = 4 * (img.width * d) * (img.height / 2 * d);\n * for (let i = 0; i < halfImage; i += 4) {\n * img.pixels[i] = red(pink);\n * img.pixels[i + 1] = green(pink);\n * img.pixels[i + 2] = blue(pink);\n * img.pixels[i + 3] = alpha(pink);\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n *
\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(255, 0, 0);\n * saveCanvas(c, 'myCanvas', 'jpg');\n * }\n *
\n * // note that this example has the same result as above\n * // if no canvas is specified, defaults to main canvas\n * function setup() {\n * let c = createCanvas(100, 100);\n * background(255, 0, 0);\n * saveCanvas('myCanvas', 'jpg');\n *\n * // all of the following are valid\n * saveCanvas(c, 'myCanvas', 'jpg');\n * saveCanvas(c, 'myCanvas.jpg');\n * saveCanvas(c, 'myCanvas');\n * saveCanvas(c);\n * saveCanvas('myCanvas', 'png');\n * saveCanvas('myCanvas');\n * saveCanvas();\n * }\n *
\n * function draw() {\n * background(mouseX);\n * }\n *\n * function mousePressed() {\n * saveFrames('out', 'png', 1, 25, data => {\n * print(data);\n * });\n * }\n
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * }\n *
\n * function setup() {\n * // here we use a callback to display the image after loading\n * loadImage('assets/laDefense.jpg', img => {\n * image(img, 0, 0);\n * });\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * // Top-left corner of the img is at (0, 0)\n * // Width and height are the img's original width and height\n * image(img, 0, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * background(50);\n * // Top-left corner of the img is at (10, 10)\n * // Width and height are 50 x 50\n * image(img, 10, 10, 50, 50);\n * }\n *
\n * function setup() {\n * // Here, we use a callback to display the image after loading\n * loadImage('assets/laDefense.jpg', img => {\n * image(img, 0, 0);\n * });\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/gradient.png');\n * }\n * function setup() {\n * // 1. Background image\n * // Top-left corner of the img is at (0, 0)\n * // Width and height are the img's original width and height, 100 x 100\n * image(img, 0, 0);\n * // 2. Top right image\n * // Top-left corner of destination rectangle is at (50, 0)\n * // Destination rectangle width and height are 40 x 20\n * // The next parameters are relative to the source image:\n * // - Starting at position (50, 50) on the source image, capture a 50 x 50\n * // subsection\n * // - Draw this subsection to fill the dimensions of the destination rectangle\n * image(img, 50, 0, 40, 20, 50, 50, 50, 50);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(0, 153, 204); // Tint blue\n * image(img, 50, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(0, 153, 204, 126); // Tint blue and set transparency\n * image(img, 50, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * tint(255, 126); // Apply transparency without changing color\n * image(img, 50, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * tint(0, 153, 204); // Tint blue\n * image(img, 0, 0);\n * noTint(); // Disable tint\n * image(img, 50, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CORNER);\n * image(img, 10, 10, 50, 50);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CORNERS);\n * image(img, 10, 10, 90, 40);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * imageMode(CENTER);\n * image(img, 50, 50, 80, 80);\n * }\n *
\n * function setup() {\n * let img = createImage(100, 100); // same as new p5.Image(100, 100);\n * img.loadPixels();\n * createCanvas(100, 100);\n * background(0);\n *\n * // helper for writing color to array\n * function writeColor(image, x, y, red, green, blue, alpha) {\n * let index = (x + y * width) * 4;\n * image.pixels[index] = red;\n * image.pixels[index + 1] = green;\n * image.pixels[index + 2] = blue;\n * image.pixels[index + 3] = alpha;\n * }\n *\n * let x, y;\n * // fill with random colors\n * for (y = 0; y < img.height; y++) {\n * for (x = 0; x < img.width; x++) {\n * let red = random(255);\n * let green = random(255);\n * let blue = random(255);\n * let alpha = 255;\n * writeColor(img, x, y, red, green, blue, alpha);\n * }\n * }\n *\n * // draw a red line\n * y = 0;\n * for (x = 0; x < img.width; x++) {\n * writeColor(img, x, y, 255, 0, 0, 255);\n * }\n *\n * // draw a green line\n * y = img.height - 1;\n * for (x = 0; x < img.width; x++) {\n * writeColor(img, x, y, 0, 255, 0, 255);\n * }\n *\n * img.updatePixels();\n * image(img, 0, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * image(img, 0, 0);\n * for (let i = 0; i < img.width; i++) {\n * let c = img.get(i, img.height / 2);\n * stroke(c);\n * line(i, height / 2, i, height);\n * }\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * image(img, 0, 0);\n * for (let i = 0; i < img.height; i++) {\n * let c = img.get(img.width / 2, i);\n * stroke(c);\n * line(0, i, width / 2, i);\n * }\n * }\n *
\n * let pink = color(255, 102, 204);\n * let img = createImage(66, 66);\n * img.loadPixels();\n * for (let i = 0; i < 4 * (width * height / 2); i += 4) {\n * img.pixels[i] = red(pink);\n * img.pixels[i + 1] = green(pink);\n * img.pixels[i + 2] = blue(pink);\n * img.pixels[i + 3] = alpha(pink);\n * }\n * img.updatePixels();\n * image(img, 17, 17);\n *
\n * let myImage;\n * let halfImage;\n *\n * function preload() {\n * myImage = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * myImage.loadPixels();\n * halfImage = 4 * myImage.width * myImage.height / 2;\n * for (let i = 0; i < halfImage; i++) {\n * myImage.pixels[i + halfImage] = myImage.pixels[i];\n * }\n * myImage.updatePixels();\n * }\n *\n * function draw() {\n * image(myImage, 0, 0, width, height);\n * }\n *
\n * let myImage;\n * let c;\n *\n * function preload() {\n * myImage = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * background(myImage);\n * noStroke();\n * c = myImage.get(60, 90);\n * fill(c);\n * rect(25, 25, 50, 50);\n * }\n *\n * //get() returns color here\n *
\n * let img;\n *\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n\n * function draw() {\n * image(img, 0, 0);\n * }\n *\n * function mousePressed() {\n * img.resize(50, 100);\n * }\n *
\n * let photo;\n * let bricks;\n * let x;\n * let y;\n *\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks.jpg');\n * }\n *\n * function setup() {\n * x = bricks.width / 2;\n * y = bricks.height / 2;\n * photo.copy(bricks, 0, 0, x, y, 0, 0, x, y);\n * image(photo, 0, 0);\n * }\n *
\n * let photo, maskImage;\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * maskImage = loadImage('assets/mask2.png');\n * }\n *\n * function setup() {\n * createCanvas(100, 100);\n * photo.mask(maskImage);\n * image(photo, 0, 0);\n * }\n *
\n * let photo1;\n * let photo2;\n *\n * function preload() {\n * photo1 = loadImage('assets/rockies.jpg');\n * photo2 = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * photo2.filter(GRAY);\n * image(photo1, 0, 0);\n * image(photo2, width / 2, 0);\n * }\n *
\n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n *
\n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n *
\n * let mountains;\n * let bricks;\n *\n * function preload() {\n * mountains = loadImage('assets/rockies.jpg');\n * bricks = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * mountains.blend(bricks, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n * image(mountains, 0, 0);\n * image(bricks, 0, 0);\n * }\n *
\n * let photo;\n *\n * function preload() {\n * photo = loadImage('assets/rockies.jpg');\n * }\n *\n * function draw() {\n * image(photo, 0, 0);\n * }\n *\n * function keyTyped() {\n * if (key === 's') {\n * photo.save('photo', 'png');\n * }\n * }\n *
While the above method is complex, it is flexible enough to work with\n * any pixelDensity. Note that set() will automatically take care of\n * setting all the appropriate values in pixels[] for a given (x, y) at\n * any pixelDensity, but the performance may not be as fast when lots of\n * modifications are made to the pixel array.\n * \n * Before accessing this array, the data must loaded with the loadPixels()\n * function. After the array data has been modified, the updatePixels()\n * function must be run to update the changes.\n * \n * Note that this is not a standard javascript array. This means that\n * standard javascript functions such as slice() or\n * arrayCopy() do not\n * work.
\n * let pink = color(255, 102, 204);\n * loadPixels();\n * let d = pixelDensity();\n * let halfImage = 4 * (width * d) * (height / 2 * d);\n * for (let i = 0; i < halfImage; i += 4) {\n * pixels[i] = red(pink);\n * pixels[i + 1] = green(pink);\n * pixels[i + 2] = blue(pink);\n * pixels[i + 3] = alpha(pink);\n * }\n * updatePixels();\n *
\n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, LIGHTEST);\n * }\n *
\n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, DARKEST);\n * }\n *
\n * let img0;\n * let img1;\n *\n * function preload() {\n * img0 = loadImage('assets/rockies.jpg');\n * img1 = loadImage('assets/bricks_third.jpg');\n * }\n *\n * function setup() {\n * background(img0);\n * image(img1, 0, 0);\n * blend(img1, 0, 0, 33, 100, 67, 0, 33, 100, ADD);\n * }\n *
\n * let img;\n *\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * background(img);\n * copy(img, 7, 22, 10, 10, 35, 25, 50, 50);\n * stroke(255);\n * noFill();\n * // Rectangle shows area being copied\n * rect(7, 22, 10, 10);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(THRESHOLD);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(GRAY);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(OPAQUE);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(INVERT);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(POSTERIZE, 3);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(DILATE);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(BLUR, 3);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/bricks.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * filter(ERODE);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * let c = get();\n * image(c, width / 2, 0);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n * function setup() {\n * image(img, 0, 0);\n * let c = get(50, 90);\n * fill(c);\n * noStroke();\n * rect(25, 25, 50, 50);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * image(img, 0, 0, width, height);\n * let d = pixelDensity();\n * let halfImage = 4 * (width * d) * (height * d / 2);\n * loadPixels();\n * for (let i = 0; i < halfImage; i++) {\n * pixels[i + halfImage] = pixels[i];\n * }\n * updatePixels();\n * }\n *
Changes the color of any pixel, or writes an image directly to the\n * display window.
The x and y parameters specify the pixel to change and the c parameter\n * specifies the color value. This can be a p5.Color object, or [R, G, B, A]\n * pixel array. It can also be a single grayscale value.\n * When setting an image, the x and y parameters define the coordinates for\n * the upper-left corner of the image, regardless of the current imageMode().\n *
\n * After using set(), you must call updatePixels() for your changes to appear.\n * This should be called once all pixels have been set, and must be called before\n * calling .get() or drawing the image.\n *
Setting the color of a single pixel with set(x, y) is easy, but not as\n * fast as putting the data directly into pixels[]. Setting the pixels[]\n * values directly may be complicated when working with a retina display,\n * but will perform better when lots of pixels need to be set directly on\n * every loop.
\n * let black = color(0);\n * set(30, 20, black);\n * set(85, 20, black);\n * set(85, 75, black);\n * set(30, 75, black);\n * updatePixels();\n *
\n * for (let i = 30; i < width - 15; i++) {\n * for (let j = 20; j < height - 25; j++) {\n * let c = color(204 - j, 153 - i, 0);\n * set(i, j, c);\n * }\n * }\n * updatePixels();\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies.jpg');\n * }\n *\n * function setup() {\n * set(0, 0, img);\n * updatePixels();\n * line(0, 0, width, height);\n * line(0, height, width, 0);\n * }\n *
Calling loadJSON() inside preload() guarantees to complete the\n * operation before setup() and draw() are called.
\n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n * let earthquakes;\n * function preload() {\n * // Get the most recent earthquake in the database\n * let url =\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n * 'summary/all_day.geojson';\n * earthquakes = loadJSON(url);\n * }\n *\n * function setup() {\n * noLoop();\n * }\n *\n * function draw() {\n * background(200);\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * }\n *
Outside of preload(), you may supply a callback function to handle the\n * object:
\n * function setup() {\n * noLoop();\n * let url =\n 'https://earthquake.usgs.gov/earthquakes/feed/v1.0/' +\n * 'summary/all_day.geojson';\n * loadJSON(url, drawEarthquake);\n * }\n *\n * function draw() {\n * background(200);\n * }\n *\n * function drawEarthquake(earthquakes) {\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * }\n *
Calling loadStrings() inside preload() guarantees to complete the\n * operation before setup() and draw() are called.
\n * let result;\n * function preload() {\n * result = loadStrings('assets/test.txt');\n * }\n\n * function setup() {\n * background(200);\n * let ind = floor(random(result.length));\n * text(result[ind], 10, 10, 80, 80);\n * }\n *
\n * function setup() {\n * loadStrings('assets/test.txt', pickString);\n * }\n *\n * function pickString(result) {\n * background(200);\n * let ind = floor(random(result.length));\n * text(result[ind], 10, 10, 80, 80);\n * }\n *
Reads the contents of a file or URL and creates a p5.Table object with\n * its values. If a file is specified, it must be located in the sketch's\n * \"data\" folder. The filename parameter can also be a URL to a file found\n * online. By default, the file is assumed to be comma-separated (in CSV\n * format). Table only looks for a header row if the 'header' option is\n * included.
Possible options include:\n *
When passing in multiple options, pass them in as separate parameters,\n * seperated by commas. For example:\n * \n * \n * loadTable('my_csv_file.csv', 'csv', 'header');\n * \n *
\n * loadTable('my_csv_file.csv', 'csv', 'header');\n *
This method is asynchronous, meaning it may not finish before the next\n * line in your sketch is executed. Calling loadTable() inside preload()\n * guarantees to complete the operation before setup() and draw() are called.\n *
\n * // Given the following CSV file called \"mammals.csv\"\n * // located in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * //the file can be remote\n * //table = loadTable(\"http://p5js.org/reference/assets/mammals.csv\",\n * // \"csv\", \"header\");\n * }\n *\n * function setup() {\n * //count the columns\n * print(table.getRowCount() + ' total rows in table');\n * print(table.getColumnCount() + ' total columns in table');\n *\n * print(table.getColumn('name'));\n * //[\"Goat\", \"Leopard\", \"Zebra\"]\n *\n * //cycle through the table\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++) {\n * print(table.getString(r, c));\n * }\n * }\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let children = xml.getChildren('animal');\n *\n * for (let i = 0; i < children.length; i++) {\n * let id = children[i].getNum('id');\n * let coloring = children[i].getString('species');\n * let name = children[i].getContent();\n * print(id + ', ' + coloring + ', ' + name);\n * }\n * }\n *\n * // Sketch prints:\n * // 0, Capra hircus, Goat\n * // 1, Panthera pardus, Leopard\n * // 2, Equus zebra, Zebra\n *
\n * let data;\n *\n * function preload() {\n * data = loadBytes('assets/mammals.xml');\n * }\n *\n * function setup() {\n * for (let i = 0; i < 5; i++) {\n * console.log(data.bytes[i].toString(16));\n * }\n * }\n *
\n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n * let earthquakes;\n * function preload() {\n * // Get the most recent earthquake in the database\n * let url =\n 'https://earthquake.usgs.gov/fdsnws/event/1/query?' +\n * 'format=geojson&limit=1&orderby=time';\n * httpGet(url, 'jsonp', false, function(response) {\n * // when the HTTP request completes, populate the variable that holds the\n * // earthquake data used in the visualization.\n * earthquakes = response;\n * });\n * }\n *\n * function draw() {\n * if (!earthquakes) {\n * // Wait until the earthquake data has loaded before drawing.\n * return;\n * }\n * background(200);\n * // Get the magnitude and name of the earthquake out of the loaded JSON\n * let earthquakeMag = earthquakes.features[0].properties.mag;\n * let earthquakeName = earthquakes.features[0].properties.place;\n * ellipse(width / 2, height / 2, earthquakeMag * 10, earthquakeMag * 10);\n * textAlign(CENTER);\n * text(earthquakeName, 0, height - 30, width, 30);\n * noLoop();\n * }\n *
\n * // Examples use jsonplaceholder.typicode.com for a Mock Data API\n *\n * let url = 'https://jsonplaceholder.typicode.com/posts';\n * let postData = { userId: 1, title: 'p5 Clicked!', body: 'p5.js is way cool.' };\n *\n * function setup() {\n * createCanvas(800, 800);\n * }\n *\n * function mousePressed() {\n * // Pick new random color values\n * let r = random(255);\n * let g = random(255);\n * let b = random(255);\n *\n * httpPost(url, 'json', postData, function(result) {\n * strokeWeight(2);\n * stroke(r, g, b);\n * fill(r, g, b, 127);\n * ellipse(mouseX, mouseY, 200, 200);\n * text(result.body, mouseX, mouseY);\n * });\n * }\n *
\n * let url = 'https://invalidURL'; // A bad URL that will cause errors\n * let postData = { title: 'p5 Clicked!', body: 'p5.js is way cool.' };\n *\n * function setup() {\n * createCanvas(800, 800);\n * }\n *\n * function mousePressed() {\n * // Pick new random color values\n * let r = random(255);\n * let g = random(255);\n * let b = random(255);\n *\n * httpPost(\n * url,\n * 'json',\n * postData,\n * function(result) {\n * // ... won't be called\n * },\n * function(error) {\n * strokeWeight(2);\n * stroke(r, g, b);\n * fill(r, g, b, 127);\n * text(error.toString(), mouseX, mouseY);\n * }\n * );\n * }\n *
\n * // Examples use USGS Earthquake API:\n * // https://earthquake.usgs.gov/fdsnws/event/1/#methods\n *\n * // displays an animation of all USGS earthquakes\n * let earthquakes;\n * let eqFeatureIndex = 0;\n *\n * function preload() {\n * let url = 'https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson';\n * httpDo(\n * url,\n * {\n * method: 'GET',\n * // Other Request options, like special headers for apis\n * headers: { authorization: 'Bearer secretKey' }\n * },\n * function(res) {\n * earthquakes = res;\n * }\n * );\n * }\n *\n * function draw() {\n * // wait until the data is loaded\n * if (!earthquakes || !earthquakes.features[eqFeatureIndex]) {\n * return;\n * }\n * clear();\n *\n * let feature = earthquakes.features[eqFeatureIndex];\n * let mag = feature.properties.mag;\n * let rad = mag / 11 * ((width + height) / 2);\n * fill(255, 0, 0, 100);\n * ellipse(width / 2 + random(-2, 2), height / 2 + random(-2, 2), rad, rad);\n *\n * if (eqFeatureIndex >= earthquakes.features.length) {\n * eqFeatureIndex = 0;\n * } else {\n * eqFeatureIndex += 1;\n * }\n * }\n *
\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * var writer = createWriter('squares.txt');\n * for (let i = 0; i < 10; i++) {\n * writer.print(i * i);\n * }\n * writer.close();\n * writer.clear();\n * }\n * }\n *
\n * // creates a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // write 'Hello world!'' to the file\n * writer.write(['Hello world!']);\n * // close the PrintWriter and save the file\n * writer.close();\n *
\n * // creates a file called 'newFile2.txt'\n * let writer = createWriter('newFile2.txt');\n * // write 'apples,bananas,123' to the file\n * writer.write(['apples', 'bananas', 123]);\n * // close the PrintWriter and save the file\n * writer.close();\n *
\n * // creates a file called 'newFile3.txt'\n * let writer = createWriter('newFile3.txt');\n * // write 'My name is: Teddy' to the file\n * writer.write('My name is:');\n * writer.write(' Teddy');\n * // close the PrintWriter and save the file\n * writer.close();\n *
\n * // creates a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // creates a file containing\n * // My name is:\n * // Teddy\n * writer.print('My name is:');\n * writer.print('Teddy');\n * // close the PrintWriter and save the file\n * writer.close();\n *
\n * let writer;\n *\n * function setup() {\n * createCanvas(400, 400);\n * // create a PrintWriter\n * writer = createWriter('newFile.txt');\n * }\n *\n * function draw() {\n * // print all mouseX and mouseY coordinates to the stream\n * writer.print([mouseX, mouseY]);\n * }\n *\n * function mouseClicked() {\n * // close the PrintWriter and save the file\n * writer.close();\n * }\n *
\n * // create writer object\n * let writer = createWriter('newFile.txt');\n * writer.write(['clear me']);\n * // clear writer object here\n * writer.clear();\n * // close writer\n * writer.close();\n *
\n * // create a file called 'newFile.txt'\n * let writer = createWriter('newFile.txt');\n * // close the PrintWriter and save the file\n * writer.close();\n *
\n * // create a file called 'newFile2.txt'\n * let writer = createWriter('newFile2.txt');\n * // write some data to the file\n * writer.write([100, 101, 102]);\n * // close the PrintWriter and save the file\n * writer.close();\n *
Save an image, text, json, csv, wav, or html. Prompts download to\n * the client's computer. Note that it is not recommended to call save()\n * within draw if it's looping, as the save() function will open a new save\n * dialog every frame.
The default behavior is to save the canvas as an image. You can\n * optionally specify a filename.\n * For example:
\n * save();\n * save('myCanvas.jpg'); // save a specific canvas with a filename\n *
Alternately, the first parameter can be a pointer to a canvas\n * p5.Element, an Array of Strings,\n * an Array of JSON, a JSON object, a p5.Table, a p5.Image, or a\n * p5.SoundFile (requires p5.sound). The second parameter is a filename\n * (including extension). The third parameter is for options specific\n * to this type of object. This method will save a file that fits the\n * given parameters. For example:
\n * // Saves canvas as an image\n * save('myCanvas.jpg');\n *\n * // Saves pImage as a png image\n * let img = createImage(10, 10);\n * save(img, 'my.png');\n *\n * // Saves canvas as an image\n * let cnv = createCanvas(100, 100);\n * save(cnv, 'myCanvas.jpg');\n *\n * // Saves p5.Renderer object as an image\n * let gb = createGraphics(100, 100);\n * save(gb, 'myGraphics.jpg');\n *\n * let myTable = new p5.Table();\n *\n * // Saves table as html file\n * save(myTable, 'myTable.html');\n *\n * // Comma Separated Values\n * save(myTable, 'myTable.csv');\n *\n * // Tab Separated Values\n * save(myTable, 'myTable.tsv');\n *\n * let myJSON = { a: 1, b: true };\n *\n * // Saves pretty JSON\n * save(myJSON, 'my.json');\n *\n * // Optimizes JSON filesize\n * save(myJSON, 'my.json', true);\n *\n * // Saves array of strings to a text file with line breaks after each item\n * let arrayOfStrings = ['a', 'b'];\n * save(arrayOfStrings, 'my.txt');\n *
\n * let json = {}; // new JSON Object\n *\n * json.id = 0;\n * json.species = 'Panthera leo';\n * json.name = 'Lion';\n *\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * saveJSON(json, 'lion.json');\n * }\n * }\n *\n * // saves the following to a file called \"lion.json\":\n * // {\n * // \"id\": 0,\n * // \"species\": \"Panthera leo\",\n * // \"name\": \"Lion\"\n * // }\n *
\n * let words = 'apple bear cat dog';\n *\n * // .split() outputs an Array\n * let list = split(words, ' ');\n *\n * function setup() {\n * createCanvas(100, 100);\n * background(200);\n * text('click here to save', 10, 10, 70, 80);\n * }\n *\n * function mousePressed() {\n * if (mouseX > 0 && mouseX < width && mouseY > 0 && mouseY < height) {\n * saveStrings(list, 'nouns.txt');\n * }\n * }\n *\n * // Saves the following to a file called 'nouns.txt':\n * //\n * // apple\n * // bear\n * // cat\n * // dog\n *
\n * let table;\n *\n * function setup() {\n * table = new p5.Table();\n *\n * table.addColumn('id');\n * table.addColumn('species');\n * table.addColumn('name');\n *\n * let newRow = table.addRow();\n * newRow.setNum('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Panthera leo');\n * newRow.setString('name', 'Lion');\n *\n * // To save, un-comment next line then click 'run'\n * // saveTable(table, 'new.csv');\n * }\n *\n * // Saves the following to a file called 'new.csv':\n * // id,species,name\n * // 0,Panthera leo,Lion\n *
Generic class for handling tabular data, typically from a\n * CSV, TSV, or other sort of spreadsheet file.
CSV files are\n * \n * comma separated values, often with the data in quotes. TSV\n * files use tabs as separators, and usually don't bother with the\n * quotes.
A rough \"spec\" for CSV can be found\n * here.
To save tables to your computer, use the save method\n * or the saveTable method.
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add a row\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Canis Lupus');\n * newRow.setString('name', 'Wolf');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //remove the first row\n * table.removeRow(0);\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let row = table.getRow(1);\n * //print it column by column\n * //note: a row is an object, not an array\n * for (let c = 0; c < table.getColumnCount(); c++) {\n * print(row.getString(c));\n * }\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n *\n * //warning: rows is an array of objects\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].set('name', 'Unicorn');\n * }\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //find the animal named zebra\n * let row = table.findRow('Zebra', 'name');\n * //find the corresponding species\n * print(row.getString('species'));\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add another goat\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Scape Goat');\n * newRow.setString('name', 'Goat');\n *\n * //find the rows containing animals named Goat\n * let rows = table.findRows('Goat', 'name');\n * print(rows.length + ' Goats found');\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //Search using specified regex on a given column, return TableRow object\n * let mammal = table.matchRow(new RegExp('ant'), 1);\n * print(mammal.getString(1));\n * //Output \"Panthera pardus\"\n * }\n *
\n * let table;\n *\n * function setup() {\n * table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', 'Lion');\n * newRow.setString('type', 'Mammal');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Snake');\n * newRow.setString('type', 'Reptile');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Mosquito');\n * newRow.setString('type', 'Insect');\n *\n * newRow = table.addRow();\n * newRow.setString('name', 'Lizard');\n * newRow.setString('type', 'Reptile');\n *\n * let rows = table.matchRows('R.*', 'type');\n * for (let i = 0; i < rows.length; i++) {\n * print(rows[i].getString('name') + ': ' + rows[i].getString('type'));\n * }\n * }\n * // Sketch prints:\n * // Snake: Reptile\n * // Lizard: Reptile\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //getColumn returns an array that can be printed directly\n * print(table.getColumn('species'));\n * //outputs [\"Capra hircus\", \"Panthera pardus\", \"Equus zebra\"]\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.clearRows();\n * print(table.getRowCount() + ' total rows in table');\n * print(table.getColumnCount() + ' total columns in table');\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.addColumn('carnivore');\n * table.set(0, 'carnivore', 'no');\n * table.set(1, 'carnivore', 'yes');\n * table.set(2, 'carnivore', 'no');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n *
\n * // given the cvs file \"blobs.csv\" in /assets directory\n * // ID, Name, Flavor, Shape, Color\n * // Blob1, Blobby, Sweet, Blob, Pink\n * // Blob2, Saddy, Savory, Blob, Blue\n *\n * let table;\n *\n * function preload() {\n * table = loadTable('assets/blobs.csv');\n * }\n *\n * function setup() {\n * createCanvas(200, 100);\n * textAlign(CENTER);\n * background(255);\n * }\n *\n * function draw() {\n * let numOfColumn = table.getColumnCount();\n * text('There are ' + numOfColumn + ' columns in the table.', 100, 50);\n * }\n *
\n * // given the cvs file \"blobs.csv\" in /assets directory\n * //\n * // ID, Name, Flavor, Shape, Color\n * // Blob1, Blobby, Sweet, Blob, Pink\n * // Blob2, Saddy, Savory, Blob, Blue\n *\n * let table;\n *\n * function preload() {\n * table = loadTable('assets/blobs.csv');\n * }\n *\n * function setup() {\n * createCanvas(200, 100);\n * textAlign(CENTER);\n * background(255);\n * }\n *\n * function draw() {\n * text('There are ' + table.getRowCount() + ' rows in the table.', 100, 50);\n * }\n *
Removes any of the specified characters (or \"tokens\").
If no column is specified, then the values in all columns and\n * rows are processed. A specific column may be referenced by\n * either its ID or title.
\n * function setup() {\n * let table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', ' $Lion ,');\n * newRow.setString('type', ',,,Mammal');\n *\n * newRow = table.addRow();\n * newRow.setString('name', '$Snake ');\n * newRow.setString('type', ',,,Reptile');\n *\n * table.removeTokens(',$ ');\n * print(table.getArray());\n * }\n *\n * // prints:\n * // 0 \"Lion\" \"Mamal\"\n * // 1 \"Snake\" \"Reptile\"\n *
\n * function setup() {\n * let table = new p5.Table();\n *\n * table.addColumn('name');\n * table.addColumn('type');\n *\n * let newRow = table.addRow();\n * newRow.setString('name', ' Lion ,');\n * newRow.setString('type', ' Mammal ');\n *\n * newRow = table.addRow();\n * newRow.setString('name', ' Snake ');\n * newRow.setString('type', ' Reptile ');\n *\n * table.trim();\n * print(table.getArray());\n * }\n *\n * // prints:\n * // 0 \"Lion\" \"Mamal\"\n * // 1 \"Snake\" \"Reptile\"\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.removeColumn('id');\n * print(table.getColumnCount());\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.set(0, 'species', 'Canis Lupus');\n * table.set(0, 'name', 'Wolf');\n *\n * //print the results\n * for (let r = 0; r < table.getRowCount(); r++)\n * for (let c = 0; c < table.getColumnCount(); c++)\n * print(table.getString(r, c));\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * table.setNum(1, 'id', 1);\n *\n * print(table.getColumn(0));\n * //[\"0\", 1, \"2\"]\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * //add a row\n * let newRow = table.addRow();\n * newRow.setString('id', table.getRowCount() - 1);\n * newRow.setString('species', 'Canis Lupus');\n * newRow.setString('name', 'Wolf');\n *\n * print(table.getArray());\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.get(0, 1));\n * //Capra hircus\n * print(table.get(0, 'species'));\n * //Capra hircus\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.getNum(1, 0) + 100);\n * //id 1 + 100 = 101\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * // table is comma separated value \"CSV\"\n * // and has specifiying header for column labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * print(table.getString(0, 0)); // 0\n * print(table.getString(0, 1)); // Capra hircus\n * print(table.getString(0, 2)); // Goat\n * print(table.getString(1, 0)); // 1\n * print(table.getString(1, 1)); // Panthera pardus\n * print(table.getString(1, 2)); // Leopard\n * print(table.getString(2, 0)); // 2\n * print(table.getString(2, 1)); // Equus zebra\n * print(table.getString(2, 2)); // Zebra\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let tableObject = table.getObject();\n *\n * print(tableObject);\n * //outputs an object\n * }\n *
\n * // Given the CSV file \"mammals.csv\"\n * // in the project's \"assets\" folder\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leoperd\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * // table is comma separated value \"CSV\"\n * // and has specifiying header for column labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let tableArray = table.getArray();\n * for (let i = 0; i < tableArray.length; i++) {\n * print(tableArray[i]);\n * }\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].set('name', 'Unicorn');\n * }\n *\n * //print the results\n * print(table.getArray());\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * rows[r].setNum('id', r + 10);\n * }\n *\n * print(table.getArray());\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * let name = rows[r].getString('name');\n * rows[r].setString('name', 'A ' + name + ' named George');\n * }\n *\n * print(table.getArray());\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let names = [];\n * let rows = table.getRows();\n * for (let r = 0; r < rows.length; r++) {\n * names.push(rows[r].get('name'));\n * }\n *\n * print(names);\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * let minId = Infinity;\n * let maxId = -Infinity;\n * for (let r = 0; r < rows.length; r++) {\n * let id = rows[r].getNum('id');\n * minId = min(minId, id);\n * maxId = min(maxId, id);\n * }\n * print('minimum id = ' + minId + ', maximum id = ' + maxId);\n * }\n *
\n * // Given the CSV file \"mammals.csv\" in the project's \"assets\" folder:\n * //\n * // id,species,name\n * // 0,Capra hircus,Goat\n * // 1,Panthera pardus,Leopard\n * // 2,Equus zebra,Zebra\n *\n * let table;\n *\n * function preload() {\n * //my table is comma separated value \"csv\"\n * //and has a header specifying the columns labels\n * table = loadTable('assets/mammals.csv', 'csv', 'header');\n * }\n *\n * function setup() {\n * let rows = table.getRows();\n * let longest = '';\n * for (let r = 0; r < rows.length; r++) {\n * let species = rows[r].getString('species');\n * if (longest.length < species.length) {\n * longest = species;\n * }\n * }\n *\n * print('longest: ' + longest);\n * }\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let children = xml.getChildren('animal');\n * let parent = children[1].getParent();\n * print(parent.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.getName());\n * xml.setName('fish');\n * print(xml.getName());\n * }\n *\n * // Sketch prints:\n * // mammals\n * // fish\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.hasChildren());\n * }\n *\n * // Sketch prints:\n * // true\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.listChildren());\n * }\n *\n * // Sketch prints:\n * // [\"animal\", \"animal\", \"animal\"]\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let animals = xml.getChildren('animal');\n *\n * for (let i = 0; i < animals.length; i++) {\n * print(animals[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Leopard\"\n * // \"Zebra\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n *
\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let secondChild = xml.getChild(1);\n * print(secondChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Leopard\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let child = new p5.XML();\n * child.setName('animal');\n * child.setAttribute('id', '3');\n * child.setAttribute('species', 'Ornithorhynchus anatinus');\n * child.setContent('Platypus');\n * xml.addChild(child);\n *\n * let animals = xml.getChildren('animal');\n * print(animals[animals.length - 1].getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Leopard\"\n * // \"Zebra\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * xml.removeChild('animal');\n * let children = xml.getChildren();\n * for (let i = 0; i < children.length; i++) {\n * print(children[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Leopard\"\n * // \"Zebra\"\n *
\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * xml.removeChild(1);\n * let children = xml.getChildren();\n * for (let i = 0; i < children.length; i++) {\n * print(children[i].getContent());\n * }\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Zebra\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getAttributeCount());\n * }\n *\n * // Sketch prints:\n * // 2\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.listAttributes());\n * }\n *\n * // Sketch prints:\n * // [\"id\", \"species\"]\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.hasAttribute('species'));\n * print(firstChild.hasAttribute('color'));\n * }\n *\n * // Sketch prints:\n * // true\n * // false\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getNum('id'));\n * }\n *\n * // Sketch prints:\n * // 0\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getString('species'));\n * }\n *\n * // Sketch prints:\n * // \"Capra hircus\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getString('species'));\n * firstChild.setAttribute('species', 'Jamides zebra');\n * print(firstChild.getString('species'));\n * }\n *\n * // Sketch prints:\n * // \"Capra hircus\"\n * // \"Jamides zebra\"\n *
\n * // The following short XML file called \"mammals.xml\" is parsed\n * // in the code below.\n * //\n * // \n * // <mammals>\n * // <animal id=\"0\" species=\"Capra hircus\">Goat</animal>\n * // <animal id=\"1\" species=\"Panthera pardus\">Leopard</animal>\n * // <animal id=\"2\" species=\"Equus zebra\">Zebra</animal>\n * // </mammals>\n *\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * let firstChild = xml.getChild('animal');\n * print(firstChild.getContent());\n * firstChild.setContent('Mountain Goat');\n * print(firstChild.getContent());\n * }\n *\n * // Sketch prints:\n * // \"Goat\"\n * // \"Mountain Goat\"\n *
\n * let xml;\n *\n * function preload() {\n * xml = loadXML('assets/mammals.xml');\n * }\n *\n * function setup() {\n * print(xml.serialize());\n * }\n *\n * // Sketch prints:\n * // \n * // Goat\n * // Leopard\n * // Zebra\n * // \n *
\n * function setup() {\n * let x = -3;\n * let y = abs(x);\n *\n * print(x); // -3\n * print(y); // 3\n * }\n *
\n * function draw() {\n * background(200);\n * // map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * //Get the ceiling of the mapped number.\n * let bx = ceil(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n *
\n * function draw() {\n * background(200);\n *\n * let leftWall = 25;\n * let rightWall = 75;\n *\n * // xm is just the mouseX, while\n * // xc is the mouseX, but constrained\n * // between the leftWall and rightWall!\n * let xm = mouseX;\n * let xc = constrain(mouseX, leftWall, rightWall);\n *\n * // Draw the walls.\n * stroke(150);\n * line(leftWall, 0, leftWall, height);\n * line(rightWall, 0, rightWall, height);\n *\n * // Draw xm and xc as circles.\n * noStroke();\n * fill(150);\n * ellipse(xm, 33, 9, 9); // Not Constrained\n * fill(0);\n * ellipse(xc, 66, 9, 9); // Constrained\n * }\n *
\n * // Move your mouse inside the canvas to see the\n * // change in distance between two points!\n * function draw() {\n * background(200);\n * fill(0);\n *\n * let x1 = 10;\n * let y1 = 90;\n * let x2 = mouseX;\n * let y2 = mouseY;\n *\n * line(x1, y1, x2, y2);\n * ellipse(x1, y1, 7, 7);\n * ellipse(x2, y2, 7, 7);\n *\n * // d is the length of the line\n * // the distance from point 1 to point 2.\n * let d = int(dist(x1, y1, x2, y2));\n *\n * // Let's write d along the line we are drawing!\n * push();\n * translate((x1 + x2) / 2, (y1 + y2) / 2);\n * rotate(atan2(y2 - y1, x2 - x1));\n * text(nfc(d, 1), 0, -5);\n * pop();\n * // Fancy!\n * }\n *
\n * function draw() {\n * background(200);\n *\n * // Compute the exp() function with a value between 0 and 2\n * let xValue = map(mouseX, 0, width, 0, 2);\n * let yValue = exp(xValue);\n *\n * let y = map(yValue, 0, 8, height, 0);\n *\n * let legend = 'exp (' + nfc(xValue, 3) + ')\\n= ' + nf(yValue, 1, 4);\n * stroke(150);\n * line(mouseX, y, mouseX, height);\n * fill(0);\n * text(legend, 5, 15);\n * noStroke();\n * ellipse(mouseX, y, 7, 7);\n *\n * // Draw the exp(x) curve,\n * // over the domain of x from 0 to 2\n * noFill();\n * stroke(0);\n * beginShape();\n * for (let x = 0; x < width; x++) {\n * xValue = map(x, 0, width, 0, 2);\n * yValue = exp(xValue);\n * y = map(yValue, 0, 8, height, 0);\n * vertex(x, y);\n * }\n *\n * endShape();\n * line(0, 0, 0, height);\n * line(0, height - 1, width, height - 1);\n * }\n *
\n * function draw() {\n * background(200);\n * //map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * //Get the floor of the mapped number.\n * let bx = floor(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n *
\n * function setup() {\n * background(200);\n * let a = 20;\n * let b = 80;\n * let c = lerp(a, b, 0.2);\n * let d = lerp(a, b, 0.5);\n * let e = lerp(a, b, 0.8);\n *\n * let y = 50;\n *\n * strokeWeight(5);\n * stroke(0); // Draw the original points in black\n * point(a, y);\n * point(b, y);\n *\n * stroke(100); // Draw the lerp points in gray\n * point(c, y);\n * point(d, y);\n * point(e, y);\n * }\n *
\n * function draw() {\n * background(200);\n * let maxX = 2.8;\n * let maxY = 1.5;\n *\n * // Compute the natural log of a value between 0 and maxX\n * let xValue = map(mouseX, 0, width, 0, maxX);\n * let yValue, y;\n * if (xValue > 0) {\n // Cannot take the log of a negative number.\n * yValue = log(xValue);\n * y = map(yValue, -maxY, maxY, height, 0);\n *\n * // Display the calculation occurring.\n * let legend = 'log(' + nf(xValue, 1, 2) + ')\\n= ' + nf(yValue, 1, 3);\n * stroke(150);\n * line(mouseX, y, mouseX, height);\n * fill(0);\n * text(legend, 5, 15);\n * noStroke();\n * ellipse(mouseX, y, 7, 7);\n * }\n *\n * // Draw the log(x) curve,\n * // over the domain of x from 0 to maxX\n * noFill();\n * stroke(0);\n * beginShape();\n * for (let x = 0; x < width; x++) {\n * xValue = map(x, 0, width, 0, maxX);\n * yValue = log(xValue);\n * y = map(yValue, -maxY, maxY, height, 0);\n * vertex(x, y);\n * }\n * endShape();\n * line(0, 0, 0, height);\n * line(0, height / 2, width, height / 2);\n * }\n *
\n * function setup() {\n * let x1 = 20;\n * let x2 = 80;\n * let y1 = 30;\n * let y2 = 70;\n *\n * line(0, 0, x1, y1);\n * print(mag(x1, y1)); // Prints \"36.05551275463989\"\n * line(0, 0, x2, y1);\n * print(mag(x2, y1)); // Prints \"85.44003745317531\"\n * line(0, 0, x1, y2);\n * print(mag(x1, y2)); // Prints \"72.80109889280519\"\n * line(0, 0, x2, y2);\n * print(mag(x2, y2)); // Prints \"106.3014581273465\"\n * }\n *
\n * let value = 25;\n * let m = map(value, 0, 100, 0, width);\n * ellipse(m, 50, 10, 10);\n
\n * function setup() {\n * noStroke();\n * }\n *\n * function draw() {\n * background(204);\n * let x1 = map(mouseX, 0, width, 25, 75);\n * ellipse(x1, 25, 25, 25);\n * //This ellipse is constrained to the 0-100 range\n * //after setting withinBounds to true\n * let x2 = map(mouseX, 0, width, 0, 100, true);\n * ellipse(x2, 75, 25, 25);\n * }\n
\n * function setup() {\n * // Change the elements in the array and run the sketch\n * // to show how max() works!\n * let numArray = [2, 1, 5, 4, 8, 9];\n * fill(0);\n * noStroke();\n * text('Array Elements', 0, 10);\n * // Draw all numbers in the array\n * let spacing = 15;\n * let elemsY = 25;\n * for (let i = 0; i < numArray.length; i++) {\n * text(numArray[i], i * spacing, elemsY);\n * }\n * let maxX = 33;\n * let maxY = 80;\n * // Draw the Maximum value in the array.\n * textSize(32);\n * text(max(numArray), maxX, maxY);\n * }\n *
\n * function setup() {\n * // Change the elements in the array and run the sketch\n * // to show how min() works!\n * let numArray = [2, 1, 5, 4, 8, 9];\n * fill(0);\n * noStroke();\n * text('Array Elements', 0, 10);\n * // Draw all numbers in the array\n * let spacing = 15;\n * let elemsY = 25;\n * for (let i = 0; i < numArray.length; i++) {\n * text(numArray[i], i * spacing, elemsY);\n * }\n * let maxX = 33;\n * let maxY = 80;\n * // Draw the Minimum value in the array.\n * textSize(32);\n * text(min(numArray), maxX, maxY);\n * }\n *
\n * function draw() {\n * background(200);\n * let currentNum = mouseX;\n * let lowerBound = 0;\n * let upperBound = width; //100;\n * let normalized = norm(currentNum, lowerBound, upperBound);\n * let lineY = 70;\n * stroke(3);\n * line(0, lineY, width, lineY);\n * //Draw an ellipse mapped to the non-normalized value.\n * noStroke();\n * fill(50);\n * let s = 7; // ellipse size\n * ellipse(currentNum, lineY, s, s);\n *\n * // Draw the guide\n * let guideY = lineY + 15;\n * text('0', 0, guideY);\n * textAlign(RIGHT);\n * text('100', width, guideY);\n *\n * // Draw the normalized value\n * textAlign(LEFT);\n * fill(0);\n * textSize(32);\n * let normalY = 40;\n * let normalX = 20;\n * text(normalized, normalX, normalY);\n * }\n *
\n * function setup() {\n * //Exponentially increase the size of an ellipse.\n * let eSize = 3; // Original Size\n * let eLoc = 10; // Original Location\n *\n * ellipse(eLoc, eLoc, eSize, eSize);\n *\n * ellipse(eLoc * 2, eLoc * 2, pow(eSize, 2), pow(eSize, 2));\n *\n * ellipse(eLoc * 4, eLoc * 4, pow(eSize, 3), pow(eSize, 3));\n *\n * ellipse(eLoc * 8, eLoc * 8, pow(eSize, 4), pow(eSize, 4));\n * }\n *
\n * function draw() {\n * background(200);\n * //map, mouseX between 0 and 5.\n * let ax = map(mouseX, 0, 100, 0, 5);\n * let ay = 66;\n *\n * // Round the mapped number.\n * let bx = round(map(mouseX, 0, 100, 0, 5));\n * let by = 33;\n *\n * // Multiply the mapped numbers by 20 to more easily\n * // see the changes.\n * stroke(0);\n * fill(0);\n * line(0, ay, ax * 20, ay);\n * line(0, by, bx * 20, by);\n *\n * // Reformat the float returned by map and draw it.\n * noStroke();\n * text(nfc(ax, 2), ax, ay - 5);\n * text(nfc(bx, 1), bx, by - 5);\n * }\n *
\n * function draw() {\n * background(200);\n * let eSize = 7;\n * let x1 = map(mouseX, 0, width, 0, 10);\n * let y1 = 80;\n * let x2 = sq(x1);\n * let y2 = 20;\n *\n * // Draw the non-squared.\n * line(0, y1, width, y1);\n * ellipse(x1, y1, eSize, eSize);\n *\n * // Draw the squared.\n * line(0, y2, width, y2);\n * ellipse(x2, y2, eSize, eSize);\n *\n * // Draw dividing line.\n * stroke(100);\n * line(0, height / 2, width, height / 2);\n *\n * // Draw text.\n * let spacing = 15;\n * noStroke();\n * fill(0);\n * text('x = ' + x1, 0, y1 + spacing);\n * text('sq(x) = ' + x2, 0, y2 + spacing);\n * }\n *
\n * function draw() {\n * background(200);\n * let eSize = 7;\n * let x1 = mouseX;\n * let y1 = 80;\n * let x2 = sqrt(x1);\n * let y2 = 20;\n *\n * // Draw the non-squared.\n * line(0, y1, width, y1);\n * ellipse(x1, y1, eSize, eSize);\n *\n * // Draw the squared.\n * line(0, y2, width, y2);\n * ellipse(x2, y2, eSize, eSize);\n *\n * // Draw dividing line.\n * stroke(100);\n * line(0, height / 2, width, height / 2);\n *\n * // Draw text.\n * noStroke();\n * fill(0);\n * let spacing = 15;\n * text('x = ' + x1, 0, y1 + spacing);\n * text('sqrt(x) = ' + x2, 0, y2 + spacing);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noStroke();\n * fill(255, 102, 204);\n * }\n *\n * function draw() {\n * background(255);\n * pointLight(color(255), createVector(sin(millis() / 1000) * 20, -40, -10));\n * scale(0.75);\n * sphere();\n * }\n *
\n * let xoff = 0.0;\n *\n * function draw() {\n * background(204);\n * xoff = xoff + 0.01;\n * let n = noise(xoff) * width;\n * line(n, 0, n, height);\n * }\n *
let noiseScale=0.02;\n *\n * function draw() {\n * background(0);\n * for (let x=0; x < width; x++) {\n * let noiseVal = noise((mouseX+x)*noiseScale, mouseY*noiseScale);\n * stroke(noiseVal*255);\n * line(x, mouseY+noiseVal*80, x, height);\n * }\n * }\n *
\n * let noiseVal;\n * let noiseScale = 0.02;\n *\n * function setup() {\n * createCanvas(100, 100);\n * }\n *\n * function draw() {\n * background(0);\n * for (let y = 0; y < height; y++) {\n * for (let x = 0; x < width / 2; x++) {\n * noiseDetail(2, 0.2);\n * noiseVal = noise((mouseX + x) * noiseScale, (mouseY + y) * noiseScale);\n * stroke(noiseVal * 255);\n * point(x, y);\n * noiseDetail(8, 0.65);\n * noiseVal = noise(\n * (mouseX + x + width / 2) * noiseScale,\n * (mouseY + y) * noiseScale\n * );\n * stroke(noiseVal * 255);\n * point(x + width / 2, y);\n * }\n * }\n * }\n *
let xoff = 0.0;\n *\n * function setup() {\n * noiseSeed(99);\n * stroke(0, 10);\n * }\n *\n * function draw() {\n * xoff = xoff + .01;\n * let n = noise(xoff) * width;\n * line(n, 0, n, height);\n * }\n *
\n * let v1 = createVector(40, 50);\n * let v2 = createVector(40, 50);\n *\n * ellipse(v1.x, v1.y, 50, 50);\n * ellipse(v2.x, v2.y, 50, 50);\n * v1.add(v2);\n * ellipse(v1.x, v1.y, 50, 50);\n *
\n * function setup() {\n * let v = createVector(20, 30);\n * print(String(v)); // prints \"p5.Vector Object : [20, 30, 0]\"\n * }\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text(v1.toString(), 10, 25, 90, 75);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * function setup() {\n * let v = createVector(1, 2, 3);\n * v.set(4, 5, 6); // Sets vector to [4, 5, 6]\n *\n * let v1 = createVector(0, 0, 0);\n * let arr = [1, 2, 3];\n * v1.set(arr); // Sets vector to [1, 2, 3]\n * }\n *
\n * let v0, v1;\n * function setup() {\n * createCanvas(100, 100);\n *\n * v0 = createVector(0, 0);\n * v1 = createVector(50, 50);\n * }\n *\n * function draw() {\n * background(240);\n *\n * drawArrow(v0, v1, 'black');\n * v1.set(v1.x + random(-1, 1), v1.y + random(-1, 1));\n *\n * noStroke();\n * text('x: ' + round(v1.x) + ' y: ' + round(v1.y), 20, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v1 = createVector(1, 2, 3);\n * let v2 = v1.copy();\n * print(v1.x === v2.x && v1.y === v2.y && v1.z === v2.z);\n * // Prints \"true\"\n *
\n * let v = createVector(1, 2, 3);\n * v.add(4, 5, 6);\n * // v's components are set to [5, 7, 9]\n *
\n * // Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(2, 3, 4);\n *\n * let v3 = p5.Vector.add(v1, v2);\n * // v3 has components [3, 5, 7]\n * print(v3);\n *
\n * // red vector + blue vector = purple vector\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(-30, 20);\n * drawArrow(v1, v2, 'blue');\n *\n * let v3 = p5.Vector.add(v1, v2);\n * drawArrow(v0, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(4, 5, 6);\n * v.sub(1, 1, 1);\n * // v's components are set to [3, 4, 5]\n *
\n * // Static method\n * let v1 = createVector(2, 3, 4);\n * let v2 = createVector(1, 2, 3);\n *\n * let v3 = p5.Vector.sub(v1, v2);\n * // v3 has components [1, 1, 1]\n * print(v3);\n *
\n * // red vector - blue vector = purple vector\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(70, 50);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX, mouseY);\n * drawArrow(v0, v2, 'blue');\n *\n * let v3 = p5.Vector.sub(v1, v2);\n * drawArrow(v2, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(1, 2, 3);\n * v.mult(2);\n * // v's components are set to [2, 4, 6]\n *
\n * // Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = p5.Vector.mult(v1, 2);\n * // v2 has components [2, 4, 6]\n * print(v2);\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(25, -25);\n * drawArrow(v0, v1, 'red');\n *\n * let num = map(mouseX, 0, width, -2, 2, true);\n * let v2 = p5.Vector.mult(v1, num);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('multiplied by ' + num.toFixed(2), 5, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(6, 4, 2);\n * v.div(2); //v's components are set to [3, 2, 1]\n *
\n * // Static method\n * let v1 = createVector(6, 4, 2);\n * let v2 = p5.Vector.div(v1, 2);\n * // v2 has components [3, 2, 1]\n * print(v2);\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 100);\n * let v1 = createVector(50, -50);\n * drawArrow(v0, v1, 'red');\n *\n * let num = map(mouseX, 0, width, 10, 0.5, true);\n * let v2 = p5.Vector.div(v1, num);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('divided by ' + num.toFixed(2), 10, 90);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text('vector length: ' + v1.mag().toFixed(2), 10, 70, 90, 30);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(20.0, 30.0, 40.0);\n * let m = v.mag();\n * print(m); // Prints \"53.85164807134504\"\n *
\n * // Static method\n * let v1 = createVector(6, 4, 2);\n * print(v1.magSq()); // Prints \"56\"\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'black');\n *\n * noStroke();\n * text('vector length squared: ' + v1.magSq().toFixed(2), 10, 45, 90, 55);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(2, 3, 4);\n *\n * print(v1.dot(v2)); // Prints \"20\"\n *
\n * //Static method\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(3, 2, 1);\n * print(p5.Vector.dot(v1, v2)); // Prints \"10\"\n *
\n * let v1 = createVector(1, 2, 3);\n * let v2 = createVector(1, 2, 3);\n *\n * v1.cross(v2); // v's components are [0, 0, 0]\n *
\n * // Static method\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let crossProduct = p5.Vector.cross(v1, v2);\n * // crossProduct has components [0, 0, 1]\n * print(crossProduct);\n *
\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let distance = v1.dist(v2); // distance is 1.4142...\n * print(distance);\n *
\n * // Static method\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let distance = p5.Vector.dist(v1, v2);\n * // distance is 1.4142...\n * print(distance);\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n *\n * let v1 = createVector(70, 50);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX, mouseY);\n * drawArrow(v0, v2, 'blue');\n *\n * noStroke();\n * text('distance between vectors: ' + v2.dist(v1).toFixed(2), 5, 50, 95, 50);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.normalize();\n * // v's components are set to\n * // [0.4454354, 0.8908708, 0.089087084]\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'red');\n * v1.normalize();\n * drawArrow(v0, v1.mult(35), 'blue');\n *\n * noFill();\n * ellipse(50, 50, 35 * 2);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.limit(5);\n * // v's components are set to\n * // [2.2271771, 4.4543543, 0.4454354]\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'red');\n * drawArrow(v0, v1.limit(35), 'blue');\n *\n * noFill();\n * ellipse(50, 50, 35 * 2);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(10, 20, 2);\n * // v has components [10.0, 20.0, 2.0]\n * v.setMag(10);\n * // v's components are set to [6.0, 8.0, 0.0]\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(0, 0);\n * let v1 = createVector(50, 50);\n *\n * drawArrow(v0, v1, 'red');\n *\n * let length = map(mouseX, 0, width, 0, 141, true);\n * v1.setMag(length);\n * drawArrow(v0, v1, 'blue');\n *\n * noStroke();\n * text('magnitude set to: ' + length.toFixed(2), 10, 70, 90, 30);\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * function setup() {\n * let v1 = createVector(30, 50);\n * print(v1.heading()); // 1.0303768265243125\n *\n * v1 = createVector(40, 50);\n * print(v1.heading()); // 0.8960553845713439\n *\n * v1 = createVector(30, 70);\n * print(v1.heading()); // 1.1659045405098132\n * }\n *
\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(mouseX - 50, mouseY - 50);\n *\n * drawArrow(v0, v1, 'black');\n *\n * let myHeading = v1.heading();\n * noStroke();\n * text(\n * 'vector heading: ' +\n * myHeading.toFixed(2) +\n * ' radians or ' +\n * degrees(myHeading).toFixed(2) +\n * ' degrees',\n * 10,\n * 50,\n * 90,\n * 50\n * );\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(10.0, 20.0);\n * // v has components [10.0, 20.0, 0.0]\n * v.rotate(HALF_PI);\n * // v's components are set to [-20.0, 9.999999, 0.0]\n *
\n * let angle = 0;\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = createVector(50, 0);\n *\n * drawArrow(v0, v1.rotate(angle), 'black');\n * angle += 0.01;\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v1 = createVector(1, 0, 0);\n * let v2 = createVector(0, 1, 0);\n *\n * let angle = v1.angleBetween(v2);\n * // angle is PI/2\n * print(angle);\n *
\n * function draw() {\n * background(240);\n * let v0 = createVector(50, 50);\n *\n * let v1 = createVector(50, 0);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(mouseX - 50, mouseY - 50);\n * drawArrow(v0, v2, 'blue');\n *\n * let angleBetween = v1.angleBetween(v2);\n * noStroke();\n * text(\n * 'angle between: ' +\n * angleBetween.toFixed(2) +\n * ' radians or ' +\n * degrees(angleBetween).toFixed(2) +\n * ' degrees',\n * 10,\n * 50,\n * 90,\n * 50\n * );\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = createVector(1, 1, 0);\n *\n * v.lerp(3, 3, 0, 0.5); // v now has components [2,2,0]\n *
\n * let v1 = createVector(0, 0, 0);\n * let v2 = createVector(100, 100, 0);\n *\n * let v3 = p5.Vector.lerp(v1, v2, 0.5);\n * // v3 has components [50,50,0]\n * print(v3);\n *
\n * let step = 0.01;\n * let amount = 0;\n *\n * function draw() {\n * background(240);\n * let v0 = createVector(0, 0);\n *\n * let v1 = createVector(mouseX, mouseY);\n * drawArrow(v0, v1, 'red');\n *\n * let v2 = createVector(90, 90);\n * drawArrow(v0, v2, 'blue');\n *\n * if (amount > 1 || amount < 0) {\n * step *= -1;\n * }\n * amount += step;\n * let v3 = p5.Vector.lerp(v1, v2, amount);\n *\n * drawArrow(v0, v3, 'purple');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * function setup() {\n * let v = createVector(20, 30);\n * print(v.array()); // Prints : Array [20, 30, 0]\n * }\n *
\n * let v = createVector(10.0, 20.0, 30.0);\n * let f = v.array();\n * print(f[0]); // Prints \"10.0\"\n * print(f[1]); // Prints \"20.0\"\n * print(f[2]); // Prints \"30.0\"\n *
\n * let v1 = createVector(5, 10, 20);\n * let v2 = createVector(5, 10, 20);\n * let v3 = createVector(13, 10, 19);\n *\n * print(v1.equals(v2.x, v2.y, v2.z)); // true\n * print(v1.equals(v3.x, v3.y, v3.z)); // false\n *
\n * let v1 = createVector(10.0, 20.0, 30.0);\n * let v2 = createVector(10.0, 20.0, 30.0);\n * let v3 = createVector(0.0, 0.0, 0.0);\n * print(v1.equals(v2)); // true\n * print(v1.equals(v3)); // false\n *
\n * function draw() {\n * background(200);\n *\n * // Create a variable, proportional to the mouseX,\n * // varying from 0-360, to represent an angle in degrees.\n * angleMode(DEGREES);\n * let myDegrees = map(mouseX, 0, width, 0, 360);\n *\n * // Display that variable in an onscreen text.\n * // (Note the nfc() function to truncate additional decimal places,\n * // and the \"\\xB0\" character for the degree symbol.)\n * let readout = 'angle = ' + nfc(myDegrees, 1) + '\\xB0';\n * noStroke();\n * fill(0);\n * text(readout, 5, 15);\n *\n * // Create a p5.Vector using the fromAngle function,\n * // and extract its x and y components.\n * let v = p5.Vector.fromAngle(radians(myDegrees), 30);\n * let vx = v.x;\n * let vy = v.y;\n *\n * push();\n * translate(width / 2, height / 2);\n * noFill();\n * stroke(150);\n * line(0, 0, 30, 0);\n * stroke(0);\n * line(0, 0, vx, vy);\n * pop();\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * fill(255);\n * noStroke();\n * }\n * function draw() {\n * background(255);\n *\n * let t = millis() / 1000;\n *\n * // add three point lights\n * pointLight(color('#f00'), p5.Vector.fromAngles(t * 1.0, t * 1.3, 100));\n * pointLight(color('#0f0'), p5.Vector.fromAngles(t * 1.1, t * 1.2, 100));\n * pointLight(color('#00f'), p5.Vector.fromAngles(t * 1.2, t * 1.1, 100));\n *\n * sphere(35);\n * }\n *
\n * let v = p5.Vector.random2D();\n * // May make v's attributes something like:\n * // [0.61554617, -0.51195765, 0.0] or\n * // [-0.4695841, -0.14366731, 0.0] or\n * // [0.6091097, -0.22805278, 0.0]\n * print(v);\n *
\n * function setup() {\n * frameRate(1);\n * }\n *\n * function draw() {\n * background(240);\n *\n * let v0 = createVector(50, 50);\n * let v1 = p5.Vector.random2D();\n * drawArrow(v0, v1.mult(50), 'black');\n * }\n *\n * // draw an arrow for a vector at a given base position\n * function drawArrow(base, vec, myColor) {\n * push();\n * stroke(myColor);\n * strokeWeight(3);\n * fill(myColor);\n * translate(base.x, base.y);\n * line(0, 0, vec.x, vec.y);\n * rotate(vec.heading());\n * let arrowSize = 7;\n * translate(vec.mag() - arrowSize, 0);\n * triangle(0, arrowSize / 2, 0, -arrowSize / 2, arrowSize, 0);\n * pop();\n * }\n *
\n * let v = p5.Vector.random3D();\n * // May make v's attributes something like:\n * // [0.61554617, -0.51195765, 0.599168] or\n * // [-0.4695841, -0.14366731, -0.8711202] or\n * // [0.6091097, -0.22805278, -0.7595902]\n * print(v);\n *
\n * randomSeed(99);\n * for (let i = 0; i < 100; i++) {\n * let r = random(0, 255);\n * stroke(r);\n * line(i, 0, i, 100);\n * }\n *
\n * for (let i = 0; i < 100; i++) {\n * let r = random(50);\n * stroke(r * 5);\n * line(50, i, 50 + r, i);\n * }\n *
\n * for (let i = 0; i < 100; i++) {\n * let r = random(-50, 50);\n * line(50, i, 50 + r, i);\n * }\n *
\n * // Get a random element from an array using the random(Array) syntax\n * let words = ['apple', 'bear', 'cat', 'dog'];\n * let word = random(words); // select random word\n * text(word, 10, 50); // draw the word\n *
\n * for (let y = 0; y < 100; y++) {\n * let x = randomGaussian(50, 15);\n * line(50, y, x, y);\n * }\n *
\n * let distribution = new Array(360);\n *\n * function setup() {\n * createCanvas(100, 100);\n * for (let i = 0; i < distribution.length; i++) {\n * distribution[i] = floor(randomGaussian(0, 15));\n * }\n * }\n *\n * function draw() {\n * background(204);\n *\n * translate(width / 2, width / 2);\n *\n * for (let i = 0; i < distribution.length; i++) {\n * rotate(TWO_PI / distribution.length);\n * stroke(0);\n * let dist = abs(distribution[i]);\n * line(0, 0, dist, 0);\n * }\n * }\n *
\n * let a = PI;\n * let c = cos(a);\n * let ac = acos(c);\n * // Prints: \"3.1415927 : -1.0 : 3.1415927\"\n * print(a + ' : ' + c + ' : ' + ac);\n *
\n * let a = PI + PI / 4.0;\n * let c = cos(a);\n * let ac = acos(c);\n * // Prints: \"3.926991 : -0.70710665 : 2.3561943\"\n * print(a + ' : ' + c + ' : ' + ac);\n *
\n * let a = PI + PI / 3;\n * let s = sin(a);\n * let as = asin(s);\n * // Prints: \"1.0471976 : 0.86602545 : 1.0471976\"\n * print(a + ' : ' + s + ' : ' + as);\n *
\n * let a = PI + PI / 3.0;\n * let s = sin(a);\n * let as = asin(s);\n * // Prints: \"4.1887903 : -0.86602545 : -1.0471976\"\n * print(a + ' : ' + s + ' : ' + as);\n *
\n * let a = PI + PI / 3;\n * let t = tan(a);\n * let at = atan(t);\n * // Prints: \"1.0471976 : 1.7320509 : 1.0471976\"\n * print(a + ' : ' + t + ' : ' + at);\n *
\n * let a = PI + PI / 3.0;\n * let t = tan(a);\n * let at = atan(t);\n * // Prints: \"4.1887903 : 1.7320513 : 1.0471977\"\n * print(a + ' : ' + t + ' : ' + at);\n *
\n * function draw() {\n * background(204);\n * translate(width / 2, height / 2);\n * let a = atan2(mouseY - height / 2, mouseX - width / 2);\n * rotate(a);\n * rect(-30, -5, 60, 10);\n * }\n *
\n * let a = 0.0;\n * let inc = TWO_PI / 25.0;\n * for (let i = 0; i < 25; i++) {\n * line(i * 4, 50, i * 4, 50 + cos(a) * 40.0);\n * a = a + inc;\n * }\n *
\n * let a = 0.0;\n * let inc = TWO_PI / 25.0;\n * for (let i = 0; i < 25; i++) {\n * line(i * 4, 50, i * 4, 50 + sin(a) * 40.0);\n * a = a + inc;\n * }\n *
\n * let a = 0.0;\n * let inc = TWO_PI / 50.0;\n * for (let i = 0; i < 100; i = i + 2) {\n * line(i, 50, i, 50 + tan(a) * 2.0);\n * a = a + inc;\n * }\n *
\n * let rad = PI / 4;\n * let deg = degrees(rad);\n * print(rad + ' radians is ' + deg + ' degrees');\n * // Prints: 0.7853981633974483 radians is 45 degrees\n *
\n * let deg = 45.0;\n * let rad = radians(deg);\n * print(deg + ' degrees is ' + rad + ' radians');\n * // Prints: 45 degrees is 0.7853981633974483 radians\n *
\n * function draw() {\n * background(204);\n * angleMode(DEGREES); // Change the mode to DEGREES\n * let a = atan2(mouseY - height / 2, mouseX - width / 2);\n * translate(width / 2, height / 2);\n * push();\n * rotate(a);\n * rect(-20, -5, 40, 10); // Larger rectangle is rotating in degrees\n * pop();\n * angleMode(RADIANS); // Change the mode to RADIANS\n * rotate(a); // variable a stays the same\n * rect(-40, -5, 20, 10); // Smaller rectangle is rotating in radians\n * }\n *
\n * textSize(16);\n * textAlign(RIGHT);\n * text('ABCD', 50, 30);\n * textAlign(CENTER);\n * text('EFGH', 50, 50);\n * textAlign(LEFT);\n * text('IJKL', 50, 70);\n *
\n * textSize(16);\n * strokeWeight(0.5);\n *\n * line(0, 12, width, 12);\n * textAlign(CENTER, TOP);\n * text('TOP', 0, 12, width);\n *\n * line(0, 37, width, 37);\n * textAlign(CENTER, CENTER);\n * text('CENTER', 0, 37, width);\n *\n * line(0, 62, width, 62);\n * textAlign(CENTER, BASELINE);\n * text('BASELINE', 0, 62, width);\n *\n * line(0, 87, width, 87);\n * textAlign(CENTER, BOTTOM);\n * text('BOTTOM', 0, 87, width);\n *
\n * // Text to display. The \"\\n\" is a \"new line\" character\n * let lines = 'L1\\nL2\\nL3';\n * textSize(12);\n *\n * textLeading(10); // Set leading to 10\n * text(lines, 10, 25);\n *\n * textLeading(20); // Set leading to 20\n * text(lines, 40, 25);\n *\n * textLeading(30); // Set leading to 30\n * text(lines, 70, 25);\n *
\n * textSize(12);\n * text('Font Size 12', 10, 30);\n * textSize(14);\n * text('Font Size 14', 10, 60);\n * textSize(16);\n * text('Font Size 16', 10, 90);\n *
\n * strokeWeight(0);\n * textSize(12);\n * textStyle(NORMAL);\n * text('Font Style Normal', 10, 15);\n * textStyle(ITALIC);\n * text('Font Style Italic', 10, 40);\n * textStyle(BOLD);\n * text('Font Style Bold', 10, 65);\n * textStyle(BOLDITALIC);\n * text('Font Style Bold Italic', 10, 90);\n *
\n * textSize(28);\n *\n * let aChar = 'P';\n * let cWidth = textWidth(aChar);\n * text(aChar, 0, 40);\n * line(cWidth, 0, cWidth, 50);\n *\n * let aString = 'p5.js';\n * let sWidth = textWidth(aString);\n * text(aString, 0, 85);\n * line(sWidth, 50, sWidth, 100);\n *
\n * let base = height * 0.75;\n * let scalar = 0.8; // Different for each font\n *\n * textSize(32); // Set initial text size\n * let asc = textAscent() * scalar; // Calc ascent\n * line(0, base - asc, width, base - asc);\n * text('dp', 0, base); // Draw text on baseline\n *\n * textSize(64); // Increase text size\n * asc = textAscent() * scalar; // Recalc ascent\n * line(40, base - asc, width, base - asc);\n * text('dp', 40, base); // Draw text on baseline\n *
\n * let base = height * 0.75;\n * let scalar = 0.8; // Different for each font\n *\n * textSize(32); // Set initial text size\n * let desc = textDescent() * scalar; // Calc ascent\n * line(0, base + desc, width, base + desc);\n * text('dp', 0, base); // Draw text on baseline\n *\n * textSize(64); // Increase text size\n * desc = textDescent() * scalar; // Recalc ascent\n * line(40, base + desc, width, base + desc);\n * text('dp', 40, base); // Draw text on baseline\n *
Calling loadFont() inside preload() guarantees that the load\n * operation will have completed before setup() and draw() are called.
\n * let myFont;\n * function preload() {\n * myFont = loadFont('assets/inconsolata.otf');\n * }\n *\n * function setup() {\n * fill('#ED225D');\n * textFont(myFont);\n * textSize(36);\n * text('p5*js', 10, 50);\n * }\n *
\n * function setup() {\n * loadFont('assets/inconsolata.otf', drawText);\n * }\n *\n * function drawText(font) {\n * fill('#ED225D');\n * textFont(font, 36);\n * text('p5*js', 10, 50);\n * }\n *
You can also use the font filename string (without the file extension) to style other HTML\n * elements.
\n * function preload() {\n * loadFont('assets/inconsolata.otf');\n * }\n *\n * function setup() {\n * let myDiv = createDiv('hello there');\n * myDiv.style('font-family', 'Inconsolata');\n * }\n *
\n * textSize(32);\n * text('word', 10, 30);\n * fill(0, 102, 153);\n * text('word', 10, 60);\n * fill(0, 102, 153, 51);\n * text('word', 10, 90);\n *
\n * let s = 'The quick brown fox jumped over the lazy dog.';\n * fill(50);\n * text(s, 10, 10, 70, 80); // Text wraps within text box\n *
\n * let inconsolata;\n * function preload() {\n * inconsolata = loadFont('assets/inconsolata.otf');\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * textFont(inconsolata);\n * textSize(width / 3);\n * textAlign(CENTER, CENTER);\n * }\n * function draw() {\n * background(0);\n * let time = millis();\n * rotateX(time / 1000);\n * rotateZ(time / 1234);\n * text('p5.js', 0, 0);\n * }\n *
\n * fill(0);\n * textSize(12);\n * textFont('Georgia');\n * text('Georgia', 12, 30);\n * textFont('Helvetica');\n * text('Helvetica', 12, 60);\n *
\n * let fontRegular, fontItalic, fontBold;\n * function preload() {\n * fontRegular = loadFont('assets/Regular.otf');\n * fontItalic = loadFont('assets/Italic.ttf');\n * fontBold = loadFont('assets/Bold.ttf');\n * }\n * function setup() {\n * background(210);\n * fill(0)\n .strokeWeight(0)\n .textSize(10);\n * textFont(fontRegular);\n * text('Font Style Normal', 10, 30);\n * textFont(fontItalic);\n * text('Font Style Italic', 10, 50);\n * textFont(fontBold);\n * text('Font Style Bold', 10, 70);\n * }\n *
\n * let font;\n * let textString = 'Lorem ipsum dolor sit amet.';\n * function preload() {\n * font = loadFont('./assets/Regular.otf');\n * }\n * function setup() {\n * background(210);\n *\n * let bbox = font.textBounds(textString, 10, 30, 12);\n * fill(255);\n * stroke(0);\n * rect(bbox.x, bbox.y, bbox.w, bbox.h);\n * fill(0);\n * noStroke();\n *\n * textFont(font);\n * textSize(12);\n * text(textString, 10, 30);\n * }\n *
\n * let font;\n * function preload() {\n * font = loadFont('assets/inconsolata.otf');\n * }\n *\n * let points;\n * let bounds;\n * function setup() {\n * createCanvas(100, 100);\n * stroke(0);\n * fill(255, 104, 204);\n *\n * points = font.textToPoints('p5', 0, 0, 10, {\n * sampleFactor: 5,\n * simplifyThreshold: 0\n * });\n * bounds = font.textBounds(' p5 ', 0, 0, 10);\n * }\n *\n * function draw() {\n * background(255);\n * beginShape();\n * translate(-bounds.x * width / bounds.w, -bounds.y * height / bounds.h);\n * for (let i = 0; i < points.length; i++) {\n * let p = points[i];\n * vertex(\n * p.x * width / bounds.w +\n * sin(20 * p.y / bounds.h + millis() / 1000) * width / 30,\n * p.y * height / bounds.h\n * );\n * }\n * endShape(CLOSE);\n * }\n *
\n * function setup() {\n * var myArray = ['Mango', 'Apple', 'Papaya'];\n * print(myArray); // ['Mango', 'Apple', 'Papaya']\n *\n * append(myArray, 'Peach');\n * print(myArray); // ['Mango', 'Apple', 'Papaya', 'Peach']\n * }\n *
\n * var src = ['A', 'B', 'C'];\n * var dst = [1, 2, 3];\n * var srcPosition = 1;\n * var dstPosition = 0;\n * var length = 2;\n *\n * print(src); // ['A', 'B', 'C']\n * print(dst); // [ 1 , 2 , 3 ]\n *\n * arrayCopy(src, srcPosition, dst, dstPosition, length);\n * print(dst); // ['B', 'C', 3]\n *
\n * function setup() {\n * var arr1 = ['A', 'B', 'C'];\n * var arr2 = [1, 2, 3];\n *\n * print(arr1); // ['A','B','C']\n * print(arr2); // [1,2,3]\n *\n * var arr3 = concat(arr1, arr2);\n *\n * print(arr1); // ['A','B','C']\n * print(arr2); // [1, 2, 3]\n * print(arr3); // ['A','B','C', 1, 2, 3]\n * }\n *
\n * function setup() {\n * var myArray = ['A', 'B', 'C'];\n * print(myArray); // ['A','B','C']\n *\n * reverse(myArray);\n * print(myArray); // ['C','B','A']\n * }\n *
\n * function setup() {\n * var myArray = ['A', 'B', 'C'];\n * print(myArray); // ['A', 'B', 'C']\n * var newArray = shorten(myArray);\n * print(myArray); // ['A','B','C']\n * print(newArray); // ['A','B']\n * }\n *
\n * function setup() {\n * var regularArr = ['ABC', 'def', createVector(), TAU, Math.E];\n * print(regularArr);\n * shuffle(regularArr, true); // force modifications to passed array\n * print(regularArr);\n *\n * // By default shuffle() returns a shuffled cloned array:\n * var newArr = shuffle(regularArr);\n * print(regularArr);\n * print(newArr);\n * }\n *
\n * function setup() {\n * var words = ['banana', 'apple', 'pear', 'lime'];\n * print(words); // ['banana', 'apple', 'pear', 'lime']\n * var count = 4; // length of array\n *\n * words = sort(words, count);\n * print(words); // ['apple', 'banana', 'lime', 'pear']\n * }\n *
\n * function setup() {\n * var numbers = [2, 6, 1, 5, 14, 9, 8, 12];\n * print(numbers); // [2, 6, 1, 5, 14, 9, 8, 12]\n * var count = 5; // Less than the length of the array\n *\n * numbers = sort(numbers, count);\n * print(numbers); // [1,2,5,6,14,9,8,12]\n * }\n *
\n * function setup() {\n * var myArray = [0, 1, 2, 3, 4];\n * var insArray = ['A', 'B', 'C'];\n * print(myArray); // [0, 1, 2, 3, 4]\n * print(insArray); // ['A','B','C']\n *\n * splice(myArray, insArray, 3);\n * print(myArray); // [0,1,2,'A','B','C',3,4]\n * }\n *
\n * function setup() {\n * var myArray = [1, 2, 3, 4, 5];\n * print(myArray); // [1, 2, 3, 4, 5]\n *\n * var sub1 = subset(myArray, 0, 3);\n * var sub2 = subset(myArray, 2, 2);\n * print(sub1); // [1,2,3]\n * print(sub2); // [3,4]\n * }\n *
\n * var str = '20';\n * var diameter = float(str);\n * ellipse(width / 2, height / 2, diameter, diameter);\n *
\n * print(float('10.31')); // 10.31\n * print(float('Infinity')); // Infinity\n * print(float('-Infinity')); // -Infinity\n *
\n * print(int('10')); // 10\n * print(int(10.31)); // 10\n * print(int(-10)); // -10\n * print(int(true)); // 1\n * print(int(false)); // 0\n * print(int([false, true, '10.3', 9.8])); // [0, 1, 10, 9]\n * print(int(Infinity)); // Infinity\n * print(int('-Infinity')); // -Infinity\n *
\n * print(str('10')); // \"10\"\n * print(str(10.31)); // \"10.31\"\n * print(str(-10)); // \"-10\"\n * print(str(true)); // \"true\"\n * print(str(false)); // \"false\"\n * print(str([true, '10.3', 9.8])); // [ \"true\", \"10.3\", \"9.8\" ]\n *
\n * print(boolean(0)); // false\n * print(boolean(1)); // true\n * print(boolean('true')); // true\n * print(boolean('abcd')); // false\n * print(boolean([0, 12, 'true'])); // [false, true, true]\n *
\n * print(byte(127)); // 127\n * print(byte(128)); // -128\n * print(byte(23.4)); // 23\n * print(byte('23.4')); // 23\n * print(byte('hello')); // NaN\n * print(byte(true)); // 1\n * print(byte([0, 255, '100'])); // [0, -1, 100]\n *
\n * print(char(65)); // \"A\"\n * print(char('65')); // \"A\"\n * print(char([65, 66, 67])); // [ \"A\", \"B\", \"C\" ]\n * print(join(char([65, 66, 67]), '')); // \"ABC\"\n *
\n * print(unchar('A')); // 65\n * print(unchar(['A', 'B', 'C'])); // [ 65, 66, 67 ]\n * print(unchar(split('ABC', ''))); // [ 65, 66, 67 ]\n *
\n * print(hex(255)); // \"000000FF\"\n * print(hex(255, 6)); // \"0000FF\"\n * print(hex([0, 127, 255], 6)); // [ \"000000\", \"00007F\", \"0000FF\" ]\n * print(Infinity); // \"FFFFFFFF\"\n * print(-Infinity); // \"00000000\"\n *
\n * print(unhex('A')); // 10\n * print(unhex('FF')); // 255\n * print(unhex(['FF', 'AA', '00'])); // [ 255, 170, 0 ]\n *
\n * var array = ['Hello', 'world!'];\n * var separator = ' ';\n * var message = join(array, separator);\n * text(message, 5, 50);\n *
\n * var string = 'Hello p5js*!';\n * var regexp = 'p5js\\\\*';\n * var m = match(string, regexp);\n * text(m, 5, 50);\n *
\n * var string = 'Hello p5js*! Hello world!';\n * var regexp = 'Hello';\n * matchAll(string, regexp);\n *
\n * var myFont;\n * function preload() {\n * myFont = loadFont('assets/fonts/inconsolata.ttf');\n * }\n * function setup() {\n * background(200);\n * var num1 = 321;\n * var num2 = -1321;\n *\n * noStroke();\n * fill(0);\n * textFont(myFont);\n * textSize(22);\n *\n * text(nf(num1, 4, 2), 10, 30);\n * text(nf(num2, 4, 2), 10, 80);\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n *
\n * function setup() {\n * background(200);\n * var num = 11253106.115;\n * var numArr = [1, 1, 2];\n *\n * noStroke();\n * fill(0);\n * textSize(12);\n *\n * // Draw formatted numbers\n * text(nfc(num, 4), 10, 30);\n * text(nfc(numArr, 2), 10, 80);\n *\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n *
\n * function setup() {\n * background(200);\n * var num1 = 11253106.115;\n * var num2 = -11253106.115;\n *\n * noStroke();\n * fill(0);\n * textSize(12);\n *\n * // Draw formatted numbers\n * text(nfp(num1, 4, 2), 10, 30);\n * text(nfp(num2, 4, 2), 10, 80);\n *\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n *
\n * var myFont;\n * function preload() {\n * myFont = loadFont('assets/fonts/inconsolata.ttf');\n * }\n * function setup() {\n * background(200);\n * var num1 = 321;\n * var num2 = -1321;\n *\n * noStroke();\n * fill(0);\n * textFont(myFont);\n * textSize(22);\n *\n * // nfs() aligns num1 (positive number) with num2 (negative number) by\n * // adding a blank space in front of the num1 (positive number)\n * // [left = 4] in num1 add one 0 in front, to align the digits with num2\n * // [right = 2] in num1 and num2 adds two 0's after both numbers\n * // To see the differences check the example of nf() too.\n * text(nfs(num1, 4, 2), 10, 30);\n * text(nfs(num2, 4, 2), 10, 80);\n * // Draw dividing line\n * stroke(120);\n * line(0, 50, width, 50);\n * }\n *
\n * var names = 'Pat,Xio,Alex';\n * var splitString = split(names, ',');\n * text(splitString[0], 5, 30);\n * text(splitString[1], 5, 50);\n * text(splitString[2], 5, 70);\n *
\n * function setup() {\n * var myStr = 'Mango, Banana, Lime';\n * var myStrArr = splitTokens(myStr, ',');\n *\n * print(myStrArr); // prints : [\"Mango\",\" Banana\",\" Lime\"]\n * }\n *
\n * var string = trim(' No new lines\\n ');\n * text(string + ' here', 2, 50);\n *
\n * var d = day();\n * text('Current day: \\n' + d, 5, 50);\n *
\n * var h = hour();\n * text('Current hour:\\n' + h, 5, 50);\n *
\n * var m = minute();\n * text('Current minute: \\n' + m, 5, 50);\n *
\n * var millisecond = millis();\n * text('Milliseconds \\nrunning: \\n' + millisecond, 5, 40);\n *
\n * var m = month();\n * text('Current month: \\n' + m, 5, 50);\n *
\n * var s = second();\n * text('Current second: \\n' + s, 5, 50);\n *
\n * var y = year();\n * text('Current year: \\n' + y, 5, 50);\n *
\n * // draw a plane\n * // with width 50 and height 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * plane(50, 50);\n * }\n *
\n * // draw a spinning box\n * // with width, height and depth of 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(50);\n * }\n *
\n * // draw a sphere with radius 40\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * sphere(40);\n * }\n *
\n * // draw a spinning cylinder\n * // with radius 20 and height 50\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateZ(frameCount * 0.01);\n * cylinder(20, 50);\n * }\n *
\n * // draw a spinning cone\n * // with radius 40 and height 70\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateZ(frameCount * 0.01);\n * cone(40, 70);\n * }\n *
\n * // draw an ellipsoid\n * // with radius 30, 40 and 40.\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * ellipsoid(30, 40, 40);\n * }\n *
\n * // draw a spinning torus\n * // with ring radius 30 and tube radius 15\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * torus(30, 15);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(50);\n * stroke(255);\n * strokeWeight(4);\n * point(25, 0);\n * strokeWeight(3);\n * point(-25, 0);\n * strokeWeight(2);\n * point(0, 25);\n * strokeWeight(1);\n * point(0, -25);\n * }\n *
\n * //draw a line\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * // Use fill instead of stroke to change the color of shape.\n * fill(255, 0, 0);\n * line(10, 10, 0, 60, 60, 20);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * rotateY(0.5);\n * box(30, 50);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode();\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * // Press the spacebar to turn debugMode off!\n * if (keyIsDown(32)) {\n * noDebugMode();\n * }\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(GRID);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(AXES);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(GRID, 100, 10, 0, 0, 0);\n * }\n *\n * function draw() {\n * background(200);\n * orbitControl();\n * box(15, 30);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * camera(0, -30, 100, 0, 0, 0, 0, 1, 0);\n * normalMaterial();\n * debugMode(100, 10, 0, 0, 0, 20, 0, -40, 0);\n * }\n *\n * function draw() {\n * noStroke();\n * background(200);\n * orbitControl();\n * box(15, 30);\n * // set the stroke color and weight for the grid!\n * stroke(255, 0, 150);\n * strokeWeight(0.8);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * ambientLight(150);\n * ambientMaterial(250);\n * noStroke();\n * sphere(40);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * //move your mouse to change light direction\n * let dirX = (mouseX / width - 0.5) * 2;\n * let dirY = (mouseY / height - 0.5) * 2;\n * directionalLight(250, 250, 250, -dirX, -dirY, -1);\n * noStroke();\n * sphere(40);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * //move your mouse to change light position\n * let locX = mouseX - width / 2;\n * let locY = mouseY - height / 2;\n * // to set the light position,\n * // think of the world's coordinate as:\n * // -width/2,-height/2 -------- width/2,-height/2\n * // | |\n * // | 0,0 |\n * // | |\n * // -width/2,height/2--------width/2,height/2\n * pointLight(250, 250, 250, locX, locY, 50);\n * noStroke();\n * sphere(40);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * lights();\n * rotateX(millis() / 1000);\n * rotateY(millis() / 1000);\n * rotateZ(millis() / 1000);\n * box();\n * }\n *
\n * //draw a spinning octahedron\n * let octahedron;\n *\n * function preload() {\n * octahedron = loadModel('assets/octahedron.obj');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * model(octahedron);\n * }\n *
\n * //draw a spinning teapot\n * let teapot;\n *\n * function preload() {\n * // Load model with normalise parameter set to true\n * teapot = loadModel('assets/teapot.obj', true);\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * scale(0.4); // Scaled to make model fit into canvas\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * normalMaterial(); // For effect\n * model(teapot);\n * }\n *
\n * let mandel;\n * function preload() {\n * // load the shader definitions from files\n * mandel = loadShader('assets/shader.vert', 'assets/shader.frag');\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * // use the shader\n * shader(mandel);\n * noStroke();\n * mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n * }\n *\n * function draw() {\n * mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n * quad(-1, -1, 1, -1, 1, 1, -1, 1);\n * }\n *
\n * // the 'varying's are shared between both vertex & fragment shaders\n * let varying = 'precision highp float; varying vec2 vPos;';\n *\n * // the vertex shader is called for each vertex\n * let vs =\n * varying +\n * 'attribute vec3 aPosition;' +\n * 'void main() { vPos = (gl_Position = vec4(aPosition,1.0)).xy; }';\n *\n * // the fragment shader is called for each pixel\n * let fs =\n * varying +\n * 'uniform vec2 p;' +\n * 'uniform float r;' +\n * 'const int I = 500;' +\n * 'void main() {' +\n * ' vec2 c = p + vPos * r, z = c;' +\n * ' float n = 0.0;' +\n * ' for (int i = I; i > 0; i --) {' +\n * ' if(z.x*z.x+z.y*z.y > 4.0) {' +\n * ' n = float(i)/float(I);' +\n * ' break;' +\n * ' }' +\n * ' z = vec2(z.x*z.x-z.y*z.y, 2.0*z.x*z.y) + c;' +\n * ' }' +\n * ' gl_FragColor = vec4(0.5-cos(n*17.0)/2.0,0.5-cos(n*13.0)/2.0,0.5-cos(n*23.0)/2.0,1.0);' +\n * '}';\n *\n * let mandel;\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n *\n * // create and initialize the shader\n * mandel = createShader(vs, fs);\n * shader(mandel);\n * noStroke();\n *\n * // 'p' is the center point of the Mandelbrot image\n * mandel.setUniform('p', [-0.74364388703, 0.13182590421]);\n * }\n *\n * function draw() {\n * // 'r' is the size of the image in Mandelbrot-space\n * mandel.setUniform('r', 1.5 * exp(-6.5 * (1 + sin(millis() / 2000))));\n * quad(-1, -1, 1, -1, 1, 1, -1, 1);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(200);\n * normalMaterial();\n * sphere(40);\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * rotateZ(frameCount * 0.01);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * //pass image as texture\n * texture(img);\n * box(200, 200, 200);\n * }\n *
\n * let pg;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * pg = createGraphics(200, 200);\n * pg.textSize(75);\n * }\n *\n * function draw() {\n * background(0);\n * pg.background(255);\n * pg.text('hello!', 0, 100);\n * //pass image as texture\n * texture(pg);\n * rotateX(0.5);\n * noStroke();\n * plane(50);\n * }\n *
\n * let vid;\n * function preload() {\n * vid = createVideo('assets/fingers.mov');\n * vid.hide();\n * }\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * //pass video frame as texture\n * texture(vid);\n * rect(-40, -40, 80, 80);\n * }\n *\n * function mousePressed() {\n * vid.loop();\n * }\n *
\n * let img;\n *\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * texture(img);\n * textureMode(NORMAL);\n * beginShape();\n * vertex(-50, -50, 0, 0);\n * vertex(50, -50, 1, 0);\n * vertex(50, 50, 1, 1);\n * vertex(-50, 50, 0, 1);\n * endShape();\n * }\n *
\n * let img;\n *\n * function preload() {\n * img = loadImage('assets/laDefense.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * texture(img);\n * textureMode(NORMAL);\n * beginShape();\n * vertex(-50, -50, 0, 0);\n * vertex(50, -50, img.width, 0);\n * vertex(50, 50, img.width, img.height);\n * vertex(-50, 50, 0, img.height);\n * endShape();\n * }\n *
\n * let img;\n * function preload() {\n * img = loadImage('assets/rockies128.jpg');\n * }\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * textureWrap(MIRROR);\n * }\n *\n * function draw() {\n * background(0);\n *\n * let dX = mouseX;\n * let dY = mouseY;\n *\n * let u = lerp(1.0, 2.0, dX);\n * let v = lerp(1.0, 2.0, dY);\n *\n * scale(width / 2);\n *\n * texture(img);\n *\n * beginShape(TRIANGLES);\n * vertex(-1, -1, 0, 0, 0);\n * vertex(1, -1, 0, u, 0);\n * vertex(1, 1, 0, u, v);\n *\n * vertex(1, 1, 0, u, v);\n * vertex(-1, 1, 0, 0, v);\n * vertex(-1, -1, 0, 0, 0);\n * endShape();\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * ambientLight(200);\n * ambientMaterial(70, 130, 230);\n * sphere(40);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * ambientLight(50);\n * pointLight(250, 250, 250, 100, 100, 30);\n * specularMaterial(250);\n * sphere(40);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(0);\n * noStroke();\n * let locX = mouseX - width / 2;\n * let locY = mouseY - height / 2;\n * ambientLight(60, 60, 60);\n * pointLight(255, 255, 255, locX, locY, 50);\n * specularMaterial(250);\n * translate(-25, 0, 0);\n * shininess(1);\n * sphere(20);\n * translate(50, 0, 0);\n * shininess(20);\n * sphere(20);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n * function draw() {\n * background(204);\n * //move the camera away from the plane by a sin wave\n * camera(0, 0, 20 + sin(frameCount * 0.01) * 10, 0, 0, 0, 0, 1, 0);\n * plane(10, 10);\n * }\n *
\n * //drag the mouse to look around!\n * //you will see there's a vanishing point\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * perspective(PI / 3.0, width / height, 0.1, 500);\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * normalMaterial();\n *\n * rotateX(-0.3);\n * rotateY(-0.2);\n * translate(0, 0, -50);\n *\n * push();\n * translate(-15, 0, sin(frameCount / 30) * 95);\n * box(30);\n * pop();\n * push();\n * translate(15, 0, sin(frameCount / 30 + PI) * 95);\n * box(30);\n * pop();\n * }\n *
\n * //drag the mouse to look around!\n * //there's no vanishing point\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * ortho(-width / 2, width / 2, height / 2, -height / 2, 0, 500);\n * }\n * function draw() {\n * background(200);\n * orbitControl();\n * normalMaterial();\n *\n * rotateX(0.2);\n * rotateY(-0.2);\n * push();\n * translate(-15, 0, sin(frameCount / 30) * 65);\n * box(30);\n * pop();\n * push();\n * translate(15, 0, sin(frameCount / 30 + PI) * 65);\n * box(30);\n * pop();\n * }\n *
\n * let cam;\n * let delta = 0.01;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * // set initial pan angle\n * cam.pan(-0.8);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // pan camera according to angle 'delta'\n * cam.pan(delta);\n *\n * // every 160 frames, switch direction\n * if (frameCount % 160 === 0) {\n * delta *= -1;\n * }\n *\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n *
\n * let cam;\n * let delta = 0.01;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * // set initial tilt\n * cam.tilt(-0.8);\n * }\n *\n * function draw() {\n * background(200);\n *\n * // pan camera according to angle 'delta'\n * cam.tilt(delta);\n *\n * // every 160 frames, switch direction\n * if (frameCount % 160 === 0) {\n * delta *= -1;\n * }\n *\n * rotateY(frameCount * 0.01);\n * translate(0, -100, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * translate(0, 35, 0);\n * box(20);\n * }\n *
\n * let cam;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // look at a new random point every 60 frames\n * if (frameCount % 60 === 0) {\n * cam.lookAt(random(-100, 100), random(-50, 50), 0);\n * }\n *\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n *
\n * // see the camera move along its own axes while maintaining its orientation\n * let cam;\n * let delta = 0.5;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // move the camera along its local axes\n * cam.move(delta, delta, 0);\n *\n * // every 100 frames, switch direction\n * if (frameCount % 150 === 0) {\n * delta *= -1;\n * }\n *\n * translate(-10, -10, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * translate(15, 15, 0);\n * box(50, 8, 50);\n * }\n *
\n * // press '1' '2' or '3' keys to set camera position\n *\n * let cam;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n * cam = createCamera();\n * }\n *\n * function draw() {\n * background(200);\n *\n * // '1' key\n * if (keyIsDown(49)) {\n * cam.setPosition(30, 0, 80);\n * }\n * // '2' key\n * if (keyIsDown(50)) {\n * cam.setPosition(0, 0, 80);\n * }\n * // '3' key\n * if (keyIsDown(51)) {\n * cam.setPosition(-30, 0, 80);\n * }\n *\n * box(20);\n * }\n *
\n * let cam1, cam2;\n * let currentCamera;\n *\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * normalMaterial();\n *\n * cam1 = createCamera();\n * cam2 = createCamera();\n * cam2.setPosition(30, 0, 50);\n * cam2.lookAt(0, 0, 0);\n * cam2.ortho();\n *\n * // set variable for previously active camera:\n * currentCamera = 1;\n * }\n *\n * function draw() {\n * background(200);\n *\n * // camera 1:\n * cam1.lookAt(0, 0, 0);\n * cam1.setPosition(sin(frameCount / 60) * 200, 0, 100);\n *\n * // every 100 frames, switch between the two cameras\n * if (frameCount % 100 === 0) {\n * if (currentCamera === 1) {\n * setCamera(cam1);\n * currentCamera = 0;\n * } else {\n * setCamera(cam2);\n * currentCamera = 1;\n * }\n * }\n *\n * drawBoxes();\n * }\n *\n * function drawBoxes() {\n * rotateX(frameCount * 0.01);\n * translate(-100, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * translate(35, 0, 0);\n * box(20);\n * }\n *
\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(255);\n * push();\n * rotateZ(frameCount * 0.02);\n * rotateX(frameCount * 0.02);\n * rotateY(frameCount * 0.02);\n * fill(0, 0, 0);\n * box(50);\n * pop();\n * }\n *
\n * function setup() {\n * setAttributes('antialias', true);\n * createCanvas(100, 100, WEBGL);\n * }\n *\n * function draw() {\n * background(255);\n * push();\n * rotateZ(frameCount * 0.02);\n * rotateX(frameCount * 0.02);\n * rotateY(frameCount * 0.02);\n * fill(0, 0, 0);\n * box(50);\n * pop();\n * }\n *
\n * // press the mouse button to enable perPixelLighting\n * function setup() {\n * createCanvas(100, 100, WEBGL);\n * noStroke();\n * fill(255);\n * }\n *\n * var lights = [\n * { c: '#f00', t: 1.12, p: 1.91, r: 0.2 },\n * { c: '#0f0', t: 1.21, p: 1.31, r: 0.2 },\n * { c: '#00f', t: 1.37, p: 1.57, r: 0.2 },\n * { c: '#ff0', t: 1.12, p: 1.91, r: 0.7 },\n * { c: '#0ff', t: 1.21, p: 1.31, r: 0.7 },\n * { c: '#f0f', t: 1.37, p: 1.57, r: 0.7 }\n * ];\n *\n * function draw() {\n * var t = millis() / 1000 + 1000;\n * background(0);\n * directionalLight(color('#222'), 1, 1, 1);\n *\n * for (var i = 0; i < lights.length; i++) {\n * var light = lights[i];\n * pointLight(\n * color(light.c),\n * p5.Vector.fromAngles(t * light.t, t * light.p, width * light.r)\n * );\n * }\n *\n * specularMaterial(255);\n * sphere(width * 0.1);\n *\n * rotateX(t * 0.77);\n * rotateY(t * 0.83);\n * rotateZ(t * 0.91);\n * torus(width * 0.3, width * 0.07, 24, 10);\n * }\n *\n * function mousePressed() {\n * setAttributes('perPixelLighting', true);\n * noStroke();\n * fill(255);\n * }\n * function mouseReleased() {\n * setAttributes('perPixelLighting', false);\n * noStroke();\n * fill(255);\n * }\n *
\n * function setup() {\n * createCanvas(200, 200, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * fill(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(75, 75, 75);\n * }\n *
\n * function setup() {\n * createCanvas(200, 200, WEBGL);\n * }\n *\n * function draw() {\n * background(0);\n * stroke(240, 150, 150);\n * fill(100, 100, 240);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * box(75, 75, 75);\n * }\n *
\n * function setup() {\n * createCanvas(200, 400, WEBGL);\n * setAttributes('antialias', true);\n * }\n *\n * function draw() {\n * background(0);\n * noStroke();\n * translate(0, -100, 0);\n * stroke(240, 150, 150);\n * fill(100, 100, 240);\n * push();\n * strokeWeight(8);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * sphere(75);\n * pop();\n * push();\n * translate(0, 200, 0);\n * strokeWeight(1);\n * rotateX(frameCount * 0.01);\n * rotateY(frameCount * 0.01);\n * sphere(75);\n * pop();\n * }\n *